REntity #148
@ -56,11 +56,11 @@ public class SimulatorCursor {
|
|||||||
|
|
||||||
if (result.getHitEntity() != null) {
|
if (result.getHitEntity() != null) {
|
||||||
List<SimulatorElement> elements = tntSimulator.getEntity(result.getHitEntity());
|
List<SimulatorElement> elements = tntSimulator.getEntity(result.getHitEntity());
|
||||||
tntSimulator.hide(player, elements);
|
|
||||||
|
|
||||||
cursor = new REntityServer();
|
cursor = new REntityServer();
|
||||||
RFallingBlockEntity entity = new RFallingBlockEntity(cursor, (elements.isEmpty() ? getPos(player, result) : elements.get(0).getPosition()).toLocation(WORLD), Material.WHITE_STAINED_GLASS);
|
RFallingBlockEntity entity = new RFallingBlockEntity(cursor, (elements.isEmpty() ? getPos(player, result) : elements.get(0).getPosition()).toLocation(WORLD), Material.WHITE_STAINED_GLASS);
|
||||||
entity.setNoGravity(true);
|
entity.setNoGravity(true);
|
||||||
|
entity.setGlowing(true);
|
||||||
cursor.addPlayer(player);
|
cursor.addPlayer(player);
|
||||||
rEntityServerMap.put(player, cursor);
|
rEntityServerMap.put(player, cursor);
|
||||||
BauSystem.MESSAGE.sendPrefixless("SIMULATOR_POSITION_EDIT", player, ChatMessageType.ACTION_BAR);
|
BauSystem.MESSAGE.sendPrefixless("SIMULATOR_POSITION_EDIT", player, ChatMessageType.ACTION_BAR);
|
||||||
|
@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem;
|
|||||||
import de.steamwar.bausystem.configplayer.Config;
|
import de.steamwar.bausystem.configplayer.Config;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.TNTElementGUI;
|
import de.steamwar.bausystem.features.simulator.gui.TNTElementGUI;
|
||||||
import de.steamwar.bausystem.features.simulator.gui.TNTSimulatorGui;
|
import de.steamwar.bausystem.features.simulator.gui.TNTSimulatorGui;
|
||||||
import de.steamwar.bausystem.features.simulator.show.SimulatorEntityShowMode;
|
|
||||||
import de.steamwar.bausystem.features.simulator.tnt.SimulatorElement;
|
import de.steamwar.bausystem.features.simulator.tnt.SimulatorElement;
|
||||||
import de.steamwar.bausystem.features.simulator.tnt.TNTElement;
|
import de.steamwar.bausystem.features.simulator.tnt.TNTElement;
|
||||||
import de.steamwar.bausystem.features.simulator.tnt.TNTGroup;
|
import de.steamwar.bausystem.features.simulator.tnt.TNTGroup;
|
||||||
@ -98,28 +97,6 @@ public class TNTSimulator {
|
|||||||
players.remove(player);
|
players.remove(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hide(Player player, List<SimulatorElement> simulatorElements) {
|
|
||||||
SimulatorEntityShowMode showMode = playerShowMode.get(player);
|
|
||||||
if (showMode == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
simulatorElements.forEach(simulatorElement -> {
|
|
||||||
simulatorElement.hide(showMode);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void hide(SimulatorElement simulatorElement) {
|
|
||||||
playerShowMode.forEach((player, simulatorEntityShowMode) -> {
|
|
||||||
simulatorElement.hide(simulatorEntityShowMode);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void show(SimulatorElement simulatorElement) {
|
|
||||||
playerShowMode.forEach((player, simulatorEntityShowMode) -> {
|
|
||||||
simulatorElement.show(simulatorEntityShowMode);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<REntity> getEntities() {
|
public List<REntity> getEntities() {
|
||||||
return tntElementList.stream().flatMap(element -> element.getEntities().stream()).collect(Collectors.toList());
|
return tntElementList.stream().flatMap(element -> element.getEntities().stream()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@ -133,7 +110,6 @@ public class TNTSimulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void remove(SimulatorElement element) {
|
public void remove(SimulatorElement element) {
|
||||||
hide(element);
|
|
||||||
tntElementList.remove(element);
|
tntElementList.remove(element);
|
||||||
Set<SimulatorElement> toRemove = new HashSet<>();
|
Set<SimulatorElement> toRemove = new HashSet<>();
|
||||||
for (SimulatorElement spawn : tntElementList) {
|
for (SimulatorElement spawn : tntElementList) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren