Merge branch 'HbmMods:master' into rulang

This commit is contained in:
Raaaaaaaaaay 2026-04-20 09:14:32 +03:00 committed by GitHub
commit 66e88e78a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
47 changed files with 802 additions and 244 deletions

View File

@ -1,20 +1,4 @@
## Added
* Redstone-over-radio lever
* Big breaker switches
* Up to two per module, side by side
* Can send different RoR values based on the lever's position
## Changed ## Changed
* All RoR panels now have basic item descriptions informing about the screwdriver requirement for configuration * RoR readers can now read neutron flux from fuel channels and the fill state of boilers and heat exchangers
* EMP grenades now deal 5x damage against anything with powered armor * Canned recursion can now be crafted from canned recursion
* Decreased base damage to compensate * Soldering recipes are now prioritized over anvil recipes in the NEI listing
* EMP grenades now destroy machines in a small radius like an EMP missile would
* Grenades are no longer affected by nuclear blasts or other grenade explosions
* Players no longer receive the starting guide book on first spawn since it's now very outdated
* All redstone-over-radio panels now have QMAW integration
## Fixed
* Fixed the grenade crafting handler not checking if a shell/filling combination is even valid, allowing weird combos
* Fixed dispenser fired laser grenades crashing the game
* Fixed schrabidium grenade being obscenely powerful for no reason
* Fixed annihilator recipe config throwing an error about the recipe list being empty, even though the recipe list should indeed be empty on purpose

View File

@ -1,6 +1,6 @@
mod_version=1.0.27 mod_version=1.0.27
# Empty build number makes a release type # Empty build number makes a release type
mod_build_number=5663 mod_build_number=5670
credits=HbMinecraft,\ credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\ \ rodolphito (explosion algorithms),\

View File

@ -866,7 +866,6 @@ public class ModBlocks {
@Deprecated public static Block fusion_heater; @Deprecated public static Block fusion_heater;
@Deprecated public static Block fusion_hatch; @Deprecated public static Block fusion_hatch;
@Deprecated public static Block plasma; // only actually used by the old plasma grenade, will die with the grenade rework
@Deprecated public static Block iter; @Deprecated public static Block iter;
@Deprecated public static Block plasma_heater; @Deprecated public static Block plasma_heater;
@ -1097,6 +1096,7 @@ public class ModBlocks {
public static Block rbmk_numitron; public static Block rbmk_numitron;
public static Block rbmk_graph; public static Block rbmk_graph;
public static Block rbmk_lever; public static Block rbmk_lever;
public static Block rbmk_indicator;
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;
@ -1984,7 +1984,6 @@ public class ModBlocks {
fusion_heater = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_heater_top").setBlockName("fusion_heater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_heater_side"); fusion_heater = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_heater_top").setBlockName("fusion_heater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_heater_side");
fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_hatch"); fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_hatch");
plasma = new BlockPlasma(Material.iron).setBlockName("plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma");
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":iter"); iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":iter");
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma_heater"); plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
@ -2120,6 +2119,7 @@ public class ModBlocks {
rbmk_numitron = new RBMKNumitron().setBlockName("rbmk_numitron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display"); rbmk_numitron = new RBMKNumitron().setBlockName("rbmk_numitron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_graph = new RBMKGraph().setBlockName("rbmk_graph").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display"); rbmk_graph = new RBMKGraph().setBlockName("rbmk_graph").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_lever = new RBMKLever().setBlockName("rbmk_lever").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display"); rbmk_lever = new RBMKLever().setBlockName("rbmk_lever").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_display");
rbmk_indicator = new RBMKIndicator().setBlockName("rbmk_indicator").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");
@ -3111,6 +3111,7 @@ public class ModBlocks {
register(rbmk_key_pad); register(rbmk_key_pad);
register(rbmk_lever); register(rbmk_lever);
register(rbmk_gauge); register(rbmk_gauge);
register(rbmk_indicator);
register(rbmk_numitron); register(rbmk_numitron);
register(rbmk_graph); register(rbmk_graph);
register(rbmk_autoloader); register(rbmk_autoloader);
@ -3345,7 +3346,6 @@ public class ModBlocks {
//Multiblock Generators //Multiblock Generators
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName()); GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName()); GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
GameRegistry.registerBlock(iter, iter.getUnlocalizedName()); GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName()); GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());

View File

@ -203,7 +203,7 @@ public class BlockKeyhole extends BlockStone {
int rand = world.rand.nextInt(20); int rand = world.rand.nextInt(20);
if(rand == 0) { if(rand == 0) {
world.setBlock(x, y + 1, z, ModBlocks.deco_loot); world.setBlock(x, y + 1, z, ModBlocks.deco_loot);
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y + 1, z); TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y + 1, z);
if(world.rand.nextInt(5) == 0) { if(world.rand.nextInt(5) == 0) {

View File

@ -1,42 +0,0 @@
package com.hbm.blocks.generic;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
@Deprecated
public class BlockPlasma extends Block {
public BlockPlasma(Material p_i45394_1_) {
super(p_i45394_1_);
this.setTickRandomly(true);
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(world.getGameRules().getGameRuleBooleanValue("doFireTick"))
world.setBlock(x, y, z, Blocks.air);
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
return null;
}
@Override
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) {
p_149670_5_.setFire(10);
p_149670_5_.setInWeb();
}
@Override public boolean isOpaqueCube() { return false; }
@Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return null; }
@Override public boolean renderAsNormalBlock() { return false; }
}

View File

@ -0,0 +1,50 @@
package com.hbm.blocks.machine.rbmk;
import org.lwjgl.opengl.GL11;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKIndicator;
import api.hbm.block.IToolable;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKIndicator extends RBMKMiniPanelBase implements IToolable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityRBMKIndicator();
}
@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) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
return true;
}
@Override
public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) {
super.renderInventoryBlock(block, meta, modelId, renderBlocks);
GL11.glPushMatrix();
GL11.glTranslated(0, -0.5, 0);
GL11.glRotated(-90, 0, 1, 0);
for(int i = 0; i < 6; i++) {
GL11.glPushMatrix();
GL11.glTranslated(0.25, (i / 2) * -0.3125 + 0.3125, (i % 2) * 0.5 - 0.25);
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.rbmk_indicator_tex);
ResourceManager.rbmk_indicator.renderAll();
GL11.glPopMatrix();
}
GL11.glPopMatrix();
}
}

View File

@ -54,7 +54,7 @@ public class BlockCablePaintable extends BlockContainer implements IToolable, IB
TileEntityCablePaintable pipe = (TileEntityCablePaintable) tile; TileEntityCablePaintable pipe = (TileEntityCablePaintable) tile;
if(pipe.block != null) { if(pipe.block != null) {
if(RenderBlockMultipass.currentPass == 1) { if(RenderBlockMultipass.currentPass == 1 && pipe.getBlockMetadata() == 0) {
return this.overlay; return this.overlay;
} else { } else {
return pipe.block.getIcon(side, pipe.meta); return pipe.block.getIcon(side, pipe.meta);
@ -103,20 +103,28 @@ public class BlockCablePaintable extends BlockContainer implements IToolable, IB
@Override @Override
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { 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(tool == ToolType.SCREWDRIVER) {
TileEntity tile = world.getTileEntity(x, y, z); TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityCablePaintable) { if(tile instanceof TileEntityCablePaintable) {
TileEntityCablePaintable pipe = (TileEntityCablePaintable) tile; TileEntityCablePaintable pipe = (TileEntityCablePaintable) tile;
if(pipe.block != null) { if(pipe.block != null) {
pipe.block = null; pipe.block = null;
world.markBlockForUpdate(x, y, z); world.markBlockForUpdate(x, y, z);
pipe.markDirty(); pipe.markDirty();
return true; return true;
}
} }
} }
if(tool == ToolType.DEFUSER) {
int meta = world.getBlockMetadata(x, y, z);
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
else world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
}
return false; return false;
} }

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.network; package com.hbm.blocks.network;
import api.hbm.block.IToolable; import api.hbm.block.IToolable;
import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.IBlockMultiPass;
import com.hbm.interfaces.ICopiable; import com.hbm.interfaces.ICopiable;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
@ -66,6 +67,7 @@ public class BlockOpenComputersCablePaintable extends BlockContainer implements
TileEntityOpenComputersCablePaintable pipe = (TileEntityOpenComputersCablePaintable) tile; TileEntityOpenComputersCablePaintable pipe = (TileEntityOpenComputersCablePaintable) tile;
if(pipe.block != null) { if(pipe.block != null) {
if(pipe.getBlockMetadata() != 0) pipe.block.getIcon(side, pipe.meta);
if(RenderBlockMultipass.currentPass == 1) { if(RenderBlockMultipass.currentPass == 1) {
return this.overlay; return this.overlay;
} else if(RenderBlockMultipass.currentPass == 2) { } else if(RenderBlockMultipass.currentPass == 2) {
@ -144,20 +146,26 @@ public class BlockOpenComputersCablePaintable extends BlockContainer implements
@Override @Override
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { 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(tool == ToolType.SCREWDRIVER) {
TileEntity tile = world.getTileEntity(x, y, z);
TileEntity tile = world.getTileEntity(x, y, z); if(tile instanceof TileEntityOpenComputersCablePaintable) {
TileEntityOpenComputersCablePaintable pipe = (TileEntityOpenComputersCablePaintable) tile;
if(tile instanceof TileEntityOpenComputersCablePaintable) {
TileEntityOpenComputersCablePaintable pipe = (TileEntityOpenComputersCablePaintable) tile; if(pipe.block != null) {
pipe.block = null;
if(pipe.block != null) { world.markBlockForUpdate(x, y, z);
pipe.block = null; pipe.markDirty();
world.markBlockForUpdate(x, y, z); return true;
pipe.markDirty(); }
return true;
} }
} }
if(tool == ToolType.DEFUSER) {
int meta = world.getBlockMetadata(x, y, z);
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
else world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
}
return false; return false;
} }

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.network; package com.hbm.blocks.network;
import api.hbm.block.IToolable; import api.hbm.block.IToolable;
import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.IBlockMultiPass;
import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ILookOverlay;
import com.hbm.interfaces.ICopiable; import com.hbm.interfaces.ICopiable;
@ -58,7 +59,7 @@ public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlo
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile; TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
if(pipe.block != null) { if(pipe.block != null) {
if(RenderBlockMultipass.currentPass == 1) { if(RenderBlockMultipass.currentPass == 1 && pipe.getBlockMetadata() == 0) {
return this.overlay; return this.overlay;
} else { } else {
return pipe.block.getIcon(side, pipe.meta); return pipe.block.getIcon(side, pipe.meta);
@ -122,20 +123,27 @@ public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlo
@Override @Override
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { 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(tool == ToolType.SCREWDRIVER) {
TileEntity tile = world.getTileEntity(x, y, z);
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityPipePaintable) {
if(tile instanceof TileEntityPipePaintable) { TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
TileEntityPipePaintable pipe = (TileEntityPipePaintable) tile;
if(pipe.block != null) {
if(pipe.block != null) { pipe.block = null;
pipe.block = null; world.markBlockForUpdate(x, y, z);
world.markBlockForUpdate(x, y, z); pipe.markDirty();
pipe.markDirty(); return true;
return true; }
} }
} }
if(tool == ToolType.DEFUSER) {
int meta = world.getBlockMetadata(x, y, z);
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
else world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
}
return false; return false;
} }

View File

@ -37,7 +37,7 @@ public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements ITo
@SideOnly(Side.CLIENT) protected IIcon overlay; @SideOnly(Side.CLIENT) protected IIcon overlay;
public FluidDuctPaintableBlockExhaust() { public FluidDuctPaintableBlockExhaust() {
super(Material.iron); super(Material.iron);
} }
@Override @Override
@ -61,7 +61,7 @@ public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements ITo
TileEntityPipeExhaustPaintable pipe = (TileEntityPipeExhaustPaintable) tile; TileEntityPipeExhaustPaintable pipe = (TileEntityPipeExhaustPaintable) tile;
if(pipe.block != null) { if(pipe.block != null) {
if(RenderBlockMultipass.currentPass == 1) { if(RenderBlockMultipass.currentPass == 1 && pipe.getBlockMetadata() == 0) {
return this.overlay; return this.overlay;
} else { } else {
return pipe.block.getIcon(side, pipe.meta); return pipe.block.getIcon(side, pipe.meta);
@ -75,20 +75,27 @@ public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements ITo
@Override @Override
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { 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(tool == ToolType.SCREWDRIVER) {
TileEntity tile = world.getTileEntity(x, y, z);
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityPipeExhaustPaintable) {
if(tile instanceof TileEntityPipeExhaustPaintable) { TileEntityPipeExhaustPaintable pipe = (TileEntityPipeExhaustPaintable) tile;
TileEntityPipeExhaustPaintable pipe = (TileEntityPipeExhaustPaintable) tile;
if(pipe.block != null) {
if(pipe.block != null) { pipe.block = null;
pipe.block = null; world.markBlockForUpdate(x, y, z);
world.markBlockForUpdate(x, y, z); pipe.markDirty();
pipe.markDirty(); return true;
return true; }
} }
} }
if(tool == ToolType.DEFUSER) {
int meta = world.getBlockMetadata(x, y, z);
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
else world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
}
return false; return false;
} }

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.network; package com.hbm.blocks.network;
import api.hbm.block.IToolable; import api.hbm.block.IToolable;
import com.hbm.blocks.IBlockMultiPass; import com.hbm.blocks.IBlockMultiPass;
import com.hbm.interfaces.ICopiable; import com.hbm.interfaces.ICopiable;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
@ -58,7 +59,7 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
if(tile instanceof TileEntityPneumoTubePaintable) { if(tile instanceof TileEntityPneumoTubePaintable) {
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile; TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
if(RenderBlockMultipass.currentPass == 0) { if(RenderBlockMultipass.currentPass == 0 || tube.getBlockMetadata() != 0) {
if(tube.block != null) { if(tube.block != null) {
return tube.block.getIcon(side, tube.meta); return tube.block.getIcon(side, tube.meta);
} else { } else {
@ -123,7 +124,14 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
((WorldServer) world).getPlayerManager().markBlockForUpdate(x, y, z); ((WorldServer) world).getPlayerManager().markBlockForUpdate(x, y, z);
return true; return true;
} else if(tool == ToolType.DEFUSER) {
int meta = world.getBlockMetadata(x, y, z);
if(meta == 0) world.setBlockMetadataWithNotify(x, y, z, 1, 3);
else world.setBlockMetadataWithNotify(x, y, z, 0, 3);
return true;
} }
return false; return false;
} }
@ -149,7 +157,7 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
} }
} }
} }
} else if(ToolType.getType(stack) == ToolType.SCREWDRIVER || ToolType.getType(stack) == ToolType.HAND_DRILL) return false; } else if(ToolType.getType(stack) == ToolType.SCREWDRIVER || ToolType.getType(stack) == ToolType.HAND_DRILL || ToolType.getType(stack) == ToolType.DEFUSER) return false;
if(!player.isSneaking()) { if(!player.isSneaking()) {
TileEntity tile = world.getTileEntity(x, y, z); TileEntity tile = world.getTileEntity(x, y, z);

View File

@ -10,6 +10,7 @@ import com.hbm.items.weapon.grenade.ItemGrenadeFilling.EnumGrenadeFilling;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.ItemEnums; import com.hbm.items.ItemEnums;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.food.ItemConserve.EnumFoodType;
import com.hbm.main.CraftingManager; import com.hbm.main.CraftingManager;
import static com.hbm.inventory.OreDictManager.*; import static com.hbm.inventory.OreDictManager.*;
@ -63,6 +64,7 @@ public class ConsumableRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_smore), new Object[] { Items.wheat, new ItemStack(ModItems.marshmallow, 1, 1), new ItemStack(Items.dye, 1, 3) }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_smore), new Object[] { Items.wheat, new ItemStack(ModItems.marshmallow, 1, 1), new ItemStack(Items.dye, 1, 3) });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.marshmallow), new Object[] { Items.stick, Items.sugar, Items.wheat_seeds }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.marshmallow), new Object[] { Items.stick, Items.sugar, Items.wheat_seeds });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.quesadilla, 3), new Object[] { ModItems.cheese, ModItems.cheese, Items.bread }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.quesadilla, 3), new Object[] { ModItems.cheese, ModItems.cheese, Items.bread });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.canned_conserve, 1, EnumFoodType.RECURSION.ordinal()), new Object[] { new ItemStack(ModItems.canned_conserve, 1, EnumFoodType.RECURSION.ordinal()) });
//Peas //Peas
CraftingManager.addRecipeAuto(new ItemStack(ModItems.peas), new Object[] { " S ", "SNS", " S ", 'S', Items.wheat_seeds, 'N', GOLD.nugget() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.peas), new Object[] { " S ", "SNS", " S ", 'S', Items.wheat_seeds, 'N', GOLD.nugget() });

View File

@ -501,28 +501,6 @@ public class ExplosionChaos { //TODO: destroy this entire class
radius = (int) f; radius = (int) f;
} }
public static void plasma(World world, int x, int y, int z, int radius) {
int r = radius;
int r2 = r * r;
int r22 = r2 / 2;
for (int xx = -r; xx < r; xx++) {
int X = xx + x;
int XX = xx * xx;
for (int yy = -r; yy < r; yy++) {
int Y = yy + y;
int YY = XX + yy * yy;
for (int zz = -r; zz < r; zz++) {
int Z = zz + z;
int ZZ = YY + zz * zz;
if (ZZ < r22 + world.rand.nextInt(r22 / 2)) {
if(world.getBlock(X, Y, Z) != ModBlocks.statue_elb_f)
world.setBlock(X, Y, Z, ModBlocks.plasma);
}
}
}
}
}
public static void levelDown(World world, int x, int y, int z, int radius) { public static void levelDown(World world, int x, int y, int z, int radius) {
if(!world.isRemote) if(!world.isRemote)

View File

@ -19,7 +19,7 @@ import net.minecraft.util.ResourceLocation;
public class GUIScreenRBMKGauge extends GuiScreen { public class GUIScreenRBMKGauge extends GuiScreen {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rbmk_gauge.png"); private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rbmk_gauge.png");
public TileEntityRBMKGauge keypad; public TileEntityRBMKGauge gauge;
protected int xSize = 256; protected int xSize = 256;
protected int ySize = 204; protected int ySize = 204;
protected int guiLeft; protected int guiLeft;
@ -33,8 +33,8 @@ public class GUIScreenRBMKGauge extends GuiScreen {
protected boolean[] active = new boolean[4]; protected boolean[] active = new boolean[4];
protected boolean[] polling = new boolean[4]; protected boolean[] polling = new boolean[4];
public GUIScreenRBMKGauge(TileEntityRBMKGauge keypad) { public GUIScreenRBMKGauge(TileEntityRBMKGauge gauge) {
this.keypad = keypad; this.gauge = gauge;
} }
@Override @Override
@ -49,21 +49,21 @@ public class GUIScreenRBMKGauge extends GuiScreen {
int oY = 4; int oY = 4;
for(int i = 0; i < 4; i++) { for(int i = 0; i < 4; i++) {
String col = Integer.toHexString(keypad.gauges[i].color); String col = Integer.toHexString(gauge.gauges[i].color);
while(col.length() < 6) col = "0" + col; while(col.length() < 6) col = "0" + col;
color[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14); color[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(color[i], 6, col); GUIScreenRBMKKeyPad.setupTextFieldStandard(color[i], 6, col);
label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14); label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, keypad.gauges[i].label); GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, gauge.gauges[i].label);
rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 73 + oY + i * 36, 72 - oX * 2, 14); rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 73 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, keypad.gauges[i].rtty); GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, gauge.gauges[i].rtty);
min[i] = new GuiTextField(this.fontRendererObj, guiLeft + 121 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14); min[i] = new GuiTextField(this.fontRendererObj, guiLeft + 121 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(min[i], 32, keypad.gauges[i].min + ""); GUIScreenRBMKKeyPad.setupTextFieldStandard(min[i], 32, gauge.gauges[i].min + "");
max[i] = new GuiTextField(this.fontRendererObj, guiLeft + 195 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14); max[i] = new GuiTextField(this.fontRendererObj, guiLeft + 195 + oX, guiTop + 73 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(max[i], 32, keypad.gauges[i].max + ""); GUIScreenRBMKKeyPad.setupTextFieldStandard(max[i], 32, gauge.gauges[i].max + "");
active[i] = keypad.gauges[i].active; active[i] = gauge.gauges[i].active;
polling[i] = keypad.gauges[i].polling; polling[i] = gauge.gauges[i].polling;
} }
} }
@ -137,7 +137,7 @@ public class GUIScreenRBMKGauge extends GuiScreen {
try { data.setInteger("min" + i, Integer.parseInt(this.min[i].getText())); } catch(Exception ex) { } try { data.setInteger("min" + i, Integer.parseInt(this.min[i].getText())); } catch(Exception ex) { }
try { data.setInteger("max" + i, Integer.parseInt(this.max[i].getText())); } catch(Exception ex) { } try { data.setInteger("max" + i, Integer.parseInt(this.max[i].getText())); } catch(Exception ex) { }
} }
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, keypad.xCoord, keypad.yCoord, keypad.zCoord)); PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, gauge.xCoord, gauge.yCoord, gauge.zCoord));
return; return;
} }

View File

@ -0,0 +1,174 @@
package com.hbm.inventory.gui;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKIndicator;
import com.hbm.util.i18n.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
public class GUIScreenRBMKIndicator extends GuiScreen {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_rbmk_indicator.png");
public TileEntityRBMKIndicator indicator;
protected int xSize = 256;
protected int ySize = 258; // idk if this is a good idea
protected int guiLeft;
protected int guiTop;
protected GuiTextField[] color = new GuiTextField[6];
protected GuiTextField[] label = new GuiTextField[6];
protected GuiTextField[] rtty = new GuiTextField[6];
protected GuiTextField[] min = new GuiTextField[6];
protected GuiTextField[] max = new GuiTextField[6];
protected boolean[] active = new boolean[6];
protected boolean[] polling = new boolean[6];
public GUIScreenRBMKIndicator(TileEntityRBMKIndicator indicator) {
this.indicator = indicator;
}
@Override
public void initGui() {
super.initGui();
this.guiLeft = (this.width - this.xSize) / 2;
this.guiTop = (this.height - this.ySize) / 2;
Keyboard.enableRepeatEvents(true);
int oX = 4;
int oY = 4;
for(int i = 0; i < 6; i++) {
String col = Integer.toHexString(indicator.indicators[i].color);
while(col.length() < 6) col = "0" + col;
color[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 37 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(color[i], 6, col);
label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 37 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, indicator.indicators[i].label);
rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 36, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, indicator.indicators[i].rtty);
min[i] = new GuiTextField(this.fontRendererObj, guiLeft + 121 + oX, guiTop + 55 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(min[i], 32, indicator.indicators[i].min + "");
max[i] = new GuiTextField(this.fontRendererObj, guiLeft + 195 + oX, guiTop + 55 + oY + i * 36, 52 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(max[i], 32, indicator.indicators[i].max + "");
active[i] = indicator.indicators[i].active;
polling[i] = indicator.indicators[i].polling;
}
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
this.drawDefaultBackground();
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
GL11.glDisable(GL11.GL_LIGHTING);
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
GL11.glEnable(GL11.GL_LIGHTING);
}
private void drawGuiContainerForegroundLayer(int x, int y) {
String name = I18nUtil.resolveKey("container.rbmkIndicator");
this.fontRendererObj.drawString(name, this.guiLeft + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, this.guiTop + 6, 4210752);
}
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, 256, 143);
drawTexturedModalRect(guiLeft, guiTop + 143, 0, 35, 256, 115);
for(int i = 0; i < 6; i++) {
drawTexturedModalRect(guiLeft + 102, guiTop + 112 + 36 + i * 36, 34 + 8 * i, 150, 8, 8);
if(this.active[i]) drawTexturedModalRect(guiLeft + 111, guiTop + i * 36 + 36, 18, 150, 16, 16);
if(this.polling[i]) drawTexturedModalRect(guiLeft + 128, guiTop + i * 36 + 35, 0, 150, 18, 18);
}
for(int i = 0; i < 6; i++) {
this.color[i].drawTextBox();
this.label[i].drawTextBox();
this.rtty[i].drawTextBox();
this.min[i].drawTextBox();
this.max[i].drawTextBox();
}
}
@Override
protected void mouseClicked(int x, int y, int b) {
super.mouseClicked(x, y, b);
for(int i = 0; i < 6; i++) {
if(guiLeft + 111 <= x && guiLeft + 111 + 16 > x && guiTop + i * 36 + 36 < y && guiTop + i * 36 + 36 + 16 >= y) {
this.active[i] = !this.active[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.active[i] ? 0.25F : 0F)));
return;
}
if(guiLeft + 128 <= x && guiLeft + 128 + 18 > x && guiTop + i * 36 + 35 < y && guiTop + i * 36 + 35 + 18 >= y) {
this.polling[i] = !this.polling[i];
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 0.5F + (this.polling[i] ? 0.25F : 0F)));
return;
}
}
if(guiLeft + 209 <= x && guiLeft + 209 + 18 > x && guiTop + 8 < y && guiTop + 8 + 18 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
byte active = 0;
byte polling = 0;
for(int i = 0; i < 6; i++) {
if(this.active[i]) active |= 1 << i;
if(this.polling[i]) polling |= 1 << i;
}
data.setByte("active", active);
data.setByte("polling", polling);
for(int i = 0; i < 6; i++) {
try { data.setInteger("color" + i, Integer.parseInt(this.color[i].getText(), 16)); } catch(Exception ex) { }
data.setString("label" + i, this.label[i].getText());
data.setString("rtty" + i, this.rtty[i].getText());
try { data.setInteger("min" + i, Integer.parseInt(this.min[i].getText())); } catch(Exception ex) { }
try { data.setInteger("max" + i, Integer.parseInt(this.max[i].getText())); } catch(Exception ex) { }
}
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, indicator.xCoord, indicator.yCoord, indicator.zCoord));
return;
}
for(int i = 0; i < 6; i++) {
this.color[i].mouseClicked(x, y, b);
this.label[i].mouseClicked(x, y, b);
this.rtty[i].mouseClicked(x, y, b);
this.min[i].mouseClicked(x, y, b);
this.max[i].mouseClicked(x, y, b);
}
}
@Override
protected void keyTyped(char c, int b) {
for(int i = 0; i < 6; i++) {
if(this.color[i].textboxKeyTyped(c, b)) return;
if(this.label[i].textboxKeyTyped(c, b)) return;
if(this.rtty[i].textboxKeyTyped(c, b)) return;
if(this.min[i].textboxKeyTyped(c, b)) return;
if(this.max[i].textboxKeyTyped(c, b)) return;
}
if(b == 1 || b == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
this.mc.thePlayer.closeScreen();
this.mc.setIngameFocus();
}
}
@Override public void onGuiClosed() { Keyboard.enableRepeatEvents(false); }
@Override public boolean doesGuiPauseGame() { return false; }
}

View File

@ -51,13 +51,13 @@ public class GUIScreenRBMKLever extends GuiScreen {
int oY = 4; int oY = 4;
for(int i = 0; i < 2; i++) { for(int i = 0; i < 2; i++) {
rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 52, 72 - oX * 2, 14); rtty[i] = new GuiTextField(this.fontRendererObj, guiLeft + 27 + oX, guiTop + 55 + oY + i * 54, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, lever.levers[i].rtty); GUIScreenRBMKKeyPad.setupTextFieldStandard(rtty[i], 10, lever.levers[i].rtty);
label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 52, 72 - oX * 2, 14); label[i] = new GuiTextField(this.fontRendererObj, guiLeft + 175 + oX, guiTop + 55 + oY + i * 54, 72 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, lever.levers[i].label); GUIScreenRBMKKeyPad.setupTextFieldStandard(label[i], 15, lever.levers[i].label);
cmdOn[i] = new GuiTextField(this.fontRendererObj, guiLeft + 45 + oX, guiTop + 73 + oY + i * 52, 81 - oX * 2, 14); cmdOn[i] = new GuiTextField(this.fontRendererObj, guiLeft + 45 + oX, guiTop + 73 + oY + i * 54, 81 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(cmdOn[i], 32, lever.levers[i].commandOn); GUIScreenRBMKKeyPad.setupTextFieldStandard(cmdOn[i], 32, lever.levers[i].commandOn);
cmdOff[i] = new GuiTextField(this.fontRendererObj, guiLeft + 166 + oX, guiTop + 73 + oY + i * 52, 81 - oX * 2, 14); cmdOff[i] = new GuiTextField(this.fontRendererObj, guiLeft + 166 + oX, guiTop + 73 + oY + i * 54, 81 - oX * 2, 14);
GUIScreenRBMKKeyPad.setupTextFieldStandard(cmdOff[i], 32, lever.levers[i].commandOff); GUIScreenRBMKKeyPad.setupTextFieldStandard(cmdOff[i], 32, lever.levers[i].commandOff);
active[i] = lever.levers[i].active; active[i] = lever.levers[i].active;

View File

@ -1026,6 +1026,19 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(Items.bone, 1), 0.75F), new AnvilOutput(new ItemStack(Items.bone, 1), 0.75F),
new AnvilOutput(new ItemStack(Items.experience_bottle, 1), 0.5F) new AnvilOutput(new ItemStack(Items.experience_bottle, 1), 0.5F)
}).setTier(1)); }).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.fusion_heater), new AnvilOutput[] {
new AnvilOutput(new ItemStack(ModItems.pipe, 4, Mats.MAT_STEEL.id)),
new AnvilOutput(new ItemStack(ModItems.pipe, 2, Mats.MAT_COPPER.id)),
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.ANALOG.ordinal()), 0.5F)
}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.fusion_hatch), new AnvilOutput[] {
new AnvilOutput(new ItemStack(ModItems.pipe, 4, Mats.MAT_STEEL.id)),
new AnvilOutput(new ItemStack(ModItems.pipe, 4, Mats.MAT_COPPER.id)),
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.ANALOG.ordinal()), 0.75F)
}).setTier(1));
} }
public static List<AnvilSmithingRecipe> getSmithing() { public static List<AnvilSmithingRecipe> getSmithing() {

View File

@ -59,7 +59,7 @@ public class ItemBlockLore extends ItemBlockBase {
if(this.field_150939_a == ModBlocks.gravel_diamond) if(this.field_150939_a == ModBlocks.gravel_diamond)
return EnumRarity.rare; return EnumRarity.rare;
if(this.field_150939_a == ModBlocks.block_euphemium || this.field_150939_a == ModBlocks.block_euphemium_cluster || this.field_150939_a == ModBlocks.plasma) if(this.field_150939_a == ModBlocks.block_euphemium || this.field_150939_a == ModBlocks.block_euphemium_cluster)
return EnumRarity.epic; return EnumRarity.epic;
return EnumRarity.common; return EnumRarity.common;

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings { public class RefStrings {
public static final String MODID = "hbm"; public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod"; public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (5663)"; public static final String VERSION = "1.0.27 BETA (5670)";
//HBM's Beta Naming Convention: //HBM's Beta Naming Convention:
//V T (X) //V T (X)
//V -> next release version //V -> next release version

View File

@ -416,6 +416,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKNumitron.class, new RenderRBMKNumitron()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKNumitron.class, new RenderRBMKNumitron());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKGraph.class, new RenderRBMKGraph()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKGraph.class, new RenderRBMKGraph());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKLever.class, new RenderRBMKLever()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKLever.class, new RenderRBMKLever());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKIndicator.class, new RenderRBMKIndicator());
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());

View File

@ -797,6 +797,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.rbmk_numitron, 1), new Object[] { " R ", "CCC", " B ", 'R', ModBlocks.radio_torch_receiver, 'B', ModBlocks.rbmk_display_blank, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.NUMITRON) }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_numitron, 1), new Object[] { " R ", "CCC", " B ", 'R', ModBlocks.radio_torch_receiver, 'B', ModBlocks.rbmk_display_blank, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.NUMITRON) });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_graph, 1), new Object[] { "R", "C", "B", 'R', ModBlocks.radio_torch_receiver, 'B', ModBlocks.rbmk_display_blank, 'C', ModItems.crt_display }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_graph, 1), new Object[] { "R", "C", "B", 'R', ModBlocks.radio_torch_receiver, 'B', ModBlocks.rbmk_display_blank, 'C', ModItems.crt_display });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_lever, 1), new Object[] { "R", "C", "B", 'R', ModBlocks.radio_torch_sender, 'B', ModBlocks.rbmk_display_blank, 'C', CU.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.rbmk_lever, 1), new Object[] { "R", "C", "B", 'R', ModBlocks.radio_torch_sender, 'B', ModBlocks.rbmk_display_blank, 'C', CU.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.rbmk_indicator, 1), new Object[] { "R", "C", "B", 'R', ModBlocks.radio_torch_receiver, 'B', ModBlocks.rbmk_display_blank, 'C', ModItems.coil_tungsten });
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 });
addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk_smooth, 1), new Object[] { "R", 'R', ModBlocks.deco_rbmk }); addRecipeAuto(new ItemStack(ModBlocks.deco_rbmk_smooth, 1), new Object[] { "R", 'R', ModBlocks.deco_rbmk });

View File

@ -1569,6 +1569,7 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.grenade_if_null"); ignoreMappings.add("hbm:item.grenade_if_null");
ignoreMappings.add("hbm:item.grenade_kit"); ignoreMappings.add("hbm:item.grenade_kit");
ignoreMappings.add("hbm:item.nuclear_waste_pearl"); ignoreMappings.add("hbm:item.nuclear_waste_pearl");
ignoreMappings.add("hbm:tile.plasma");
/// REMAP /// /// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -18,6 +18,7 @@ public class NEIRegistry {
handlers.add(new ToolingHandler()); handlers.add(new ToolingHandler());
handlers.add(new ConstructionHandler()); handlers.add(new ConstructionHandler());
handlers.add(new AnnihilatorHandler()); handlers.add(new AnnihilatorHandler());
handlers.add(new SolderingStationHandler());
handlers.add(new AnvilRecipeHandler()); handlers.add(new AnvilRecipeHandler());
handlers.add(new SmithingRecipeHandler()); handlers.add(new SmithingRecipeHandler());
handlers.add(new PressRecipeHandler()); handlers.add(new PressRecipeHandler());
@ -72,7 +73,6 @@ public class NEIRegistry {
handlers.add(new ElectrolyserMetalHandler()); handlers.add(new ElectrolyserMetalHandler());
handlers.add(new AshpitHandler()); handlers.add(new AshpitHandler());
handlers.add(new ArcWelderHandler()); handlers.add(new ArcWelderHandler());
handlers.add(new SolderingStationHandler());
handlers.add(new ExposureChamberHandler()); handlers.add(new ExposureChamberHandler());
handlers.add(new ArcFurnaceSolidHandler()); handlers.add(new ArcFurnaceSolidHandler());
handlers.add(new ArcFurnaceFluidHandler()); handlers.add(new ArcFurnaceFluidHandler());

View File

@ -1641,6 +1641,7 @@ public class ResourceManager {
public static final HFRWavefrontObjectVBO rbmk_gauge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/gauge.obj")).asVBO(); public static final HFRWavefrontObjectVBO rbmk_gauge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/gauge.obj")).asVBO();
public static final HFRWavefrontObjectVBO rbmk_numitron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/numitron.obj")).asVBO(); public static final HFRWavefrontObjectVBO rbmk_numitron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/numitron.obj")).asVBO();
public static final HFRWavefrontObjectVBO rbmk_lever = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/lever.obj")).asVBO(); public static final HFRWavefrontObjectVBO rbmk_lever = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/lever.obj")).asVBO();
public static final HFRWavefrontObjectVBO rbmk_indicator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/indicator.obj")).asVBO();
public static final HFRWavefrontObject rbmk_debris = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/debris.obj")).noSmooth(); public static final HFRWavefrontObject rbmk_debris = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/debris.obj")).noSmooth();
public static final ResourceLocation rbmk_crane_console_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/crane_console.png"); public static final ResourceLocation rbmk_crane_console_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/crane_console.png");
public static final ResourceLocation rbmk_crane_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_crane.png"); public static final ResourceLocation rbmk_crane_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_crane.png");
@ -1651,6 +1652,7 @@ public class ResourceManager {
public static final ResourceLocation rbmk_numitron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/numitron.png"); public static final ResourceLocation rbmk_numitron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/numitron.png");
public static final ResourceLocation rbmk_numitron_lights_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/numitron_lights.png"); public static final ResourceLocation rbmk_numitron_lights_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/numitron_lights.png");
public static final ResourceLocation rbmk_lever_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/lever.png"); public static final ResourceLocation rbmk_lever_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/lever.png");
public static final ResourceLocation rbmk_indicator_tex = new ResourceLocation(RefStrings.MODID, "textures/models/network/indicator.png");
public static final HFRWavefrontObject hev_battery = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/battery.obj")).noSmooth(); public static final HFRWavefrontObject hev_battery = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/battery.obj")).noSmooth();
public static final HFRWavefrontObject anvil = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/anvil.obj")).noSmooth(); public static final HFRWavefrontObject anvil = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/anvil.obj")).noSmooth();
public static final HFRWavefrontObject crystal_power = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/crystals_power.obj")).noSmooth(); public static final HFRWavefrontObject crystal_power = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/crystals_power.obj")).noSmooth();

View File

@ -3,44 +3,52 @@ package com.hbm.render.entity.effect;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import com.hbm.entity.effect.EntityCloudSolinium; import com.hbm.entity.effect.EntityCloudSolinium;
import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager;
import com.hbm.util.ColorUtil;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderCloudSolinium extends Render { public class RenderCloudSolinium extends Render {
private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Sphere.obj");
private IModelCustom blastModel;
private ResourceLocation blastTexture;
public float scale = 0;
public float ring = 0;
public RenderCloudSolinium() {
blastModel = AdvancedModelLoader.loadModel(objTesterModelRL);
blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BlastSolinium.png");
scale = 0;
}
@Override @Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { public void doRender(Entity entity, double x, double y, double z, float f0, float interp) {
render((EntityCloudSolinium)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
public void render(EntityCloudSolinium cloud, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); GL11.glTranslated(x, y, z);
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glScalef(cloud.age, cloud.age, cloud.age); GL11.glDisable(GL11.GL_TEXTURE_2D);
bindTexture(blastTexture); int color = 0x27FFDA;
blastModel.renderAll();
GL11.glPopMatrix(); EntityCloudSolinium cloud = (EntityCloudSolinium) entity;
float scale = cloud.age + interp;
GL11.glScalef(scale, scale, scale);
GL11.glColor3f(ColorUtil.fr(color), ColorUtil.fg(color), ColorUtil.fb(color));
ResourceManager.sphere_new.renderAll();
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glColor4f(ColorUtil.fr(color), ColorUtil.fg(color), ColorUtil.fb(color), 0.125F);
GL11.glEnable(GL11.GL_CULL_FACE);
double outerScale = 1.025;
for(int i = 0; i < 3; i++) {
GL11.glScaled(outerScale, outerScale, outerScale);
ResourceManager.sphere_new.renderAll();
}
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
} }
@Override @Override

View File

@ -0,0 +1,70 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKIndicator;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKIndicator.IndicatorUnit;
import com.hbm.util.ColorUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderRBMKIndicator 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;
}
TileEntityRBMKIndicator indicator = (TileEntityRBMKIndicator) te;
for(int i = 0; i < 6; i++) {
IndicatorUnit unit = indicator.indicators[i];
if(!unit.active) continue;
GL11.glPushMatrix();
GL11.glTranslated(0.25, (i / 2) * -0.3125 + 0.3125, (i % 2) * -0.5 + 0.25);
GL11.glColor3f(1F, 1F, 1F);
this.bindTexture(ResourceManager.rbmk_indicator_tex);
ResourceManager.rbmk_indicator.renderPart("Base");
float mult = unit.light ? 1F : 0.35F;
GL11.glColor3f(ColorUtil.fr(unit.color) * mult, ColorUtil.fg(unit.color) * mult, ColorUtil.fb(unit.color) * mult);
if(unit.light) RenderArcFurnace.fullbright(true);
ResourceManager.rbmk_indicator.renderPart("Light");
if(unit.light) RenderArcFurnace.fullbright(false);
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
int height = font.FONT_HEIGHT;
if(unit.label != null && !unit.label.isEmpty()) {
GL11.glTranslated(0.0725, 0.5, 0);
int width = font.getStringWidth(unit.label);
float f3 = Math.min(0.0125F, 0.3F / Math.max(width, 1));
GL11.glScalef(f3, -f3, f3);
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
GL11.glRotatef(90, 0, 1, 0);
font.drawString(unit.label, - width / 2, - height / 2, 0x000000);
}
GL11.glPopMatrix();
}
GL11.glPopMatrix();
}
}

View File

@ -408,6 +408,7 @@ public class TileMappings {
put(TileEntityRBMKNumitron.class, "tileentity_rbmk_numitron"); put(TileEntityRBMKNumitron.class, "tileentity_rbmk_numitron");
put(TileEntityRBMKGraph.class, "tileentity_rbmk_graph"); put(TileEntityRBMKGraph.class, "tileentity_rbmk_graph");
put(TileEntityRBMKLever.class, "tileentity_rbmk_lever"); put(TileEntityRBMKLever.class, "tileentity_rbmk_lever");
put(TileEntityRBMKIndicator.class, "tileentity_rbmk_indicator");
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");

View File

@ -421,7 +421,7 @@ public class TileEntityForceField extends TileEntityLoadedBase implements ISided
entity.posY -= entity.motionY; entity.posY -= entity.motionY;
entity.posZ -= entity.motionZ; entity.posZ -= entity.motionZ;
worldObj.playSoundAtEntity(entity, "hbm:weapon.sparkShoot", 2.5F, 1.0F); if(!this.muffled) worldObj.playSoundAtEntity(entity, "hbm:weapon.sparkShoot", 2.5F, 1.0F);
outside.add(entity); outside.add(entity);
if(!worldObj.isRemote) { if(!worldObj.isRemote) {

View File

@ -1,7 +1,8 @@
package com.hbm.tileentity.machine.rbmk; package com.hbm.tileentity.machine.rbmk;
import api.hbm.fluid.IFluidStandardTransceiver;
import api.hbm.fluidmk2.FluidNode; import api.hbm.fluidmk2.FluidNode;
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
import api.hbm.redstoneoverradio.IRORValueProvider;
import api.hbm.tile.IInfoProviderEC; import api.hbm.tile.IInfoProviderEC;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
@ -37,7 +38,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
@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 TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements IControlReceiver, IFluidStandardTransceiver, SimpleComponent, IInfoProviderEC, CompatHandler.OCComponent { public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements IControlReceiver, IFluidStandardTransceiverMK2, SimpleComponent, IInfoProviderEC, IRORValueProvider, CompatHandler.OCComponent {
public FluidTank feed; public FluidTank feed;
public FluidTank steam; public FluidTank steam;
@ -347,4 +348,21 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, consumption); data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, consumption);
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, output); data.setDouble(CompatEnergyControl.D_OUTPUT_MB, output);
} }
@Override
public String[] getFunctionInfo() {
return new String[] {
PREFIX_VALUE + "feed",
PREFIX_VALUE + "steam",
PREFIX_VALUE + "consumption"
};
}
@Override
public String provideRORValue(String name) {
if((PREFIX_VALUE + "feed").equals(name)) return "" + this.feed.getFill();
if((PREFIX_VALUE + "steam").equals(name)) return "" + this.steam.getFill();
if((PREFIX_VALUE + "consumption").equals(name)) return "" + this.consumption;
return null;
}
} }

View File

@ -1,6 +1,7 @@
package com.hbm.tileentity.machine.rbmk; package com.hbm.tileentity.machine.rbmk;
import api.hbm.fluidmk2.IFluidStandardTransceiverMK2; import api.hbm.fluidmk2.IFluidStandardTransceiverMK2;
import api.hbm.redstoneoverradio.IRORValueProvider;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType; import com.hbm.entity.projectile.EntityRBMKDebris.DebrisType;
@ -29,7 +30,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World; import net.minecraft.world.World;
@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 TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements IFluidStandardTransceiverMK2, SimpleComponent, CompatHandler.OCComponent { public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements IFluidStandardTransceiverMK2, IRORValueProvider, SimpleComponent, CompatHandler.OCComponent {
public FluidTank feed; public FluidTank feed;
public FluidTank steam; public FluidTank steam;
@ -262,4 +263,19 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIRBMKHeater(player.inventory, this); return new GUIRBMKHeater(player.inventory, this);
} }
@Override
public String[] getFunctionInfo() {
return new String[] {
PREFIX_VALUE + "in",
PREFIX_VALUE + "out"
};
}
@Override
public String provideRORValue(String name) {
if((PREFIX_VALUE + "in").equals(name)) return "" + this.feed.getFill();
if((PREFIX_VALUE + "out").equals(name)) return "" + this.steam.getFill();
return null;
}
} }

View File

@ -0,0 +1,198 @@
package com.hbm.tileentity.machine.rbmk;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.gui.GUIScreenRBMKIndicator;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.tileentity.network.RTTYSystem;
import com.hbm.tileentity.network.RTTYSystem.RTTYChannel;
import com.hbm.util.BufferUtil;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class TileEntityRBMKIndicator extends TileEntityLoadedBase implements IGUIProvider, IControlReceiver {
/* __________
* / /|
* /________ / |
* | __ __ | |
* ||__| |__|| |
* ||__| |__|| |
* ||__| |__|| /
* |_________|/
*/
public IndicatorUnit[] indicators = new IndicatorUnit[6];
public TileEntityRBMKIndicator() {
for(int i = 0; i < 6; i++) this.indicators[i] = new IndicatorUnit(i);
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
for(int i = 0; i < 6; i++) this.indicators[i].update();
this.networkPackNT(50);
}
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
for(int i = 0; i < 6; i++) this.indicators[i].serialize(buf);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
for(int i = 0; i < 6; i++) this.indicators[i].deserialize(buf);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
for(int i = 0; i < 6; i++) this.indicators[i].readFromNBT(nbt, i);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
for(int i = 0; i < 6; i++) this.indicators[i].writeToNBT(nbt, i);
}
public class IndicatorUnit {
/** If the value should be pulled from the RTTY system every tick, otherwise only on state change */
public boolean polling;
/** Color of the indicator light */
public int color;
/** Label on the indicator */
public String label = "";
/** What channel to read values from */
public String rtty = "";
/** Lower bound for the indicator to light up */
public long min = 0;
/** Upper bound for the indicator to light up */
public long max = 100;
/** Whether the indicator is on or off */
public boolean light;
/** Whether this indicator is visible on the panel */
public boolean active;
public IndicatorUnit(int initialIndex) {
if(initialIndex % 2 == 0)
color = 0xff0000;
else
color = 0xffff00;
label = "Indicator " + (initialIndex + 1);
}
public void update() {
if(!active) return;
if(rtty == null || rtty.isEmpty()) return;
RTTYChannel chan = RTTYSystem.listen(worldObj, rtty);
int sigVal = 0;
if(chan != null && chan.timeStamp < worldObj.getTotalWorldTime() - 1) chan = null;
// always accept new signals
if(chan != null && chan.signal != null) {
try { sigVal = Integer.parseInt(chan.signal.toString()); } catch(Exception ex) { }
decideLight(sigVal);
} else {
// if there's no new signal and we're polling, set to 0
if(polling) decideLight(0);
}
}
// if max is lower than min, inverse the operation, i.e. make the indicator light up outside of the bounds
private void decideLight(long value) {
if(min <= max) {
light = value >= min && value <= max;
} else {
light = value < max || value > min;
}
}
public void serialize(ByteBuf buf) {
buf.writeBoolean(active);
buf.writeBoolean(polling);
buf.writeBoolean(light);
buf.writeInt(color);
BufferUtil.writeString(buf, label);
BufferUtil.writeString(buf, rtty);
buf.writeLong(min);
buf.writeLong(max);
}
public void deserialize(ByteBuf buf) {
active = buf.readBoolean();
polling = buf.readBoolean();
light = buf.readBoolean();
color = buf.readInt();
label = BufferUtil.readString(buf);
rtty = BufferUtil.readString(buf);
min = buf.readLong();
max = buf.readLong();
}
public void readFromNBT(NBTTagCompound nbt, int index) {
this.active = nbt.getBoolean("active" + index);
this.polling = nbt.getBoolean("polling" + index);
this.color = nbt.getInteger("color" + index);
this.label = nbt.getString("label" + index);
this.rtty = nbt.getString("rtty" + index);
this.min = nbt.getLong("min" + index);
this.max = nbt.getLong("max" + index);
this.light = nbt.getBoolean("light" + index);
}
public void writeToNBT(NBTTagCompound nbt, int index) {
nbt.setBoolean("active" + index, active);
nbt.setBoolean("polling" + index, polling);
nbt.setInteger("color" + index, color);
nbt.setString("label" + index, label);
nbt.setString("rtty" + index, rtty);
nbt.setLong("min" + index, min);
nbt.setLong("max" + index, max);
nbt.setBoolean("light" + index, light);
}
}
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }
@Override public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIScreenRBMKIndicator(this); }
@Override
public boolean hasPermission(EntityPlayer player) {
return player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 15 * 15;
}
@Override
public void receiveControl(NBTTagCompound data) {
int active = data.getByte("active");
int polling = data.getByte("polling");
for(int i = 0; i < 6; i++) {
this.indicators[i].active = (active & (1 << i)) != 0;
this.indicators[i].polling = (polling & (1 << i)) != 0;
}
for(int i = 0; i < 6; i++) {
IndicatorUnit indicator = this.indicators[i];
indicator.color = MathHelper.clamp_int(data.getInteger("color" + i), 0, 0xffffff);
indicator.label = data.getString("label" + i);
indicator.rtty = data.getString("rtty" + i);
indicator.min = data.hasKey("min" + i) ? data.getInteger("min" + i) : Integer.MIN_VALUE;
indicator.max = data.hasKey("max" + i) ? data.getInteger("max" + i) : Integer.MAX_VALUE;
}
}
}

View File

@ -552,7 +552,10 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
PREFIX_VALUE + "columnheat", PREFIX_VALUE + "columnheat",
PREFIX_VALUE + "rodheat", PREFIX_VALUE + "rodheat",
PREFIX_VALUE + "depletion", PREFIX_VALUE + "depletion",
PREFIX_VALUE + "xenon" PREFIX_VALUE + "xenon",
PREFIX_VALUE + "fastflux",
PREFIX_VALUE + "slowflux",
PREFIX_VALUE + "flux"
}; };
} }
@ -564,6 +567,9 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (100 - ItemRBMKRod.getEnrichment(slots[0]) * 100); if((PREFIX_VALUE + "depletion").equals(name)) return "" + (int) (100 - ItemRBMKRod.getEnrichment(slots[0]) * 100);
if((PREFIX_VALUE + "xenon").equals(name)) return "" + (int) (ItemRBMKRod.getPoison(slots[0])); if((PREFIX_VALUE + "xenon").equals(name)) return "" + (int) (ItemRBMKRod.getPoison(slots[0]));
} }
if((PREFIX_VALUE + "fastflux").equals(name)) return "" + (int) Math.ceil(fluxFromType(NType.FAST));
if((PREFIX_VALUE + "slowflux").equals(name)) return "" + (int) Math.ceil(fluxFromType(NType.SLOW));
if((PREFIX_VALUE + "flux").equals(name)) return "" + (int) Math.ceil(fluxFromType(NType.ANY));
return null; return null;
} }
} }

View File

@ -466,6 +466,7 @@ container.rbmkControlAuto=RBMK Automatische Steuerstäbe
container.rbmkGauge=Redstone-over-Radio Meter container.rbmkGauge=Redstone-over-Radio Meter
container.rbmkGraph=Redstone-over-Radio Graph container.rbmkGraph=Redstone-over-Radio Graph
container.rbmkHeater=RBMK Heizer container.rbmkHeater=RBMK Heizer
container.rbmkIndicator=Redstone-over-Radio Statuslampen
container.rbmkKeyPad=Redstone-over-Radio Tastenfeld container.rbmkKeyPad=Redstone-over-Radio Tastenfeld
container.rbmkLever=Redstone-over-Radio Hebel container.rbmkLever=Redstone-over-Radio Hebel
container.rbmkNumitron=Redstone-over-Radio Ziffernanzeige container.rbmkNumitron=Redstone-over-Radio Ziffernanzeige
@ -4896,7 +4897,9 @@ tile.rbmk_display_blank.name=Leeres Redstone-over-Radio Panel
tile.rbmk_gauge.name=Redstone-over-Radio Meter tile.rbmk_gauge.name=Redstone-over-Radio Meter
tile.rbmk_graph.name=Redstone-over-Radio Graph tile.rbmk_graph.name=Redstone-over-Radio Graph
tile.rbmk_heater.name=RBMK-Heizer tile.rbmk_heater.name=RBMK-Heizer
tile.rbmk_indicator.name=Redstone-over-Radio Statuslampen
tile.rbmk_key_pad.name=Redstone-over-Radio Tastenfeld tile.rbmk_key_pad.name=Redstone-over-Radio Tastenfeld
tile.rbmk_lever.name=Redstone-over-Radio Hebel
tile.rbmk_loader.name=RBMK-Dampfadapter tile.rbmk_loader.name=RBMK-Dampfadapter
tile.rbmk_moderator.name=RBMK Graphitmoderator tile.rbmk_moderator.name=RBMK Graphitmoderator
tile.rbmk_numitron.name=Redstone-over-Radio Ziffernanzeige tile.rbmk_numitron.name=Redstone-over-Radio Ziffernanzeige

View File

@ -874,6 +874,7 @@ container.rbmkControlAuto=RBMK Automatic Control Rods
container.rbmkGauge=Redstone-over-Radio Gauge container.rbmkGauge=Redstone-over-Radio Gauge
container.rbmkGraph=Redstone-over-Radio Graph container.rbmkGraph=Redstone-over-Radio Graph
container.rbmkHeater=RBMK Fluid Heater container.rbmkHeater=RBMK Fluid Heater
container.rbmkIndicator=Redstone-over-Radio Indicator Lights
container.rbmkKeyPad=Redstone-over-Radio Keypad container.rbmkKeyPad=Redstone-over-Radio Keypad
container.rbmkLever=Redstone-over-Radio Lever container.rbmkLever=Redstone-over-Radio Lever
container.rbmkNumitron=Redstone-over-Radio Numeric Display container.rbmkNumitron=Redstone-over-Radio Numeric Display
@ -6167,6 +6168,8 @@ tile.rbmk_gauge.desc=Can be configured with a screwdriver.$Displays up to four n
tile.rbmk_graph.name=Redstone-over-Radio Graph tile.rbmk_graph.name=Redstone-over-Radio Graph
tile.rbmk_graph.desc=Can be configured with a screwdriver.$Logs and displays up to two numeric values$from different RoR signal sources. tile.rbmk_graph.desc=Can be configured with a screwdriver.$Logs and displays up to two numeric values$from different RoR signal sources.
tile.rbmk_heater.name=RBMK Fluid Heater tile.rbmk_heater.name=RBMK Fluid Heater
tile.rbmk_indicator.name=Redstone-over-Radio Indicator Lights
tile.rbmk_indicator.desc=Can be configured with a screwdriver.$Can have up to six indicators that will$light up when an RoR value falls$within the configured threshold.
tile.rbmk_key_pad.name=Redstone-over-Radio Keypad tile.rbmk_key_pad.name=Redstone-over-Radio Keypad
tile.rbmk_key_pad.desc=Can be configured with a screwdriver.$Allows up to four different buttons which can$send RoR signals when pressed. tile.rbmk_key_pad.desc=Can be configured with a screwdriver.$Allows up to four different buttons which can$send RoR signals when pressed.
tile.rbmk_lever.name=Redstone-over-Radio Lever tile.rbmk_lever.name=Redstone-over-Radio Lever

View File

@ -6,6 +6,6 @@
"en_US": "Redstone-over-Radio Keypad" "en_US": "Redstone-over-Radio Keypad"
}, },
"content": { "content": {
"en_US": "Interactive [[redstone over radio|Redstone over Radio]] transmitting device, needs to be configured with a scredriver first. Up to four buttons can be enabled using the red buttons, each button can transmit one value over its own RoR channel. This is useful for [RoR controllers|Redstone-over-Radio Controller], allowing things like RBMK settings to be adjusted with the push of a button.<br><br>The color setting accepts hexadecimal values, i.e. up to six characters with groups of two representing red, green and blue color components respectively. As a rule of thumb: FF is full color, 80 is half color and 00 is no color. FF8000 (full red, half green and no blue) is therefore orange.<br><br>The polling setting on the keypad turns the button into a locking one, the button remains pressed, sending the RoR signal each tick, until it is unpressed. State change buttons only send the command once when initially pressed.<br><br>See also:<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]" "en_US": "Interactive [[redstone over radio|Redstone over Radio]] transmitting device, needs to be configured with a scredriver first. Up to four buttons can be enabled using the red buttons, each button can transmit one value over its own RoR channel. This is useful for [RoR controllers|Redstone-over-Radio Controller], allowing things like RBMK settings to be adjusted with the push of a button.<br><br>The color setting accepts hexadecimal values, i.e. up to six characters with groups of two representing red, green and blue color components respectively. As a rule of thumb: FF is full color, 80 is half color and 00 is no color. FF8000 (full red, half green and no blue) is therefore orange.<br><br>The polling setting on the keypad turns the button into a locking one, the button remains pressed, sending the RoR signal each tick, until it is unpressed. State change buttons only send the command once when initially pressed.<br><br>See also:<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Indicator Lights]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]"
} }
} }

View File

@ -6,6 +6,6 @@
"en_US": "Redstone-over-Radio Gauge" "en_US": "Redstone-over-Radio Gauge"
}, },
"content": { "content": {
"en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values using a gauge needle. Up to four gauges can be enabled using the red buttons, each gauge can receive one value over its own RoR channel. Minimum and maximum values need to be configured before the gauge can be used, if the minimum is set to a higher value than the maximum, then the needle will run in reverse. The needle can exceed the maximum value by up to 50%, entering the red section of the gauge.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]" "en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values using a gauge needle. Up to four gauges can be enabled using the red buttons, each gauge can receive one value over its own RoR channel. Minimum and maximum values need to be configured before the gauge can be used, if the minimum is set to a higher value than the maximum, then the needle will run in reverse. The needle can exceed the maximum value by up to 50%, entering the red section of the gauge.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Indicator Lights]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]"
} }
} }

View File

@ -6,6 +6,6 @@
"en_US": "Redstone-over-Radio Graph" "en_US": "Redstone-over-Radio Graph"
}, },
"content": { "content": {
"en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values over time using a line graph. Values are updated every half second, and the graph can log up to 15 seconds of input. Up to two graphs can be enabled using the red buttons, each graphs can receive one value over its own RoR channel. Useful for displaying values where the change over time is important, such as temperature curves.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Lever]]" "en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values over time using a line graph. Values are updated every half second, and the graph can log up to 15 seconds of input. Up to two graphs can be enabled using the red buttons, each graphs can receive one value over its own RoR channel. Useful for displaying values where the change over time is important, such as temperature curves.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Indicator Lights]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Lever]]"
} }
} }

View File

@ -0,0 +1,11 @@
{
"name": "Redstone-over-Radio Indicator Lights",
"icon": ["hbm:tile.rbmk_indicator", 1, 0],
"trigger": [["hbm:tile.rbmk_indicator"]],
"title": {
"en_US": "Redstone-over-Radio Indicator Lights"
},
"content": {
"en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Indicator panels will light up, if a numeric RoR signal falls within the configured threshold (bounds are inclusive).If the minimum threshold is larger than the maximum, then the behavior is inverted, making the indicator light up outside of the configured threshold.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]"
}
}

View File

@ -6,6 +6,6 @@
"en_US": "Redstone-over-Radio Lever" "en_US": "Redstone-over-Radio Lever"
}, },
"content": { "content": {
"en_US": "Interactive [[redstone over radio|Redstone over Radio]] transmitting device, needs to be configured with a scredriver first. Up to two large breaker switches can be enabled using the red buttons, each button can transmit one value over its own RoR channel. Levers behave similar to keypad buttons, except that they can transmit different values depending on whether they have been turned on or off. With polling enabled, the switch will continuously send the signal corresponding to whichevever state it is in, except when the lever is currently being flipped. State change causes it to only send a single pulse after it has been flipped.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]" "en_US": "Interactive [[redstone over radio|Redstone over Radio]] transmitting device, needs to be configured with a scredriver first. Up to two large breaker switches can be enabled using the red buttons, each button can transmit one value over its own RoR channel. Levers behave similar to keypad buttons, except that they can transmit different values depending on whether they have been turned on or off. With polling enabled, the switch will continuously send the signal corresponding to whichevever state it is in, except when the lever is currently being flipped. State change causes it to only send a single pulse after it has been flipped.<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Indicator Lights]]<br>[[Redstone-over-Radio Numeric Display]]<br>[[Redstone-over-Radio Graph]]"
} }
} }

View File

@ -6,6 +6,6 @@
"en_US": "Redstone-over-Radio Numeric Display" "en_US": "Redstone-over-Radio Numeric Display"
}, },
"content": { "content": {
"en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values using a seven segment number display. Up to two displays can be enabled using the red buttons, each display can receive one value over its own RoR channel. Large values displayed will be shortened, using SI suffixes. Also useful for displaying item counts provided by an [[RoR item counter|Redstone-over-Radio Item Counter]].<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]" "en_US": "Aesthetic [[redstone over radio|Redstone over Radio]] receiving device, needs to be configured with a scredriver first. Can represent numeric RoR values using a seven segment number display. Up to two displays can be enabled using the red buttons, each display can receive one value over its own RoR channel. Large values displayed will be shortened, using SI suffixes. Also useful for displaying item counts provided by an [[RoR item counter|Redstone-over-Radio Item Counter]].<br><br>See also:<br>[[Redstone-over-Radio Keypad]]<br>[[Redstone-over-Radio Gauge]]<br>[[Redstone-over-Radio Indicator Lights]]<br>[[Redstone-over-Radio Graph]]<br>[[Redstone-over-Radio Lever]]"
} }
} }

View File

@ -0,0 +1,66 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
o Light
v 0.062500 0.593750 0.187500
v 0.062500 0.406250 0.187500
v 0.062500 0.593750 -0.187500
v 0.062500 0.406250 -0.187500
vt 0.428571 -0.000000
vt 1.000000 1.000000
vt 0.428571 1.000000
vt 1.000000 -0.000000
vn 1.0000 -0.0000 -0.0000
s off
f 2/1/1 3/2/1 1/3/1
f 2/1/1 4/4/1 3/2/1
o Base
v 0.000000 0.375000 -0.218750
v 0.000000 0.625000 -0.218750
v -0.000000 0.375000 0.218750
v 0.000000 0.625000 0.218750
v 0.062500 0.593750 0.187500
v 0.062500 0.406250 0.187500
v 0.062500 0.593750 -0.187500
v 0.062500 0.406250 -0.187500
v 0.062500 0.625000 -0.218750
v 0.062500 0.625000 0.218750
v 0.062500 0.375000 0.218750
v 0.062500 0.375000 -0.218750
vt -0.000000 0.833333
vt 0.047619 0.166667
vt 0.047619 0.833333
vt 0.428571 0.833333
vt 0.380952 0.166667
vt 0.428571 0.166667
vt 0.047619 1.000000
vt 0.380952 0.833333
vt 0.380952 1.000000
vt 0.380952 -0.000000
vt 0.047619 -0.000000
vt 0.357143 0.750000
vt 0.071429 0.750000
vt 0.071429 0.250000
vt 0.357143 0.250000
vt -0.000000 0.166667
vn 0.0000 -0.0000 1.0000
vn 0.0000 -0.0000 -1.0000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 -0.0000
s off
f 8/5/2 15/6/2 14/7/2
f 6/8/3 16/9/3 5/10/3
f 8/11/4 13/12/4 6/13/4
f 5/14/5 15/6/5 7/15/5
f 11/16/6 14/7/6 9/17/6
f 9/17/6 15/6/6 10/18/6
f 10/18/6 16/9/6 12/19/6
f 12/19/6 13/12/6 11/16/6
f 8/5/2 7/20/2 15/6/2
f 6/8/3 13/12/3 16/9/3
f 8/11/4 14/7/4 13/12/4
f 5/14/5 16/9/5 15/6/5
f 11/16/6 13/12/6 14/7/6
f 9/17/6 14/7/6 15/6/6
f 10/18/6 15/6/6 16/9/6
f 12/19/6 16/9/6 13/12/6

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -1,45 +0,0 @@
{
"animation": {
"frametime": 2,
"frames": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
18,
17,
16,
15,
14,
13,
12,
11,
10,
9,
8,
7,
6,
5,
4,
3,
2,
1
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B