Skip to content

Implement 1.9->1.8 command block translation#692

Open
Beaness wants to merge 1 commit into
ViaVersion:masterfrom
Beaness:commandblocks
Open

Implement 1.9->1.8 command block translation#692
Beaness wants to merge 1 commit into
ViaVersion:masterfrom
Beaness:commandblocks

Conversation

@Beaness

@Beaness Beaness commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #499

image

@florianreuth florianreuth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally a nice approach; Haven't done more in depth reviews but just stylistic stuff for now

});
}

private void registerBlockChangeWithCommandBlockStorage(final ClientboundPackets1_9 packetType) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can just be inlined, the helper methods only exist in rewriter base classes to reduce duplicated code.

}

private void registerMultiBlockChangeWithCommandBlockStorage(final ClientboundPackets1_9 packetType) {
protocol.registerClientbound(packetType, new PacketHandlers() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, just inline. Also would like to prevent PacketHandlers API from being used; Just a direct wrapper -> {} lambda with passthrough instead of map (and then storing in a field e.g. final int chunkX = wrapper.passthrough(Types.INT);)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emulate command block types by prefixing command input if possible

2 participants