forked from SteamWar/SteamWar
Fix interaction with trace entity not showing detail text
This commit is contained in:
+18
@@ -24,6 +24,11 @@ import de.steamwar.bausystem.configplayer.Config;
|
||||
import de.steamwar.bausystem.features.tracer.TNTPoint;
|
||||
import de.steamwar.bausystem.features.tracer.Trace;
|
||||
import de.steamwar.bausystem.features.tracer.TraceManager;
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
import de.steamwar.entity.RBlockDisplay;
|
||||
import de.steamwar.entity.RInteractionEntity;
|
||||
>>>>>>> Stashed changes
|
||||
import de.steamwar.entity.REntityServer;
|
||||
import de.steamwar.entity.RFallingBlockEntity;
|
||||
import lombok.Getter;
|
||||
@@ -55,13 +60,26 @@ public class TraceEntity extends RFallingBlockEntity {
|
||||
private final String uniqueTntIdsString;
|
||||
|
||||
private final Trace trace;
|
||||
private final RInteractionEntity hitbox;
|
||||
|
||||
public TraceEntity(REntityServer server, Location location, boolean isExplosion, List<TNTPoint> records, Trace trace) {
|
||||
super(server, location, isExplosion ? Material.RED_STAINED_GLASS : Material.TNT);
|
||||
this.records = records;
|
||||
this.trace = trace;
|
||||
uniqueTntIdsString = records.stream().map(TNTPoint::getTntId).distinct().map(Object::toString).collect(Collectors.joining(" "));
|
||||
<<<<<<< Updated upstream
|
||||
setNoGravity(true);
|
||||
=======
|
||||
hitbox = new RInteractionEntity(server, location, TNT_VISUAL_SCALE, TNT_VISUAL_SCALE, this);
|
||||
setTransform(TNT_VISUAL_TRANSFORM);
|
||||
setBlock(material.createBlockData());
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die() {
|
||||
hitbox.die();
|
||||
super.die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user