the sloppiest toppy
@ -10,11 +10,15 @@
|
|||||||
|
|
||||||
**This is for 1.7.10!** For 1.12, check out these projects:
|
**This is for 1.7.10!** For 1.12, check out these projects:
|
||||||
|
|
||||||
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE
|
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE/releases
|
||||||
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
|
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
|
||||||
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
|
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
|
||||||
|
|
||||||
For 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
|
For further ports, try:
|
||||||
|
|
||||||
|
* NTM Remake on 1.18.2: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
|
||||||
|
* HBM Modernized on 1.20.1: https://github.com/Raptor324/HBM-Modernized/releases
|
||||||
|
* NTM Neo on 1.21.1: https://github.com/ohiomannnn/HBMsNTM-NEO-EDITION/releases
|
||||||
|
|
||||||
## Downloading pre-compiled versions from GitHub
|
## Downloading pre-compiled versions from GitHub
|
||||||
|
|
||||||
|
|||||||
17
changelog
@ -10,6 +10,10 @@
|
|||||||
* More efficient than MEU but with less durability
|
* More efficient than MEU but with less durability
|
||||||
* Has a new thermal coefficient mechanic, once the core heat exceeds 1000°C, reactivity drops down
|
* Has a new thermal coefficient mechanic, once the core heat exceeds 1000°C, reactivity drops down
|
||||||
* Very high diffusion, meaning the core is considerably colder than on most fuels
|
* Very high diffusion, meaning the core is considerably colder than on most fuels
|
||||||
|
* RBMK Display panel
|
||||||
|
* Single block that shows a 7x7 view of a linked RBMK
|
||||||
|
* Doesn't have a GUI or tooltips or anything, only acts as a monitor
|
||||||
|
* Ideal for >15x15 reactor monitoring, since the displays are tileable
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Updated RBMK visuals
|
* Updated RBMK visuals
|
||||||
@ -44,13 +48,22 @@
|
|||||||
* Cold PFM is used up at a steady rate, even if the reactor is already cold
|
* Cold PFM is used up at a steady rate, even if the reactor is already cold
|
||||||
* The RBMK structural column recipe now uses only half as many metal plates, and rubber instead of insulator
|
* The RBMK structural column recipe now uses only half as many metal plates, and rubber instead of insulator
|
||||||
* Changed the way reasim RBMK fuel channels work
|
* Changed the way reasim RBMK fuel channels work
|
||||||
* Instead of six randomized neutron streams, reasim rods now use eight half strength streams in an even star pattern
|
* Instead of six randomized neutron streams, reasim rods now use eight 75% strength streams in an even star pattern
|
||||||
* The pattern is rotated in a random multiple of 9° (i.e. four possible angle variations)
|
* The pattern is rotated in a random multiple of 9° (i.e. four possible angle variations)
|
||||||
* RBMK steam channels now spawn steam particles if water is voided due to the steam buffer not being emptied in time
|
* RBMK steam channels now spawn steam particles if water is voided due to the steam buffer not being emptied in time
|
||||||
* Rebalanced 528 mode
|
* Rebalanced 528 mode
|
||||||
* Increased the chance for most precision assembler recipes to succeed
|
* Increased the chance for most precision assembler recipes to succeed
|
||||||
* Increased the chance for items to be salvaged by recycling
|
* Increased the chance for items to be salvaged by recycling
|
||||||
* In expensive mode, the chances have been increased drastically compared to the old values
|
* In expensive mode, the chances have been increased drastically compared to the old values
|
||||||
|
* Added RoR functionality to some RBMK columns
|
||||||
|
* Manual control rods can have their target height set, allowing them to be remote controlled without a console
|
||||||
|
* All fuel channels can now provide values such as column heat, fuel skin heat, depletion and xenon poison
|
||||||
|
* RBMK consoles and displays no longer show the temperature value of control rods as a red gradient, instead they show the control rods' color grouping
|
||||||
|
* RBMK fuel rods can no longer be removed by hand if the skin temp exceeds 200°C
|
||||||
|
* RBMK fuel rods can no longer be cycled via autoloader if the skin temp exceeds 1,000°C
|
||||||
|
* For fully automated high powered reactors, it may now be necessary to read the depletion via RoR and then throttle the reactor with control rods
|
||||||
|
* RBMK cranes can still remove any fuel, no matter how hot it is
|
||||||
|
* RBMK fuel channels will now undergo meltdown if it is broken when a fuel rod is still loaded with a heat temperature of at least 1,500°C
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed NBTStack serialization omitting the stack size most of the time, preventing deserialization (mainly in the precision assembler config)
|
* Fixed NBTStack serialization omitting the stack size most of the time, preventing deserialization (mainly in the precision assembler config)
|
||||||
@ -63,3 +76,5 @@
|
|||||||
* Fixed fluid output direction being incorrect on boilers, causing them to break with pipe anchors
|
* Fixed fluid output direction being incorrect on boilers, causing them to break with pipe anchors
|
||||||
* Fixed an issue where the industrial turbine's tendency to round up the possible operation counter would cause it to use up steam it doesn't actually have
|
* Fixed an issue where the industrial turbine's tendency to round up the possible operation counter would cause it to use up steam it doesn't actually have
|
||||||
* Fixed yet another issue with the settings tool when copying automatic control rod settings
|
* Fixed yet another issue with the settings tool when copying automatic control rod settings
|
||||||
|
* Fixed quad rocket launcher steering not working right
|
||||||
|
* Fixed standard and industrial boilers not respecting the heating efficiency value of the fluid trait
|
||||||
|
|||||||
@ -1096,6 +1096,7 @@ public class ModBlocks {
|
|||||||
public static Block rbmk_heater;
|
public static Block rbmk_heater;
|
||||||
public static Block rbmk_console;
|
public static Block rbmk_console;
|
||||||
public static Block rbmk_crane_console;
|
public static Block rbmk_crane_console;
|
||||||
|
public static Block rbmk_display;
|
||||||
public static Block rbmk_autoloader;
|
public static Block rbmk_autoloader;
|
||||||
public static Block rbmk_loader;
|
public static Block rbmk_loader;
|
||||||
public static Block rbmk_steam_inlet;
|
public static Block rbmk_steam_inlet;
|
||||||
@ -1433,8 +1434,8 @@ public class ModBlocks {
|
|||||||
deco_lead = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
|
deco_lead = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
|
||||||
deco_beryllium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
|
deco_beryllium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
|
||||||
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).noFortune().setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
|
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).noFortune().setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
|
||||||
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_side");
|
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
|
||||||
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
|
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_blank_top");
|
||||||
|
|
||||||
deco_emitter = new BlockEmitter().setBlockName("deco_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":emitter");
|
deco_emitter = new BlockEmitter().setBlockName("deco_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":emitter");
|
||||||
part_emitter = new PartEmitter().setBlockName("part_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":part_top");
|
part_emitter = new PartEmitter().setBlockName("part_emitter").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":part_top");
|
||||||
@ -2115,6 +2116,7 @@ public class ModBlocks {
|
|||||||
rbmk_heater = new RBMKHeater().setBlockName("rbmk_heater").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_heater");
|
rbmk_heater = new RBMKHeater().setBlockName("rbmk_heater").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_heater");
|
||||||
rbmk_console = new RBMKConsole().setBlockName("rbmk_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_console");
|
rbmk_console = new RBMKConsole().setBlockName("rbmk_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_console");
|
||||||
rbmk_crane_console = new RBMKCraneConsole().setBlockName("rbmk_crane_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_crane_console");
|
rbmk_crane_console = new RBMKCraneConsole().setBlockName("rbmk_crane_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_crane_console");
|
||||||
|
rbmk_display = new RBMKDisplay().setBlockName("rbmk_display").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
|
||||||
rbmk_autoloader = new RBMKAutoloader().setBlockName("rbmk_autoloader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_autoloader");
|
rbmk_autoloader = new RBMKAutoloader().setBlockName("rbmk_autoloader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_autoloader");
|
||||||
rbmk_loader = new RBMKLoader(Material.iron).setBlockName("rbmk_loader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_loader");
|
rbmk_loader = new RBMKLoader(Material.iron).setBlockName("rbmk_loader").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_loader");
|
||||||
rbmk_steam_inlet = new RBMKInlet(Material.iron).setBlockName("rbmk_steam_inlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_inlet");
|
rbmk_steam_inlet = new RBMKInlet(Material.iron).setBlockName("rbmk_steam_inlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_inlet");
|
||||||
@ -3106,6 +3108,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(rbmk_heater, rbmk_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(rbmk_heater, rbmk_heater.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
|
GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(rbmk_crane_console, rbmk_crane_console.getUnlocalizedName());
|
GameRegistry.registerBlock(rbmk_crane_console, rbmk_crane_console.getUnlocalizedName());
|
||||||
|
register(rbmk_display);
|
||||||
register(rbmk_autoloader);
|
register(rbmk_autoloader);
|
||||||
register(rbmk_loader);
|
register(rbmk_loader);
|
||||||
register(rbmk_steam_inlet);
|
register(rbmk_steam_inlet);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.hbm.blocks.machine.rbmk;
|
package com.hbm.blocks.machine.rbmk;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@ -40,6 +41,7 @@ public class RBMKControl extends RBMKPipedBase {
|
|||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
if(meta >= this.offset) return new TileEntityRBMKControlManual();
|
if(meta >= this.offset) return new TileEntityRBMKControlManual();
|
||||||
|
if(meta >= this.extra) return new TileEntityProxyCombo();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
96
src/main/java/com/hbm/blocks/machine/rbmk/RBMKDisplay.java
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
package com.hbm.blocks.machine.rbmk;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.render.block.ISBRHUniversal;
|
||||||
|
import com.hbm.render.util.RenderBlocksNT;
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKDisplay;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class RBMKDisplay extends BlockContainer implements ISBRHUniversal, IToolable {
|
||||||
|
|
||||||
|
public RBMKDisplay() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int getRenderType() { return renderID; }
|
||||||
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
|
@Override public boolean renderAsNormalBlock() { return false; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
return new TileEntityRBMKDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||||
|
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
|
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||||
|
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||||
|
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
|
return false;
|
||||||
|
if(!world.isRemote) {
|
||||||
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
if (tile instanceof TileEntityRBMKDisplay) {
|
||||||
|
((TileEntityRBMKDisplay) tile).rotate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
RenderBlocks renderer = (RenderBlocks) renderBlocks;
|
||||||
|
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
|
|
||||||
|
renderer.setRenderBounds(0.25D, 0D, 0D, 1D, 1D, 1D);
|
||||||
|
RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks) {
|
||||||
|
RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world);
|
||||||
|
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||||
|
tessellator.setColorOpaque_F(1, 1, 1);
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
renderer.setRenderBounds(meta == 4 ? 0.25D : 0D, 0D, meta == 2 ? 0.25D : 0D, meta == 5 ? 0.75D : 1D, 1D, meta == 3 ? 0.75D : 1D);
|
||||||
|
renderer.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@ import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
|
|||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -38,6 +39,20 @@ public class RBMKRod extends RBMKBase {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
|
if(meta >= this.offset) {
|
||||||
|
TileEntityRBMKRod tile = (TileEntityRBMKRod) world.getTileEntity(x, y, z);
|
||||||
|
if(tile != null) {
|
||||||
|
if(tile.slots[0] != null && tile.slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getHullHeat(tile.slots[0]) >= 1500) {
|
||||||
|
tile.meltdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
|
world.removeTileEntity(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister reg) {
|
public void registerBlockIcons(IIconRegister reg) {
|
||||||
|
|||||||
@ -454,21 +454,24 @@ public class EntityChemical extends EntityThrowableNT {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Block block = worldObj.getBlock(x, y, z);
|
|
||||||
if(type == Fluids.SEEDSLURRY) {
|
if(type == Fluids.SEEDSLURRY) {
|
||||||
if(block == Blocks.dirt || block == ModBlocks.waste_earth || block == ModBlocks.dirt_dead || block == ModBlocks.dirt_oily) {
|
|
||||||
|
for(int i = -1; i <= 1; i++) for(int j = -1; j <= 1; j++) for(int k = -1; k <= 1; k++) {
|
||||||
if(worldObj.getBlockLightValue(x, y + 1, z) >= 9 && worldObj.getBlockLightOpacity(x, y + 1, z) <= 2) {
|
Block block = worldObj.getBlock(x + i, y + j, z + k);
|
||||||
worldObj.setBlock(x, y, z, Blocks.grass);
|
if(block == Blocks.dirt || block == ModBlocks.waste_earth || block == ModBlocks.dirt_dead || block == ModBlocks.dirt_oily) {
|
||||||
|
|
||||||
|
if(worldObj.getBlockLightValue(x + i, y + j + 1, z + k) >= 9 && worldObj.getBlockLightOpacity(x + i, y + j + 1, z + k) <= 2) {
|
||||||
|
worldObj.setBlock(x + i, y + j, z + k, Blocks.grass);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
int meta = worldObj.getBlockMetadata(x + i, y + j, z + k);
|
||||||
|
if(block == Blocks.cobblestone) worldObj.setBlock(x + i, y + j, z + k, Blocks.mossy_cobblestone);
|
||||||
|
if(block == Blocks.stonebrick && meta == 0) worldObj.setBlock(x + i, y + j, z + k, Blocks.stonebrick, 1, 3);
|
||||||
|
if(block == ModBlocks.waste_earth) worldObj.setBlock(x + i, y + j, z + k, Blocks.grass);
|
||||||
|
if(block == ModBlocks.brick_concrete) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.brick_concrete_mossy);
|
||||||
|
if(block == ModBlocks.concrete_brick_slab && meta % 8 == 0) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.concrete_brick_slab, meta + 1, 3);
|
||||||
|
if(block == ModBlocks.brick_concrete_stairs) worldObj.setBlock(x + i, y + j, z + k, ModBlocks.brick_concrete_mossy_stairs, meta, 3);
|
||||||
}
|
}
|
||||||
int meta = worldObj.getBlockMetadata(x, y, z);
|
|
||||||
if(block == Blocks.cobblestone) worldObj.setBlock(x, y, z, Blocks.mossy_cobblestone);
|
|
||||||
if(block == Blocks.stonebrick && meta == 0) worldObj.setBlock(x, y, z, Blocks.stonebrick, 1, 3);
|
|
||||||
if(block == ModBlocks.waste_earth) worldObj.setBlock(x, y, z, Blocks.grass);
|
|
||||||
if(block == ModBlocks.brick_concrete) worldObj.setBlock(x, y, z, ModBlocks.brick_concrete_mossy);
|
|
||||||
if(block == ModBlocks.concrete_brick_slab && meta % 8 == 0) worldObj.setBlock(x, y, z, ModBlocks.concrete_brick_slab, meta + 1, 3);
|
|
||||||
if(block == ModBlocks.brick_concrete_stairs) worldObj.setBlock(x, y, z, ModBlocks.brick_concrete_mossy_stairs, meta, 3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setDead();
|
this.setDead();
|
||||||
|
|||||||
@ -29,7 +29,27 @@ public class ContainerRBMKRod extends Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(index == 0) {
|
||||||
|
|
||||||
|
if(rbmk.coldEnoughForManual()) {
|
||||||
|
return super.slotClick(index, button, mode, player);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
Slot slot = this.getSlot(index);
|
||||||
|
ItemStack ret = null;
|
||||||
|
|
||||||
|
if(slot.getHasStack()) ret = slot.getStack().copy();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.slotClick(index, button, mode, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack transferStackInSlot(EntityPlayer player, int par2) {
|
||||||
ItemStack var3 = null;
|
ItemStack var3 = null;
|
||||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||||
|
|
||||||
@ -38,6 +58,7 @@ public class ContainerRBMKRod extends Container {
|
|||||||
var3 = var5.copy();
|
var3 = var5.copy();
|
||||||
|
|
||||||
if(par2 <= rbmk.getSizeInventory() - 1) {
|
if(par2 <= rbmk.getSizeInventory() - 1) {
|
||||||
|
if(!rbmk.coldEnoughForManual()) return null;
|
||||||
if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) {
|
if(!this.mergeItemStack(var5, rbmk.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,11 +32,8 @@ public class GUIMachineShredder extends GuiInfoContainer {
|
|||||||
|
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
if(diFurnace.getGearLeft() == 0 || diFurnace.getGearLeft() == 3)
|
if(diFurnace.getGearLeft() == 0 || diFurnace.getGearLeft() == 3) flag = true;
|
||||||
flag = true;
|
if(diFurnace.getGearRight() == 0 || diFurnace.getGearRight() == 3) flag = true;
|
||||||
|
|
||||||
if(diFurnace.getGearRight() == 0 || diFurnace.getGearRight() == 3)
|
|
||||||
flag = true;
|
|
||||||
|
|
||||||
if(flag) {
|
if(flag) {
|
||||||
String[] text = new String[] { "Error: Shredder blades are broken or missing!" };
|
String[] text = new String[] { "Error: Shredder blades are broken or missing!" };
|
||||||
|
|||||||
@ -8,12 +8,11 @@ import com.hbm.lib.RefStrings;
|
|||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class GUIRBMKRod extends GuiContainer {
|
public class GUIRBMKRod extends GuiInfoContainer {
|
||||||
|
|
||||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_rbmk_element.png");
|
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_rbmk_element.png");
|
||||||
private TileEntityRBMKRod rod;
|
private TileEntityRBMKRod rod;
|
||||||
@ -26,6 +25,16 @@ public class GUIRBMKRod extends GuiContainer {
|
|||||||
this.ySize = 186;
|
this.ySize = 186;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
|
if(!rod.coldEnoughForAutoloader())
|
||||||
|
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 20, 16, 16, guiLeft - 8, guiTop + 20 + 16, "Fuel skin temperature has exceeded 1,000°C,", "autoloaders can no longer cycle fuel!");
|
||||||
|
if(!rod.coldEnoughForManual())
|
||||||
|
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, "Fuel skin temperature has exceeded 200°C,", "fuel can no longer be removed by hand!");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.rod.hasCustomInventoryName() ? this.rod.getInventoryName() : I18n.format(this.rod.getInventoryName());
|
String name = this.rod.hasCustomInventoryName() ? this.rod.getInventoryName() : I18n.format(this.rod.getInventoryName());
|
||||||
@ -51,5 +60,8 @@ public class GUIRBMKRod extends GuiContainer {
|
|||||||
int x = (int)(xenon * 58);
|
int x = (int)(xenon * 58);
|
||||||
drawTexturedModalRect(guiLeft + 126, guiTop + 82 - x, 212, 58 - x, 14, x);
|
drawTexturedModalRect(guiLeft + 126, guiTop + 82 - x, 212, 58 - x, 14, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!rod.coldEnoughForAutoloader()) this.drawInfoPanel(guiLeft - 16, guiTop + 20, 16, 16, 6);
|
||||||
|
if(!rod.coldEnoughForManual()) this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.blocks.ModBlocks;
|
|||||||
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
import com.hbm.blocks.machine.rbmk.RBMKBase;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityCraneConsole;
|
import com.hbm.tileentity.machine.rbmk.TileEntityCraneConsole;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole;
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKDisplay;
|
||||||
import com.hbm.util.i18n.I18nUtil;
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -48,6 +49,7 @@ public class ItemRBMKTool extends Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: at this point just add a fucking interface
|
||||||
if(b == ModBlocks.rbmk_console && stack.hasTagCompound()) {
|
if(b == ModBlocks.rbmk_console && stack.hasTagCompound()) {
|
||||||
|
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
@ -82,6 +84,21 @@ public class ItemRBMKTool extends Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(b == ModBlocks.rbmk_display && stack.hasTagCompound()) {
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
TileEntityRBMKDisplay console = (TileEntityRBMKDisplay) world.getTileEntity(x, y, z);
|
||||||
|
int tx = stack.stackTagCompound.getInteger("posX");
|
||||||
|
int ty = stack.stackTagCompound.getInteger("posY");
|
||||||
|
int tz = stack.stackTagCompound.getInteger("posZ");
|
||||||
|
console.setTarget(tx, ty, tz);
|
||||||
|
player.addChatComponentMessage(new ChatComponentTranslation(this.getUnlocalizedName() + ".set").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class XFactoryRocket {
|
|||||||
};
|
};
|
||||||
public static Consumer<Entity> LAMBDA_STEERING_ACCELERATE = (entity) -> {
|
public static Consumer<Entity> LAMBDA_STEERING_ACCELERATE = (entity) -> {
|
||||||
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
||||||
if(!(entity instanceof EntityPlayer)) {
|
if(!(bullet.getThrower() instanceof EntityPlayer)) {
|
||||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -410,6 +410,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKControlAuto.class, new RenderRBMKControlRod());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKControlAuto.class, new RenderRBMKControlRod());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCraneConsole.class, new RenderCraneConsole());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCraneConsole.class, new RenderCraneConsole());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKConsole.class, new RenderRBMKConsole());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKConsole.class, new RenderRBMKConsole());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKDisplay.class, new RenderRBMKDisplay());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRod.class, new RenderRBMKFuelChannel());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRod.class, new RenderRBMKFuelChannel());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRodReaSim.class, new RenderRBMKFuelChannel());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKRodReaSim.class, new RenderRBMKFuelChannel());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKAutoloader.class, new RenderRBMKAutoloader());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKAutoloader.class, new RenderRBMKAutoloader());
|
||||||
|
|||||||
@ -791,6 +791,7 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_loader, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.plate(), 'C', CU.ingot(), 'B', ModItems.tank_steel });
|
addRecipeAuto(new ItemStack(ModBlocks.rbmk_loader, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.plate(), 'C', CU.ingot(), 'B', ModItems.tank_steel });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_inlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', IRON.plate(), 'B', ModItems.tank_steel });
|
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_inlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', IRON.plate(), 'B', ModItems.tank_steel });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_outlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.tank_steel });
|
addRecipeAuto(new ItemStack(ModBlocks.rbmk_steam_outlet, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.tank_steel });
|
||||||
|
addRecipeAuto(new ItemStack(ModBlocks.rbmk_display, 1), new Object[] { "B", "C", "D", 'B', B.ingot(), 'D', ModBlocks.deco_rbmk, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
|
||||||
//addRecipeAuto(new ItemStack(ModBlocks.rbmk_heatex, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.pipes_steel });
|
//addRecipeAuto(new ItemStack(ModBlocks.rbmk_heatex, 1), new Object[] { "SCS", "CBC", "SCS", 'S', STEEL.ingot(), 'C', CU.plate(), 'B', ModItems.pipes_steel });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk, 8), new Object[] { "R", 'R', ModBlocks.rbmk_blank });
|
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk, 8), new Object[] { "R", 'R', ModBlocks.rbmk_blank });
|
||||||
|
|||||||
@ -25,7 +25,7 @@ public class ParticleRBMKSteam extends EntityFX {
|
|||||||
public ParticleRBMKSteam(TextureManager texman, World world, double x, double y, double z) {
|
public ParticleRBMKSteam(TextureManager texman, World world, double x, double y, double z) {
|
||||||
super(world, x, y, z);
|
super(world, x, y, z);
|
||||||
this.theRenderEngine = texman;
|
this.theRenderEngine = texman;
|
||||||
this.particleMaxAge = 30;
|
this.particleMaxAge = 10;
|
||||||
this.particleAlpha = 0.25F;
|
this.particleAlpha = 0.25F;
|
||||||
this.particleScale = 4F;
|
this.particleScale = 4F;
|
||||||
}
|
}
|
||||||
@ -80,10 +80,10 @@ public class ParticleRBMKSteam extends EntityFX {
|
|||||||
GL11.glTranslatef(pX + x, pY + y, pZ + z);
|
GL11.glTranslatef(pX + x, pY + y, pZ + z);
|
||||||
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||||
|
|
||||||
tess.addVertexWithUV(this.particleScale * -0.25 - 1, -0.25, 0, uMax, vMax);
|
tess.addVertexWithUV(this.particleScale * -0.25 - 0.9375, -0.25, 0, uMax, vMax);
|
||||||
tess.addVertexWithUV(this.particleScale * -0.25 - 1, this.particleScale - 0.25, 0, uMax, vMin);
|
tess.addVertexWithUV(this.particleScale * -0.25 - 0.9375, this.particleScale - 0.25, 0, uMax, vMin);
|
||||||
tess.addVertexWithUV(this.particleScale * 0.25 - 1, this.particleScale - 0.25, 0, uMin, vMin);
|
tess.addVertexWithUV(this.particleScale * 0.25 - 0.9375, this.particleScale - 0.25, 0, uMin, vMin);
|
||||||
tess.addVertexWithUV(this.particleScale * 0.25 - 1, -0.25, 0, uMin, vMax);
|
tess.addVertexWithUV(this.particleScale * 0.25 - 0.9375, -0.25, 0, uMin, vMax);
|
||||||
|
|
||||||
tess.draw();
|
tess.draw();
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,6 @@ public interface ISBRHUniversal {
|
|||||||
|
|
||||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
public void renderInventoryBlock(Block block, int metadata, int modelId, Object renderBlocks);
|
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks);
|
||||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks);
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,8 +60,21 @@ public class RenderRBMKConsole extends TileEntitySpecialRenderer {
|
|||||||
double kx = -0.3725D;
|
double kx = -0.3725D;
|
||||||
double ky = -(i / 15) * 0.125 + 3.625;
|
double ky = -(i / 15) * 0.125 + 3.625;
|
||||||
double kz = -(i % 15) * 0.125 + 0.125D * 7;
|
double kz = -(i % 15) * 0.125 + 0.125D * 7;
|
||||||
|
|
||||||
|
if(col.data.hasKey("color") && col.data.getByte("color") >= 0) {
|
||||||
|
byte color = col.data.getByte("color");
|
||||||
|
if(color == 0) tess.setColorOpaque_I(0xFF0000);
|
||||||
|
if(color == 1) tess.setColorOpaque_I(0xFFFF00);
|
||||||
|
if(color == 2) tess.setColorOpaque_I(0x008000);
|
||||||
|
if(color == 3) tess.setColorOpaque_I(0x0000FF);
|
||||||
|
if(color == 4) tess.setColorOpaque_I(0x8000FF);
|
||||||
|
} else {
|
||||||
|
double heat = col.data.getDouble("heat") / col.data.getDouble("maxHeat");
|
||||||
|
double color = 0.65D + (i % 2) * 0.05D;
|
||||||
|
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color);
|
||||||
|
}
|
||||||
|
|
||||||
drawColumn(tess, kx, ky, kz, (float)(0.65D + (i % 2) * 0.05D), col.data.getDouble("heat") / col.data.getDouble("maxHeat"));
|
drawColumn(tess, kx, ky, kz, 0, 0);
|
||||||
|
|
||||||
switch(col.type) {
|
switch(col.type) {
|
||||||
case FUEL:
|
case FUEL:
|
||||||
@ -123,7 +136,6 @@ public class RenderRBMKConsole extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
double width = 0.0625D * 0.75;
|
double width = 0.0625D * 0.75;
|
||||||
|
|
||||||
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), color, color);
|
|
||||||
tess.addVertex(x, y + width, z - width);
|
tess.addVertex(x, y + width, z - width);
|
||||||
tess.addVertex(x, y + width, z + width);
|
tess.addVertex(x, y + width, z + width);
|
||||||
tess.addVertex(x, y - width, z + width);
|
tess.addVertex(x, y - width, z + width);
|
||||||
|
|||||||
127
src/main/java/com/hbm/render/tileentity/RenderRBMKDisplay.java
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKDisplay;
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.RBMKColumn;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class RenderRBMKDisplay extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||||
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
|
||||||
|
switch(te.getBlockMetadata()) {
|
||||||
|
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||||
|
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||||
|
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||||
|
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
TileEntityRBMKDisplay display = (TileEntityRBMKDisplay) te;
|
||||||
|
|
||||||
|
GL11.glTranslated(0, 0.5, 0);
|
||||||
|
GL11.glScaled(1, 8D / 7D, 8D / 7D);
|
||||||
|
GL11.glTranslated(0, -0.5, 0);
|
||||||
|
|
||||||
|
Tessellator tess = Tessellator.instance;
|
||||||
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||||
|
tess.startDrawingQuads();
|
||||||
|
tess.setBrightness(240);
|
||||||
|
tess.setNormal(1, 0, 0);
|
||||||
|
|
||||||
|
for(int i = 0; i < display.columns.length; i++) {
|
||||||
|
|
||||||
|
RBMKColumn col = display.columns[i];
|
||||||
|
|
||||||
|
if(col == null) continue;
|
||||||
|
|
||||||
|
double kx = 0.28125D;
|
||||||
|
double ky = -(i / 7) * 0.125 + 0.875;
|
||||||
|
double kz = -(i % 7) * 0.125 + 0.125D * 3;
|
||||||
|
|
||||||
|
if(col.data.hasKey("color") && col.data.getByte("color") >= 0) {
|
||||||
|
byte color = col.data.getByte("color");
|
||||||
|
if(color == 0) tess.setColorOpaque_I(0xFF0000);
|
||||||
|
if(color == 1) tess.setColorOpaque_I(0xFFFF00);
|
||||||
|
if(color == 2) tess.setColorOpaque_I(0x008000);
|
||||||
|
if(color == 3) tess.setColorOpaque_I(0x0000FF);
|
||||||
|
if(color == 4) tess.setColorOpaque_I(0x8000FF);
|
||||||
|
} else {
|
||||||
|
double heat = col.data.getDouble("heat") / col.data.getDouble("maxHeat");
|
||||||
|
double color = 0.65D + (i % 2) * 0.05D;
|
||||||
|
tess.setColorOpaque_F((float) (color + ((1 - color) * heat)), (float) color, (float) color);
|
||||||
|
}
|
||||||
|
|
||||||
|
drawColumn(tess, kx, ky, kz);
|
||||||
|
|
||||||
|
switch(col.type) {
|
||||||
|
case FUEL:
|
||||||
|
case FUEL_SIM: drawFuel(tess, kx + 0.01, ky, kz, col.data.getDouble("enrichment")); break;
|
||||||
|
case CONTROL: drawControl(tess, kx + 0.01, ky, kz, col.data.getDouble("level")); break;
|
||||||
|
case CONTROL_AUTO: drawControlAuto(tess, kx + 0.01, ky, kz, col.data.getDouble("level")); break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tess.draw();
|
||||||
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawColumn(Tessellator tess, double x, double y, double z) {
|
||||||
|
|
||||||
|
double width = 0.0625D * 0.75;
|
||||||
|
|
||||||
|
tess.addVertex(x, y + width, z - width);
|
||||||
|
tess.addVertex(x, y + width, z + width);
|
||||||
|
tess.addVertex(x, y - width, z + width);
|
||||||
|
tess.addVertex(x, y - width, z - width);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawFuel(Tessellator tess, double x, double y, double z, double enrichment) {
|
||||||
|
this.drawDot(tess, x, y, z, 0F, 0.25F + (float) (enrichment * 0.75D), 0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawControl(Tessellator tess, double x, double y, double z, double level) {
|
||||||
|
this.drawDot(tess, x, y, z, (float) level, (float) level, 0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawControlAuto(Tessellator tess, double x, double y, double z, double level) {
|
||||||
|
this.drawDot(tess, x, y, z, (float) level, 0F, (float) level);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawDot(Tessellator tess, double x, double y, double z, float r, float g, float b) {
|
||||||
|
|
||||||
|
double width = 0.03125D;
|
||||||
|
double edge = 0.022097D;
|
||||||
|
|
||||||
|
tess.setColorOpaque_F(r, g, b);
|
||||||
|
|
||||||
|
tess.addVertex(x, y + width, z);
|
||||||
|
tess.addVertex(x, y + edge, z + edge);
|
||||||
|
tess.addVertex(x, y, z + width);
|
||||||
|
tess.addVertex(x, y - edge, z + edge);
|
||||||
|
|
||||||
|
tess.addVertex(x, y + edge, z - edge);
|
||||||
|
tess.addVertex(x, y + width, z);
|
||||||
|
tess.addVertex(x, y - edge, z - edge);
|
||||||
|
tess.addVertex(x, y, z - width);
|
||||||
|
|
||||||
|
tess.addVertex(x, y + width, z);
|
||||||
|
tess.addVertex(x, y - edge, z + edge);
|
||||||
|
tess.addVertex(x, y - width, z);
|
||||||
|
tess.addVertex(x, y - edge, z - edge);
|
||||||
|
|
||||||
|
tess.setColorOpaque_F(1F, 1F, 1F);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -402,6 +402,7 @@ public class TileMappings {
|
|||||||
put(TileEntityRBMKStorage.class, "tileentity_rbmk_storage");
|
put(TileEntityRBMKStorage.class, "tileentity_rbmk_storage");
|
||||||
put(TileEntityCraneConsole.class, "tileentity_rbmk_crane_console");
|
put(TileEntityCraneConsole.class, "tileentity_rbmk_crane_console");
|
||||||
put(TileEntityRBMKConsole.class, "tileentity_rbmk_console");
|
put(TileEntityRBMKConsole.class, "tileentity_rbmk_console");
|
||||||
|
put(TileEntityRBMKDisplay.class, "tileentity_rbmk_display");
|
||||||
put(TileEntityRBMKInlet.class, "tileentity_rbmk_inlet");
|
put(TileEntityRBMKInlet.class, "tileentity_rbmk_inlet");
|
||||||
put(TileEntityRBMKOutlet.class, "tileentity_rbmk_outlet");
|
put(TileEntityRBMKOutlet.class, "tileentity_rbmk_outlet");
|
||||||
put(TileEntityRBMKAutoloader.class, "tileentity_rbmk_autoloader");
|
put(TileEntityRBMKAutoloader.class, "tileentity_rbmk_autoloader");
|
||||||
|
|||||||
@ -215,15 +215,16 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPa
|
|||||||
if(trait.getEfficiency(HeatingType.BOILER) > 0) {
|
if(trait.getEfficiency(HeatingType.BOILER) > 0) {
|
||||||
|
|
||||||
HeatingStep entry = trait.getFirstStep();
|
HeatingStep entry = trait.getFirstStep();
|
||||||
|
int heatReq = (int) Math.max(entry.heatReq / trait.getEfficiency(HeatingType.BOILER), 1);
|
||||||
int inputOps = this.tanks[0].getFill() / entry.amountReq;
|
int inputOps = this.tanks[0].getFill() / entry.amountReq;
|
||||||
int outputOps = (this.tanks[1].getMaxFill() - this.tanks[1].getFill()) / entry.amountProduced;
|
int outputOps = (this.tanks[1].getMaxFill() - this.tanks[1].getFill()) / entry.amountProduced;
|
||||||
int heatOps = this.heat / entry.heatReq;
|
int heatOps = this.heat / heatReq;
|
||||||
|
|
||||||
int ops = Math.min(inputOps, Math.min(outputOps, heatOps));
|
int ops = Math.min(inputOps, Math.min(outputOps, heatOps));
|
||||||
|
|
||||||
this.tanks[0].setFill(this.tanks[0].getFill() - entry.amountReq * ops);
|
this.tanks[0].setFill(this.tanks[0].getFill() - entry.amountReq * ops);
|
||||||
this.tanks[1].setFill(this.tanks[1].getFill() + entry.amountProduced * ops);
|
this.tanks[1].setFill(this.tanks[1].getFill() + entry.amountProduced * ops);
|
||||||
this.heat -= entry.heatReq * ops;
|
this.heat -= heatReq * ops;
|
||||||
|
|
||||||
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
||||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
||||||
|
|||||||
@ -201,15 +201,16 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
|||||||
if(trait.getEfficiency(HeatingType.BOILER) > 0) {
|
if(trait.getEfficiency(HeatingType.BOILER) > 0) {
|
||||||
|
|
||||||
HeatingStep entry = trait.getFirstStep();
|
HeatingStep entry = trait.getFirstStep();
|
||||||
|
int heatReq = (int) Math.max(entry.heatReq / trait.getEfficiency(HeatingType.BOILER), 1);
|
||||||
int inputOps = this.tanks[0].getFill() / entry.amountReq;
|
int inputOps = this.tanks[0].getFill() / entry.amountReq;
|
||||||
int outputOps = (this.tanks[1].getMaxFill() - this.tanks[1].getFill()) / entry.amountProduced;
|
int outputOps = (this.tanks[1].getMaxFill() - this.tanks[1].getFill()) / entry.amountProduced;
|
||||||
int heatOps = this.heat / entry.heatReq;
|
int heatOps = this.heat / heatReq;
|
||||||
|
|
||||||
int ops = Math.min(inputOps, Math.min(outputOps, heatOps));
|
int ops = Math.min(inputOps, Math.min(outputOps, heatOps));
|
||||||
|
|
||||||
this.tanks[0].setFill(this.tanks[0].getFill() - entry.amountReq * ops);
|
this.tanks[0].setFill(this.tanks[0].getFill() - entry.amountReq * ops);
|
||||||
this.tanks[1].setFill(this.tanks[1].getFill() + entry.amountProduced * ops);
|
this.tanks[1].setFill(this.tanks[1].getFill() + entry.amountProduced * ops);
|
||||||
this.heat -= entry.heatReq * ops;
|
this.heat -= heatReq * ops;
|
||||||
|
|
||||||
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
||||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
||||||
|
|||||||
@ -72,8 +72,10 @@ public class TileEntityRBMKAutoloader extends TileEntityMachineBase implements I
|
|||||||
TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
|
TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
if(tile instanceof TileEntityRBMKRod) {
|
if(tile instanceof TileEntityRBMKRod) {
|
||||||
TileEntityRBMKRod rod = (TileEntityRBMKRod) tile;
|
TileEntityRBMKRod rod = (TileEntityRBMKRod) tile;
|
||||||
if(rod.slots[0] == null || (rod.slots[0] != null && rod.slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getEnrichment(rod.slots[0]) * 100 < cycle)) {
|
if(rod.coldEnoughForAutoloader()) {
|
||||||
this.isRetracting = false;
|
if(rod.slots[0] == null || (rod.slots[0] != null && rod.slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getEnrichment(rod.slots[0]) * 100 < cycle)) {
|
||||||
|
this.isRetracting = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,7 +103,8 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
data.setString("type", "rbmksteam");
|
data.setString("type", "rbmksteam");
|
||||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, xCoord + 0.25 + worldObj.rand.nextInt(2) * 0.5, yCoord + RBMKDials.getColumnHeight(worldObj), zCoord + 0.25 + worldObj.rand.nextInt(2) * 0.5), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 100));
|
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, xCoord + 0.25 + worldObj.rand.nextInt(2) * 0.5, yCoord + RBMKDials.getColumnHeight(worldObj), zCoord + 0.25 + worldObj.rand.nextInt(2) * 0.5), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 100));
|
||||||
MainRegistry.proxy.effectNT(data);
|
MainRegistry.proxy.effectNT(data);
|
||||||
this.ventDelay = 20;
|
this.ventDelay = 20 + worldObj.rand.nextInt(10);
|
||||||
|
this.worldObj.playSoundEffect(xCoord, yCoord + RBMKDials.getColumnHeight(worldObj), zCoord, "hbm:block.steamEngineOperate", 2F, 1F + worldObj.rand.nextFloat() * 0.25F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +113,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
|
|||||||
|
|
||||||
this.trySubscribe(feed.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
this.trySubscribe(feed.getTankType(), worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||||
for(DirPos pos : getOutputPos()) {
|
for(DirPos pos : getOutputPos()) {
|
||||||
if(this.steam.getFill() > 0) this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
if(this.steam.getFill() > 0) this.tryProvide(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.hbm.inventory.gui.GUIRBMKControl;
|
|||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||||
import com.hbm.util.EnumUtil;
|
import com.hbm.util.EnumUtil;
|
||||||
|
|
||||||
|
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||||
import cpw.mods.fml.common.Optional;
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -22,7 +23,7 @@ import net.minecraft.util.MathHelper;
|
|||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class TileEntityRBMKControlManual extends TileEntityRBMKControl implements IControlReceiver, ICopiable {
|
public class TileEntityRBMKControlManual extends TileEntityRBMKControl implements IControlReceiver, ICopiable, IRORInteractive {
|
||||||
|
|
||||||
public RBMKColor color;
|
public RBMKColor color;
|
||||||
public double startingLevel;
|
public double startingLevel;
|
||||||
@ -193,4 +194,24 @@ public class TileEntityRBMKControlManual extends TileEntityRBMKControl implement
|
|||||||
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
||||||
if(nbt.hasKey("color")) color = EnumUtil.grabEnumSafely(RBMKColor.class, nbt.getInteger("color"));
|
if(nbt.hasKey("color")) color = EnumUtil.grabEnumSafely(RBMKColor.class, nbt.getInteger("color"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFunctionInfo() {
|
||||||
|
return new String[] {
|
||||||
|
PREFIX_FUNCTION + "setrods" + NAME_SEPARATOR + "percent"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String runRORFunction(String name, String[] params) {
|
||||||
|
|
||||||
|
if((PREFIX_FUNCTION + "setrods").equals(name) && params.length > 0) {
|
||||||
|
int percent = IRORInteractive.parseInt(params[0], 0, 100);
|
||||||
|
this.targetLevel = percent / 100D;
|
||||||
|
this.markDirty();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,147 @@
|
|||||||
|
package com.hbm.tileentity.machine.rbmk;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||||
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.RBMKColumn;
|
||||||
|
import com.hbm.util.BufferUtil;
|
||||||
|
import com.hbm.util.Compat;
|
||||||
|
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class TileEntityRBMKDisplay extends TileEntityLoadedBase {
|
||||||
|
|
||||||
|
private int targetX;
|
||||||
|
private int targetY;
|
||||||
|
private int targetZ;
|
||||||
|
|
||||||
|
private byte rotation;
|
||||||
|
|
||||||
|
public RBMKColumn[] columns = new RBMKColumn[7 * 7];
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
if(this.worldObj.getTotalWorldTime() % 10 == 0) {
|
||||||
|
rescan();
|
||||||
|
this.networkPackNT(50);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTarget(int x, int y, int z) {
|
||||||
|
this.targetX = x;
|
||||||
|
this.targetY = y;
|
||||||
|
this.targetZ = z;
|
||||||
|
this.markDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(ByteBuf buf) {
|
||||||
|
super.serialize(buf);
|
||||||
|
|
||||||
|
for(RBMKColumn column : this.columns) {
|
||||||
|
if(column == null || column.type == null)
|
||||||
|
buf.writeByte(-1);
|
||||||
|
else {
|
||||||
|
buf.writeByte((byte) column.type.ordinal());
|
||||||
|
BufferUtil.writeNBT(buf, column.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deserialize(ByteBuf buf) {
|
||||||
|
super.deserialize(buf);
|
||||||
|
|
||||||
|
for(int i = 0; i < this.columns.length; i++) {
|
||||||
|
byte ordinal = buf.readByte();
|
||||||
|
if(ordinal == -1)
|
||||||
|
this.columns[i] = null;
|
||||||
|
else
|
||||||
|
this.columns[i] = new RBMKColumn(ColumnType.values()[ordinal], BufferUtil.readNBT(buf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rescan() {
|
||||||
|
|
||||||
|
for(int index = 0; index < columns.length; index++) {
|
||||||
|
int rx = getXFromIndex(index);
|
||||||
|
int rz = getZFromIndex(index);
|
||||||
|
|
||||||
|
TileEntity te = Compat.getTileStandard(worldObj, targetX + rx, targetY, targetZ + rz);
|
||||||
|
|
||||||
|
if(te instanceof TileEntityRBMKBase) {
|
||||||
|
|
||||||
|
TileEntityRBMKBase rbmk = (TileEntityRBMKBase)te;
|
||||||
|
|
||||||
|
columns[index] = new RBMKColumn(rbmk.getConsoleType(), rbmk.getNBTForConsole());
|
||||||
|
columns[index].data.setDouble("heat", rbmk.heat);
|
||||||
|
columns[index].data.setDouble("maxHeat", rbmk.maxHeat());
|
||||||
|
|
||||||
|
if(te instanceof TileEntityRBMKControlManual) {
|
||||||
|
TileEntityRBMKControlManual control = (TileEntityRBMKControlManual) te;
|
||||||
|
if(control.color != null) {
|
||||||
|
columns[index].data.setByte("color", (byte) control.color.ordinal());
|
||||||
|
} else {
|
||||||
|
columns[index].data.setByte("color", (byte) -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
columns[index] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
|
||||||
|
this.targetX = nbt.getInteger("tX");
|
||||||
|
this.targetY = nbt.getInteger("tY");
|
||||||
|
this.targetZ = nbt.getInteger("tZ");
|
||||||
|
this.rotation = nbt.getByte("rotation");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
|
||||||
|
nbt.setInteger("tX", this.targetX);
|
||||||
|
nbt.setInteger("tY", this.targetY);
|
||||||
|
nbt.setInteger("tZ", this.targetZ);
|
||||||
|
nbt.setByte("rotation", this.rotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rotate() {
|
||||||
|
rotation = (byte)((rotation + 1) % 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getXFromIndex(int col) {
|
||||||
|
int i = col % 7 - 3;
|
||||||
|
int j = col / 7 - 3;
|
||||||
|
switch (rotation) {
|
||||||
|
case 0: return i;
|
||||||
|
case 1: return -j;
|
||||||
|
case 2: return -i;
|
||||||
|
case 3: return j;
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getZFromIndex(int col) {
|
||||||
|
int i = col % 7 - 3;
|
||||||
|
int j = col / 7 - 3;
|
||||||
|
switch (rotation) {
|
||||||
|
case 0: return j;
|
||||||
|
case 1: return i;
|
||||||
|
case 2: return -j;
|
||||||
|
case 3: return -i;
|
||||||
|
}
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -20,6 +20,7 @@ import com.hbm.util.BufferUtil;
|
|||||||
import com.hbm.util.CompatEnergyControl;
|
import com.hbm.util.CompatEnergyControl;
|
||||||
import com.hbm.util.ParticleUtil;
|
import com.hbm.util.ParticleUtil;
|
||||||
|
|
||||||
|
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||||
import api.hbm.tile.IInfoProviderEC;
|
import api.hbm.tile.IInfoProviderEC;
|
||||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
import cpw.mods.fml.common.Optional;
|
import cpw.mods.fml.common.Optional;
|
||||||
@ -43,7 +44,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBMKFluxReceiver, IRBMKLoadable, IInfoProviderEC, SimpleComponent, CompatHandler.OCComponent {
|
public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBMKFluxReceiver, IRBMKLoadable, IInfoProviderEC, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||||
|
|
||||||
// New system!!
|
// New system!!
|
||||||
// Used for receiving flux (calculating outbound flux/burning rods)
|
// Used for receiving flux (calculating outbound flux/burning rods)
|
||||||
@ -88,6 +89,28 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
|||||||
fluxFastRatio = (fastFlux + fastFluxIn) / fluxQuantity;
|
fluxFastRatio = (fastFlux + fastFluxIn) / fluxQuantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean coldEnoughForAutoloader() {
|
||||||
|
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||||
|
return ItemRBMKRod.getHullHeat(slots[0]) <= 1_000;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public boolean coldEnoughForManual() {
|
||||||
|
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||||
|
return ItemRBMKRod.getHullHeat(slots[0]) <= 200;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidate() {
|
||||||
|
super.invalidate();
|
||||||
|
|
||||||
|
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getHullHeat(slots[0]) >= 150) {
|
||||||
|
this.meltdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
@ -104,13 +127,8 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
|||||||
// Experimental flux ratio curve rods!
|
// Experimental flux ratio curve rods!
|
||||||
// Again, nothing really uses this so its just idle code at the moment.
|
// Again, nothing really uses this so its just idle code at the moment.
|
||||||
if(rod.specialFluxCurve) {
|
if(rod.specialFluxCurve) {
|
||||||
|
|
||||||
fluxRatioOut = rod.fluxRatioOut(this.fluxFastRatio, ItemRBMKRod.getEnrichment(slots[0]));
|
fluxRatioOut = rod.fluxRatioOut(this.fluxFastRatio, ItemRBMKRod.getEnrichment(slots[0]));
|
||||||
|
double fluxIn = rod.fluxFromRatio(this.fluxQuantity, this.fluxFastRatio);
|
||||||
double fluxIn;
|
|
||||||
|
|
||||||
fluxIn = rod.fluxFromRatio(this.fluxQuantity, this.fluxFastRatio);
|
|
||||||
|
|
||||||
fluxQuantityOut = rod.burn(worldObj, slots[0], fluxIn);
|
fluxQuantityOut = rod.burn(worldObj, slots[0], fluxIn);
|
||||||
} else {
|
} else {
|
||||||
NType rType = rod.rType;
|
NType rType = rod.rType;
|
||||||
@ -527,4 +545,25 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
|||||||
data.setDouble(CompatEnergyControl.D_MELT_C, ((ItemRBMKRod) slots[0].getItem()).meltingPoint);
|
data.setDouble(CompatEnergyControl.D_MELT_C, ((ItemRBMKRod) slots[0].getItem()).meltingPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFunctionInfo() {
|
||||||
|
return new String[] {
|
||||||
|
PREFIX_VALUE + "columnheat",
|
||||||
|
PREFIX_VALUE + "rodheat",
|
||||||
|
PREFIX_VALUE + "depletion",
|
||||||
|
PREFIX_VALUE + "xenon"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String provideRORValue(String name) {
|
||||||
|
if((PREFIX_VALUE + "columnheat").equals(name)) return "" + this.heat;
|
||||||
|
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod) {
|
||||||
|
if((PREFIX_VALUE + "rodheat").equals(name)) return "" + ItemRBMKRod.getHullHeat(slots[0]);
|
||||||
|
if((PREFIX_VALUE + "depletion").equals(name)) return "" + (100 - ItemRBMKRod.getEnrichment(slots[0]) * 100);
|
||||||
|
if((PREFIX_VALUE + "xenon").equals(name)) return "" + (ItemRBMKRod.getPoison(slots[0]) * 100);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public class TileEntityRBMKRodReaSim extends TileEntityRBMKRod {
|
|||||||
Vec3NT vec = new Vec3NT(1, 0, 0);
|
Vec3NT vec = new Vec3NT(1, 0, 0);
|
||||||
vec.rotateAroundYDeg(worldObj.rand.nextInt(4) * 9D);
|
vec.rotateAroundYDeg(worldObj.rand.nextInt(4) * 9D);
|
||||||
for(int i = 0; i < 8; i++) {
|
for(int i = 0; i < 8; i++) {
|
||||||
new RBMKNeutronHandler.RBMKNeutronStream(node, vec, flux * 0.5, ratio);
|
new RBMKNeutronHandler.RBMKNeutronStream(node, new Vec3NT(vec), flux * 0.75, ratio);
|
||||||
vec.rotateAroundYDeg(45D);
|
vec.rotateAroundYDeg(45D);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4884,7 +4884,10 @@ tile.rbmk_console.name=RBMK Konsole
|
|||||||
tile.rbmk_control.name=RBMK Steuerstäbe
|
tile.rbmk_control.name=RBMK Steuerstäbe
|
||||||
tile.rbmk_control_auto.name=RBMK Automatische Steuerstäbe
|
tile.rbmk_control_auto.name=RBMK Automatische Steuerstäbe
|
||||||
tile.rbmk_control_mod.name=RBMK Moderierte Steuerstäbe
|
tile.rbmk_control_mod.name=RBMK Moderierte Steuerstäbe
|
||||||
|
tile.rbmk_control_reasim.name=RBMK Steuerstäbe (ReaSim)
|
||||||
|
tile.rbmk_control_reasim_auto.name=RBMK Automatische Steuerstäbe (ReaSim)
|
||||||
tile.rbmk_crane_console.name=RBMK Kransteuerung
|
tile.rbmk_crane_console.name=RBMK Kransteuerung
|
||||||
|
tile.rbmk_display.name=RBMK Anzeigepanel
|
||||||
tile.rbmk_heater.name=RBMK-Heizer
|
tile.rbmk_heater.name=RBMK-Heizer
|
||||||
tile.rbmk_loader.name=RBMK-Dampfadapter
|
tile.rbmk_loader.name=RBMK-Dampfadapter
|
||||||
tile.rbmk_moderator.name=RBMK Graphitmoderator
|
tile.rbmk_moderator.name=RBMK Graphitmoderator
|
||||||
|
|||||||
@ -6163,7 +6163,10 @@ tile.rbmk_cooler.name=RBMK Cooler
|
|||||||
tile.rbmk_control.name=RBMK Control Rods
|
tile.rbmk_control.name=RBMK Control Rods
|
||||||
tile.rbmk_control_auto.name=RBMK Automatic Control Rods
|
tile.rbmk_control_auto.name=RBMK Automatic Control Rods
|
||||||
tile.rbmk_control_mod.name=RBMK Moderated Control Rods
|
tile.rbmk_control_mod.name=RBMK Moderated Control Rods
|
||||||
|
tile.rbmk_control_reasim.name=RBMK Control Rods (ReaSim)
|
||||||
|
tile.rbmk_control_reasim_auto.name=RBMK Automatic Control Rods (ReaSim)
|
||||||
tile.rbmk_crane_console.name=RBMK Crane Console
|
tile.rbmk_crane_console.name=RBMK Crane Console
|
||||||
|
tile.rbmk_display.name=RBMK Display Panel
|
||||||
tile.rbmk_heater.name=RBMK Fluid Heater
|
tile.rbmk_heater.name=RBMK Fluid Heater
|
||||||
tile.rbmk_loader.name=RBMK Steam Connector
|
tile.rbmk_loader.name=RBMK Steam Connector
|
||||||
tile.rbmk_loader.desc=Allows RBMKs to have both water and steam connections at the bottom$Place one water pipe below the RBMK column, then the connector,$then connect the steam duct to the connector.
|
tile.rbmk_loader.desc=Allows RBMKs to have both water and steam connections at the bottom$Place one water pipe below the RBMK column, then the connector,$then connect the steam duct to the connector.
|
||||||
@ -6226,6 +6229,14 @@ tile.rbmk.dodd.steam_amt=Steam Amount
|
|||||||
tile.rbmk.dodd.cryo_amt=Cryo Amount
|
tile.rbmk.dodd.cryo_amt=Cryo Amount
|
||||||
tile.rbmk.dodd.gas_amt=Gas Amount
|
tile.rbmk.dodd.gas_amt=Gas Amount
|
||||||
tile.rbmk.dodd.fuel_amt=Fuel Amount
|
tile.rbmk.dodd.fuel_amt=Fuel Amount
|
||||||
|
tile.rbmk.dodd.t0=Cold PFM Amount
|
||||||
|
tile.rbmk.dodd.t0_max=Cold PFM Capacity
|
||||||
|
tile.rbmk.dodd.t0_type=Cold PFM Type
|
||||||
|
tile.rbmk.dodd.t0_p=Cold PFM Pressure
|
||||||
|
tile.rbmk.dodd.t1=PFM Amount
|
||||||
|
tile.rbmk.dodd.t1_max=PFM Capacity
|
||||||
|
tile.rbmk.dodd.t1_type=PFM Type
|
||||||
|
tile.rbmk.dodd.t1_p=PFM Pressure
|
||||||
tile.reactor_computer.name=Reactor Control
|
tile.reactor_computer.name=Reactor Control
|
||||||
tile.reactor_conductor.name=Reactor Boiler
|
tile.reactor_conductor.name=Reactor Boiler
|
||||||
tile.reactor_control.name=Control Rods
|
tile.reactor_control.name=Control Rods
|
||||||
|
|||||||
|
After Width: | Height: | Size: 151 B |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 383 B |
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 443 B |