mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #1070 from BallOfEnergy1/master
Minor addition in pollution code. (clamping values)
This commit is contained in:
commit
dd8005f60f
@ -176,9 +176,9 @@ public class PollutionHandler {
|
|||||||
} else {
|
} else {
|
||||||
data.pollution[S] *= 0.99F;
|
data.pollution[S] *= 0.99F;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.pollution[H] *= 0.999F;
|
data.pollution[H] *= 0.999F;
|
||||||
|
|
||||||
/* SPREADING */
|
/* SPREADING */
|
||||||
//apply new data to self
|
//apply new data to self
|
||||||
PollutionData newData = newPollution.get(chunk.getKey());
|
PollutionData newData = newPollution.get(chunk.getKey());
|
||||||
|
|||||||
@ -4,9 +4,15 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
import li.cil.oc.api.machine.Arguments;
|
||||||
|
import li.cil.oc.api.machine.Callback;
|
||||||
|
import li.cil.oc.api.machine.Context;
|
||||||
|
import li.cil.oc.api.network.SimpleComponent;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
public class TileEntityGeiger extends TileEntity {
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
|
public class TileEntityGeiger extends TileEntity implements SimpleComponent {
|
||||||
|
|
||||||
int timer = 0;
|
int timer = 0;
|
||||||
int ticker = 0;
|
int ticker = 0;
|
||||||
@ -57,5 +63,15 @@ public class TileEntityGeiger extends TileEntity {
|
|||||||
int rads = (int)Math.ceil(ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord));
|
int rads = (int)Math.ceil(ChunkRadiationManager.proxy.getRadiation(worldObj, xCoord, yCoord, zCoord));
|
||||||
return rads;
|
return rads;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String getComponentName() {
|
||||||
|
return "ntm_geiger";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Callback
|
||||||
|
@Optional.Method(modid = "OpenComputers")
|
||||||
|
public Object[] getRads(Context context, Arguments args) {
|
||||||
|
return new Object[] {check()};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -400,7 +400,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
|
|||||||
@Callback
|
@Callback
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getLevel(Context context, Arguments args) {
|
public Object[] getLevel(Context context, Arguments args) {
|
||||||
return new Object[] {level};
|
return new Object[] {level * 100};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Callback
|
@Callback
|
||||||
|
|||||||
@ -383,10 +383,10 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] getSteamType(Context context, Arguments args) {
|
public Object[] getSteamType(Context context, Arguments args) {
|
||||||
FluidType type = steam.getTankType();
|
FluidType type = steam.getTankType();
|
||||||
if(type == Fluids.STEAM) {return new Object[] {"0"};}
|
if(type == Fluids.STEAM) {return new Object[] {0};}
|
||||||
else if(type == Fluids.HOTSTEAM) {return new Object[] {"1"};}
|
else if(type == Fluids.HOTSTEAM) {return new Object[] {1};}
|
||||||
else if(type == Fluids.SUPERHOTSTEAM) {return new Object[] {"2"};}
|
else if(type == Fluids.SUPERHOTSTEAM) {return new Object[] {2};}
|
||||||
else if(type == Fluids.ULTRAHOTSTEAM) {return new Object[] {"3"};}
|
else if(type == Fluids.ULTRAHOTSTEAM) {return new Object[] {3};}
|
||||||
else {return new Object[] {"Unknown Error"};}
|
else {return new Object[] {"Unknown Error"};}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,16 +401,16 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
}
|
}
|
||||||
if(type == 0) {
|
if(type == 0) {
|
||||||
steam.setTankType(Fluids.STEAM);
|
steam.setTankType(Fluids.STEAM);
|
||||||
return new Object[] {"true"};
|
return new Object[] {true};
|
||||||
} else if(type == 1) {
|
} else if(type == 1) {
|
||||||
steam.setTankType(Fluids.HOTSTEAM);
|
steam.setTankType(Fluids.HOTSTEAM);
|
||||||
return new Object[] {"true"};
|
return new Object[] {true};
|
||||||
} else if(type == 2) {
|
} else if(type == 2) {
|
||||||
steam.setTankType(Fluids.SUPERHOTSTEAM);
|
steam.setTankType(Fluids.SUPERHOTSTEAM);
|
||||||
return new Object[] {"true"};
|
return new Object[] {true};
|
||||||
} else {
|
} else {
|
||||||
steam.setTankType(Fluids.ULTRAHOTSTEAM);
|
steam.setTankType(Fluids.ULTRAHOTSTEAM);
|
||||||
return new Object[] {"true"};
|
return new Object[] {true};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user