From ff4302bf2e8f680724b54de734c68814dae92c8d Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 27 Nov 2020 17:20:40 +0100 Subject: [PATCH] Fix stair rotation --- BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java b/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java index 142c402..e2998ec 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java @@ -34,6 +34,7 @@ import net.minecraft.server.v1_15_R1.BlockPosition; import net.minecraft.server.v1_15_R1.WorldServer; import org.bukkit.Bukkit; import org.bukkit.Material; +import org.bukkit.block.data.BlockData; import org.bukkit.craftbukkit.v1_15_R1.CraftWorld; import org.bukkit.craftbukkit.v1_15_R1.block.data.CraftBlockData; @@ -100,12 +101,12 @@ public class Region_15 { for(int Z = v.getBlockZ(); Z < v.getBlockZ() + dimensions.getBlockZ(); Z++){ BlockPosition blockPos = new BlockPosition(X, Y, Z); BaseBlock fullBlock = clipboard.getFullBlock(BlockVector3.at(X, Y, Z).subtract(v).add(clipboard.getRegion().getMinimumPoint())); - Material replaceTo = BukkitAdapter.adapt(fullBlock.getBlockType()); + BlockData replaceTo = BukkitAdapter.adapt(fullBlock); world.removeTileEntity(blockPos); if(replaceTo == null) world.setTypeAndData(blockPos, ((CraftBlockData)Material.AIR.createBlockData()).getState(), 1042); else - world.setTypeAndData(new BlockPosition(X, Y, Z), ((CraftBlockData)replaceTo.createBlockData()).getState(), 1042); + world.setTypeAndData(new BlockPosition(X, Y, Z), ((CraftBlockData)replaceTo).getState(), 1042); world.getChunkProvider().flagDirty(blockPos); }