API to get a BlockState without a snapshot

This allows you to get a BlockState without creating a snapshot, operating
on the real tile entity.

This is useful for where performance is needed

also Avoid NPE during CraftBlockEntityState load if could not get TE

If Tile Entity was null, correct Sign to return empty lines instead of null
This commit is contained in:
Aikar
2017-11-06 21:08:22 -05:00
parent 1d1c5a4493
commit eb20b0b160
5 changed files with 71 additions and 10 deletions

View File

@@ -177,4 +177,10 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
public String serialize() {
return CraftNBTTagConfigSerializer.serialize(this.toTagCompound());
}
// Paper start
public void clear() {
this.customDataTags.clear();
}
// Paper end
}