mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Add sanity check to turbine
This commit is contained in:
1 parent
bb473a3100
commit
bacd97f44a
1 file changed
+4
-2
@@ -43,6 +43,8 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
|
||||
public boolean ic2Registered = false;
|
||||
|
||||
public TurbineFluidTank fluidTank;
|
||||
|
||||
public Fluid STEAM = FluidRegistry.getFluid("steam");
|
||||
|
||||
public TileEntityTurbineValve()
|
||||
{
|
||||
@@ -368,7 +370,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
|
||||
@Override
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
if(structure == null)
|
||||
if(!canFill(from, resource != null ? resource.getFluid() : null))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -403,7 +405,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
|
||||
@Override
|
||||
public boolean canFill(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
if(fluid == FluidRegistry.getFluid("steam"))
|
||||
if(fluid == STEAM)
|
||||
{
|
||||
return ((!world.isRemote && structure != null) || (world.isRemote && clientHasStructure));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user