Fixed multimeter crash
This commit is contained in:
parent
9f9bb3db52
commit
79d22687f6
2 changed files with 10 additions and 3 deletions
|
@ -41,6 +41,7 @@ import resonantinduction.electrical.wire.ItemWire;
|
|||
import resonantinduction.mechanical.process.BlockGrinderWheel;
|
||||
import resonantinduction.mechanical.process.TileGrinderWheel;
|
||||
import resonantinduction.mechanical.process.TilePurifier;
|
||||
import universalelectricity.api.CompatibilityModule;
|
||||
import calclavia.lib.content.ContentRegistry;
|
||||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.recipe.UniversalRecipe;
|
||||
|
@ -143,7 +144,7 @@ public class Electrical
|
|||
/**
|
||||
* Set reference itemstacks
|
||||
*/
|
||||
ResonantInductionTabs.ITEMSTACK = new ItemStack(blockBattery);
|
||||
ResonantInductionTabs.ITEMSTACK = new ItemStack(itemTransformer);
|
||||
|
||||
for (EnumWireMaterial material : EnumWireMaterial.values())
|
||||
{
|
||||
|
|
|
@ -224,8 +224,14 @@ public class PartMultimeter extends JCuboidPart implements IPacketReceiver, TFac
|
|||
{
|
||||
if (tileEntity instanceof IConductor)
|
||||
{
|
||||
IEnergyNetwork network = ((IConductor) tileEntity).getInstance(side.getOpposite()).getNetwork();
|
||||
return network.getLastBuffer();
|
||||
IConductor conductor = (IConductor) ((IConductor) tileEntity).getInstance(side.getOpposite());
|
||||
|
||||
if (conductor != null)
|
||||
{
|
||||
// TODO: Conductor may always return null in some cases.
|
||||
IEnergyNetwork network = conductor.getNetwork();
|
||||
return network.getLastBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
return CompatibilityModule.getEnergy(tileEntity, side);
|
||||
|
|
Loading…
Add table
Reference in a new issue