Skip to content

Commit

Permalink
Update VV usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Aug 25, 2024
1 parent d627975 commit 6cc4990
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected void registerPackets() {
wrapper.cancel();
});
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_TAGS.getId(), -1, wrapper -> {
tagRewriter.getGenericHandler().handle(wrapper);
tagRewriter.handleGeneric(wrapper);
wrapper.user().get(ConfigurationPacketStorage.class).addRawPacket(wrapper, ClientboundPackets1_19_4.UPDATE_TAGS);
wrapper.cancel();
});
Expand Down Expand Up @@ -229,4 +229,4 @@ public ItemRewriter<Protocol1_20_2To1_20> getItemRewriter() {
public TagRewriter<ClientboundPackets1_20_2> getTagRewriter() {
return tagRewriter;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected void registerPackets() {
registerClientbound(ClientboundConfigurationPackets1_20_5.UPDATE_TAGS, wrapper -> {
// Send off registry data first, needed for tags
sendRegistryData(wrapper.user());
tagRewriter.getGenericHandler().handle(wrapper);
tagRewriter.handleGeneric(wrapper);
});

registerClientbound(ClientboundConfigurationPackets1_20_5.FINISH_CONFIGURATION, wrapper -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ public void registerPackets() {
wrapper.passthrough(Types.FLOAT); // Knockback Z
wrapper.passthrough(Types.VAR_INT); // Block interaction type

protocol.getEntityRewriter().rewriteParticle(wrapper, Types1_20_5.PARTICLE, Types1_20_3.PARTICLE); // Small explosion particle
protocol.getEntityRewriter().rewriteParticle(wrapper, Types1_20_5.PARTICLE, Types1_20_3.PARTICLE); // Large explosion particle
final Particle smallExplosionParticle = wrapper.passthroughAndMap(Types1_20_5.PARTICLE, Types1_20_3.PARTICLE);
final Particle largeExplosionParticle = wrapper.passthroughAndMap(Types1_20_5.PARTICLE, Types1_20_3.PARTICLE);
rewriteParticle(wrapper.user(), smallExplosionParticle);
rewriteParticle(wrapper.user(), largeExplosionParticle);

final Holder<SoundEvent> soundEventHolder = wrapper.read(Types.SOUND_EVENT);
if (soundEventHolder.isDirect()) {
Expand Down

0 comments on commit 6cc4990

Please sign in to comment.