Multiverse-NetherPortals

Multiverse-NetherPortals

689k Downloads

The obsidian platform in the end is generated in wrong y places for MC 1.21

KagefumiMerry opened this issue · 2 comments

commented

Information

Details

I was able to reproduce my issue on a freshly setup and up-to-date server with the latest version of Multiverse plugins with no other plugins and with no kinds of other server or client mods.

Description
When player enter the end, the obsidian platform is generated wrongly above the platform generated by the Multiverse-NetherPortals.
Once Multiverse-NetherPortals plugin removed, the behavior returned to vanilla one.

Steps to reproduce

  1. Enter the end portal in the stronghold
  2. the obsidian platform is generated, but with double its thickness.
  3. all the blocks not obsidian or air are just missing

Expected behavior

  1. the obsidian platform should be generated
  2. all the blocks not obsidian or air should be the drop item entities (the 1.21 behavior)

Screenshots
2024-06-27_15 25 52

I check a bit the source code, it maybe related the NetherPortals handling in
src/main/java/com/onarandombox/MultiverseNetherPortals/listeners/MVNPEntityListener.java
src/main/java/com/onarandombox/MultiverseNetherPortals/listeners/MVNPPlayerListener.java

            } else if (toWorld.getEnvironment() == World.Environment.THE_END && type == PortalType.ENDER) {
                Location loc = new Location(event.getTo().getWorld(), 100, 50, 0); // This is the vanilla location for obsidian platform.
                event.setTo(loc);
                Block block = loc.getBlock();
                for (int x = block.getX() - 2; x <= block.getX() + 2; x++) {
                    for (int z = block.getZ() - 2; z <= block.getZ() + 2; z++) {
                        Block platformBlock = loc.getWorld().getBlockAt(x, block.getY() - 1, z);
                        if (platformBlock.getType() != Material.OBSIDIAN) {
                            platformBlock.setType(Material.OBSIDIAN);
                        }
                        for (int yMod = 1; yMod <= 3; yMod++) {
                            Block b = platformBlock.getRelative(BlockFace.UP, yMod);
                            if (b.getType() != Material.AIR) {
                                b.setType(Material.AIR);
                            }
                        }
                    }
                }
            }

Also, I need to mention that Entity spawn in a bit different position, but current spawn point command only support single type.

From Wiki:
Players who enter the End spawn at coordinates (100, 49, 0), facing west towards the main island; other entities that enter the End spawn at coordinates (100.5, 50, 0.5), in the middle of and 1 block higher than the platform

commented

Thanks for the detailed report! I’ll look in to this soon

commented

A dev build can be downloaded from "artifacts" here