mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
update holos
This commit is contained in:
@@ -19,10 +19,6 @@ hacks:
|
||||
ArmourBound:
|
||||
enabled: true
|
||||
whitelist:
|
||||
- IRON_HELMET
|
||||
- IRON_CHESTPLATE
|
||||
- IRON_LEGGINGS
|
||||
- IRON_BOOTS
|
||||
- DIAMOND_HELMET
|
||||
- DIAMOND_CHESTPLATE
|
||||
- DIAMOND_LEGGINGS
|
||||
|
||||
@@ -12,5 +12,5 @@ dependencies {
|
||||
compileOnly(project(":plugins:civmodcore-paper"))
|
||||
compileOnly(project(":plugins:namelayer-paper"))
|
||||
|
||||
compileOnly("com.comphenix.protocol:ProtocolLib:5.2.0-SNAPSHOT")
|
||||
compileOnly(files("../../ansible/src/paper-plugins/ProtocolLib.jar"))
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import java.util.TreeMap;
|
||||
import java.util.UUID;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.minecraft.world.entity.PositionMoveRotation;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@@ -168,7 +170,7 @@ public class HologramManager {
|
||||
fakeMetadata.getIntegers().write(0, hologramId);
|
||||
|
||||
List<WrappedDataValue> values = new ArrayList<>();
|
||||
values.add(new WrappedDataValue(10, WrappedDataWatcher.Registry.get(Integer.class), 2));
|
||||
values.add(new WrappedDataValue(10, WrappedDataWatcher.Registry.get(Integer.class), 4));
|
||||
values.add(new WrappedDataValue(15, WrappedDataWatcher.Registry.get(Byte.class), (byte) 3));
|
||||
values.add(new WrappedDataValue(23, WrappedDataWatcher.Registry.getChatComponentSerializer(),
|
||||
new AdventureComponent(createHoloContent())));
|
||||
@@ -223,14 +225,13 @@ public class HologramManager {
|
||||
PacketContainer fakeTeleport = protocolLib.createPacket(PacketType.Play.Server.ENTITY_TELEPORT);
|
||||
fakeTeleport.getIntegers().write(0, hologramId);
|
||||
|
||||
fakeTeleport.getDoubles()
|
||||
.write(0, updated.getX())
|
||||
.write(1, updated.getY())
|
||||
.write(2, updated.getZ());
|
||||
|
||||
fakeTeleport.getBytes()
|
||||
.write(0, (byte) 0)
|
||||
.write(1, (byte) 0);
|
||||
fakeTeleport.getModifier().withType(PositionMoveRotation.class)
|
||||
.write(0,
|
||||
new PositionMoveRotation(
|
||||
new Vec3(updated.getX(), updated.getY(), updated.getZ()),
|
||||
new Vec3(0, 0, 0),
|
||||
0,
|
||||
0));
|
||||
|
||||
fakeTeleport.getBooleans()
|
||||
.write(0, false);
|
||||
|
||||
Reference in New Issue
Block a user