mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2025-01-07 19:39:00 +01:00
24w46a
This commit is contained in:
parent
402aff9656
commit
68b8481de1
@ -27,7 +27,7 @@ import com.viaversion.viabackwards.protocol.v1_21_4to1_21_2.rewriter.EntityPacke
|
|||||||
import com.viaversion.viabackwards.protocol.v1_21_4to1_21_2.rewriter.ParticleRewriter1_21_4;
|
import com.viaversion.viabackwards.protocol.v1_21_4to1_21_2.rewriter.ParticleRewriter1_21_4;
|
||||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||||
import com.viaversion.viaversion.api.minecraft.Particle;
|
import com.viaversion.viaversion.api.minecraft.Particle;
|
||||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_2;
|
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_4;
|
||||||
import com.viaversion.viaversion.api.protocol.packet.provider.PacketTypesProvider;
|
import com.viaversion.viaversion.api.protocol.packet.provider.PacketTypesProvider;
|
||||||
import com.viaversion.viaversion.api.protocol.packet.provider.SimplePacketTypesProvider;
|
import com.viaversion.viaversion.api.protocol.packet.provider.SimplePacketTypesProvider;
|
||||||
import com.viaversion.viaversion.api.type.Types;
|
import com.viaversion.viaversion.api.type.Types;
|
||||||
@ -161,7 +161,7 @@ public final class Protocol1_21_4To1_21_2 extends BackwardsProtocol<ClientboundP
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(final UserConnection user) {
|
public void init(final UserConnection user) {
|
||||||
addEntityTracker(user, new EntityTrackerBase(user, EntityTypes1_21_2.PLAYER));
|
addEntityTracker(user, new EntityTrackerBase(user, EntityTypes1_21_4.PLAYER));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,7 +24,7 @@ import com.viaversion.viabackwards.protocol.v1_21_4to1_21_2.Protocol1_21_4To1_21
|
|||||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||||
import com.viaversion.viaversion.api.minecraft.RegistryEntry;
|
import com.viaversion.viaversion.api.minecraft.RegistryEntry;
|
||||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_2;
|
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_21_4;
|
||||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||||
import com.viaversion.viaversion.api.type.Types;
|
import com.viaversion.viaversion.api.type.Types;
|
||||||
import com.viaversion.viaversion.api.type.types.version.Types1_21_2;
|
import com.viaversion.viaversion.api.type.types.version.Types1_21_2;
|
||||||
@ -45,7 +45,7 @@ public final class EntityPacketRewriter1_21_4 extends EntityRewriter<Clientbound
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerPackets() {
|
public void registerPackets() {
|
||||||
registerTrackerWithData1_19(ClientboundPackets1_21_2.ADD_ENTITY, EntityTypes1_21_2.FALLING_BLOCK);
|
registerTrackerWithData1_19(ClientboundPackets1_21_2.ADD_ENTITY, EntityTypes1_21_4.FALLING_BLOCK);
|
||||||
registerSetEntityData(ClientboundPackets1_21_2.SET_ENTITY_DATA, Types1_21_4.ENTITY_DATA_LIST, Types1_21_2.ENTITY_DATA_LIST);
|
registerSetEntityData(ClientboundPackets1_21_2.SET_ENTITY_DATA, Types1_21_4.ENTITY_DATA_LIST, Types1_21_2.ENTITY_DATA_LIST);
|
||||||
registerRemoveEntities(ClientboundPackets1_21_2.REMOVE_ENTITIES);
|
registerRemoveEntities(ClientboundPackets1_21_2.REMOVE_ENTITIES);
|
||||||
|
|
||||||
@ -157,10 +157,10 @@ public final class EntityPacketRewriter1_21_4 extends EntityRewriter<Clientbound
|
|||||||
Types1_21_2.ENTITY_DATA_TYPES.componentType,
|
Types1_21_2.ENTITY_DATA_TYPES.componentType,
|
||||||
Types1_21_2.ENTITY_DATA_TYPES.optionalComponentType
|
Types1_21_2.ENTITY_DATA_TYPES.optionalComponentType
|
||||||
);
|
);
|
||||||
registerBlockStateHandler(EntityTypes1_21_2.ABSTRACT_MINECART, 11);
|
registerBlockStateHandler(EntityTypes1_21_4.ABSTRACT_MINECART, 11);
|
||||||
|
|
||||||
filter().type(EntityTypes1_21_2.CREAKING_TRANSIENT).removeIndex(18); // Is tearing down
|
filter().type(EntityTypes1_21_4.CREAKING).removeIndex(18); // Is tearing down
|
||||||
filter().type(EntityTypes1_21_2.SALMON).index(17).handler((event, data) -> {
|
filter().type(EntityTypes1_21_4.SALMON).index(17).handler((event, data) -> {
|
||||||
final int typeId = data.value();
|
final int typeId = data.value();
|
||||||
final String type = switch (typeId) {
|
final String type = switch (typeId) {
|
||||||
case 0 -> "small";
|
case 0 -> "small";
|
||||||
@ -171,8 +171,13 @@ public final class EntityPacketRewriter1_21_4 extends EntityRewriter<Clientbound
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMappingDataLoaded() {
|
||||||
|
mapTypes();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityType typeFromId(final int type) {
|
public EntityType typeFromId(final int type) {
|
||||||
return EntityTypes1_21_2.getTypeFromId(type);
|
return EntityTypes1_21_4.getTypeFromId(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user