Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jan 10, 2025
1 parent 072c2a7 commit 7c8093d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void register() {
final EntityTracker entityTracker = wrapper.user().get(EntityTracker.class);
final int entityId = wrapper.get(Types.INT, 0);
final byte typeId = wrapper.get(Types.BYTE, 0);
final int data = wrapper.get(Types.INT, 1);
final int data = wrapper.get(Types.INT, 4);
final EntityTypes1_8.EntityType type;
if (typeId == 70 || typeId == 71 || typeId == 74) {
type = EntityTypes1_8.ObjectType.FALLING_BLOCK.getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ public void register() {
map(Types.BYTE); // yaw
map(Types.INT); // data
handler(wrapper -> {
final int typeID = wrapper.get(Types.BYTE, 0);
int data = wrapper.get(Types.INT, 3);
if (EntityTypes1_8.ObjectType.findById(wrapper.get(Types.BYTE, 0), data) == EntityTypes1_8.ObjectType.FALLING_BLOCK) {
if (EntityTypes1_8.ObjectType.findById(typeID, data) == EntityTypes1_8.ObjectType.FALLING_BLOCK) {
final int id = data & 0xFFFF;
final int metadata = data >> 16;
final IdAndData block = new IdAndData(id, metadata);
Expand Down

0 comments on commit 7c8093d

Please sign in to comment.