corrected fluid network NPE
This commit is contained in:
parent
d0b3b6cc6a
commit
35f939fcef
1 changed files with 5 additions and 1 deletions
|
@ -68,6 +68,10 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
/** Gets the collective tank of the network */
|
||||
public FluidTank combinedStorage()
|
||||
{
|
||||
if(this.sharedTanks == null)
|
||||
{
|
||||
this.sharedTanks = new FluidTank[1];
|
||||
}
|
||||
if (this.sharedTanks[0] == null)
|
||||
{
|
||||
this.sharedTanks[0] = new FluidTank(FluidContainerRegistry.BUCKET_VOLUME);
|
||||
|
@ -78,7 +82,7 @@ public class NetworkFluidTiles extends NetworkTileEntities
|
|||
|
||||
public FluidTank combinedStorage(int index)
|
||||
{
|
||||
if (index < this.sharedTanks.length)
|
||||
if (this.sharedTanks != null && index < this.sharedTanks.length)
|
||||
{
|
||||
if (this.sharedTanks[index] == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue