Fix TNTSimulator
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
909c21415d
Commit
ba4d8e5a28
@ -46,6 +46,12 @@ class SimulatorEntity_15 extends BaseEntity_15 implements AbstractSimulatorEntit
|
|||||||
sendEntity(player);
|
sendEntity(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPosition(Vector position) {
|
||||||
|
this.position = position;
|
||||||
|
setPosition(position.getX(), position.getY(), position.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hide(Player player, boolean force) {
|
public boolean hide(Player player, boolean force) {
|
||||||
if (!force && referenceCounter.decrement() > 0) {
|
if (!force && referenceCounter.decrement() > 0) {
|
||||||
|
@ -33,7 +33,7 @@ public class BaseEntity_15 extends EntityFallingBlock implements AbstractEntity
|
|||||||
private static final Vec3D ZERO = new Vec3D(0, 0, 0);
|
private static final Vec3D ZERO = new Vec3D(0, 0, 0);
|
||||||
|
|
||||||
private final IBlockData iBlockData;
|
private final IBlockData iBlockData;
|
||||||
private final Vector position;
|
protected Vector position;
|
||||||
|
|
||||||
public BaseEntity_15(World world, Vector position, Material blockType) {
|
public BaseEntity_15(World world, Vector position, Material blockType) {
|
||||||
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ(), ((CraftBlockData) blockType.createBlockData()).getState());
|
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ(), ((CraftBlockData) blockType.createBlockData()).getState());
|
||||||
|
@ -22,11 +22,14 @@ package de.steamwar.bausystem.features.simulator;
|
|||||||
import de.steamwar.bausystem.shared.AbstractEntity;
|
import de.steamwar.bausystem.shared.AbstractEntity;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public interface AbstractSimulatorEntity extends AbstractEntity {
|
public interface AbstractSimulatorEntity extends AbstractEntity {
|
||||||
|
|
||||||
void display(Player player);
|
void display(Player player);
|
||||||
|
|
||||||
|
void setPosition(Vector position);
|
||||||
|
|
||||||
boolean hide(Player player, boolean always);
|
boolean hide(Player player, boolean always);
|
||||||
|
|
||||||
int getId();
|
int getId();
|
||||||
|
@ -329,6 +329,9 @@ public class TNTSimulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void editTNT() {
|
private void editTNT() {
|
||||||
|
hide();
|
||||||
|
entity.setPosition(position);
|
||||||
|
show();
|
||||||
SWInventory swInventory = new SWInventory(player, 54, "TNT konfigurieren");
|
SWInventory swInventory = new SWInventory(player, 54, "TNT konfigurieren");
|
||||||
|
|
||||||
// Change Count of spawned TNT
|
// Change Count of spawned TNT
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren