Create default TileEntity data where required.

Fixes #1093
Fixes #1042
This commit is contained in:
dordsor21
2021-06-10 13:39:36 +01:00
parent 71130025e8
commit 7ef8b2f95e
13 changed files with 134 additions and 9 deletions

View File

@ -186,7 +186,7 @@ public interface BlockStateHolder<B extends BlockStateHolder<B>> extends TileEnt
*/
@Nullable
default CompoundTag getNbtData() {
return null;
return getBlockType().getMaterial().isTile() ? getBlockType().getMaterial().getDefaultTile() : null;
}
/**