mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +01:00
Add null-safety check on usage of BlockEntity.loadStatic (#6224)
This commit is contained in:
parent
6802a1316b
commit
efb3cf490d
@ -298,10 +298,12 @@ public class BlockHelper {
|
||||
if (data != null) {
|
||||
if (existingBlockEntity instanceof IMergeableBE mergeable) {
|
||||
BlockEntity loaded = BlockEntity.loadStatic(target, state, data);
|
||||
if (existingBlockEntity.getType()
|
||||
.equals(loaded.getType())) {
|
||||
mergeable.accept(loaded);
|
||||
return;
|
||||
if (loaded != null) {
|
||||
if (existingBlockEntity.getType()
|
||||
.equals(loaded.getType())) {
|
||||
mergeable.accept(loaded);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
BlockEntity blockEntity = world.getBlockEntity(target);
|
||||
|
Loading…
Reference in New Issue
Block a user