mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-23 02:25:19 +01:00
Transform Minecart metadata (9) to the new block format
This commit is contained in:
parent
0ada2496de
commit
acb960bfdf
@ -55,6 +55,15 @@ public class MetadataRewriter {
|
||||
metadata.setId(metadata.getId() + 1);
|
||||
}
|
||||
|
||||
// Handle Minecart inner block
|
||||
if (type.isOrHasParent(Entity1_13Types.EntityType.MINECART_ABSTRACT) && metadata.getId() == 9) {
|
||||
// New block format
|
||||
int oldId = (int) metadata.getValue();
|
||||
int combined = (((oldId & 4095) << 4) | (oldId >> 12 & 15));
|
||||
int newId = WorldPackets.toNewId(combined);
|
||||
metadata.setValue(newId);
|
||||
}
|
||||
|
||||
// Handle other changes
|
||||
if (type.is(Entity1_13Types.EntityType.AREA_EFFECT_CLOUD)) {
|
||||
if (metadata.getId() == 9 || metadata.getId() == 10 || metadata.getId() == 11) {
|
||||
|
Loading…
Reference in New Issue
Block a user