Skip to content

Commit 54655e3

Browse files
authored
Fix world border lerp size set in ticks instead of millis (#1156)
1 parent 863258d commit 54655e3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_21_11to1_21_9/rewriter/BlockItemPacketRewriter1_21_11.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ public void registerPackets() {
8383
recipeRewriter.registerRecipeBookAdd(ClientboundPackets1_21_11.RECIPE_BOOK_ADD);
8484
recipeRewriter.registerPlaceGhostRecipe(ClientboundPackets1_21_11.PLACE_GHOST_RECIPE);
8585

86+
protocol.registerClientbound(ClientboundPackets1_21_11.SET_BORDER_LERP_SIZE, wrapper -> {
87+
wrapper.passthrough(Types.DOUBLE); // oldSize
88+
wrapper.passthrough(Types.DOUBLE); // newSize
89+
wrapper.write(Types.VAR_LONG, wrapper.read(Types.VAR_LONG) * 50); // lerpTime
90+
});
91+
protocol.registerClientbound(ClientboundPackets1_21_11.INITIALIZE_BORDER, wrapper -> {
92+
wrapper.passthrough(Types.DOUBLE); // newCenterX
93+
wrapper.passthrough(Types.DOUBLE); // newCenterZ
94+
wrapper.passthrough(Types.DOUBLE); // oldSize
95+
wrapper.passthrough(Types.DOUBLE); // newSize
96+
wrapper.write(Types.VAR_LONG, wrapper.read(Types.VAR_LONG) * 50); // lerpTime
97+
});
8698
protocol.registerClientbound(ClientboundPackets1_21_11.SET_TIME, wrapper -> {
8799
final long gameTime = wrapper.passthrough(Types.LONG);
88100
wrapper.user().get(GameTimeStorage.class).setGameTime(gameTime);

0 commit comments

Comments
 (0)