Fix crash with lamp
This commit is contained in:
parent
7e05b0da12
commit
666e8f03b2
3 changed files with 4 additions and 3 deletions
|
@ -37,7 +37,6 @@ import reborncore.common.blocks.BlockMachineBase;
|
||||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||||
import reborncore.common.powerSystem.PowerSystem;
|
import reborncore.common.powerSystem.PowerSystem;
|
||||||
import reborncore.common.util.StringUtils;
|
import reborncore.common.util.StringUtils;
|
||||||
import team.reborn.energy.Energy;
|
|
||||||
import team.reborn.energy.EnergyTier;
|
import team.reborn.energy.EnergyTier;
|
||||||
import techreborn.blocks.generator.BlockSolarPanel;
|
import techreborn.blocks.generator.BlockSolarPanel;
|
||||||
import techreborn.init.TRBlockEntities;
|
import techreborn.init.TRBlockEntities;
|
||||||
|
|
|
@ -71,6 +71,10 @@ public class LampBlockEntity extends PowerAcceptorBlockEntity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canAcceptEnergy(final Direction direction) {
|
public boolean canAcceptEnergy(final Direction direction) {
|
||||||
|
if (world == null) {
|
||||||
|
// Blame tooltip for this
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Direction me = BlockLamp.getFacing(world.getBlockState(pos)).getOpposite();
|
Direction me = BlockLamp.getFacing(world.getBlockState(pos)).getOpposite();
|
||||||
return direction == me;
|
return direction == me;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,8 +49,6 @@ import techreborn.events.TRRecipeHandler;
|
||||||
import techreborn.init.ModSounds;
|
import techreborn.init.ModSounds;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.items.tool.ItemTreeTap;
|
import techreborn.items.tool.ItemTreeTap;
|
||||||
import techreborn.items.tool.basic.ItemElectricTreetap;
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue