forked from SteamWar/SteamWar
Merge branch 'main' into BauSystem/fix-interaction-with-trace-entity
This commit is contained in:
+16
-10
@@ -24,18 +24,17 @@ 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;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Transformation;
|
||||
import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
import yapion.hierarchy.types.YAPIONValue;
|
||||
|
||||
import java.util.List;
|
||||
@@ -46,7 +45,16 @@ import static de.steamwar.bausystem.features.util.TNTClickListener.TNT_CLICK_DET
|
||||
/**
|
||||
* Wrapper for the rendering of a record bundle
|
||||
*/
|
||||
public class TraceEntity extends RFallingBlockEntity {
|
||||
public class TraceEntity extends RBlockDisplay {
|
||||
|
||||
private static final float TNT_VISUAL_SCALE = 0.98F;
|
||||
private static final float TNT_VISUAL_OFFSET = -TNT_VISUAL_SCALE / 2.0F;
|
||||
private static final Transformation TNT_VISUAL_TRANSFORM = new Transformation(
|
||||
new Vector3f(TNT_VISUAL_OFFSET, 0.0F, TNT_VISUAL_OFFSET),
|
||||
new Quaternionf(0, 0, 0, 1),
|
||||
new Vector3f(TNT_VISUAL_SCALE, TNT_VISUAL_SCALE, TNT_VISUAL_SCALE),
|
||||
new Quaternionf(0, 0, 0, 1)
|
||||
);
|
||||
|
||||
/**
|
||||
* The records represented by this REntity
|
||||
@@ -63,17 +71,15 @@ public class TraceEntity extends RFallingBlockEntity {
|
||||
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);
|
||||
super(server, location);
|
||||
Material material = 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
|
||||
|
||||
@@ -28,6 +28,9 @@ import net.md_5.bungee.api.chat.ClickEvent
|
||||
import org.bukkit.entity.Player
|
||||
|
||||
object InviteCommand : SWCommand("invite") {
|
||||
init {
|
||||
message = de.steamwar.tntleague.message
|
||||
}
|
||||
|
||||
@Register
|
||||
fun invitePlayer(@Validator("isLeader") sender: Player, target: Player) {
|
||||
|
||||
Reference in New Issue
Block a user