Skip to content

Commit

Permalink
1.20.3-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Nov 30, 2023
1 parent 8a19fbd commit f556a29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
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.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.packet.ClientboundPackets1_20_3;
import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.rewriter.RecipeRewriter1_20_3;
Expand Down Expand Up @@ -116,7 +117,7 @@ public void handleCraftingShaped(final PacketWrapper wrapper) throws Exception {
wrapper.passthrough(Type.FLOAT); // Power

final int blocks = wrapper.read(Type.VAR_INT);
byte[][] toBlow = new byte[blocks][3];
final byte[][] toBlow = new byte[blocks][3];
for (int i = 0; i < blocks; i++) {
toBlow[i] = new byte[]{
wrapper.read(Type.BYTE), // Relative X
Expand All @@ -125,15 +126,15 @@ public void handleCraftingShaped(final PacketWrapper wrapper) throws Exception {
};
}

float knockbackX = wrapper.read(Type.FLOAT); // Knockback X
float knockbackY = wrapper.read(Type.FLOAT); // Knockback Y
float knockbackZ = wrapper.read(Type.FLOAT); // Knockback Z
final float knockbackX = wrapper.read(Type.FLOAT); // Knockback X
final float knockbackY = wrapper.read(Type.FLOAT); // Knockback Y
final float knockbackZ = wrapper.read(Type.FLOAT); // Knockback Z

int blockInteraction = wrapper.read(Type.VAR_INT); // Block interaction type
final int blockInteraction = wrapper.read(Type.VAR_INT); // Block interaction type
// 0 = keep, 1 = destroy, 2 = destroy_with_decay, 3 = trigger_block
if (blockInteraction == 1 || blockInteraction == 2) {
wrapper.write(Type.VAR_INT, blocks);
for (byte[] relativeXYZ : toBlow) {
for (final byte[] relativeXYZ : toBlow) {
wrapper.write(Type.BYTE, relativeXYZ[0]);
wrapper.write(Type.BYTE, relativeXYZ[1]);
wrapper.write(Type.BYTE, relativeXYZ[2]);
Expand All @@ -148,8 +149,8 @@ public void handleCraftingShaped(final PacketWrapper wrapper) throws Exception {
wrapper.write(Type.FLOAT, knockbackZ);

// TODO Probably needs handling
wrapper.read(Type.VAR_INT); // Small explosion particle
wrapper.read(Type.VAR_INT); // Large explosion particle
wrapper.read(Types1_20_3.PARTICLE); // Small explosion particle
wrapper.read(Types1_20_3.PARTICLE); // Large explosion particle
wrapper.read(Type.STRING); // Explosion sound
wrapper.read(Type.OPTIONAL_FLOAT); // Sound range
});
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=4.9.0-1.20.3-pre3-SNAPSHOT
projectVersion=4.9.0-1.20.3-rc1-SNAPSHOT

# Smile emoji
mcVersions=1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10
Expand Down

0 comments on commit f556a29

Please sign in to comment.