Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 00:22:53 +01:00
Update template
Dieser Commit ist enthalten in:
Ursprung
f90861dbce
Commit
073488abcf
@ -68,7 +68,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
|
|
||||||
wrapper.write(Type.BYTE, slot);
|
wrapper.write(Type.BYTE, slot);
|
||||||
protocol.getItemRewriter().handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2));
|
protocol.getItemRewriter().handleItemToClient(wrapper.passthrough(Type.ITEM1_20_2));
|
||||||
} while ((slot & -128) != 0);
|
} while (slot < 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
protocol.registerClientbound(ClientboundConfigurationPackets1_20_5.REGISTRY_DATA, new PacketHandlers() {
|
protocol.registerClientbound(ClientboundConfigurationPackets1_20_5.REGISTRY_DATA, new PacketHandlers() {
|
||||||
@ -171,7 +171,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
wrapper.passthrough(Type.VAR_INT); // Effect ID
|
wrapper.passthrough(Type.VAR_INT); // Effect ID
|
||||||
|
|
||||||
final int amplifier = wrapper.read(Type.VAR_INT);
|
final int amplifier = wrapper.read(Type.VAR_INT);
|
||||||
wrapper.write(Type.BYTE, (byte) MathUtil.clamp(amplifier, 0, 127));
|
wrapper.write(Type.BYTE, (byte) MathUtil.clamp(amplifier, Byte.MIN_VALUE, Byte.MAX_VALUE));
|
||||||
|
|
||||||
wrapper.passthrough(Type.VAR_INT); // Duration
|
wrapper.passthrough(Type.VAR_INT); // Duration
|
||||||
wrapper.passthrough(Type.BYTE); // Flags
|
wrapper.passthrough(Type.BYTE); // Flags
|
||||||
@ -254,7 +254,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
|||||||
mapTypes();
|
mapTypes();
|
||||||
|
|
||||||
mapEntityTypeWithData(EntityTypes1_20_5.ARMADILLO, EntityTypes1_20_5.COW).tagName();
|
mapEntityTypeWithData(EntityTypes1_20_5.ARMADILLO, EntityTypes1_20_5.COW).tagName();
|
||||||
mapEntityTypeWithData(EntityTypes1_20_5.BREEZE_WIND_CHARGE, EntityTypes1_20_5.WIND_CHARGE).jsonName();
|
mapEntityTypeWithData(EntityTypes1_20_5.BREEZE_WIND_CHARGE, EntityTypes1_20_5.WIND_CHARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -70,6 +70,7 @@ public final class Protocol1_98To1_99 extends BackwardsProtocol<ClientboundPacke
|
|||||||
soundRewriter.registerStopSound(ClientboundPackets1_20_5.STOP_SOUND);
|
soundRewriter.registerStopSound(ClientboundPackets1_20_5.STOP_SOUND);
|
||||||
|
|
||||||
new StatisticsRewriter<>(this).register(ClientboundPackets1_20_5.STATISTICS);
|
new StatisticsRewriter<>(this).register(ClientboundPackets1_20_5.STATISTICS);
|
||||||
|
new AttributeRewriter<>(this).register1_20_5(ClientboundPackets1_20_5.ENTITY_PROPERTIES);
|
||||||
|
|
||||||
// Registers translatable mappings (missing a whole bunch still)
|
// Registers translatable mappings (missing a whole bunch still)
|
||||||
//translatableRewriter.registerOpenWindow(ClientboundPackets1_20_5.OPEN_WINDOW); // Handled by registerOpenWindow in item rewriters
|
//translatableRewriter.registerOpenWindow(ClientboundPackets1_20_5.OPEN_WINDOW); // Handled by registerOpenWindow in item rewriters
|
||||||
@ -83,8 +84,6 @@ public final class Protocol1_98To1_99 extends BackwardsProtocol<ClientboundPacke
|
|||||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.SYSTEM_CHAT);
|
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.SYSTEM_CHAT);
|
||||||
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT);
|
translatableRewriter.registerComponentPacket(ClientboundPackets1_20_5.DISGUISED_CHAT);
|
||||||
translatableRewriter.registerPing();
|
translatableRewriter.registerPing();
|
||||||
|
|
||||||
// TODO Attributes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,7 +21,7 @@ import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
|
|||||||
import com.viaversion.viabackwards.template.protocol.Protocol1_98To1_99;
|
import com.viaversion.viabackwards.template.protocol.Protocol1_98To1_99;
|
||||||
import com.viaversion.viaversion.api.type.Type;
|
import com.viaversion.viaversion.api.type.Type;
|
||||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2;
|
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_20_2;
|
||||||
import com.viaversion.viaversion.api.type.types.version.Types1_20_3;
|
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3;
|
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPacket1_20_5;
|
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPacket1_20_5;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5;
|
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.packet.ClientboundPackets1_20_5;
|
||||||
@ -58,8 +58,8 @@ public final class BlockItemPacketRewriter1_99 extends ItemRewriter<ClientboundP
|
|||||||
registerTradeList1_20_5(ClientboundPackets1_20_5.TRADE_LIST);
|
registerTradeList1_20_5(ClientboundPackets1_20_5.TRADE_LIST);
|
||||||
registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
|
registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
|
||||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
|
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
|
||||||
registerSpawnParticle1_20_5(ClientboundPackets1_20_5.SPAWN_PARTICLE, Types1_20_3.PARTICLE, Types1_20_3.PARTICLE);
|
registerSpawnParticle1_20_5(ClientboundPackets1_20_5.SPAWN_PARTICLE, Types1_20_5.PARTICLE, Types1_20_5.PARTICLE);
|
||||||
registerExplosion(ClientboundPackets1_20_5.EXPLOSION, Types1_20_3.PARTICLE, Types1_20_3.PARTICLE);
|
registerExplosion(ClientboundPackets1_20_5.EXPLOSION, Types1_20_5.PARTICLE, Types1_20_5.PARTICLE);
|
||||||
|
|
||||||
new RecipeRewriter1_20_3<>(protocol).register1_20_5(ClientboundPackets1_20_5.DECLARE_RECIPES);
|
new RecipeRewriter1_20_3<>(protocol).register1_20_5(ClientboundPackets1_20_5.DECLARE_RECIPES);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren