3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Fix hologram patch not working on 1.12

Dieser Commit ist enthalten in:
Myles 2017-06-07 15:13:04 +01:00
Ursprung 2292175e9a
Commit 1cb3b985a7

Datei anzeigen

@ -3,7 +3,6 @@ package us.myles.ViaVersion.protocols.protocol1_9to1_8.storage;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import io.netty.buffer.ByteBuf;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.PacketWrapper;
@ -25,7 +24,6 @@ import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.chat.GameMode; import us.myles.ViaVersion.protocols.protocol1_9to1_8.chat.GameMode;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter; import us.myles.ViaVersion.protocols.protocol1_9to1_8.metadata.MetadataRewriter;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BossBarProvider; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BossBarProvider;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.EntityIdProvider; import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.EntityIdProvider;
import java.util.*; import java.util.*;
@ -182,14 +180,13 @@ public class EntityTracker extends StoredObject {
knownHolograms.add(entityID); knownHolograms.add(entityID);
try { try {
// Send movement // Send movement
ByteBuf buf = getUser().getChannel().alloc().buffer(); PacketWrapper wrapper = new PacketWrapper(0x25, null, getUser());
Type.VAR_INT.write(buf, 0x25); // Relative Move Packet wrapper.write(Type.VAR_INT, entityID);
Type.VAR_INT.write(buf, entityID); wrapper.write(Type.SHORT, (short) 0);
buf.writeShort(0); wrapper.write(Type.SHORT, (short) (128D * (Via.getConfig().getHologramYOffset() * 32D)));
buf.writeShort((short) (128D * (Via.getConfig().getHologramYOffset() * 32D))); wrapper.write(Type.SHORT, (short) 0);
buf.writeShort(0); wrapper.write(Type.BOOLEAN, true);
buf.writeBoolean(true); wrapper.send(Protocol1_9TO1_8.class, true, false);
getUser().sendRawPacket(buf, false);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }