Added null check to right click framed wire
This commit is contained in:
parent
a0a1d68f7b
commit
1dd2151b9b
3 changed files with 494 additions and 490 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 9fb37199c4375ce8e07576cf843272355b66ad92
|
||||
Subproject commit 9ef65f568555a0b95f18f642b3306fcb3e63b1ab
|
|
@ -130,9 +130,12 @@ public class PartFramedWire extends PartAdvancedWire implements TSlottedPart, JN
|
|||
{
|
||||
System.out.println(this.getNetwork());
|
||||
}
|
||||
|
||||
TileMultipart tile = tile();
|
||||
World w = world();
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (item.getItem().itemID == Block.lever.blockID)
|
||||
{
|
||||
if (!w.isRemote)
|
||||
|
@ -153,10 +156,9 @@ public class PartFramedWire extends PartAdvancedWire implements TSlottedPart, JN
|
|||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.activate(player, part, item);
|
||||
}
|
||||
|
||||
return super.activate(player, part, item);
|
||||
}
|
||||
|
||||
public void preparePlacement(int meta)
|
||||
|
@ -378,7 +380,9 @@ public class PartFramedWire extends PartAdvancedWire implements TSlottedPart, JN
|
|||
this.getNetwork().removeConnector(this);
|
||||
this.getNetwork().split((IConductor) tile());
|
||||
}
|
||||
catch (NullPointerException e) {}
|
||||
catch (NullPointerException e)
|
||||
{
|
||||
}
|
||||
this.setNetwork(null);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ tooltip.transformer.stepDown=Step Down
|
|||
tooltip.wire.resistance=Resistance: %v
|
||||
tooltip.wire.current=Current: %v
|
||||
tooltip.wire.damage=Damage: %v
|
||||
tooltip.wire.helpText=The energy transfer rate can be increased and the energy loss may be reduced by using a higher the voltage.
|
||||
tooltip.wire.helpText=The energy transfer rate can be increased and the energy loss may be reduced by using a higher the voltage. Hold control when placing the wire to place down a framed wire.
|
||||
# %0 goes before the localized name of the shift key, %1 goes after
|
||||
tooltip.noShift=Hold %0shift %1for more information"
|
||||
# %0 is the color for the charge level, %1 is grey to reset it back to normal (optional), %v0 is the current charge, %v1 is the max charge
|
||||
|
|
Loading…
Reference in a new issue