diff --git a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java index 53a329dd..7801e718 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/features/simulator/SimulatorEntity_15.java @@ -46,6 +46,12 @@ class SimulatorEntity_15 extends BaseEntity_15 implements AbstractSimulatorEntit sendEntity(player); } + @Override + public void setPosition(Vector position) { + this.position = position; + setPosition(position.getX(), position.getY(), position.getZ()); + } + @Override public boolean hide(Player player, boolean force) { if (!force && referenceCounter.decrement() > 0) { diff --git a/BauSystem_15/src/de/steamwar/bausystem/shared/BaseEntity_15.java b/BauSystem_15/src/de/steamwar/bausystem/shared/BaseEntity_15.java index 84befad9..aec347e4 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/shared/BaseEntity_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/shared/BaseEntity_15.java @@ -33,7 +33,7 @@ public class BaseEntity_15 extends EntityFallingBlock implements AbstractEntity private static final Vec3D ZERO = new Vec3D(0, 0, 0); private final IBlockData iBlockData; - private final Vector position; + protected Vector position; public BaseEntity_15(World world, Vector position, Material blockType) { super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ(), ((CraftBlockData) blockType.createBlockData()).getState()); diff --git a/BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java b/BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java index ec788d36..685bab26 100644 --- a/BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java +++ b/BauSystem_API/src/de/steamwar/bausystem/features/simulator/AbstractSimulatorEntity.java @@ -22,11 +22,14 @@ package de.steamwar.bausystem.features.simulator; import de.steamwar.bausystem.shared.AbstractEntity; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; +import org.bukkit.util.Vector; public interface AbstractSimulatorEntity extends AbstractEntity { void display(Player player); + void setPosition(Vector position); + boolean hide(Player player, boolean always); int getId(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java index 0f2fb064..e4452738 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java @@ -329,6 +329,9 @@ public class TNTSimulator { } private void editTNT() { + hide(); + entity.setPosition(position); + show(); SWInventory swInventory = new SWInventory(player, 54, "TNT konfigurieren"); // Change Count of spawned TNT