Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
Fix waterlogged again (the mappings were overwritten, lol)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeeey committed Apr 26, 2020
1 parent b31a67d commit aa89bdc
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public void translate(ProxySession session, MovePlayerPacket packet) {
y = Math.ceil(y * 2) / 2; // If we only do this when on ground then movement isn't so buggy
}

ClientPlayerPositionRotationPacket playerPositionRotationPacket = new ClientPlayerPositionRotationPacket(packet.isOnGround(), GenericMath.round(packet.getPosition().getX(), 4),
y, GenericMath.round(packet.getPosition().getZ(), 4), packet.getRotation().getY(), packet.getRotation().getX());
// I must admit some credit to Geyser for finding the precision loss issue
// I Googled how to not lose precision when casting a float to a double and apparently this is a good way to do it
ClientPlayerPositionRotationPacket playerPositionRotationPacket = new ClientPlayerPositionRotationPacket(packet.isOnGround(), Double.parseDouble(Float.toString(packet.getPosition().getX())),
y, Double.parseDouble(Float.toString(packet.getPosition().getZ())), packet.getRotation().getY(), packet.getRotation().getX());

session.sendRemotePacket(playerPositionRotationPacket);
}
Expand Down
81 changes: 54 additions & 27 deletions proxy/src/main/resources/mappings/1.15/block_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8825,21 +8825,24 @@
"hardness": 0.0,
"bedrock_states": {
"sea_grass_type": "default"
}
},
"waterlogged": true
},
"minecraft:tall_seagrass[half=upper]": {
"bedrock_identifier": "minecraft:seagrass",
"hardness": 0.0,
"bedrock_states": {
"sea_grass_type": "double_top"
}
},
"waterlogged": true
},
"minecraft:tall_seagrass[half=lower]": {
"bedrock_identifier": "minecraft:seagrass",
"hardness": 0.0,
"bedrock_states": {
"sea_grass_type": "double_bot"
}
},
"waterlogged": true
},
"minecraft:piston[extended=true,facing=north]": {
"bedrock_identifier": "minecraft:piston",
Expand Down Expand Up @@ -74235,28 +74238,32 @@
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 0
}
},
"waterlogged": true
},
"minecraft:kelp[age=1]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 1
}
},
"waterlogged": true
},
"minecraft:kelp[age=2]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 2
}
},
"waterlogged": true
},
"minecraft:kelp[age=3]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 3
}
},
"waterlogged": true
},
"minecraft:kelp[age=4]": {
"bedrock_identifier": "minecraft:kelp",
Expand All @@ -74277,49 +74284,56 @@
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 6
}
},
"waterlogged": true
},
"minecraft:kelp[age=7]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 7
}
},
"waterlogged": true
},
"minecraft:kelp[age=8]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 8
}
},
"waterlogged": true
},
"minecraft:kelp[age=9]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 9
}
},
"waterlogged": true
},
"minecraft:kelp[age=10]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 10
}
},
"waterlogged": true
},
"minecraft:kelp[age=11]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 11
}
},
"waterlogged": true
},
"minecraft:kelp[age=12]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 12
}
},
"waterlogged": true
},
"minecraft:kelp[age=13]": {
"bedrock_identifier": "minecraft:kelp",
Expand All @@ -74340,70 +74354,80 @@
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 15
}
},
"waterlogged": true
},
"minecraft:kelp[age=16]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 16
}
},
"waterlogged": true
},
"minecraft:kelp[age=17]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 17
}
},
"waterlogged": true
},
"minecraft:kelp[age=18]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 18
}
},
"waterlogged": true
},
"minecraft:kelp[age=19]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 19
}
},
"waterlogged": true
},
"minecraft:kelp[age=20]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 20
}
},
"waterlogged": true
},
"minecraft:kelp[age=21]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 21
}
},
"waterlogged": true
},
"minecraft:kelp[age=22]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 22
}
},
"waterlogged": true
},
"minecraft:kelp[age=23]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 23
}
},
"waterlogged": true
},
"minecraft:kelp[age=24]": {
"bedrock_identifier": "minecraft:kelp",
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 24
}
},
"waterlogged": true
},
"minecraft:kelp[age=25]": {
"bedrock_identifier": "minecraft:kelp",
Expand All @@ -74417,7 +74441,8 @@
"hardness": 0.0,
"bedrock_states": {
"kelp_age": 0
}
},
"waterlogged": true
},
"minecraft:dried_kelp_block": {
"bedrock_identifier": "minecraft:dried_kelp_block",
Expand Down Expand Up @@ -76064,14 +76089,16 @@
"hardness": 0.0,
"bedrock_states": {
"drag_down": true
}
},
"waterlogged": true
},
"minecraft:bubble_column[drag=false]": {
"bedrock_identifier": "minecraft:bubble_column",
"hardness": 0.0,
"bedrock_states": {
"drag_down": false
}
},
"waterlogged": true
},
"minecraft:polished_granite_stairs[facing=north,half=top,shape=straight,waterlogged=true]": {
"bedrock_identifier": "minecraft:polished_granite_stairs",
Expand Down

0 comments on commit aa89bdc

Please sign in to comment.