Merge pull request #1210 from KennyTV/dev

Fix minecart data
This commit is contained in:
Myles 2019-03-04 15:46:27 +00:00 committed by GitHub
commit 1cdfeadd86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,29 @@ public class EntityPackets {
if (type1_14.is(Entity1_14Types.EntityType.FALLING_BLOCK)) { if (type1_14.is(Entity1_14Types.EntityType.FALLING_BLOCK)) {
int data = wrapper.get(Type.INT, 0); int data = wrapper.get(Type.INT, 0);
wrapper.set(Type.INT, 0, Protocol1_14To1_13_2.getNewBlockStateId(data)); wrapper.set(Type.INT, 0, Protocol1_14To1_13_2.getNewBlockStateId(data));
} else if (type1_14.is(Entity1_14Types.EntityType.MINECART)) {
int data = wrapper.get(Type.INT, 0);
// default is 0 = rideable minecart
switch (data) {
case 1:
typeId = Entity1_14Types.EntityType.CHEST_MINECART.getId();
break;
case 2:
typeId = Entity1_14Types.EntityType.FURNACE_MINECART.getId();
break;
case 3:
typeId = Entity1_14Types.EntityType.TNT_MINECART.getId();
break;
case 4:
typeId = Entity1_14Types.EntityType.SPAWNER_MINECART.getId();
break;
case 5:
typeId = Entity1_14Types.EntityType.HOPPER_MINECART.getId();
break;
case 6:
typeId = Entity1_14Types.EntityType.COMMANDBLOCK_MINECART.getId();
break;
}
} }
} }