Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 09:00:09 +01:00
Ursprung
55a2a0a779
Commit
127cae80bd
@ -1,6 +1,6 @@
|
|||||||
package us.myles.ViaVersion.protocols.protocol1_17to1_16_4.packets;
|
package us.myles.ViaVersion.protocols.protocol1_17to1_16_4.packets;
|
||||||
|
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_16_2Types;
|
import us.myles.ViaVersion.api.entities.Entity1_17Types;
|
||||||
import us.myles.ViaVersion.api.type.types.version.Types1_14;
|
import us.myles.ViaVersion.api.type.types.version.Types1_14;
|
||||||
import us.myles.ViaVersion.api.type.types.version.Types1_17;
|
import us.myles.ViaVersion.api.type.types.version.Types1_17;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2;
|
||||||
@ -11,9 +11,9 @@ public class EntityPackets {
|
|||||||
|
|
||||||
public static void register(Protocol1_17To1_16_4 protocol) {
|
public static void register(Protocol1_17To1_16_4 protocol) {
|
||||||
MetadataRewriter1_17To1_16_4 metadataRewriter = protocol.get(MetadataRewriter1_17To1_16_4.class);
|
MetadataRewriter1_17To1_16_4 metadataRewriter = protocol.get(MetadataRewriter1_17To1_16_4.class);
|
||||||
metadataRewriter.registerSpawnTrackerWithData(ClientboundPackets1_16_2.SPAWN_ENTITY, Entity1_16_2Types.EntityType.FALLING_BLOCK);
|
metadataRewriter.registerSpawnTrackerWithData(ClientboundPackets1_16_2.SPAWN_ENTITY, Entity1_17Types.EntityType.FALLING_BLOCK);
|
||||||
metadataRewriter.registerTracker(ClientboundPackets1_16_2.SPAWN_MOB);
|
metadataRewriter.registerTracker(ClientboundPackets1_16_2.SPAWN_MOB);
|
||||||
metadataRewriter.registerTracker(ClientboundPackets1_16_2.SPAWN_PLAYER, Entity1_16_2Types.EntityType.PLAYER);
|
metadataRewriter.registerTracker(ClientboundPackets1_16_2.SPAWN_PLAYER, Entity1_17Types.EntityType.PLAYER);
|
||||||
metadataRewriter.registerMetadataRewriter(ClientboundPackets1_16_2.ENTITY_METADATA, Types1_14.METADATA_LIST, Types1_17.METADATA_LIST);
|
metadataRewriter.registerMetadataRewriter(ClientboundPackets1_16_2.ENTITY_METADATA, Types1_14.METADATA_LIST, Types1_17.METADATA_LIST);
|
||||||
metadataRewriter.registerEntityDestroy(ClientboundPackets1_16_2.DESTROY_ENTITIES);
|
metadataRewriter.registerEntityDestroy(ClientboundPackets1_16_2.DESTROY_ENTITIES);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.github.steveice10.opennbt.tag.builtin.Tag;
|
|||||||
import us.myles.ViaVersion.api.PacketWrapper;
|
import us.myles.ViaVersion.api.PacketWrapper;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_16_2Types;
|
import us.myles.ViaVersion.api.entities.Entity1_17Types;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
|
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||||
@ -137,7 +137,7 @@ public class WorldPackets {
|
|||||||
|
|
||||||
UserConnection user = wrapper.user();
|
UserConnection user = wrapper.user();
|
||||||
user.get(BiomeStorage.class).setWorld(world);
|
user.get(BiomeStorage.class).setWorld(world);
|
||||||
user.get(EntityTracker1_17.class).addEntity(wrapper.get(Type.INT, 0), Entity1_16_2Types.EntityType.PLAYER);
|
user.get(EntityTracker1_17.class).addEntity(wrapper.get(Type.INT, 0), Entity1_17Types.EntityType.PLAYER);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package us.myles.ViaVersion.protocols.protocol1_17to1_16_4.storage;
|
package us.myles.ViaVersion.protocols.protocol1_17to1_16_4.storage;
|
||||||
|
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_16_2Types.EntityType;
|
import us.myles.ViaVersion.api.entities.Entity1_17Types.EntityType;
|
||||||
import us.myles.ViaVersion.api.storage.EntityTracker;
|
import us.myles.ViaVersion.api.storage.EntityTracker;
|
||||||
|
|
||||||
public class EntityTracker1_17 extends EntityTracker {
|
public class EntityTracker1_17 extends EntityTracker {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren