diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index 92ee8a31f..57653d0d3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -332,10 +332,13 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{ } else if(ActuallyAdditions.teslaLoaded){ if(capability == TeslaUtil.teslaConsumer || capability == TeslaUtil.teslaProducer || capability == TeslaUtil.teslaHolder){ - if(this.teslaWrapper == null){ - this.teslaWrapper = new TeslaForgeUnitsWrapper(this.getEnergyStorage(facing)); + IEnergyStorage storage = this.getEnergyStorage(facing); + if(storage != null){ + if(this.teslaWrapper == null){ + this.teslaWrapper = new TeslaForgeUnitsWrapper(storage); + } + return (T)this.teslaWrapper; } - return (T)this.teslaWrapper; } } return super.getCapability(capability, facing); diff --git a/update/changelog.md b/update/changelog.md index 2dda456e4..856b35640 100644 --- a/update/changelog.md +++ b/update/changelog.md @@ -1,5 +1,6 @@ # 1.11-r83 * Fix an exception during loading some tileentities causing them to lose their data +* Fix a crash with Energy Phantomfaces and Tesla * Improve performance of Patreon display code # 1.11-r82