Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-17 13:30:14 +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);
|
||||
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() {
|
||||
@ -171,7 +171,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
||||
wrapper.passthrough(Type.VAR_INT); // Effect ID
|
||||
|
||||
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.BYTE); // Flags
|
||||
@ -254,7 +254,7 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
|
||||
mapTypes();
|
||||
|
||||
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
|
||||
|
@ -70,6 +70,7 @@ public final class Protocol1_98To1_99 extends BackwardsProtocol<ClientboundPacke
|
||||
soundRewriter.registerStopSound(ClientboundPackets1_20_5.STOP_SOUND);
|
||||
|
||||
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)
|
||||
//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.DISGUISED_CHAT);
|
||||
translatableRewriter.registerPing();
|
||||
|
||||
// TODO Attributes
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,7 +21,7 @@ import com.viaversion.viabackwards.api.rewriters.ItemRewriter;
|
||||
import com.viaversion.viabackwards.template.protocol.Protocol1_98To1_99;
|
||||
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.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_5to1_20_3.packet.ClientboundPacket1_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);
|
||||
registerCreativeInvAction(ServerboundPackets1_20_5.CREATIVE_INVENTORY_ACTION);
|
||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_20_5.WINDOW_PROPERTY);
|
||||
registerSpawnParticle1_20_5(ClientboundPackets1_20_5.SPAWN_PARTICLE, Types1_20_3.PARTICLE, Types1_20_3.PARTICLE);
|
||||
registerExplosion(ClientboundPackets1_20_5.EXPLOSION, 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_5.PARTICLE, Types1_20_5.PARTICLE);
|
||||
|
||||
new RecipeRewriter1_20_3<>(protocol).register1_20_5(ClientboundPackets1_20_5.DECLARE_RECIPES);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren