mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
dial for turning off meltdowns
This commit is contained in:
parent
93dee8ac82
commit
625b0c70ab
@ -16,7 +16,6 @@ import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -333,7 +332,5 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ public class RBMKDials {
|
||||
public static final String KEY_REASIM_MOD = "dialReasimOutputMod";
|
||||
public static final String KEY_REASIM_BOILERS = "dialReasimBoilers";
|
||||
public static final String KEY_REASIM_BOILER_SPEED = "dialReasimBoilerSpeed";
|
||||
public static final String KEY_DISABLE_MELTDOWNS = "dialEnableMeltdowns";
|
||||
|
||||
public static void createDials(World world) {
|
||||
GameRules rules = world.getGameRules();
|
||||
@ -51,6 +52,7 @@ public class RBMKDials {
|
||||
rules.setOrCreateGameRule(KEY_REASIM_MOD, "1.0");
|
||||
rules.setOrCreateGameRule(KEY_REASIM_BOILERS, "false");
|
||||
rules.setOrCreateGameRule(KEY_REASIM_BOILER_SPEED, "0.05");
|
||||
rules.setOrCreateGameRule(KEY_DISABLE_MELTDOWNS, "false");
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,4 +208,14 @@ public class RBMKDials {
|
||||
public static double getReaSimBoilerSpeed(World world) {
|
||||
return MathHelper.clamp_double(GameRuleHelper.parseDouble(world.getGameRules().getGameRuleStringValue(KEY_REASIM_BOILER_SPEED), 0.05D), 0.0D, 1.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not fuel columns should initiate a meltdown when overheating
|
||||
* The method is in reverse because the default for older worlds will be 'false'
|
||||
* @param world
|
||||
* @return
|
||||
*/
|
||||
public static boolean getMeltdownsDisabled(World world) {
|
||||
return world.getGameRules().getGameRuleBooleanValue(KEY_DISABLE_MELTDOWNS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.tileentity.machine.rbmk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
@ -11,7 +10,6 @@ import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
rod.updateHeat(worldObj, slots[0], 1.0D);
|
||||
this.heat += rod.provideHeat(worldObj, slots[0], heat, 1.0D);
|
||||
|
||||
if(this.heat > this.maxHeat()) {
|
||||
if(this.heat > this.maxHeat() && !RBMKDials.getMeltdownsDisabled(worldObj)) {
|
||||
this.meltdown();
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user