mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
null pointer fix for #5388
This commit is contained in:
1 parent
8bc38d47a7
commit
c195cd6bbb
2 files changed
+3
-1
No files matched your search
@@ -2,6 +2,7 @@ package mekanism.common.multiblock;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
@@ -24,6 +25,7 @@ public abstract class SynchronizedData<T extends SynchronizedData<T>> {
|
||||
|
||||
public boolean hasRenderer;
|
||||
|
||||
@Nullable//may be null if structure has not been fully sent
|
||||
public Coord4D renderLocation;
|
||||
|
||||
public Coord4D minLocation;
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract class TileEntityMultiblock<T extends SynchronizedData<T>> extend
|
||||
structure = getNewStructure();
|
||||
}
|
||||
|
||||
if (structure != null && clientHasStructure && isRendering) {
|
||||
if (structure != null && structure.renderLocation != null && clientHasStructure && isRendering) {
|
||||
if (!prevStructure) {
|
||||
Mekanism.proxy.doMultiblockSparkle(this, structure.renderLocation.getPos(), structure.volLength,
|
||||
structure.volWidth, structure.volHeight, tile -> MultiblockManager.areEqual(this, tile));
|
||||
|
||||
Reference in new issue
Block a user