hee hee hee haa

This commit is contained in:
Boblet 2026-03-05 15:40:44 +01:00
parent 341bc38a09
commit 10168b945d
47 changed files with 269 additions and 80 deletions

View File

@ -1,3 +1,10 @@
## Added
* Reasim RBMK control rods
* Come in manual and auto variants, but not moderated
* The same as standard control rods, except they need 5kHE/t
* Have only a single cable connection at the bottom
* Replace standard RBMK control rods when 528 mode is enabled
## Changed
* Updated RBMK visuals
* The indentations on most RBMK passive elements have been removed, heavily reducing tri count and allowing face culling, making RBMKs render much more efficiently
@ -11,6 +18,8 @@
* This means that things like 2x2 jungle trees can now be automated
* Annihilating radioactive items now creates that item's radiation value x5 as chunk radiation
* The maximum per tick is a 1000 RAD/s increase to prevent world-destroying radiation levels from annihilating demon cores
* The water door now has a skin that isn't rusted with less contrast
* The containment door now has a lead-colored skin with a trefoil on it
## Fixed
* Fixed NBTStack serialization omitting the stack size most of the time, preventing deserialization (mainly in the precision assembler config)
@ -19,4 +28,5 @@
* Fixed tool abilities switching when clicking on a block with a special interaction
* Fixed outdated info on the QMAW pages involving AA and BSCCO due to the fusion reactor update
* Fixed ammo container giving 9mm instead of .22 for the akimbo target pistols
* Fixed RBMK control rods incorrectly showing up in the red group when no group is set
* Fixed RBMK control rods incorrectly showing up in the red group when no group is set
* Fixed fluid output direction being incorrect on boilers, causing them to break with pipe anchors

View File

@ -1083,6 +1083,8 @@ public class ModBlocks {
public static Block rbmk_control;
public static Block rbmk_control_mod;
public static Block rbmk_control_auto;
public static Block rbmk_control_reasim;
public static Block rbmk_control_reasim_auto;
public static Block rbmk_blank;
public static Block rbmk_boiler;
public static Block rbmk_reflector;
@ -2100,6 +2102,8 @@ public class ModBlocks {
rbmk_control = new RBMKControl(false).setBlockName("rbmk_control").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control");
rbmk_control_mod = new RBMKControl(true).setBlockName("rbmk_control_mod").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_mod");
rbmk_control_auto = new RBMKControlAuto().setBlockName("rbmk_control_auto").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_auto");
rbmk_control_reasim = new RBMKControl(false).setBlockName("rbmk_control_reasim").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_reasim");
rbmk_control_reasim_auto = new RBMKControlAuto().setBlockName("rbmk_control_reasim_auto").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_control_reasim_auto");
rbmk_blank = new RBMKBlank().setBlockName("rbmk_blank").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_blank");
rbmk_boiler = new RBMKBoiler().setBlockName("rbmk_boiler").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_boiler");
rbmk_reflector = new RBMKReflector().setBlockName("rbmk_reflector").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_reflector");
@ -3089,6 +3093,8 @@ public class ModBlocks {
GameRegistry.registerBlock(rbmk_control, rbmk_control.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_mod, rbmk_control_mod.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_auto, rbmk_control_auto.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_reasim, rbmk_control_reasim.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_control_reasim_auto, rbmk_control_reasim_auto.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_blank, rbmk_blank.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_boiler, rbmk_boiler.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_reflector, rbmk_reflector.getUnlocalizedName());

View File

@ -1,10 +1,13 @@
package com.hbm.blocks.generic;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.BlockPillar;
import com.hbm.items.ModItems;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -38,5 +41,12 @@ public class BlockForgottenLock extends BlockPillar {
public static void generate(World world, int x, int y, int z, int meta, ForgeDirection dir) {
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
int len = 15;
for(int w = -2; w <= 2; w++) for(int h = -2; h <= 2; h++) for(int d = 0; d < len; d++) {
Block b = (w == -2 || w == 2 || h == -2 || h == 2 || d == len - 1) ? ModBlocks.brick_forgotten : Blocks.air;
world.setBlock(x - dir.offsetX * d + rot.offsetX * w, y + h, z - dir.offsetZ * d + rot.offsetZ * w, b);
}
}
}

View File

@ -64,13 +64,18 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
if(renderLid != LID_NONE && side > 1) return true;
return super.shouldSideBeRendered(world, x, y, z, side);
}
public boolean hasOwnLid() {
return this == ModBlocks.rbmk_control || this == ModBlocks.rbmk_control_auto || this == ModBlocks.rbmk_control_mod ||
this == ModBlocks.rbmk_control_reasim || this == ModBlocks.rbmk_control_reasim_auto;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName() + "_side");
this.textureTop = reg.registerIcon(this.getTextureName() + "_top");
if(this == ModBlocks.rbmk_control || this == ModBlocks.rbmk_control_auto || this == ModBlocks.rbmk_control_mod) return;
if(hasOwnLid()) return;
this.coverTextureTop = reg.registerIcon(this.getTextureName() + "_cover_top");
this.coverTextureSide = reg.registerIcon(this.getTextureName() + "_cover_side");
this.glassTextureTop = reg.registerIcon(this.getTextureName() + "_glass_top");
@ -80,8 +85,10 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(renderLid == LID_STANDARD) return side == 0 || side == 1 ? coverTextureTop : coverTextureSide;
if(renderLid == LID_GLASS) return side == 0 || side == 1 ? glassTextureTop : glassTextureSide;
if(!hasOwnLid()) {
if(renderLid == LID_STANDARD) return side == 0 || side == 1 ? coverTextureTop : coverTextureSide;
if(renderLid == LID_GLASS) return side == 0 || side == 1 ? glassTextureTop : glassTextureSide;
}
return side == 0 || side == 1 ? textureTop : blockIcon;
}
@ -97,34 +104,24 @@ public abstract class RBMKBase extends BlockDummyable implements IToolable, ILoo
public boolean openInv(World world, int x, int y, int z, EntityPlayer player) {
if(world.isRemote) {
return true;
}
if(world.isRemote) return true;
int[] pos = this.findCore(world, x, y, z);
if(pos == null)
return false;
if(pos == null) return false;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntityRBMKBase))
return false;
if(!(te instanceof TileEntityRBMKBase)) return false;
TileEntityRBMKBase rbmk = (TileEntityRBMKBase) te;
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKLid) {
if(!rbmk.hasLid())
return false;
if(!rbmk.hasLid()) return false;
}
if(!player.isSneaking()) {
if(!player.isSneaking())
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
return true;
} else {
return true;
}
return true;
}
@Override

View File

@ -1,21 +1,42 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class RBMKControl extends RBMKPipedBase {
public boolean moderated = false;
public IIcon textureBottom;
public RBMKControl(boolean moderated) {
super();
this.moderated = moderated;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
if(this == ModBlocks.rbmk_control_reasim)
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(this.renderLid == LID_NONE && this == ModBlocks.rbmk_control_reasim && side == 0) return textureBottom;
return super.getIcon(side, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset) return new TileEntityRBMKControlManual();

View File

@ -1,19 +1,39 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.ModBlocks;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlAuto;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class RBMKControlAuto extends RBMKPipedBase {
public IIcon textureBottom;
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
if(this == ModBlocks.rbmk_control_reasim_auto)
this.textureBottom = reg.registerIcon(this.getTextureName() + "_bottom");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
if(this.renderLid == LID_NONE && this == ModBlocks.rbmk_control_reasim_auto && side == 0) return textureBottom;
return super.getIcon(side, meta);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= this.offset)
return new TileEntityRBMKControlAuto();
if(meta >= this.offset) return new TileEntityRBMKControlAuto();
return null;
}

View File

@ -7,6 +7,7 @@ import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
import com.hbm.util.BobMathUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -33,6 +34,10 @@ public class GUIRBMKControl extends GuiInfoContainer {
super.drawScreen(mouseX, mouseY, f);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 71, guiTop + 29, 16, 56, mouseX, mouseY, new String[]{ (int)(rod.level * 100) + "%" } );
if(rod.isPowered()) {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 87, guiTop + 21, 16, 16, mouseX, mouseY, new String[]{ BobMathUtil.getShortNumber(rod.power) + " / " + BobMathUtil.getShortNumber(rod.maxPower) + "HE" } );
}
}
@Override
@ -85,5 +90,9 @@ public class GUIRBMKControl extends GuiInfoContainer {
drawTexturedModalRect(guiLeft + 28, guiTop + 26 + color * 11, 184, color * 10, 12, 10);
}
if(rod.isPowered()) {
drawTexturedModalRect(guiLeft + 87, guiTop + 21, 196, rod.hasPower ? 16 : 0, 16, 16);
}
}
}

View File

@ -9,6 +9,7 @@ import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlAuto;
import com.hbm.util.BobMathUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
@ -64,6 +65,10 @@ public class GUIRBMKControlAuto extends GuiInfoContainer {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 124, guiTop + 29, 16, 56, mouseX, mouseY, new String[]{ (int)(rod.level * 100) + "%" } );
if(rod.isPowered()) {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 136, guiTop + 21, 16, 16, mouseX, mouseY, new String[]{ BobMathUtil.getShortNumber(rod.power) + " / " + BobMathUtil.getShortNumber(rod.maxPower) + "HE" } );
}
String func = "Function: ";
switch(rod.function) {
@ -155,6 +160,10 @@ public class GUIRBMKControlAuto extends GuiInfoContainer {
int f = rod.function.ordinal();
drawTexturedModalRect(guiLeft + 59, guiTop + 27, 184, f * 19, 26, 19);
if(rod.isPowered()) {
drawTexturedModalRect(guiLeft + 136, guiTop + 21, 210, rod.hasPower ? 16 : 0, 16, 16);
}
for(int i = 0; i < 4; i++) {
this.fields[i].drawTextBox();
}

View File

@ -3142,6 +3142,21 @@ public class ModItems {
rbmk_pellet_zfb_am_mix = (ItemRBMKPellet) new ItemRBMKPellet("Zirconium Fast Breeder - HEP-241#MEA").setUnlocalizedName("rbmk_pellet_zfb_am_mix").setTextureName(RefStrings.MODID + ":rbmk_pellet_zfb_am_mix");
rbmk_pellet_drx = (ItemRBMKPellet) new ItemRBMKPellet(EnumChatFormatting.OBFUSCATED + "can't you hear, can't you hear the thunder?").setUnlocalizedName("rbmk_pellet_drx").setTextureName(RefStrings.MODID + ":rbmk_pellet_drx");
int tintUranium = 0x868D82;
int tintNeptunium = 0x757E73;
int tintPlutonium = 0x656E6B;
int tintAmericium = 0xA88A8F;
int tintThorium = 0x665448;
int tintZirconium = 0xAAA36A;
int tintSchrabidium = 0x2D9A94;
int tintPolonium = 0x563A26;
int tintRadium = 0xB3B6AD;
int tintAustralium = 0xFFEE00;
int tintFlashgold = 0xDC9613;
int tintFlashlead = 0x7B7B87;
int tintBalefire = 0xB2FF1B;
int tintDRX = 0xD77276;
rbmk_fuel_empty = new Item().setUnlocalizedName("rbmk_fuel_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_fuel_empty");
rbmk_fuel_ueu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ueu)
.setYield(100000000D)
@ -3150,7 +3165,7 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
.setHeat(0.65) //0.5 is too much of a nerf in heat; pu239 buildup justifies it being on par with MEU ig
.setMeltingPoint(2865)
.setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu");
.setTint(tintUranium).setUnlocalizedName("rbmk_fuel_ueu").setTextureName(RefStrings.MODID + ":rbmk_fuel_ueu");
rbmk_fuel_meu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_meu)
.setYield(100000000D)
.setStats(20)
@ -3158,20 +3173,20 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
.setHeat(0.65) //0.75 was a bit too much...
.setMeltingPoint(2865)
.setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
.setTint(tintUranium).setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
rbmk_fuel_heu233 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu233)
.setYield(100000000D)
.setStats(27.5D)
.setFunction(EnumBurnFunc.LINEAR)
.setHeat(1.25D)
.setMeltingPoint(2865)
.setUnlocalizedName("rbmk_fuel_heu233").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu233");
.setTint(tintUranium).setUnlocalizedName("rbmk_fuel_heu233").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu233");
rbmk_fuel_heu235 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heu235)
.setYield(100000000D)
.setStats(50) //Consistency with HEN; its critical mass is too high to justify a linear function
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setMeltingPoint(2865)
.setUnlocalizedName("rbmk_fuel_heu235").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu235");
.setTint(tintUranium).setUnlocalizedName("rbmk_fuel_heu235").setTextureName(RefStrings.MODID + ":rbmk_fuel_heu235");
rbmk_fuel_thmeu = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_thmeu)
.setYield(100000000D)
.setStats(20)
@ -3179,7 +3194,7 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.BOOSTED_SLOPE)
.setHeat(0.65D) //Consistency with MEU
.setMeltingPoint(3350)
.setUnlocalizedName("rbmk_fuel_thmeu").setTextureName(RefStrings.MODID + ":rbmk_fuel_thmeu");
.setTint(tintThorium).setUnlocalizedName("rbmk_fuel_thmeu").setTextureName(RefStrings.MODID + ":rbmk_fuel_thmeu");
rbmk_fuel_lep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_lep)
.setYield(100000000D)
.setStats(35)
@ -3187,27 +3202,27 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
.setHeat(0.75D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_lep").setTextureName(RefStrings.MODID + ":rbmk_fuel_lep");
.setTint(tintPlutonium).setUnlocalizedName("rbmk_fuel_lep").setTextureName(RefStrings.MODID + ":rbmk_fuel_lep");
rbmk_fuel_mep = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mep)
.setYield(100000000D)
.setStats(35)
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_mep").setTextureName(RefStrings.MODID + ":rbmk_fuel_mep");
.setTint(tintPlutonium).setUnlocalizedName("rbmk_fuel_mep").setTextureName(RefStrings.MODID + ":rbmk_fuel_mep");
rbmk_fuel_hep239 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep239)
.setYield(100000000D)
.setStats(30)
.setFunction(EnumBurnFunc.LINEAR)
.setHeat(1.25D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_hep").setTextureName(RefStrings.MODID + ":rbmk_fuel_hep");
.setTint(tintPlutonium).setUnlocalizedName("rbmk_fuel_hep").setTextureName(RefStrings.MODID + ":rbmk_fuel_hep");
rbmk_fuel_hep241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hep241)
.setYield(100000000D)
.setStats(40)
.setFunction(EnumBurnFunc.LINEAR)
.setHeat(1.75D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_hep241").setTextureName(RefStrings.MODID + ":rbmk_fuel_hep241");
.setTint(tintPlutonium).setUnlocalizedName("rbmk_fuel_hep241").setTextureName(RefStrings.MODID + ":rbmk_fuel_hep241");
rbmk_fuel_lea = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_lea)
.setYield(100000000D)
.setStats(60, 10)
@ -3215,14 +3230,14 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
.setHeat(1.5D)
.setMeltingPoint(2386)
.setUnlocalizedName("rbmk_fuel_lea").setTextureName(RefStrings.MODID + ":rbmk_fuel_lea");
.setTint(tintAmericium).setUnlocalizedName("rbmk_fuel_lea").setTextureName(RefStrings.MODID + ":rbmk_fuel_lea");
rbmk_fuel_mea = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mea)
.setYield(100000000D)
.setStats(35D, 20)
.setFunction(EnumBurnFunc.ARCH)
.setHeat(1.75D)
.setMeltingPoint(2386)
.setUnlocalizedName("rbmk_fuel_mea").setTextureName(RefStrings.MODID + ":rbmk_fuel_mea");
.setTint(tintAmericium).setUnlocalizedName("rbmk_fuel_mea").setTextureName(RefStrings.MODID + ":rbmk_fuel_mea");
rbmk_fuel_hea241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hea241)
.setYield(100000000D)
.setStats(65, 15)
@ -3230,14 +3245,14 @@ public class ModItems {
.setHeat(1.85D)
.setMeltingPoint(2386)
.setNeutronTypes(NType.FAST, NType.FAST)
.setUnlocalizedName("rbmk_fuel_hea241").setTextureName(RefStrings.MODID + ":rbmk_fuel_hea241");
.setTint(tintAmericium).setUnlocalizedName("rbmk_fuel_hea241").setTextureName(RefStrings.MODID + ":rbmk_fuel_hea241");
rbmk_fuel_hea242 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hea242)
.setYield(100000000D)
.setStats(45)
.setFunction(EnumBurnFunc.LINEAR)
.setHeat(2D)
.setMeltingPoint(2386)
.setUnlocalizedName("rbmk_fuel_hea242").setTextureName(RefStrings.MODID + ":rbmk_fuel_hea242");
.setTint(tintAmericium).setUnlocalizedName("rbmk_fuel_hea242").setTextureName(RefStrings.MODID + ":rbmk_fuel_hea242");
rbmk_fuel_men = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_men)
.setYield(100000000D)
.setStats(30)
@ -3246,21 +3261,21 @@ public class ModItems {
.setHeat(0.75)
.setMeltingPoint(2800)
.setNeutronTypes(NType.ANY, NType.FAST) //Build-up of Pu-239 leads to both speeds of neutrons grooving
.setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
.setTint(tintNeptunium).setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
rbmk_fuel_hen = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hen)
.setYield(100000000D)
.setStats(40)
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setMeltingPoint(2800)
.setNeutronTypes(NType.FAST, NType.FAST)
.setUnlocalizedName("rbmk_fuel_hen").setTextureName(RefStrings.MODID + ":rbmk_fuel_hen");
.setTint(tintNeptunium).setUnlocalizedName("rbmk_fuel_hen").setTextureName(RefStrings.MODID + ":rbmk_fuel_hen");
rbmk_fuel_mox = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mox)
.setYield(100000000D)
.setStats(40)
.setFunction(EnumBurnFunc.LOG_TEN)
.setDepletionFunction(EnumDepleteFunc.RAISING_SLOPE)
.setMeltingPoint(2815)
.setUnlocalizedName("rbmk_fuel_mox").setTextureName(RefStrings.MODID + ":rbmk_fuel_mox");
.setTint(tintUranium).setUnlocalizedName("rbmk_fuel_mox").setTextureName(RefStrings.MODID + ":rbmk_fuel_mox");
rbmk_fuel_les = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_les)
.setYield(100000000D)
.setStats(50)
@ -3268,14 +3283,14 @@ public class ModItems {
.setHeat(1.25D)
.setMeltingPoint(2500)
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
.setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
.setTint(tintSchrabidium).setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
rbmk_fuel_mes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_mes)
.setYield(100000000D)
.setStats(75D)
.setFunction(EnumBurnFunc.ARCH)
.setHeat(1.5D)
.setMeltingPoint(2750)
.setUnlocalizedName("rbmk_fuel_mes").setTextureName(RefStrings.MODID + ":rbmk_fuel_mes");
.setTint(tintSchrabidium).setUnlocalizedName("rbmk_fuel_mes").setTextureName(RefStrings.MODID + ":rbmk_fuel_mes");
rbmk_fuel_hes = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_hes)
.setYield(100000000D)
.setStats(90)
@ -3283,7 +3298,7 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.LINEAR)
.setHeat(1.75D)
.setMeltingPoint(3000)
.setUnlocalizedName("rbmk_fuel_hes").setTextureName(RefStrings.MODID + ":rbmk_fuel_hes");
.setTint(tintSchrabidium).setUnlocalizedName("rbmk_fuel_hes").setTextureName(RefStrings.MODID + ":rbmk_fuel_hes");
rbmk_fuel_leaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_leaus)
.setYield(100000000D)
.setStats(30)
@ -3291,14 +3306,14 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.LINEAR)
.setXenon(0.05D, 50D)
.setHeat(1.5D)
.setMeltingPoint(7029).setUnlocalizedName("rbmk_fuel_leaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_leaus");
.setTint(tintAustralium).setMeltingPoint(7029).setUnlocalizedName("rbmk_fuel_leaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_leaus");
rbmk_fuel_heaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heaus)
.setYield(100000000D)
.setStats(35)
.setFunction(EnumBurnFunc.LINEAR)
.setXenon(0.05D, 50D)
.setHeat(1.5D)
.setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
.setTint(tintAustralium).setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
rbmk_fuel_po210be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_po210be)
.setYield(25000000D)
.setStats(0D, 50)
@ -3309,7 +3324,7 @@ public class ModItems {
.setDiffusion(0.05D)
.setMeltingPoint(1287)
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
.setUnlocalizedName("rbmk_fuel_po210be").setTextureName(RefStrings.MODID + ":rbmk_fuel_po210be");
.setTint(tintPolonium).setUnlocalizedName("rbmk_fuel_po210be").setTextureName(RefStrings.MODID + ":rbmk_fuel_po210be");
rbmk_fuel_ra226be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_ra226be)
.setYield(100000000D)
.setStats(0D, 20)
@ -3320,7 +3335,7 @@ public class ModItems {
.setDiffusion(0.5D)
.setMeltingPoint(700)
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
.setUnlocalizedName("rbmk_fuel_ra226be").setTextureName(RefStrings.MODID + ":rbmk_fuel_ra226be");
.setTint(tintRadium).setUnlocalizedName("rbmk_fuel_ra226be").setTextureName(RefStrings.MODID + ":rbmk_fuel_ra226be");
rbmk_fuel_pu238be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_pu238be)
.setYield(50000000D)
.setStats(40, 40)
@ -3329,7 +3344,7 @@ public class ModItems {
.setDiffusion(0.05D)
.setMeltingPoint(1287)
.setNeutronTypes(NType.SLOW, NType.SLOW) //Beryllium Moderation
.setUnlocalizedName("rbmk_fuel_pu238be").setTextureName(RefStrings.MODID + ":rbmk_fuel_pu238be");
.setTint(tintPlutonium).setUnlocalizedName("rbmk_fuel_pu238be").setTextureName(RefStrings.MODID + ":rbmk_fuel_pu238be");
rbmk_fuel_balefire_gold = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire_gold)
.setYield(100000000D)
.setStats(50, 10)
@ -3337,7 +3352,7 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.LINEAR)
.setXenon(0.0D, 50D)
.setMeltingPoint(2000)
.setUnlocalizedName("rbmk_fuel_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire_gold");
.setTint(tintFlashgold).setUnlocalizedName("rbmk_fuel_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire_gold");
rbmk_fuel_flashlead = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_flashlead)
.setYield(250000000D)
.setStats(40, 50)
@ -3345,7 +3360,7 @@ public class ModItems {
.setDepletionFunction(EnumDepleteFunc.LINEAR)
.setXenon(0.0D, 50D)
.setMeltingPoint(2050)
.setUnlocalizedName("rbmk_fuel_flashlead").setTextureName(RefStrings.MODID + ":rbmk_fuel_flashlead");
.setTint(tintFlashlead).setUnlocalizedName("rbmk_fuel_flashlead").setTextureName(RefStrings.MODID + ":rbmk_fuel_flashlead");
rbmk_fuel_balefire = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire)
.setYield(100000000D)
.setStats(100, 35)
@ -3353,34 +3368,34 @@ public class ModItems {
.setXenon(0.0D, 50D)
.setHeat(3D)
.setMeltingPoint(3652)
.setUnlocalizedName("rbmk_fuel_balefire").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire");
.setTint(tintBalefire).setUnlocalizedName("rbmk_fuel_balefire").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire");
rbmk_fuel_zfb_bismuth = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_bismuth)
.setYield(50000000D)
.setStats(20)
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setHeat(1.75D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_zfb_bismuth").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_bismuth");
.setTint(tintZirconium).setUnlocalizedName("rbmk_fuel_zfb_bismuth").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_bismuth");
rbmk_fuel_zfb_pu241 = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_pu241)
.setYield(50000000D)
.setStats(20)
.setFunction(EnumBurnFunc.SQUARE_ROOT)
.setMeltingPoint(2865)
.setUnlocalizedName("rbmk_fuel_zfb_pu241").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_pu241");
.setTint(tintZirconium).setUnlocalizedName("rbmk_fuel_zfb_pu241").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_pu241");
rbmk_fuel_zfb_am_mix = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_zfb_am_mix)
.setYield(50000000D)
.setStats(20)
.setFunction(EnumBurnFunc.LINEAR)
.setHeat(1.75D)
.setMeltingPoint(2744)
.setUnlocalizedName("rbmk_fuel_zfb_am_mix").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_am_mix");
.setTint(tintZirconium).setUnlocalizedName("rbmk_fuel_zfb_am_mix").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_am_mix");
rbmk_fuel_drx = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_drx)
.setYield(10000000D)
.setStats(1000, 10)
.setFunction(EnumBurnFunc.QUADRATIC)
.setHeat(0.1D)
.setMeltingPoint(100000)
.setUnlocalizedName("rbmk_fuel_drx").setTextureName(RefStrings.MODID + ":rbmk_fuel_drx");
.setTint(tintDRX).setUnlocalizedName("rbmk_fuel_drx").setTextureName(RefStrings.MODID + ":rbmk_fuel_drx");
rbmk_fuel_test = (ItemRBMKRod) new ItemRBMKRod("THE VOICES")
.setYield(1000000D)
.setStats(100)

