Merge pull request #995 from creeper123123321/master

Rewrite arrow metadata and remove 0x10 metadata flag in 1.12.2 -> 1.13
This commit is contained in:
Myles 2018-08-23 21:33:38 +01:00 committed by GitHub
commit 0a8f740a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -31,8 +31,8 @@ public class MetadataRewriter {
int data = (int) metadata.getValue();
metadata.setValue(Protocol1_13_1To1_13.getNewBlockStateId(data));
}
if(type.is(EntityType.ITEM)){
if (type.isOrHasParent(EntityType.ABSTRACT_ARROW) && metadata.getId() >= 7) {
metadata.setId(metadata.getId() + 1); // New shooter UUID
}
} catch (Exception e) {
metadatas.remove(metadata);

View File

@ -79,6 +79,11 @@ public class MetadataRewriter {
if (metadata.getId() >= 9)
metadatas.remove(metadata); // Remove
}
if (metadata.getId() == 0) {
metadata.setValue((byte) ((byte) metadata.getValue() & ~0x10)); // Previously unused, now swimming
}
// TODO: Boat has changed
} catch (Exception e) {
metadatas.remove(metadata);