Merge pull request #437 from JOO200/master

Add check for unchanged materials in BlockBagExtent
Dieser Commit ist enthalten in:
Matthew Miller 2018-12-06 15:07:14 +10:00 committet von GitHub
Commit b1d8d4901d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -86,6 +86,7 @@ public class BlockBagExtent extends AbstractDelegateExtent {
if (blockBag != null) { if (blockBag != null) {
BlockState existing = getExtent().getBlock(position); BlockState existing = getExtent().getBlock(position);
if (!block.getBlockType().equals(existing.getBlockType())) {
if (!block.getBlockType().getMaterial().isAir()) { if (!block.getBlockType().getMaterial().isAir()) {
try { try {
blockBag.fetchPlacedBlock(block.toImmutableState()); blockBag.fetchPlacedBlock(block.toImmutableState());
@ -108,6 +109,7 @@ public class BlockBagExtent extends AbstractDelegateExtent {
} }
} }
} }
}
return super.setBlock(position, block); return super.setBlock(position, block);
} }