View File

@ -36,6 +36,7 @@ public class ItemRBMKRod extends Item {
public double diffusion = 0.02D; //the speed at which the core heats the hull
public NType nType = NType.SLOW; //neutronType, the most efficient neutron type for fission
public NType rType = NType.FAST; //releaseType, the type of neutrons released by this fuel
public int colorTint = 0x304825;
/* _____
* ,I I I I,
@ -73,6 +74,11 @@ public class ItemRBMKRod extends Item {
this.setMaxStackSize(1);
this.setCreativeTab(MainRegistry.controlTab);
}
public ItemRBMKRod setTint(int tint) {
this.colorTint = tint;
return this;
}
public ItemRBMKRod setYield(double yield) {
this.yield = yield;

View File

@ -778,11 +778,12 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.rbmk_reflector, 1), new Object[] { "GGG", "GRG", "GGG", 'G', OreDictManager.getReflector(), 'R', ModBlocks.rbmk_blank });
if(!GeneralConfig.enable528) {
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control, 1), new Object[] { " B ", "GRG", " B ", 'G', GRAPHITE.ingot(), 'B', ModItems.motor, 'R', ModBlocks.rbmk_absorber });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', GRAPHITE.block(), 'R', ModBlocks.rbmk_control, 'B', ModItems.nugget_bismuth });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_auto, 1), new Object[] { "C", "R", "D", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'R', ModBlocks.rbmk_control, 'D', ModItems.crt_display });
} else {
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control, 1), new Object[] { "CBC", "GRG", "CBC", 'G', GRAPHITE.ingot(), 'B', ModItems.motor, 'R', ModBlocks.rbmk_absorber, 'C', CD.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_reasim, 1), new Object[] { " B ", "GRG", " B ", 'G', GRAPHITE.ingot(), 'B', ModItems.motor, 'R', ModBlocks.rbmk_absorber });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_reasim_auto, 1), new Object[] { "C", "R", "D", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'R', ModBlocks.rbmk_control, 'D', ModItems.crt_display });
}
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', GRAPHITE.block(), 'R', ModBlocks.rbmk_control, 'B', ModItems.nugget_bismuth });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_control_auto, 1), new Object[] { "C", "R", "D", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'R', ModBlocks.rbmk_control, 'D', ModItems.crt_display });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_rod_reasim, 1), new Object[] { "ZCZ", "ZRZ", "ZCZ", 'C', STEEL.shell(), 'R', ModBlocks.rbmk_blank, 'Z', ZR.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_rod_reasim_mod, 1), new Object[] { "BGB", "GRG", "BGB", 'G', GRAPHITE.block(), 'R', ModBlocks.rbmk_rod_reasim, 'B', ANY_RESISTANTALLOY.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_outgasser, 1), new Object[] { "GHG", "GRG", "GTG", 'G', ModBlocks.steel_grate, 'H', Blocks.hopper, 'T', ModItems.tank_steel, 'R', ModBlocks.rbmk_blank });

View File

@ -333,6 +333,7 @@ public class ResourceManager {
public static final ResourceLocation pheo_blast_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/blast_door.png");
public static IModelCustomNamed pheo_blast_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/blast_door.obj")).asVBO();
public static final ResourceLocation pheo_containment_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door.png");
public static final ResourceLocation pheo_containment_door_trefoil_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/containment_door_trefoil.png");
public static IModelCustomNamed pheo_containment_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/containment_door.obj")).asVBO();
public static final ResourceLocation pheo_seal_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/seal_door.png");
public static IModelCustomNamed pheo_seal_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/seal_door.obj")).asVBO();
@ -344,6 +345,7 @@ public class ResourceManager {
public static final ResourceLocation pheo_vehicle_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vehicle_door.png");
public static IModelCustomNamed pheo_vehicle_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/vehicle_door.obj")).asVBO();
public static final ResourceLocation pheo_water_door_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/water_door.png");
public static final ResourceLocation pheo_water_door_clean_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/water_door_clean.png");
public static IModelCustomNamed pheo_water_door = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/pheodoors/water_door.obj")).asVBO();
public static final ResourceLocation pheo_vault_door_3 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_3.png");
public static final ResourceLocation pheo_vault_door_4 = new ResourceLocation(RefStrings.MODID, "textures/models/pheodoors/vault/vault_door_4.png");

View File

@ -24,7 +24,7 @@ public class RenderRBMKControl implements ISimpleBlockRenderingHandler {
GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
RBMKBase.renderLid = RBMKBase.LID_NONE;
IIcon iicon = block.getIcon(0, 0);
IIcon iicon = block.getIcon(1, 0);
tessellator.setColorOpaque_F(1, 1, 1);
if(renderer.hasOverrideBlockTexture()) {

View File

@ -40,7 +40,9 @@ public class RenderRBMKRod implements ISimpleBlockRenderingHandler {
tessellator.startDrawingQuads();
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rbmk_element, "Inner", rod.inner, tessellator, 0, false);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rbmk_element, "Cap", iicon, tessellator, 0, false);
tessellator.setColorOpaque_I(0x304825);
ObjUtil.renderPartWithIcon((HFRWavefrontObject) ResourceManager.rbmk_element_rods, "Rods", rod.fuel, tessellator, 0, false);
tessellator.setColorOpaque_I(0xFFFFFF);
tessellator.setNormal(-1F, 0F, 0F); renderer.renderFaceXNeg(block, -0.5, 0, -0.5, sideIcon);
tessellator.setNormal(1F, 0F, 0F); renderer.renderFaceXPos(block, -0.5, 0, -0.5, sideIcon);
tessellator.setNormal(0F, 0F, -1F); renderer.renderFaceZNeg(block, -0.5, 0, -0.5, sideIcon);

View File

@ -112,7 +112,7 @@ public class ItemRenderLibraryDoors {
}
public void renderCommon() {
GL11.glRotated(90, 0, 1, 0);
bindTexture(ResourceManager.pheo_water_door_tex);
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.WATER_DOOR.getCyclingSkins());
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.pheo_water_door.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
@ -164,7 +164,7 @@ public class ItemRenderLibraryDoors {
GL11.glScaled(3.8, 3.8, 3.8);
}
public void renderCommon() {
bindTexture(ResourceManager.pheo_containment_door_tex);
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.QE_CONTAINMENT.getCyclingSkins());
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.pheo_containment_door.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
import com.hbm.util.ColorUtil;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -20,11 +21,13 @@ public class RenderRBMKFuelChannel extends TileEntitySpecialRenderer {
boolean hasRod = false;
boolean cherenkov = false;
int color = 0;
if(te instanceof TileEntityRBMKRod) {
TileEntityRBMKRod rod = (TileEntityRBMKRod) te;
if(rod.hasRod) hasRod = true;
if(rod.fluxQuantity > 5) cherenkov = true;
color = rod.rodColor;
}
GL11.glPushMatrix();
@ -50,12 +53,14 @@ public class RenderRBMKFuelChannel extends TileEntitySpecialRenderer {
if(hasRod) {
GL11.glPushMatrix();
bindTexture(texture_rods);
GL11.glColor3f(ColorUtil.fr(color), ColorUtil.fg(color), ColorUtil.fb(color));
for(int j = 0; j <= offset; j++) {
ResourceManager.rbmk_element_rods_vbo.renderPart("Rods");
GL11.glTranslated(0, 1, 0);
}
GL11.glColor3f(1F, 1F, 1F);
GL11.glPopMatrix();
}

View File

@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.DoorDecl;
import com.hbm.tileentity.TileEntityDoorGeneric;
import net.minecraft.client.Minecraft;
@ -16,8 +17,8 @@ public class RenderContainmentDoor implements IRenderDoors {
@Override
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.pheo_containment_door_tex);
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.QE_CONTAINMENT.getSkinFromIndex(door.getSkinIndex()));
double maxRaise = 2.25;
double raise = 0;

View File

@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.DoorDecl;
import com.hbm.tileentity.TileEntityDoorGeneric;
import net.minecraft.client.Minecraft;
@ -15,8 +16,8 @@ public class RenderWaterDoor implements IRenderDoors {
@Override
public void render(TileEntityDoorGeneric door, DoubleBuffer buf) {
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.pheo_water_door_tex);
Minecraft.getMinecraft().getTextureManager().bindTexture(DoorDecl.WATER_DOOR.getSkinFromIndex(door.getSkinIndex()));
double maxRot = 120;
double rot = 0;

View File

@ -418,6 +418,18 @@ public abstract class DoorDecl {
return null;
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_containment_door_tex,
ResourceManager.pheo_containment_door_trefoil_tex
};
return skins;
}
@Override public int getSkinCount() { return 2; }
@Override public int timeToOpen() { return 160; };
@Override public int[][] getDoorOpenRanges() { return new int[][] { { -1, 0, 0, 3, 3, 1 } }; }
@Override public int[] getDimensions() { return new int[] { 2, 0, 0, 0, 1, 1 }; }
@ -457,6 +469,18 @@ public abstract class DoorDecl {
return null;
}
public ResourceLocation[] skins;
@SideOnly(Side.CLIENT) @Override public ResourceLocation[] getSEDNASkins() {
if(skins == null) skins = new ResourceLocation[] {
ResourceManager.pheo_water_door_tex,
ResourceManager.pheo_water_door_clean_tex
};
return skins;
}
@Override public int getSkinCount() { return 2; }
@Override
public AxisAlignedBB getBlockBound(int x, int y, int z, boolean open, boolean forCollision) {
if(!open) return AxisAlignedBB.getBoundingBox(0, 0, 0.75, 1, 1, 1);

View File

@ -24,7 +24,7 @@ import com.hbm.tileentity.IFluidCopiable;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.fluid.IFluidStandardTransceiver;
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
import api.hbm.tile.IHeatSource;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -36,7 +36,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine, IFluidCopiable {
public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPacketReceiver, IFluidStandardTransceiverMK2, IConfigurableMachine, IFluidCopiable {
public int heat;
public FluidTank[] tanks;
@ -267,7 +267,7 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPa
private void sendFluid() {
for(DirPos pos : getConPos()) {
this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir().getOpposite());
this.tryProvide(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
}

View File

@ -19,7 +19,7 @@ import com.hbm.tileentity.IFluidCopiable;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.fluid.IFluidStandardTransceiver;
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
import api.hbm.tile.IHeatSource;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -30,7 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.EnumSkyBlock;
public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase implements IBufPacketReceiver, IFluidStandardTransceiver, IConfigurableMachine, IFluidCopiable {
public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase implements IBufPacketReceiver, IFluidStandardTransceiverMK2, IConfigurableMachine, IFluidCopiable {
public int heat;
public FluidTank[] tanks;
@ -232,7 +232,7 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
private void sendFluid() {
for(DirPos pos : getConPos()) {
this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir().getOpposite());
this.tryProvide(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
}

View File

@ -1,8 +1,12 @@
package com.hbm.tileentity.machine.rbmk;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
import com.hbm.handler.CompatHandler;
import com.hbm.handler.neutron.RBMKNeutronHandler.RBMKType;
import com.hbm.interfaces.NotableComments;
import api.hbm.energymk2.IEnergyReceiverMK2;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -13,19 +17,42 @@ import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
@NotableComments
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase implements SimpleComponent, CompatHandler.OCComponent {
public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase implements SimpleComponent, CompatHandler.OCComponent, IEnergyReceiverMK2 {
@SideOnly(Side.CLIENT)
public double lastLevel;
public double level;
public static final double speed = 0.00277D; // it takes around 18 seconds for the thing to fully extend
public double targetLevel;
public boolean hasPower = false;;
public long power;
public static final long consumption = 5_000;
public static final long maxPower = consumption * 10; // enough buffer for half a second of movement
public TileEntityRBMKControl() {
super(0);
}
public boolean isPowered() {
return this.getBlockType() == ModBlocks.rbmk_control_reasim || this.getBlockType() == ModBlocks.rbmk_control_reasim_auto;
}
@Override public long getPower() { return power; }
@Override public void setPower(long power) { this.power = power; }
@Override public long getMaxPower() { return isPowered() ? this.maxPower : 0; }
@Override public boolean canConnect(ForgeDirection dir) {
return isPowered() ? dir == ForgeDirection.DOWN : false;
}
@Override public ConnectionPriority getPriority() {
return ConnectionPriority.LOW; // high would make more sense, but i am a sadistic asshole
}
@Override
public boolean isLidRemovable() {
@ -39,15 +66,30 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
this.lastLevel = this.level;
} else {
if(level < targetLevel) {
level += speed * RBMKDials.getControlSpeed(worldObj);
if(level > targetLevel) level = targetLevel;
this.hasPower = true;
if(this.isPowered()) {
this.trySubscribe(worldObj, xCoord, yCoord - 1, zCoord, ForgeDirection.DOWN);
if(this.power < consumption) this.hasPower = false;
}
if(level > targetLevel) {
level -= speed * RBMKDials.getControlSpeed(worldObj);
if(level < targetLevel) level = targetLevel;
this.lastLevel = this.level;
if(this.hasPower) {
if(level < targetLevel) {
level += speed * RBMKDials.getControlSpeed(worldObj);
if(level > targetLevel) level = targetLevel;
}
if(level > targetLevel) {
level -= speed * RBMKDials.getControlSpeed(worldObj);
if(level < targetLevel) level = targetLevel;
}
if(this.isPowered() && level != lastLevel) {
this.power -= this.consumption;
}
}
}
@ -88,6 +130,8 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
super.serialize(buf);
buf.writeDouble(this.level);
buf.writeDouble(this.targetLevel);
buf.writeLong(this.power);
buf.writeBoolean(this.hasPower);
}
@Override
@ -95,6 +139,8 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
super.deserialize(buf);
this.level = buf.readDouble();
this.targetLevel = buf.readDouble();
this.power = buf.readLong();
this.hasPower = buf.readBoolean();
}
@Override

View File

@ -53,6 +53,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
public double lastFluxRatio;
public boolean hasRod;
public int rodColor = 0;
// Fuel rod item data client sync
private String fuelYield;
@ -95,6 +96,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
ItemRBMKRod rod = ((ItemRBMKRod)slots[0].getItem());
this.rodColor = rod.colorTint;
double fluxRatioOut;
double fluxQuantityOut;
@ -260,6 +262,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
buf.writeDouble(this.lastFluxQuantity);
buf.writeDouble(this.lastFluxRatio);
buf.writeBoolean(this.hasRod);
buf.writeInt(this.rodColor);
if(this.hasRod) {
ItemRBMKRod rod = ((ItemRBMKRod)slots[0].getItem());
BufferUtil.writeString(buf, ItemRBMKRod.getYield(slots[0]) + " / " + rod.yield + " (" + (ItemRBMKRod.getEnrichment(slots[0]) * 100) + "%)");
@ -276,6 +279,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
this.fluxQuantity = buf.readDouble();
this.fluxFastRatio = buf.readDouble();
this.hasRod = buf.readBoolean();
this.rodColor = buf.readInt();
if(this.hasRod) {
fuelYield = BufferUtil.readString(buf);
fuelXenon = BufferUtil.readString(buf);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB