Updated Via* API usage

This commit is contained in:
FlorianMichael 2024-01-29 18:21:28 +01:00
parent b9313d3464
commit 6bf3eae7e4
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
3 changed files with 17 additions and 17 deletions

View File

@ -23,8 +23,8 @@ repositories {
}
dependencies {
compileOnly "com.viaversion:viaversion-common:4.10.0-23w51b-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:4.10.0-23w51b-SNAPSHOT"
compileOnly "com.viaversion:viaversion-common:4.10.0-24w04a-SNAPSHOT"
compileOnly "com.viaversion:viabackwards-common:4.10.0-24w04a-SNAPSHOT"
compileOnly "org.yaml:snakeyaml:2.2"
compileOnly "com.google.guava:guava:33.0.0-jre"
compileOnly "io.netty:netty-handler:4.1.106.Final"

View File

@ -27,19 +27,19 @@ import net.raphimc.viaaprilfools.protocols.protocol1_14to3D_Shareware.Protocol1_
public class BlockItemPackets3D_Shareware extends ItemRewriter<ClientboundPackets3D_Shareware, ServerboundPackets1_14, Protocol1_14to3D_Shareware> {
public BlockItemPackets3D_Shareware(Protocol1_14to3D_Shareware protocol) {
super(protocol);
super(protocol, Type.ITEM1_13_2, Type.ITEM1_13_2_SHORT_ARRAY);
}
@Override
protected void registerPackets() {
this.registerSetCooldown(ClientboundPackets3D_Shareware.COOLDOWN);
this.registerWindowItems(ClientboundPackets3D_Shareware.WINDOW_ITEMS, Type.ITEM1_13_2_SHORT_ARRAY);
this.registerSetSlot(ClientboundPackets3D_Shareware.SET_SLOT, Type.ITEM1_13_2);
this.registerEntityEquipment(ClientboundPackets3D_Shareware.ENTITY_EQUIPMENT, Type.ITEM1_13_2);
this.registerAdvancements(ClientboundPackets3D_Shareware.ADVANCEMENTS, Type.ITEM1_13_2);
this.registerClickWindow(ServerboundPackets1_14.CLICK_WINDOW, Type.ITEM1_13_2);
this.registerCreativeInvAction(ServerboundPackets1_14.CREATIVE_INVENTORY_ACTION, Type.ITEM1_13_2);
this.registerSpawnParticle(ClientboundPackets3D_Shareware.SPAWN_PARTICLE, Type.ITEM1_13_2, Type.FLOAT);
this.registerWindowItems(ClientboundPackets3D_Shareware.WINDOW_ITEMS);
this.registerSetSlot(ClientboundPackets3D_Shareware.SET_SLOT);
this.registerEntityEquipment(ClientboundPackets3D_Shareware.ENTITY_EQUIPMENT);
this.registerAdvancements(ClientboundPackets3D_Shareware.ADVANCEMENTS);
this.registerClickWindow(ServerboundPackets1_14.CLICK_WINDOW);
this.registerCreativeInvAction(ServerboundPackets1_14.CREATIVE_INVENTORY_ACTION);
this.registerSpawnParticle(ClientboundPackets3D_Shareware.SPAWN_PARTICLE, Type.FLOAT);
this.protocol.registerClientbound(ClientboundPackets3D_Shareware.TRADE_LIST, new PacketHandlers() {
public void register() {

View File

@ -41,19 +41,19 @@ import java.util.Map;
public class BlockItemPackets20w14infinite extends ItemRewriter<ClientboundPackets20w14infinite, ServerboundPackets1_16, Protocol1_16to20w14infinite> {
public BlockItemPackets20w14infinite(Protocol1_16to20w14infinite protocol) {
super(protocol);
super(protocol, Type.ITEM1_13_2, Type.ITEM1_13_2_SHORT_ARRAY);
}
@Override
protected void registerPackets() {
this.registerSetCooldown(ClientboundPackets20w14infinite.COOLDOWN);
this.registerWindowItems(ClientboundPackets20w14infinite.WINDOW_ITEMS, Type.ITEM1_13_2_SHORT_ARRAY);
this.registerSetSlot(ClientboundPackets20w14infinite.SET_SLOT, Type.ITEM1_13_2);
this.registerWindowItems(ClientboundPackets20w14infinite.WINDOW_ITEMS);
this.registerSetSlot(ClientboundPackets20w14infinite.SET_SLOT);
this.registerTradeList(ClientboundPackets20w14infinite.TRADE_LIST);
this.registerAdvancements(ClientboundPackets20w14infinite.ADVANCEMENTS, Type.ITEM1_13_2);
this.registerSpawnParticle(ClientboundPackets20w14infinite.SPAWN_PARTICLE, Type.ITEM1_13_2, Type.DOUBLE);
this.registerClickWindow(ServerboundPackets1_16.CLICK_WINDOW, Type.ITEM1_13_2);
this.registerCreativeInvAction(ServerboundPackets1_16.CREATIVE_INVENTORY_ACTION, Type.ITEM1_13_2);
this.registerAdvancements(ClientboundPackets20w14infinite.ADVANCEMENTS);
this.registerSpawnParticle(ClientboundPackets20w14infinite.SPAWN_PARTICLE, Type.DOUBLE);
this.registerClickWindow(ServerboundPackets1_16.CLICK_WINDOW);
this.registerCreativeInvAction(ServerboundPackets1_16.CREATIVE_INVENTORY_ACTION);
final BlockRewriter<ClientboundPackets20w14infinite> blockRewriter = new BlockRewriter<>(this.protocol, Type.POSITION1_14);
blockRewriter.registerBlockAction(ClientboundPackets20w14infinite.BLOCK_ACTION);
blockRewriter.registerBlockChange(ClientboundPackets20w14infinite.BLOCK_CHANGE);