Merge branch 'master' of github.com:PewPewCricket/Hbm-s-Nuclear-Tech-GIT

This commit is contained in:
PewPewCricket 2025-07-24 13:34:00 -05:00
commit 7aa8818a5b
103 changed files with 3229 additions and 1573 deletions

View File

@ -1,27 +1,23 @@
## Added
* New assembler
* Features a brand new animated model, GUI and the new recipe selection system
* Many recipes have been reworked, with the microcrafting complexity reduced
* The redcoil didn't get a recipe. It's gonna die soon.
* Neither did the schrabidium transmutator
* Balls-o-tron's spawner can now be made without a worm coin, using a silver key instead. This means that, while expensive, it's possible to summon him without finding a jungle dungeon
* Blueprins
* Replace the journals
* Instead of opening them and making a template, they act as a multi template
* Blueprints need to remain in the slot, removing them will disable the recipes again
* Blueprint booklets
* Can be found in worldgen
* Using it will create one random blueprint of the same type as the booklet
* Liquid concrete
* It's conk but liquid
* Rebar
* When hooked up to liquid concrete using pipes, will fill to create reinforced concrete
* Fills bottom to top, so connect the pipes to the top
* Rebar placer
* Can be configured with different types of concrete, reinforced or not, or even colored
* Rebar created with the rebar placer will remember its type and assume it when being filled with liquid concrete
## Changed
* Removed levitation unit
* Many of NTM's regular building blocks now have forge microblock support
* RBMK crane models now conform to the dimensions of the room they're in
* Projectile resistance for armor has been renamed to "physical" and now also extends to all direct forms of attack by other entities that don't fall into any other categories (mostly melee attacks)
* This should fix the issue where most armors are quite weak against swords
* Electric attacks (i.e. tesla cannon) are now in the "energy damage" category
* This means that armors that have energy resistance actually properly work against the tesla cannon
* Heavy components are being deprecated
* The alternate recipes for nitric acid and xenon gas in the chemical plant now require blueprints
* The chemical plant now has a recipe for making cobblestone from 25mB of lava (which can be liquefacted into even more lava, useful for cobblestone generation)
* Removed the old arc furnace
## Fixed
* Fixed gas centrifuge sound persisting when broken or when unloaded
* Fixed all centrifuge sounds trying to play even when the player is far away, using up audio slots
* Fixed guns that don't have durability always displaying a condition of 0%
* Fixed GL state leak caused by skeletons
* Fixed a few assembler recipes using the old crafting numbers which sometimes exceed the stack limit
* As an extra safeguard, the recipe loader now throws an exception if that happens
* Fixed dupe caused by the breeding reactor
* Fixed a potential crash caused by a change done to tile entity proxies in relation to EnergyControl

View File

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

View File

@ -315,12 +315,14 @@ public class ModBlocks {
public static Block floodlight;
public static Block floodlight_beam;
public static Block rebar;
public static Block reinforced_stone;
public static Block concrete_smooth;
public static Block concrete_colored;
public static Block concrete_colored_ext;
public static Block concrete;
public static Block concrete_asbestos;
public static Block concrete_rebar;
public static Block concrete_super;
public static Block concrete_super_broken;
public static Block ducrete_smooth;
@ -748,9 +750,6 @@ public class ModBlocks {
public static Block machine_microwave;
public static Block machine_arc_furnace_off;
public static Block machine_arc_furnace_on;
//public static Block machine_deuterium;
public static Block machine_battery_potato;
@ -1122,6 +1121,7 @@ public class ModBlocks {
public static Block rbmk_heater;
public static Block rbmk_console;
public static Block rbmk_crane_console;
public static Block rbmk_autoloader;
public static Block rbmk_loader;
public static Block rbmk_steam_inlet;
public static Block rbmk_steam_outlet;
@ -1524,12 +1524,14 @@ public class ModBlocks {
floodlight = new Floodlight(Material.iron).setBlockName("floodlight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
floodlight_beam = new FloodlightBeam().setBlockName("floodlight_beam");
rebar = new BlockRebar().setBlockName("rebar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":rebar");
reinforced_stone = new BlockGeneric(Material.rock).setBlockName("reinforced_stone").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_stone");
concrete_smooth = new BlockRadResistant(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
concrete_colored = new BlockConcreteColored(Material.rock).setBlockName("concrete_colored").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
concrete_colored_ext = new BlockConcreteColoredExt(Material.rock).setBlockName("concrete_colored_ext").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete_colored_ext");
concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile");
concrete_asbestos = new BlockGeneric(Material.rock).setBlockName("concrete_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":concrete_asbestos");
concrete_rebar = new BlockGeneric(Material.rock).setBlockName("concrete_rebar").setCreativeTab(MainRegistry.blockTab).setHardness(50.0F).setResistance(240.0F).setBlockTextureName(RefStrings.MODID + ":concrete_rebar");
concrete_super = new BlockUberConcrete().setBlockName("concrete_super").setCreativeTab(MainRegistry.blockTab).setHardness(150.0F).setResistance(1000.0F);
concrete_super_broken = new BlockFalling(Material.rock).setBlockName("concrete_super_broken").setCreativeTab(MainRegistry.blockTab).setHardness(10.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":concrete_super_broken");
concrete_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":concrete_pillar_top").setBlockName("concrete_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(180.0F).setBlockTextureName(RefStrings.MODID + ":concrete_pillar_side");
@ -1873,8 +1875,6 @@ public class ModBlocks {
machine_electric_furnace_off = new MachineElectricFurnace(false).setBlockName("machine_electric_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_electric_furnace_on = new MachineElectricFurnace(true).setBlockName("machine_electric_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
machine_arc_furnace_off = new MachineArcFurnace(false).setBlockName("machine_arc_furnace_off").setHardness(5.0F).setResistance(10.0F);
machine_arc_furnace_on = new MachineArcFurnace(true).setBlockName("machine_arc_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
machine_arc_furnace = new MachineArcFurnaceLarge().setBlockName("machine_arc_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
@ -2169,6 +2169,7 @@ public class ModBlocks {
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_crane_console = new RBMKCraneConsole().setBlockName("rbmk_crane_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_crane_console");
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_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_outlet = new RBMKOutlet(Material.iron).setBlockName("rbmk_steam_outlet").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_steam_outlet");
@ -2701,6 +2702,7 @@ public class ModBlocks {
GameRegistry.registerBlock(reinforced_laminate_pane,ItemBlockBlastInfo.class, reinforced_laminate_pane.getUnlocalizedName());
//Bricks
register(rebar);
GameRegistry.registerBlock(reinforced_stone, ItemBlockBlastInfo.class, reinforced_stone.getUnlocalizedName());
GameRegistry.registerBlock(reinforced_ducrete, ItemBlockBlastInfo.class, reinforced_ducrete.getUnlocalizedName());
GameRegistry.registerBlock(concrete_smooth, ItemBlockBlastInfo.class, concrete_smooth.getUnlocalizedName());
@ -2708,6 +2710,7 @@ public class ModBlocks {
GameRegistry.registerBlock(concrete_colored_ext, ItemBlockBlastInfo.class, concrete_colored_ext.getUnlocalizedName());
GameRegistry.registerBlock(concrete, ItemBlockBlastInfo.class, concrete.getUnlocalizedName());
GameRegistry.registerBlock(concrete_asbestos, ItemBlockBlastInfo.class, concrete_asbestos.getUnlocalizedName());
GameRegistry.registerBlock(concrete_rebar, ItemBlockBlastInfo.class, concrete_rebar.getUnlocalizedName());
GameRegistry.registerBlock(concrete_super, ItemBlockBlastInfo.class, concrete_super.getUnlocalizedName());
GameRegistry.registerBlock(concrete_super_broken, ItemBlockBlastInfo.class, concrete_super_broken.getUnlocalizedName());
GameRegistry.registerBlock(ducrete_smooth, ItemBlockBlastInfo.class, ducrete_smooth.getUnlocalizedName());
@ -3182,6 +3185,7 @@ public class ModBlocks {
GameRegistry.registerBlock(rbmk_heater, rbmk_heater.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_crane_console, rbmk_crane_console.getUnlocalizedName());
register(rbmk_autoloader);
register(rbmk_loader);
register(rbmk_steam_inlet);
register(rbmk_steam_outlet);
@ -3287,8 +3291,6 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
GameRegistry.registerBlock(machine_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName());
GameRegistry.registerBlock(machine_arc_furnace_off, machine_arc_furnace_off.getUnlocalizedName());
GameRegistry.registerBlock(machine_arc_furnace_on, machine_arc_furnace_on.getUnlocalizedName());
GameRegistry.registerBlock(machine_microwave, machine_microwave.getUnlocalizedName());
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
register(machine_assembly_machine);

View File

@ -0,0 +1,496 @@
package com.hbm.blocks.generic;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.ClientConfig;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemRebarPlacer;
import com.hbm.lib.Library;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.main.ServerProxy;
import com.hbm.render.block.ISBRHUniversal;
import com.hbm.render.util.RenderBlocksNT;
import com.hbm.tileentity.IBufPacketReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.INetworkProvider;
import com.hbm.uninos.UniNodespace;
import com.hbm.uninos.networkproviders.RebarNetwork;
import com.hbm.uninos.networkproviders.RebarNetworkProvider;
import com.hbm.util.BobMathUtil;
import com.hbm.util.Compat;
import com.hbm.util.InventoryUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.fluidmk2.IFluidReceiverMK2;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockRebar extends BlockContainer implements ISBRHUniversal {
@SideOnly(Side.CLIENT) protected IIcon concrete;
public BlockRebar() {
super(Material.iron);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
this.concrete = reg.registerIcon(RefStrings.MODID + ":concrete_liquid");
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityRebar();
}
@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 void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
TileEntity tile = world.getTileEntity(x, y, z);
if(!(tile instanceof TileEntityRebar)) return;
TileEntityRebar rebar = (TileEntityRebar) tile;
rebar.hasConnection = false;
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
TileEntity neighbor = Compat.getTileStandard(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
if(neighbor instanceof TileEntityPipeBaseNT) {
rebar.hasConnection = true;
return;
}
}
}
public static class TileEntityRebar extends TileEntityLoadedBase implements IFluidReceiverMK2, IBufPacketReceiver {
public Block concrete;
public int concreteMeta;
public int progress;
public int prevProgress;
protected RebarNode node;
public boolean hasConnection = false;
public TileEntityRebar setup(Block b, int m) {
this.concrete = b;
this.concreteMeta = m;
return this;
}
@Override
public void updateEntity() {
long time = worldObj.getTotalWorldTime();
if(!worldObj.isRemote) {
if(prevProgress != progress) {
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
prevProgress = progress;
}
if(this.progress >= 1_000) {
if(concrete != null && ItemRebarPlacer.isValidConk(Item.getItemFromBlock(concrete), concreteMeta)) {
worldObj.setBlock(xCoord, yCoord, zCoord, concrete, concreteMeta, 3);
} else {
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.concrete_rebar);
}
return;
}
if(time % 60 == 0) {
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
this.trySubscribe(Fluids.CONCRETE, worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
}
}
if(this.node == null || this.node.expired) {
this.node = (RebarNode) UniNodespace.getNode(worldObj, xCoord, yCoord, zCoord, RebarNetworkProvider.THE_PROVIDER);
if(this.node == null || this.node.expired) {
this.node = this.createNode();
UniNodespace.createNode(worldObj, this.node);
}
}
this.networkPackNT(100);
}
}
@Override
public void invalidate() {
super.invalidate();
if(!worldObj.isRemote) {
if(this.node != null) {
UniNodespace.destroyNode(worldObj, xCoord, yCoord, zCoord, RebarNetworkProvider.THE_PROVIDER);
}
}
}
@Override public void serialize(ByteBuf buf) { buf.writeInt(progress); }
@Override public void deserialize(ByteBuf buf) { this.progress = buf.readInt(); }
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.progress = nbt.getInteger("progress");
this.hasConnection = nbt.getBoolean("hasConnection");
if(nbt.hasKey("block")) {
this.concrete = Block.getBlockById(nbt.getInteger("block"));
this.concreteMeta = nbt.getInteger("meta");
}
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger("progress", this.progress);
nbt.setBoolean("hasConnection", this.hasConnection);
if(this.concrete != null) {
nbt.setInteger("block", Block.getIdFromBlock(this.concrete));
nbt.setInteger("meta", this.concreteMeta);
}
}
public RebarNode createNode() {
TileEntity tile = (TileEntity) this;
return new RebarNode(RebarNetworkProvider.THE_PROVIDER, new BlockPos(tile.xCoord, tile.yCoord, tile.zCoord)).setConnections(
new DirPos(tile.xCoord + 1, tile.yCoord, tile.zCoord, Library.POS_X),
new DirPos(tile.xCoord - 1, tile.yCoord, tile.zCoord, Library.NEG_X),
new DirPos(tile.xCoord, tile.yCoord + 1, tile.zCoord, Library.POS_Y),
new DirPos(tile.xCoord, tile.yCoord - 1, tile.zCoord, Library.NEG_Y),
new DirPos(tile.xCoord, tile.yCoord, tile.zCoord + 1, Library.POS_Z),
new DirPos(tile.xCoord, tile.yCoord, tile.zCoord - 1, Library.NEG_Z)
);
}
@Override
public FluidTank[] getAllTanks() {
FluidTank tank = new FluidTank(Fluids.CONCRETE, 1_000);
tank.setFill(progress);
return new FluidTank[] {tank};
}
@Override
public long transferFluid(FluidType type, int pressure, long amount) {
if(type != Fluids.CONCRETE) return amount;
if(this.node == null || this.node.expired || !this.node.hasValidNet()) return amount;
List<TileEntityRebar> lowestLinks = new ArrayList();
int lowestY = 256;
int progress = 0;
int capacity = 0;
for(Object o : this.node.net.links) {
RebarNode node = (RebarNode) o;
int y = node.positions[0].getY(); //rebar can only have one pos, there's no multiblock rebar
if(y < lowestY) {
lowestY = y;
progress = 0;
capacity = 0;
lowestLinks.clear();
}
if(y == lowestY) {
TileEntity tile = worldObj.getTileEntity(node.positions[0].getX(), y, node.positions[0].getZ());
if(!(tile instanceof TileEntityRebar)) continue;
TileEntityRebar rebar = (TileEntityRebar) tile;
progress += rebar.progress;
capacity += 1_000;
lowestLinks.add(rebar);
}
}
if(capacity > 0 && !lowestLinks.isEmpty()) {
int maxSpeed = 50;
int maxAccept = (int) BobMathUtil.min(capacity - progress, amount, maxSpeed * lowestLinks.size());
int target = Math.min((progress + maxAccept) / lowestLinks.size(), 1_000);
for(TileEntityRebar rebar : lowestLinks) {
if(rebar.progress >= target) continue;
int delta = target - rebar.progress;
if(delta > amount) continue;
rebar.progress += delta;
amount -= delta;
}
}
return amount;
}
@Override
public long getDemand(FluidType type, int pressure) {
return 10_000;
}
}
public static class RebarNode extends GenNode<RebarNetwork> {
public RebarNode(INetworkProvider<RebarNetwork> provider, BlockPos... positions) {
super(provider, positions);
}
@Override
public RebarNode setConnections(DirPos... connections) {
super.setConnections(connections);
return this;
}
}
@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);
double o = 0.25D;
renderer.setRenderBounds(0.4375D - o, 0D, 0.4375D - o, 0.5625D - o, 1D, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D - o, 0D, 0.4375D + o, 0.5625D - o, 1D, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D + o, 0D, 0.4375D - o, 0.5625D + o, 1D, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D + o, 0D, 0.4375D + o, 0.5625D + o, 1D, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0D, 0.4375D - o, 0.4375D - o, 1D, 0.5625D - o, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0D, 0.4375D - o, 0.4375D + o, 1D, 0.5625D - o, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0D, 0.4375D + o, 0.4375D - o, 1D, 0.5625D + o, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0D, 0.4375D + o, 0.4375D + o, 1D, 0.5625D + o, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D - o, 0.4375D - o, 0D, 0.5625D - o, 0.5625D - o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D - o, 0.4375D + o, 0D, 0.5625D - o, 0.5625D + o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D + o, 0.4375D - o, 0D, 0.5625D + o, 0.5625D - o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer);
renderer.setRenderBounds(0.4375D + o, 0.4375D + o, 0D, 0.5625D + o, 0.5625D + o, 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);
double o = 0.25D;
double min = -0.001;
double max = 1.001;
if(ClientConfig.RENDER_REBAR_SIMPLE.get()) {
renderer.setRenderBounds(0.4375D, min, 0.4375D, 0.5625D, max, 0.5625D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(min, 0.4375D, 0.4375D, max, 0.5625D, 0.5625D); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D, 0.4375D, min, 0.5625D, 0.5625D, max); renderer.renderStandardBlock(block, x, y, z);
} else {
renderer.setRenderBounds(0.4375D - o, min, 0.4375D - o, 0.5625D - o, max, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D - o, min, 0.4375D + o, 0.5625D - o, max, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D + o, min, 0.4375D - o, 0.5625D + o, max, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D + o, min, 0.4375D + o, 0.5625D + o, max, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(min, 0.4375D - o, 0.4375D - o, max, 0.5625D - o, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(min, 0.4375D - o, 0.4375D + o, max, 0.5625D - o, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(min, 0.4375D + o, 0.4375D - o, max, 0.5625D + o, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(min, 0.4375D + o, 0.4375D + o, max, 0.5625D + o, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D - o, 0.4375D - o, min, 0.5625D - o, 0.5625D - o, max); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D - o, 0.4375D + o, min, 0.5625D - o, 0.5625D + o, max); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D + o, 0.4375D - o, min, 0.5625D + o, 0.5625D - o, max); renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.4375D + o, 0.4375D + o, min, 0.5625D + o, 0.5625D + o, max); renderer.renderStandardBlock(block, x, y, z);
}
/*TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityRebar) {
TileEntityRebar rebar = (TileEntityRebar) tile;
if(rebar.progress > 0) {
double height = rebar.progress / 1000D;
renderer.setOverrideBlockTexture(concrete);
renderer.setRenderBounds(0, 0, 0, 1, height, 1); renderer.renderStandardBlock(block, x, y, z);
renderer.clearOverrideBlockTexture();
}
}*/
return true;
}
// from ModEventHandlerClient.onRenderWorldLastEvent
@SideOnly(Side.CLIENT)
public static void renderRebar(List tiles, float interp) {
List<TileEntityRebar> rebars = new ArrayList();
for(Object o : tiles) {
if(!(o instanceof TileEntityRebar)) continue;
TileEntityRebar rebar = (TileEntityRebar) o;
if(rebar.progress > 0) rebars.add(rebar);
}
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
World world = mc.theWorld;
double dx = player.prevPosX + (player.posX - player.prevPosX) * interp;
double dy = player.prevPosY + (player.posY - player.prevPosY) * interp;
double dz = player.prevPosZ + (player.posZ - player.prevPosZ) * interp;
if(!rebars.isEmpty()) {
GL11.glPushMatrix();
GL11.glShadeModel(GL11.GL_SMOOTH);
//RenderHelper.enableStandardItemLighting();
EntityRenderer entityRenderer = mc.entityRenderer;
entityRenderer.enableLightmap(interp);
RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world);
renderer.setOverrideBlockTexture(((BlockRebar) ModBlocks.rebar).concrete);
mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
for(TileEntityRebar rebar : rebars) {
tess.setTranslation(-dx, -dy, -dz);
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
renderer.setRenderBounds(0, 0, 0, 1, rebar.progress / 1000D, 1);
renderer.renderStandardBlock(ModBlocks.rebar, rebar.xCoord, rebar.yCoord, rebar.zCoord);
}
tess.draw();
tess.setTranslation(0, 0, 0);
renderer.clearOverrideBlockTexture();
entityRenderer.disableLightmap(interp);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.rebar_placer && player.getHeldItem().hasTagCompound() &&
player.getHeldItem().stackTagCompound.hasKey("pos") && mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectType.BLOCK) {
int[] pos = player.getHeldItem().stackTagCompound.getIntArray("pos");
MovingObjectPosition mop = mc.objectMouseOver;
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
int iX = mop.blockX + dir.offsetX;
int iY = mop.blockY + dir.offsetY;
int iZ = mop.blockZ + dir.offsetZ;
double minX = Math.min(pos[0], iX) + 0.125;
double maxX = Math.max(pos[0], iX) + 0.875;
double minY = Math.min(pos[1], iY) + 0.125;
double maxY = Math.max(pos[1], iY) + 0.875;
double minZ = Math.min(pos[2], iZ) + 0.125;
double maxZ = Math.max(pos[2], iZ) + 0.875;
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor3f(1F, 1F, 1F);
Tessellator tess = Tessellator.instance;
tess.setTranslation(-dx, -dy, -dz);
tess.startDrawing(GL11.GL_LINES);
tess.setBrightness(240);
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
// top
tess.addVertex(minX, maxY, minZ);
tess.addVertex(minX, maxY, maxZ);
tess.addVertex(minX, maxY, maxZ);
tess.addVertex(maxX, maxY, maxZ);
tess.addVertex(maxX, maxY, maxZ);
tess.addVertex(maxX, maxY, minZ);
tess.addVertex(maxX, maxY, minZ);
tess.addVertex(minX, maxY, minZ);
// bottom
tess.addVertex(minX, minY, minZ);
tess.addVertex(minX, minY, maxZ);
tess.addVertex(minX, minY, maxZ);
tess.addVertex(maxX, minY, maxZ);
tess.addVertex(maxX, minY, maxZ);
tess.addVertex(maxX, minY, minZ);
tess.addVertex(maxX, minY, minZ);
tess.addVertex(minX, minY, minZ);
// sides
tess.addVertex(minX, minY, minZ);
tess.addVertex(minX, maxY, minZ);
tess.addVertex(maxX, minY, minZ);
tess.addVertex(maxX, maxY, minZ);
tess.addVertex(maxX, minY, maxZ);
tess.addVertex(maxX, maxY, maxZ);
tess.addVertex(minX, minY, maxZ);
tess.addVertex(minX, maxY, maxZ);
tess.draw();
tess.setTranslation(0, 0, 0);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPopMatrix();
int rebarLeft = InventoryUtil.countAStackMatches(player, new ComparableStack(ModBlocks.rebar), true);
int rebarRequired = (Math.max(pos[0], iX) - Math.min(pos[0], iX) + 1) * (Math.max(pos[1], iY) - Math.min(pos[1], iY) + 1) * (Math.max(pos[2], iZ) - Math.min(pos[2], iZ) + 1);
MainRegistry.proxy.displayTooltip((rebarRequired > rebarLeft ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + (rebarLeft + " / " + rebarRequired), 1_000, ServerProxy.ID_CABLE);
}
}
}

View File

@ -1,288 +0,0 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnace;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
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.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class MachineArcFurnace extends BlockContainer {
private final Random field_149933_a = new Random();
private final boolean isActive;
private static boolean keepInventory;
@SideOnly(Side.CLIENT)
private IIcon iconFront;
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconBottom;
@SideOnly(Side.CLIENT)
private IIcon iconRods;
public MachineArcFurnace(boolean blockState) {
super(Material.iron);
isActive = blockState;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_arc_furnace_front_on" : ":machine_arc_furnace_front_off"));
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_arc_furnace_top_on" : ":machine_arc_furnace_top"));
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":machine_arc_furnace_bottom");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_arc_furnace_side");
this.iconRods = iconRegister.registerIcon(RefStrings.MODID + ":machine_arc_furnace_top_rods");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
if(this == ModBlocks.machine_arc_furnace_off) {
if(side == 1 && metadata > 5) {
return iconRods;
}
}
if(metadata > 5)
metadata -= 4;
if(side == 0)
return this.iconBottom;
if(side == 1)
return this.iconTop;
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
return Item.getItemFromBlock(ModBlocks.machine_arc_furnace_off);
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
super.onBlockAdded(world, x, y, z);
this.setDefaultDirection(world, x, y, z);
}
private void setDefaultDirection(World world, int x, int y, int z) {
if(!world.isRemote)
{
Block block1 = world.getBlock(x, y, z - 1);
Block block2 = world.getBlock(x, y, z + 1);
Block block3 = world.getBlock(x - 1, y, z);
Block block4 = world.getBlock(x + 1, y, z);
byte b0 = 3;
if(block1.func_149730_j() && !block2.func_149730_j())
{
b0 = 3;
}
if(block2.func_149730_j() && !block1.func_149730_j())
{
b0 = 2;
}
if(block3.func_149730_j() && !block4.func_149730_j())
{
b0 = 5;
}
if(block4.func_149730_j() && !block3.func_149730_j())
{
b0 = 4;
}
world.setBlockMetadataWithNotify(x, y, z, b0, 2);
}
}
@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);
}
if(itemStack.hasDisplayName())
{
((TileEntityMachineArcFurnace)world.getTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
}
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote)
{
return true;
} else if(!player.isSneaking())
{
TileEntityMachineArcFurnace entity = (TileEntityMachineArcFurnace) world.getTileEntity(x, y, z);
if(entity != null)
{
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
}
return true;
} else {
return false;
}
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityMachineArcFurnace();
}
public static void updateBlockState(boolean isProcessing, World world, int x, int y, int z) {
int i = world.getBlockMetadata(x, y, z);
TileEntity entity = world.getTileEntity(x, y, z);
keepInventory = true;
if(isProcessing)
{
world.setBlock(x, y, z, ModBlocks.machine_arc_furnace_on);
}else{
world.setBlock(x, y, z, ModBlocks.machine_arc_furnace_off);
}
keepInventory = false;
world.setBlockMetadataWithNotify(x, y, z, i, 2);
if(entity != null) {
entity.validate();
world.setTileEntity(x, y, z, entity);
}
}
@Override
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
if (!keepInventory)
{
TileEntityMachineArcFurnace tileentityfurnace = (TileEntityMachineArcFurnace)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
if (tileentityfurnace != null)
{
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
{
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
if (itemstack != null)
{
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
while (itemstack.stackSize > 0)
{
int j1 = this.field_149933_a.nextInt(21) + 10;
if (j1 > itemstack.stackSize)
{
j1 = itemstack.stackSize;
}
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
if (itemstack.hasTagCompound())
{
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
}
float f3 = 0.05F;
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
p_149749_1_.spawnEntityInWorld(entityitem);
}
}
}
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
}
}
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World p_149734_1_, int x, int y, int z, Random rand)
{
if (isActive)
{
int l = p_149734_1_.getBlockMetadata(x, y, z);
float f = x + 0.5F;
float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
float f2 = z + 0.5F;
float f3 = 0.52F;
float f4 = rand.nextFloat() * 0.6F - 0.3F;
if (l == 4)
{
p_149734_1_.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
p_149734_1_.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
}
else if (l == 5)
{
p_149734_1_.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
p_149734_1_.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
}
else if (l == 2)
{
p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
p_149734_1_.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
}
else if (l == 3)
{
p_149734_1_.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
p_149734_1_.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
}
}
}
@Override
@SideOnly(Side.CLIENT)
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)
{
return Item.getItemFromBlock(ModBlocks.machine_arc_furnace_off);
}
}

View File

@ -0,0 +1,42 @@
package com.hbm.blocks.machine.rbmk;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKAutoloader;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
public class RBMKAutoloader extends BlockDummyable {
public RBMKAutoloader() {
super(Material.iron);
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.125, 0, -0.125, 0.125, 4, 0.125));
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.5, 4, -0.5, 0.5, 9, 0.5));
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityRBMKAutoloader();
return new TileEntityProxyCombo().inventory();
}
@Override
public int[] getDimensions() {
return new int[] {8, 0, 0, 0, 0, 0};
}
@Override
public int getOffset() {
return 0;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return this.standardOpenBehavior(world, x, y, z, player, 0);
}
}

View File

@ -7,6 +7,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
@Deprecated
public interface IRenderBlock {
public static int renderID = RenderingRegistry.getNextAvailableRenderId();

View File

@ -32,6 +32,7 @@ public class ClientConfig extends RunningConfig {
public static ConfigWrapper<Boolean> RENDER_REEDS = new ConfigWrapper(!Compat.isModLoaded(Compat.MOD_ANG));
public static ConfigWrapper<Boolean> NEI_HIDE_SECRETS = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> COOLING_TOWER_PARTICLES = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> RENDER_REBAR_SIMPLE = new ConfigWrapper(false);
private static void initDefaults() {
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
@ -53,6 +54,7 @@ public class ClientConfig extends RunningConfig {
configMap.put("RENDER_REEDS", RENDER_REEDS);
configMap.put("NEI_HIDE_SECRETS", NEI_HIDE_SECRETS);
configMap.put("COOLING_TOWER_PARTICLES", COOLING_TOWER_PARTICLES);
configMap.put("RENDER_REBAR_SIMPLE", RENDER_REBAR_SIMPLE);
}
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */

View File

@ -113,7 +113,7 @@ public class ToolRecipes {
//Utility
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rangefinder, 1), new Object[] { "GRC", " S", 'G', KEY_ANYPANE, 'R', REDSTONE.dust(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'S' ,STEEL.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.designator, 1), new Object[] { " A", "#B#", "#B#", '#', IRON.plate(), 'A', STEEL.plate(), 'B', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.designator, 1), new Object[] { " A", "#B#", "#B#", '#', ANY_PLASTIC.ingot(), 'A', STEEL.plate(), 'B', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.designator_range, 1), new Object[] { ModItems.rangefinder, ModItems.designator, ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.designator_manual, 1), new Object[] { " A", "#C#", "#B#", '#', ANY_PLASTIC.ingot(), 'A', PB.plate(), 'B', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'C', ModItems.designator });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.designator_arty_range, 1), new Object[] { ModItems.rangefinder, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), ANY_PLASTIC.ingot() });
@ -156,10 +156,15 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(ItemBlowtorch.getEmptyTool(ModItems.blowtorch), new Object[] { "CC ", " I ", "CCC", 'C', CU.plate528(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(ItemBlowtorch.getEmptyTool(ModItems.acetylene_torch), new Object[] { "SS ", " PS", " T ", 'S', STEEL.plate528(), 'P', ANY_PLASTIC.ingot(), 'T', ModItems.tank_steel });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.boltgun), new Object[] { "DPS", " RD", " D ", 'D', DURA.ingot(), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'R', RUBBER.ingot(), 'S', STEEL.shell() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rebar_placer), new Object[] { "RDR", "DWD", "RDR", 'R', ModBlocks.rebar, 'D', ModItems.ducttape, 'W', ModItems.wrench });
//Bobmazon
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bobmazon), new Object[] { Items.book, Items.gold_nugget, Items.string, KEY_BLUE });
//Blueprints
//CraftingManager.addShapelessAuto(new ItemStack(ModItems.blueprint_folder, 1, 0), new Object[] { ModItems.blueprints, ModItems.blueprints, ModItems.blueprints });
//CraftingManager.addShapelessAuto(new ItemStack(ModItems.blueprint_folder, 1, 1), new Object[] { ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.fragment_meteorite });
//Carts
CraftingManager.addRecipeAuto(ItemModMinecart.createCartItem(EnumCartBase.WOOD, EnumMinecart.EMPTY), new Object[] { "P P", "WPW", 'P',KEY_SLAB, 'W', KEY_PLANKS });
CraftingManager.addRecipeAuto(ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.EMPTY), new Object[] { "P P", "IPI", 'P', STEEL.plate(), 'I', STEEL.ingot() });

View File

@ -1,7 +1,6 @@
package com.hbm.handler;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.network.BlockOpenComputersCablePaintable;
import com.hbm.inventory.RecipesCommon;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
@ -17,7 +16,6 @@ import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.*;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.oredict.OreDictionary;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View File

@ -1,176 +0,0 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.imc.ICompatNHNEI;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.gui.GUIMachineAssembler;
import com.hbm.inventory.recipes.AssemblerRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemAssemblyTemplate;
import com.hbm.lib.RefStrings;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class AssemblerRecipeHandler extends TemplateRecipeHandler implements ICompatNHNEI {
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
@Override
public ItemStack[] getMachinesForRecipe() {
return new ItemStack[]{
new ItemStack(ModBlocks.machine_assembler),
new ItemStack(ModBlocks.machine_assemfac)};
}
@Override
public String getRecipeID() {
return "assembly";
}
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
List<PositionedStack> input;
PositionedStack result;
public SmeltingSet(List<Object> in, ItemStack result) {
input = new ArrayList();
ComparableStack comp = new ComparableStack(result);
ItemStack template = ItemAssemblyTemplate.writeType(new ItemStack(ModItems.assembly_template), comp);
for(int i = 0; i < Math.min(in.size(), 12); i++) {
input.add(new PositionedStack(in.get(i), 30 + (i % 4) * 18, 6 + (i / 4) * 18));
}
input.add(new PositionedStack(template, 66 + 45, 6));
this.result = new PositionedStack(result, 138, 24);
}
@Override
public List<PositionedStack> getIngredients() {
return getCycledIngredients(cycleticks / 48, input);
}
@Override
public PositionedStack getResult() {
return result;
}
}
@Override
public String getRecipeName() {
return "Assembly Machine";
}
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/nei/gui_nei_assembler.png";
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if ((outputId.equals("assembly")) && getClass() == AssemblerRecipeHandler.class) {
Map<ItemStack, List<Object>> recipes = AssemblerRecipes.getRecipes();
for (Map.Entry<ItemStack, List<Object>> recipe : recipes.entrySet()) {
this.arecipes.add(new SmeltingSet(recipe.getValue(), recipe.getKey()));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
Map<ItemStack, List<Object>> recipes = AssemblerRecipes.getRecipes();
for (Map.Entry<ItemStack, List<Object>> recipe : recipes.entrySet()) {
if (NEIServerUtils.areStacksSameTypeCrafting(recipe.getKey(), result))
this.arecipes.add(new SmeltingSet(recipe.getValue(), recipe.getKey()));
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if ((inputId.equals("assembly")) && getClass() == AssemblerRecipeHandler.class) {
loadCraftingRecipes("assembly", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
Map<ItemStack, List<Object>> recipes = AssemblerRecipes.getRecipes();
for (Map.Entry<ItemStack, List<Object>> recipe : recipes.entrySet()) {
for(Object o : recipe.getValue()) {
if(o instanceof ItemStack && NEIServerUtils.areStacksSameTypeCrafting((ItemStack)o, ingredient)) {
this.arecipes.add(new SmeltingSet(recipe.getValue(), recipe.getKey()));
} else if(o instanceof List) {
for(Object obj : (List)o) {
if(obj instanceof ItemStack && NEIServerUtils.areStacksSameTypeCrafting((ItemStack)obj, ingredient)) {
this.arecipes.add(new SmeltingSet(recipe.getValue(), recipe.getKey()));
}
}
}
}
}
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return null;
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36, 23, 36, 18), "assembly"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2, 89 - 7 - 11, 18 * 5 - 4, 18 + 16), "assembly"));
guiGui.add(GUIMachineAssembler.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(83 - 3 + 16 + 5, 5 + 18, 16, 86, 36, 18, 48, 0);
}
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
}

View File

@ -0,0 +1,18 @@
package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.AssemblyMachineRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
public class AssemblyMachineRecipeHandler extends NEIGenericRecipeHandler {
public AssemblyMachineRecipeHandler() {
super(ModBlocks.machine_assembly_machine.getLocalizedName(), AssemblyMachineRecipes.INSTANCE, ModBlocks.machine_assembly_machine);
}
@Override public String getRecipeID() { return "ntmAssemblyMachine"; }
@Override public int getInputXOffset(GenericRecipe recipe, int inputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
@Override public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
@Override public int getMachineXOffset(GenericRecipe recipe) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
}

View File

@ -3,14 +3,11 @@ package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.ChemicalPlantRecipes;
public class ChemicalPlantRecipeHandler extends NEIUniversalHandler { //TODO: make a new universal handler
public class ChemicalPlantRecipeHandler extends NEIGenericRecipeHandler {
public ChemicalPlantRecipeHandler() {
super(ModBlocks.machine_chemical_plant.getLocalizedName(), ModBlocks.machine_chemical_plant, ChemicalPlantRecipes.getRecipes());
super(ModBlocks.machine_chemical_plant.getLocalizedName(), ChemicalPlantRecipes.INSTANCE, ModBlocks.machine_chemical_plant, ModBlocks.machine_chemical_factory);
}
@Override
public String getKey() {
return "ntmChemicalPlant";
}
@Override public String getRecipeID() { return "ntmChemicalPlant"; }
}

View File

@ -1,236 +0,0 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.imc.ICompatNHNEI;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.gui.GUIMachineChemplant;
import com.hbm.inventory.recipes.ChemplantRecipes;
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.lib.RefStrings;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public class ChemplantRecipeHandler extends TemplateRecipeHandler implements ICompatNHNEI {
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
@Override
public ItemStack[] getMachinesForRecipe() {
return new ItemStack[]{
new ItemStack(ModBlocks.machine_chemplant),
new ItemStack(ModBlocks.machine_chemfac)};
}
@Override
public String getRecipeID() {
return "chemistry";
}
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
PositionedStack[] itemIn = new PositionedStack[4];
PositionedStack[] fluidIn = new PositionedStack[2];
PositionedStack[] itemOut = new PositionedStack[4];
PositionedStack[] fluidOut = new PositionedStack[2];
PositionedStack template;
public RecipeSet(ChemRecipe recipe) {
for(int i = 0; i < recipe.inputs.length; i++) {
AStack in = recipe.inputs[i];
if(in == null) continue;
this.itemIn[i] = new PositionedStack(in.extractForNEI(), 30 + (i % 2) * 18, 24 + (i / 2) * 18);
}
for(int i = 0; i < recipe.inputFluids.length; i++) {
FluidStack in = recipe.inputFluids[i];
if(in == null) continue;
ItemStack drop = ItemFluidIcon.make(in);
this.fluidIn[i] = new PositionedStack(drop, 30 + (i % 2) * 18, 6);
}
for(int i = 0; i < recipe.outputs.length; i++) {
ItemStack out = recipe.outputs[i];
if(out == null) continue;
this.itemOut[i] = new PositionedStack(out, 120 + (i % 2) * 18, 24 + (i / 2) * 18);
}
for(int i = 0; i < recipe.outputFluids.length; i++) {
FluidStack out = recipe.outputFluids[i];
if(out == null) continue;
ItemStack drop = ItemFluidIcon.make(out);
this.fluidOut[i] = new PositionedStack(drop, 120 + (i % 2) * 18, 6);
}
this.template = new PositionedStack(new ItemStack(ModItems.chemistry_template, 1, recipe.getId()), 84, 6);
}
@Override
public List<PositionedStack> getIngredients() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
for(PositionedStack stack : itemIn) if(stack != null) stacks.add(stack);
for(PositionedStack stack : fluidIn) if(stack != null) stacks.add(stack);
stacks.add(template);
return getCycledIngredients(cycleticks / 20, stacks);
}
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
for(PositionedStack stack : itemOut) if(stack != null) stacks.add(stack);
for(PositionedStack stack : fluidOut) if(stack != null) stacks.add(stack);
stacks.add(template);
return stacks;
}
@Override
public PositionedStack getResult() {
return null;
}
}
@Override
public String getRecipeName() {
return "Chemical Plant";
}
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/nei/gui_nei_chemplant.png";
}
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if((outputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
this.arecipes.add(new RecipeSet(recipe));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadCraftingRecipes(ItemStack result) {
outer:
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
for(ItemStack out : recipe.outputs) {
if(out != null && NEIServerUtils.areStacksSameTypeCrafting(result, out)) {
this.arecipes.add(new RecipeSet(recipe));
continue outer;
}
}
for(FluidStack out : recipe.outputFluids) {
if(out != null) {
ItemStack drop = ItemFluidIcon.make(out.type, out.fill);
if(compareFluidStacks(result, drop)) {
this.arecipes.add(new RecipeSet(recipe));
continue outer;
}
}
}
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if((inputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
loadCraftingRecipes("chemistry", new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
outer:
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
for(AStack in : recipe.inputs) {
if(in != null) {
List<ItemStack> stacks = in.extractForNEI();
for(ItemStack stack : stacks) {
if(NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack)) {
this.arecipes.add(new RecipeSet(recipe));
continue outer;
}
}
}
}
for(FluidStack in : recipe.inputFluids) {
if(in != null) {
ItemStack drop = ItemFluidIcon.make(in.type, in.fill);
if(compareFluidStacks(ingredient, drop)) {
this.arecipes.add(new RecipeSet(recipe));
continue outer;
}
}
}
}
}
private boolean compareFluidStacks(ItemStack sta1, ItemStack sta2) {
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
}
@Override
public Class<? extends GuiContainer> getGuiClass() {
return null;
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 72, 23, 18 * 3, 18), "chemistry"));
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2, 89 - 7 - 11, 18 * 5 - 4, 18 + 16), "chemistry"));
guiGui.add(GUIMachineChemplant.class);
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
drawProgressBar(83 - 3 + 16 + 5 - 36, 5 + 18, 16, 86, 18 * 3, 18, 48, 0);
}
@Override
public TemplateRecipeHandler newInstance() {
return super.newInstance();
}
}

View File

@ -0,0 +1,321 @@
package com.hbm.handler.nei;
import static codechicken.lib.gui.GuiDraw.drawTexturedModalRect;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import com.hbm.config.ClientConfig;
import com.hbm.handler.imc.ICompatNHNEI;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.inventory.recipes.loader.GenericRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipes.IOutput;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBlueprints;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.lib.RefStrings;
import codechicken.nei.NEIServerUtils;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import net.minecraft.block.Block;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
public abstract class NEIGenericRecipeHandler extends TemplateRecipeHandler implements ICompatNHNEI {
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
public final String displayName;
public final GenericRecipes recipeSet;
public final ItemStack[] machines;
public NEIGenericRecipeHandler(String displayName, GenericRecipes recipeSet, Block... machines) {
ItemStack[] machineStacks = new ItemStack[machines.length];
for(int i = 0; i < machines.length; i++) machineStacks[i] = new ItemStack(machines[i]);
this.displayName = displayName;
this.recipeSet = recipeSet;
this.machines = machineStacks;
}
public NEIGenericRecipeHandler(String displayName, GenericRecipes recipeSet, ItemStack... machines) {
this.displayName = displayName;
this.recipeSet = recipeSet;
this.machines = machines;
}
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
protected GenericRecipe recipe;
protected PositionedStack[] input;
protected PositionedStack[] output;
protected PositionedStack machine;
protected PositionedStack template;
public RecipeSet(GenericRecipe recipe) {
this.recipe = recipe;
int inputSize = 0;
int outputSize = 0;
if(recipe.inputItem != null) inputSize += recipe.inputItem.length; // sure a ternary is "less code" but is it more readable? no? thought so
if(recipe.inputFluid != null) inputSize += recipe.inputFluid.length;
if(recipe.outputItem != null) outputSize += recipe.outputItem.length;
if(recipe.outputFluid != null) outputSize += recipe.outputFluid.length;
int inputOffset = getInputXOffset(recipe, inputSize);
int outputOffset = getOutputXOffset(recipe, outputSize);
int machineOffset = getMachineXOffset(recipe);
this.input = new PositionedStack[inputSize];
int[][] inPos = getInputSlotPositions(inputSize);
inputSize = 0; // just gonna reuse this because fuck it why not
if(recipe.inputItem != null) for(int i = 0; i < recipe.inputItem.length; i++) {
this.input[i] = new PositionedStack(recipe.inputItem[i].extractForNEI(), inPos[i][0] + inputOffset, inPos[i][1]);
inputSize = i + 1;
}
if(recipe.inputFluid != null) for(int i = 0; i < recipe.inputFluid.length; i++) {
this.input[inputSize + i] = new PositionedStack(ItemFluidIcon.make(recipe.inputFluid[i]), inPos[inputSize + i][0] + inputOffset, inPos[inputSize + i][1]);
}
int[][] outPos = getOutputSlotPositions(outputSize);
this.output = new PositionedStack[outputSize];
outputSize = 0;
if(recipe.outputItem != null) for(int i = 0; i < recipe.outputItem.length; i++) {
this.output[i] = new PositionedStack(recipe.outputItem[i].getAllPossibilities(), outPos[i][0] + outputOffset, outPos[i][1]);
outputSize = i + 1;
}
if(recipe.outputFluid != null) for(int i = 0; i < recipe.outputFluid.length; i++) {
this.output[outputSize + i] = new PositionedStack(ItemFluidIcon.make(recipe.outputFluid[i]), outPos[outputSize + i][0] + outputOffset, outPos[outputSize + i][1]);
}
if(recipe.isPooled()) {
String[] pools = recipe.getPools();
ItemStack[] blueprints = new ItemStack[pools.length];
for(int i = 0; i < pools.length; i++) blueprints[i] = ItemBlueprints.make(pools[i]);
this.template = new PositionedStack(blueprints, 75 + machineOffset, 10);
}
ItemStack[] machineStacks = getMachines(recipe);
this.machine = new PositionedStack(machineStacks, 75 + machineOffset, template == null ? 31 : 38);
}
@Override public List<PositionedStack> getIngredients() { return getCycledIngredients(cycleticks / 20, Arrays.asList(this.input)); }
@Override public PositionedStack getResult() { return this.output[0]; }
@Override
public List<PositionedStack> getOtherStacks() {
List<PositionedStack> other = new ArrayList();
for(int i = 1; i < this.output.length; i++) other.add(this.output[i]);
other.add(this.machine);
if(this.template != null) other.add(this.template);
return getCycledIngredients(cycleticks / 20, other);
}
}
@Override public String getRecipeName() { return this.displayName; }
@Override public ItemStack[] getMachinesForRecipe() { return machines; }
@Override public String getGuiTexture() { return RefStrings.MODID + ":textures/gui/nei/gui_nei.png"; }
public int getInputXOffset(GenericRecipe recipe, int inputCount) { return 0; }
public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return 0; }
public int getMachineXOffset(GenericRecipe recipe) { return 0; }
public ItemStack[] getMachines(GenericRecipe recipe) { return this.machines; }
// magic number vomit land
public int[][] getInputSlotPositions(int count) {
if(count == 1) return new int[][] { {48, 24} };
if(count == 2) return new int[][] { {30, 24}, {48, 24} };
if(count == 3) return new int[][] { {12, 24}, {30, 24}, {48, 24} };
if(count == 4) return new int[][] { {30, 15}, {48, 15}, {30, 33}, {48, 33} };
if(count == 5) return new int[][] { {12, 15}, {30, 15}, {48, 15}, {12, 33}, {30, 33} };
if(count == 6) return new int[][] { {12, 15}, {30, 15}, {48, 15}, {12, 33}, {30, 33}, {48, 33} };
int[][] slots = new int[count][2];
int cols = (count + 2) / 3;
for(int i = 0; i < count; i++) {
slots[i][0] = 12 + (i % cols) * 18 - (cols == 4 ? 18 : 0);
slots[i][1] = 6 + (i / cols) * 18;
}
return slots;
}
public int[][] getOutputSlotPositions(int count) {
switch(count) {
case 1: return new int[][] {
{102, 24}
};
case 2: return new int[][] {
{102, 24},
{120, 24}
};
case 3: return new int[][] {
{102, 24},
{120, 24},
{138, 24}
};
case 4: return new int[][] {
{102, 24 - 9},
{120, 24 - 9},
{102, 24 + 9},
{120, 24 + 9}
};
case 5: return new int[][] {
{102, 24 - 9}, {120, 24 - 9},
{102, 24 + 9}, {120, 24 + 9},
{138, 24},
};
case 6: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 42}, {120, 42},
};
case 7: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 42}, {120, 42},
{138, 24},
};
case 8: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 42}, {120, 42},
{138, 24}, {138, 42},
};
}
return new int[count][2];
}
@Override
public void loadCraftingRecipes(ItemStack result) {
outer: for(Object o : this.recipeSet.recipeOrderedList) {
GenericRecipe recipe = (GenericRecipe) o;
boolean hasMatch = false;
boolean hide = ClientConfig.NEI_HIDE_SECRETS.get();
if(hide && recipe.isPooled()) {
String[] pools = recipe.getPools();
for(String pool : pools) if(pool.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) continue outer;
}
if(hide && recipe.inputItem != null) for(AStack astack : recipe.inputItem) for(ItemStack stack : astack.extractForNEI()) {
if(ModItems.excludeNEI.contains(stack.getItem())) continue outer;
}
if(recipe.outputItem != null) for(IOutput output : recipe.outputItem) for(ItemStack stack : output.getAllPossibilities()) {
if(hide && ModItems.excludeNEI.contains(stack.getItem())) continue outer;
if(NEIServerUtils.areStacksSameTypeCrafting(stack, result)) hasMatch = true;
}
if(recipe.outputFluid != null) for(FluidStack fluid : recipe.outputFluid) {
if(areItemsAndMetaEqual(ItemFluidIcon.make(fluid), result)) hasMatch = true;
}
if(hasMatch) this.arecipes.add(new RecipeSet(recipe));
}
}
/** load all */
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if(outputId.equals(getRecipeID())) {
outer: for(Object o : this.recipeSet.recipeOrderedList) {
GenericRecipe recipe = (GenericRecipe) o;
boolean hide = ClientConfig.NEI_HIDE_SECRETS.get();
if(hide && recipe.isPooled()) {
String[] pools = recipe.getPools();
for(String pool : pools) if(pool.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) continue outer;
}
if(hide && recipe.inputItem != null) for(AStack astack : recipe.inputItem) for(ItemStack stack : astack.extractForNEI())
if(ModItems.excludeNEI.contains(stack.getItem())) continue outer;
if(hide && recipe.outputItem != null) for(IOutput output : recipe.outputItem) for(ItemStack stack : output.getAllPossibilities())
if(ModItems.excludeNEI.contains(stack.getItem())) continue outer;
this.arecipes.add(new RecipeSet(recipe));
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
@Override
public void loadUsageRecipes(String inputId, Object... ingredients) {
if(inputId.equals(getRecipeID())) {
loadCraftingRecipes(getRecipeID(), new Object[0]);
} else {
super.loadUsageRecipes(inputId, ingredients);
}
}
@Override
public void loadUsageRecipes(ItemStack ingredient) {
outer: for(Object o : this.recipeSet.recipeOrderedList) {
GenericRecipe recipe = (GenericRecipe) o;
boolean hasMatch = false;
boolean hide = ClientConfig.NEI_HIDE_SECRETS.get();
if(hide && recipe.isPooled()) {
String[] pools = recipe.getPools();
for(String pool : pools) if(pool.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) continue outer;
}
if(recipe.inputItem != null) for(AStack astack : recipe.inputItem) for(ItemStack stack : astack.extractForNEI()) {
if(hide && ModItems.excludeNEI.contains(stack.getItem())) continue outer;
if(NEIServerUtils.areStacksSameTypeCrafting(stack, ingredient)) hasMatch = true;
}
if(recipe.inputFluid != null) for(FluidStack fluid : recipe.inputFluid) {
if(areItemsAndMetaEqual(ItemFluidIcon.make(fluid), ingredient)) hasMatch = true;
}
if(hide && recipe.outputItem != null) for(IOutput output : recipe.outputItem) for(ItemStack stack : output.getAllPossibilities()) {
if(ModItems.excludeNEI.contains(stack.getItem())) continue outer;
}
if(hasMatch) this.arecipes.add(new RecipeSet(recipe));
}
}
public static boolean areItemsAndMetaEqual(ItemStack sta1, ItemStack sta2) {
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
}
@Override
public void loadTransferRects() {
transferRectsGui = new LinkedList<RecipeTransferRect>();
guiGui = new LinkedList<Class<? extends GuiContainer>>();
transferRects.add(new RecipeTransferRect(new Rectangle(147, 1, 18, 18), getRecipeID()));
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
}
@Override
public void drawBackground(int recipe) {
super.drawBackground(recipe);
RecipeSet rec = (RecipeSet) this.arecipes.get(recipe);
for(PositionedStack pos : rec.input) drawTexturedModalRect(pos.relx - 1, pos.rely - 1, 5, 87, 18, 18);
for(PositionedStack pos : rec.output) drawTexturedModalRect(pos.relx - 1, pos.rely - 1, 5, 87, 18, 18);
if(rec.template == null) {
drawTexturedModalRect(74 + this.getMachineXOffset(rec.recipe), 14, 59, 87, 18, 36);
} else {
drawTexturedModalRect(74 + this.getMachineXOffset(rec.recipe), 7, 77, 87, 18, 50);
}
}
}

View File

@ -25,11 +25,6 @@ import net.minecraft.item.ItemStack;
public abstract class NEIUniversalHandler extends TemplateRecipeHandler implements ICompatNHNEI {
@Override
public ItemStack[] getMachinesForRecipe() {
return machine;
}
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
@ -119,6 +114,11 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler implemen
return this.display;
}
@Override
public ItemStack[] getMachinesForRecipe() {
return machine;
}
@Override
public String getGuiTexture() {
return RefStrings.MODID + ":textures/gui/nei/gui_nei.png";

View File

@ -1,90 +0,0 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotSmelting;
import com.hbm.items.ModItems;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnace;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerMachineArcFurnace extends Container {
private TileEntityMachineArcFurnace diFurnace;
public ContainerMachineArcFurnace(InventoryPlayer invPlayer, TileEntityMachineArcFurnace tedf) {
diFurnace = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 56, 17));
this.addSlotToContainer(new SlotSmelting(invPlayer.player, tedf, 1, 116, 35));
this.addSlotToContainer(new Slot(tedf, 2, 38, 53));
this.addSlotToContainer(new Slot(tedf, 3, 56, 53));
this.addSlotToContainer(new Slot(tedf, 4, 74, 53));
this.addSlotToContainer(new Slot(tedf, 5, 8, 53));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
}
}
@Override
public void addCraftingToCrafters(ICrafting crafting) {
super.addCraftingToCrafters(crafting);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack rStack = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
rStack = stack.copy();
if(index <= 5) {
if(!this.mergeItemStack(stack, 6, this.inventorySlots.size(), true)) {
return null;
}
slot.onSlotChange(stack, rStack);
} else {
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(stack, 5, 6, false))
return null;
} else if(rStack.getItem() == ModItems.arc_electrode) {
if(!this.mergeItemStack(stack, 2, 5, false))
return null;
} else if(!this.mergeItemStack(stack, 0, 1, false))
return null;
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return rStack;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return diFurnace.isUseableByPlayer(player);
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBlueprints;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.util.InventoryUtil;
@ -53,6 +54,14 @@ public class ContainerMachineChemicalFactory extends ContainerBase {
if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(slotStack, 0, 1, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemBlueprints) {
if(!this.mergeItemStack(slotStack, 4, 5, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemBlueprints) {
if(!this.mergeItemStack(slotStack, 11, 12, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemBlueprints) {
if(!this.mergeItemStack(slotStack, 18, 19, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemBlueprints) {
if(!this.mergeItemStack(slotStack, 25, 26, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemMachineUpgrade) {
if(!this.mergeItemStack(slotStack, 1, 4, false)) return null;
} else {

View File

@ -3,7 +3,7 @@ package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemChemistryTemplate;
import com.hbm.items.machine.ItemBlueprints;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.util.InventoryUtil;
@ -57,7 +57,7 @@ public class ContainerMachineChemicalPlant extends ContainerBase {
if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(slotStack, 0, 1, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemChemistryTemplate) {
} else if(slotOriginal.getItem() instanceof ItemBlueprints) {
if(!this.mergeItemStack(slotStack, 1, 2, false)) return null;
} else if(slotOriginal.getItem() instanceof ItemMachineUpgrade) {
if(!this.mergeItemStack(slotStack, 2, 4, false)) return null;

View File

@ -43,8 +43,8 @@ public class ContainerMachineReactorBreeding extends Container {
ItemStack stack = slot.getStack();
var3 = stack.copy();
if(index <= 1) {
if(!this.mergeItemStack(stack, 1, this.inventorySlots.size(), true)) {
if(index <= 2) {
if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) {
return null;
}

View File

@ -0,0 +1,54 @@
package com.hbm.inventory.container;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKAutoloader;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class ContainerRBMKAutoloader extends ContainerBase {
public TileEntityRBMKAutoloader loader;
public ContainerRBMKAutoloader(InventoryPlayer invPlayer, TileEntityRBMKAutoloader tedf) {
super(invPlayer, tedf);
loader = tedf;
this.addSlots(loader, 0, 17, 18, 3, 3);
this.addTakeOnlySlots(loader, 9, 107, 18, 3, 3);
this.playerInv(invPlayer, 8, 100);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack rStack = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
rStack = stack.copy();
if(index <= 17) {
if(!this.mergeItemStack(stack, 18, this.inventorySlots.size(), true)) {
return null;
}
} else {
if(!this.mergeItemStack(stack, 0, 9, false)) return null;
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return rStack;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return loader.isUseableByPlayer(player);
}
}

View File

@ -190,6 +190,7 @@ public class Fluids {
public static FluidType SODIUM_ALUMINATE;
public static FluidType BAUXITE_SOLUTION;
public static FluidType ALUMINA;
public static FluidType CONCRETE;
/* Lagacy names for compatibility purposes */
@Deprecated public static FluidType ACID; //JAOPCA uses this, apparently
@ -405,7 +406,8 @@ public class Fluids {
SODIUM_ALUMINATE = new FluidType("SODIUM_ALUMINATE", 0xFFD191, 3, 0, 1, EnumSymbol.ACID).addTraits(new FT_Corrosive(30), LIQUID);
BAUXITE_SOLUTION = new FluidType("BAUXITE_SOLUTION", 0xE2560F, 3, 0, 3, EnumSymbol.ACID).addTraits(new FT_Corrosive(40), LIQUID, VISCOUS);
ALUMINA = new FluidType("ALUMINA", 0xDDFFFF, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
AIR = new FluidType(151, "AIR", 0xE7EAEB, 0, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS);
AIR = new FluidType("AIR", 0xE7EAEB, 0, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS);
CONCRETE = new FluidType(152, "CONCRETE", 0xA2A2A2, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
// ^ ^ ^ ^ ^ ^ ^ ^
//ADD NEW FLUIDS HERE
@ -553,6 +555,7 @@ public class Fluids {
metaOrder.add(SODIUM_ALUMINATE);
metaOrder.add(BAUXITE_SOLUTION);
metaOrder.add(ALUMINA);
metaOrder.add(CONCRETE);
//solutions and working fluids
metaOrder.add(FRACKSOL);
metaOrder.add(LYE);

View File

@ -1,64 +0,0 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMachineArcFurnace;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineArcFurnace;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUIMachineArcFurnace extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_arc.png");
private TileEntityMachineArcFurnace diFurnace;
public GUIMachineArcFurnace(InventoryPlayer invPlayer, TileEntityMachineArcFurnace tedf) {
super(new ContainerMachineArcFurnace(invPlayer, tedf));
diFurnace = tedf;
this.xSize = 176;
this.ySize = 166;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 51 - 34, 16, 34, diFurnace.power, diFurnace.maxPower);
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(diFurnace.isInvalid() && diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord) instanceof TileEntityMachineArcFurnace)
diFurnace = (TileEntityMachineArcFurnace) diFurnace.getWorldObj().getTileEntity(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord);
if(diFurnace.hasPower()) {
int i = (int)diFurnace.getPowerRemainingScaled(34);
drawTexturedModalRect(guiLeft + 8, guiTop + 51 - i, 176, 67 - i, 16, i);
}
if(diFurnace.canProcess() && diFurnace.hasPower())
{
drawTexturedModalRect(guiLeft + 55, guiTop + 35, 176, 0, 15, 16);
}
int j1 = diFurnace.getDiFurnaceProgressScaled(24);
drawTexturedModalRect(guiLeft + 79, guiTop + 34, 176, 16, j1 + 1, 17);
}
}

View File

@ -0,0 +1,72 @@
package com.hbm.inventory.gui;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerRBMKAutoloader;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKAutoloader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
public class GUIRBMKAutoloader extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_autoloader.png");
private TileEntityRBMKAutoloader loader;
public GUIRBMKAutoloader(InventoryPlayer invPlayer, TileEntityRBMKAutoloader tile) {
super(new ContainerRBMKAutoloader(invPlayer, tile));
loader = tile;
this.xSize = 176;
this.ySize = 182;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
}
@Override
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
if(guiLeft + 74 <= x && guiLeft + 74 + 12 > x && guiTop + 36 < y && guiTop + 36 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("minus", true);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, loader.xCoord, loader.yCoord, loader.zCoord));
}
if(guiLeft + 90 <= x && guiLeft + 90 + 12 > x && guiTop + 36 < y && guiTop + 36 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("plus", true);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, loader.xCoord, loader.yCoord, loader.zCoord));
}
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.loader.hasCustomInventoryName() ? this.loader.getInventoryName() : I18n.format(this.loader.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xFFFFFF);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
String percent = loader.cycle + "%";
this.fontRendererObj.drawString(percent, this.xSize / 2 - this.fontRendererObj.getStringWidth(percent) / 2, 23, 0x00FF00);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
}
}

View File

@ -10,16 +10,11 @@ import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.recipes.AssemblerRecipes;
import com.hbm.inventory.recipes.AssemblerRecipes.AssemblerRecipe;
import com.hbm.inventory.recipes.ChemplantRecipes;
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
import com.hbm.inventory.recipes.CrucibleRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemAssemblyTemplate;
import com.hbm.items.machine.ItemCassette;
import com.hbm.items.machine.ItemStamp;
import com.hbm.items.machine.ItemStamp.StampType;
@ -83,22 +78,8 @@ public class GUIScreenTemplateFolder extends GuiScreen {
}
}
}
// Assembly Templates
for(int i = 0; i < AssemblerRecipes.recipeList.size(); i++) {
ComparableStack comp = AssemblerRecipes.recipeList.get(i);
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(comp);
if(recipe != null && recipe.folders.contains(item)) {
allStacks.add(ItemAssemblyTemplate.writeType(new ItemStack(ModItems.assembly_template, 1, i), comp));
}
}
if(!this.isJournal) {
// Chemistry Templates
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
ChemRecipe chem = ChemplantRecipes.recipes.get(i);
allStacks.add(new ItemStack(ModItems.chemistry_template, 1, chem.getId()));
}
// Crucible Templates
for(int i = 0; i < CrucibleRecipes.recipes.size(); i++) {

View File

@ -292,6 +292,8 @@ public abstract class GuiInfoContainer extends GuiContainer implements INEIGuiHa
this.drawGradientRect(minX + indent, minY, minX + indent + 16, minY + 16, 0xffb0b0b0, 0xffb0b0b0);
}
GL11.glEnable(GL11.GL_DEPTH_TEST);
RenderHelper.enableGUIStandardItemLighting();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY);
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY, null);
RenderHelper.disableStandardItemLighting();

View File

@ -26,8 +26,6 @@ import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.material.Mats;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.ItemEnums.EnumCasingType;
import com.hbm.items.ItemEnums.EnumSecretType;
import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.machine.ItemAssemblyTemplate;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
@ -36,7 +34,6 @@ import com.hbm.items.machine.ItemPACoil.EnumCoilType;
import com.hbm.items.machine.ItemPistons.EnumPistonType;
import com.hbm.items.weapon.ItemAmmoHIMARS;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.common.Loader;
@ -98,7 +95,6 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModItems.warhead_volcano, 1), new AStack[] {new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_nuke, 3), new OreDictStack(U238.block(), 24), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.CAPACITOR_BOARD.ordinal()) }, 600);
makeRecipe(new ComparableStack(ModItems.missile_stealth, 1), new AStack[] { new OreDictStack(TI.plate(), 20), new OreDictStack(AL.plate(), 20), new OreDictStack(CU.plate(), 10), new OreDictStack(KEY_BLACK, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(STEEL.bolt(), 32) },1200);
makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new OreDictStack(DURA.ingot(), 32), new OreDictStack(B.ingot(), 8), new OreDictStack(PB.plate(), 16), new ComparableStack(ModItems.pipes_steel) },600);
makeRecipe(new ComparableStack(ModItems.tritium_deuterium_cake, 1), new AStack[] {new ComparableStack(ModItems.cell_deuterium, 6), new ComparableStack(ModItems.cell_tritium, 2), new OreDictStack(LI.ingot(), 4), },150);
makeRecipe(new ComparableStack(ModItems.pellet_cluster, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new ComparableStack(Blocks.tnt, 1), }, 50);
makeRecipe(new ComparableStack(ModItems.pellet_buckshot, 1), new AStack[] {new OreDictStack(PB.nugget(), 6), }, 50);
makeRecipe(new ComparableStack(ModItems.magnetron, 1), new AStack[] {new OreDictStack(CU.plate(), 3), new OreDictStack(W.wireFine(), 4), }, 40);
@ -157,7 +153,6 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.nuke_fleija, 1), new AStack[] {new OreDictStack(AL.shell(), 1), new ComparableStack(ModItems.fins_quad_titanium, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new OreDictStack("dyeWhite", 4), },400);
makeRecipe(new ComparableStack(ModBlocks.nuke_solinium, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_quad_titanium, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new OreDictStack("dyeGray", 8), },400);
makeRecipe(new ComparableStack(ModBlocks.nuke_n2, 1), new AStack[] {new OreDictStack(STEEL.shell(), 6), new OreDictStack(MAGTUNG.wireFine(), 12), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER), new OreDictStack("dyeBlack", 8), },300);
makeRecipe(new ComparableStack(ModBlocks.nuke_fstbmb, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(TI.shell(), 6), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CONTROLLER_ADVANCED), new OreDictStack("dyeGray", 8), },600, ModItems.journal_pip, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModBlocks.nuke_custom, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_ADVANCED), new OreDictStack("dyeGray", 4), },300);
makeRecipe(new ComparableStack(ModBlocks.float_bomb, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new OreDictStack(GOLD.wireDense(), 8), },250);
makeRecipe(new ComparableStack(ModBlocks.therm_endo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.powder_ice, 32), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_gold, 4), },250);
@ -237,13 +232,13 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_buster, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(TI.plate(), 4), new ComparableStack(ModBlocks.det_charge, 1), new ComparableStack(ModBlocks.det_cord, 4), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(PU239.ingot(), 1), new OreDictStack(OreDictManager.getReflector(), 2), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear_large, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(AL.plate(), 4), new OreDictStack(PU239.ingot(), 2), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit,3, EnumCircuitType.ADVANCED), },300);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.powder_magic, 12), new ComparableStack(ModItems.bucket_mud, 1), },100, ModItems.journal_pip);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.grenade_pink_cloud, 2), },100, ModItems.journal_pip);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.powder_magic, 12), new ComparableStack(ModItems.bucket_mud, 1), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.grenade_pink_cloud, 2), },100);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_he, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_incendiary, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 2), new OreDictStack(P_RED.dust(), 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 24), new OreDictStack(TI.plate(), 12), new OreDictStack(PU239.ingot(), 3), new ComparableStack(ModBlocks.det_charge, 6), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.ADVANCED), },500);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_n2, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 20), new ComparableStack(ModBlocks.det_charge, 24), new ComparableStack(Blocks.redstone_block, 12), new OreDictStack(MAGTUNG.dust(), 6), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), },400);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), }, 60, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), }, 60);
makeRecipe(new ComparableStack(ModItems.fusion_shield_tungsten, 1), new AStack[] {new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)}, 600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_desh, 1), new AStack[] {new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)}, 600);
makeRecipe(new ComparableStack(ModItems.fusion_shield_chlorophyte, 1), new AStack[] {new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48)}, 600);
@ -258,15 +253,6 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.part_generic, 32, EnumPartType.LDE)
},600);
makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] {
new OreDictStack(AL.shell(), 4),
new OreDictStack(RUBBER.ingot(), 16),
new ComparableStack(ModItems.rocket_fuel, 16),
new ComparableStack(ModItems.thruster_small, 3),
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER_ADVANCED),
new ComparableStack(ModItems.part_generic, 12, EnumPartType.LDE)
},600, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {
new OreDictStack(RUBBER.ingot(), 12),
new OreDictStack(TI.shell(), 3),
@ -397,7 +383,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(STEEL.plate528(), 16),
new OreDictStack(CU.ingot(), 12),
new OreDictStack(GOLD.wireDense(), 8),
new ComparableStack(ModItems.tank_steel, 4),
new OreDictStack(STEEL.shell(), 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)
}, 300);
@ -405,7 +391,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.ingot_firebrick, 12),
new OreDictStack(STEEL.plateCast(), 6),
new OreDictStack(CU.plateWelded(), 2),
new ComparableStack(ModItems.tank_steel, 2),
new OreDictStack(STEEL.shell(), 2),
new OreDictStack(ANY_CONCRETE.any(), 8)
}, 100);
@ -573,15 +559,6 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.coin_worm, 1)
}, 1200);
makeRecipe(new ComparableStack(ModItems.sat_gerald, 1), new AStack[] {
new OreDictStack(SBD.plateCast(), 128),
new OreDictStack(BSCCO.wireDense(), 128),
new ComparableStack(ModBlocks.det_nuke, 64),
new ComparableStack(ModItems.part_generic, 256, EnumPartType.HDE),
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
new ComparableStack(ModItems.coin_ufo, 1),
}, 1200, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModBlocks.vault_door, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 32),
new OreDictStack(W.ingot(), 32),
@ -785,18 +762,6 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
}, 100);
makeRecipe(new ComparableStack(ModItems.ammo_standard, 6, EnumAmmo.BMG50_SM), new AStack[] {
new ComparableStack(ModItems.casing, 1, EnumCasingType.LARGE_STEEL),
new OreDictStack(ANY_SMOKELESS.dust(), 6),
new OreDictStack(STAR.ingot(), 3),
}, 100, ModItems.journal_silver);
makeRecipe(new ComparableStack(ModItems.ammo_secret, 12, EnumAmmoSecret.BMG50_BLACK), new AStack[] {
new ComparableStack(ModItems.casing, 2, EnumCasingType.LARGE_STEEL),
new OreDictStack(ANY_SMOKELESS.dust(), 24),
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.SELENIUM_STEEL),
new ComparableStack(ModItems.black_diamond),
}, 1200, ModItems.journal_silver);
makeRecipe(new ComparableStack(ModBlocks.machine_silex, 1), new AStack[] {
new ComparableStack(ModBlocks.glass_quartz, 16),
!exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 1),
@ -929,8 +894,8 @@ public class AssemblerRecipes extends SerializableRecipe {
!exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 2),
!exp ? new OreDictStack(CU.plate528(), 16) : new OreDictStack(CU.heavyComp(), 1),
new OreDictStack(RUBBER.ingot(), 8),
new OreDictStack(STEEL.shell(), 3),
new ComparableStack(ModItems.ingot_firebrick, 16),
new ComparableStack(ModItems.tank_steel, 3),
new ComparableStack(ModItems.coil_copper, 16),
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC)
}, 200);
@ -1112,7 +1077,6 @@ public class AssemblerRecipes extends SerializableRecipe {
if(!GeneralConfig.enable528) {
makeRecipe(new ComparableStack(ModBlocks.machine_hephaestus, 1), new AStack[] { new OreDictStack(STEEL.pipe(), 12), !exp ? new OreDictStack(STEEL.ingot(), 24) : new OreDictStack(STEEL.heavyComp(), 2), !exp ? new OreDictStack(CU.plate(), 24) : new OreDictStack(CU.heavyComp(), 2), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16) }, 150);
makeRecipe(new ComparableStack(ModBlocks.machine_radgen, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 6), new OreDictStack(MAGTUNG.wireFine(), 24), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC), new ComparableStack(ModItems.reactor_core, 3), new OreDictStack(STAR.ingot(), 1), new OreDictStack("dyeRed", 1), }, 400, ModItems.journal_pip);
makeRecipe(new ComparableStack(ModBlocks.machine_reactor_breeding, 1), new AStack[] {new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1)},150);
makeRecipe(new ComparableStack(ModBlocks.reactor_research, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.motor_desh, 2), new OreDictStack(B.ingot(), 5), new OreDictStack(PB.plate(), 8), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC), },300);
@ -1206,8 +1170,8 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.motor_desh, 2),
!exp ? new ComparableStack(ModItems.plate_desh, 6) : new OreDictStack(DESH.heavyComp()),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR),
new ComparableStack(ModItems.tank_steel, 24),
new ComparableStack(ModItems.pipes_steel, 2)
new OreDictStack(STEEL.shell(), 16),
new OreDictStack(STEEL.pipe(), 12)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_catalytic_cracker), new AStack[] {
@ -1243,8 +1207,8 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(RUBBER.ingot(), 8),
new OreDictStack(PB.plate528(), 12),
new OreDictStack(CU.plateCast(), 4),
new ComparableStack(ModItems.thermo_element, 8),
new ComparableStack(ModItems.tank_steel, 3)
new OreDictStack(STEEL.shell(), 2),
new ComparableStack(ModItems.thermo_element, 8)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.transition_seal, 1), new AStack[]{

View File

@ -16,6 +16,7 @@ import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.material.Mats;
import com.hbm.inventory.recipes.loader.GenericRecipe;
@ -165,17 +166,17 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
// decoration
this.register(new GenericRecipe("ass.capnuka").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.NUKA))
.inputItems(new ComparableStack(ModItems.cap_nuka, 128)));
.inputItems(new ComparableStack(ModItems.cap_nuka, 64), new ComparableStack(ModItems.cap_nuka, 64)));
this.register(new GenericRecipe("ass.capquantum").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.QUANTUM))
.inputItems(new ComparableStack(ModItems.cap_quantum, 128)));
.inputItems(new ComparableStack(ModItems.cap_quantum, 64), new ComparableStack(ModItems.cap_quantum, 64)));
this.register(new GenericRecipe("ass.capsparkle").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.SPARKLE))
.inputItems(new ComparableStack(ModItems.cap_sparkle, 128)));
.inputItems(new ComparableStack(ModItems.cap_sparkle, 64), new ComparableStack(ModItems.cap_sparkle, 64)));
this.register(new GenericRecipe("ass.caprad").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.RAD))
.inputItems(new ComparableStack(ModItems.cap_rad, 128)));
.inputItems(new ComparableStack(ModItems.cap_rad, 64), new ComparableStack(ModItems.cap_rad, 64)));
this.register(new GenericRecipe("ass.capfritz").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.FRITZ))
.inputItems(new ComparableStack(ModItems.cap_fritz, 128)));
.inputItems(new ComparableStack(ModItems.cap_fritz, 64), new ComparableStack(ModItems.cap_fritz, 64)));
this.register(new GenericRecipe("ass.capkorl").setup(10, 100).outputItems(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.KORL))
.inputItems(new ComparableStack(ModItems.cap_korl, 128)));
.inputItems(new ComparableStack(ModItems.cap_korl, 64), new ComparableStack(ModItems.cap_korl, 64)));
/*
this.register(new GenericRecipe("ass.").setup(, 100).outputItems(new ItemStack(ModBlocks., 1))
.inputItems());
@ -233,7 +234,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.epress").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_epress, 1))
.inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)));
this.register(new GenericRecipe("ass.fel").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_fel, 1))
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new OreDictStack(ALLOY.wireDense(), 64), new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)));
.inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new OreDictStack(ALLOY.wireDense(), 64), new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.part_generic, 4, EnumPartType.GLASS_POLARIZED), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)));
this.register(new GenericRecipe("ass.silex").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_silex, 1))
.inputItems(new ComparableStack(ModBlocks.glass_quartz, 16), new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(DESH.ingot(), 4), new OreDictStack(RUBBER.ingot(), 8), new OreDictStack(STEEL.pipe(), 8)));
this.register(new GenericRecipe("ass.excavator").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_excavator, 1))
@ -283,7 +284,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.dieselgen").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_diesel, 1))
.inputItems(new OreDictStack(STEEL.shell(), 1), new OreDictStack(CU.plateCast(), 2), new ComparableStack(ModItems.coil_copper, 4)));
this.register(new GenericRecipe("ass.combustiongen").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_combustion_engine, 1))
.inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)));
.inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new ComparableStack(ModItems.canister_empty, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)));
this.register(new GenericRecipe("ass.pistonsetsteel").setup(200, 100).outputItems(new ItemStack(ModItems.piston_set, 1, EnumPistonType.STEEL.ordinal()))
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(CU.plate(), 4), new OreDictStack(W.ingot(), 8), new OreDictStack(W.bolt(), 16)));
this.register(new GenericRecipe("ass.pistonsetdura").setup(200, 100).outputItems(new ItemStack(ModItems.piston_set, 1, EnumPistonType.DURA.ordinal()))
@ -329,7 +330,8 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 128)));
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64)));
// fluid tanks
this.register(new GenericRecipe("ass.tank").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_fluidtank, 1))
@ -354,10 +356,10 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModBlocks.pa_beamline, 3), new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.QUANTUM)));
this.register(new GenericRecipe("ass.detector").setup(400, 100).outputItems(new ItemStack(ModBlocks.pa_detector, 1))
.inputItems(new ComparableStack(ModBlocks.pa_beamline, 3), new OreDictStack(STEEL.plateCast(), 24), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.QUANTUM)));
this.register(new GenericRecipe("ass.pagold").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.GOLD.ordinal())).inputItems(new OreDictStack(GOLD.wireDense(), 128)));
this.register(new GenericRecipe("ass.pagold").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.GOLD.ordinal())).inputItems(new OreDictStack(GOLD.wireDense(), 64), new OreDictStack(GOLD.wireDense(), 64)));
this.register(new GenericRecipe("ass.panbti").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.NIOBIUM.ordinal())).inputItems(new OreDictStack(NB.wireDense(), 64), new OreDictStack(TI.wireDense(), 64)));
this.register(new GenericRecipe("ass.pabscco").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.BSCCO.ordinal())).inputItems(new OreDictStack(BSCCO.wireDense(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64)));
this.register(new GenericRecipe("ass.pachlorophyte").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.CHLOROPHYTE.ordinal())).inputItems(new OreDictStack(CU.wireDense(), 128), new ComparableStack(ModItems.powder_chlorophyte, 16)));
this.register(new GenericRecipe("ass.pachlorophyte").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.CHLOROPHYTE.ordinal())).inputItems(new OreDictStack(CU.wireDense(), 64), new OreDictStack(CU.wireDense(), 64), new ComparableStack(ModItems.powder_chlorophyte, 16)));
this.register(new GenericRecipe("ass.exposurechamber").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_exposure_chamber, 1))
.inputItems(new OreDictStack(AL.plateCast(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 12), new OreDictStack(ALLOY.wireDense(), 32), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModBlocks.capacitor_tantalium, 1), new ComparableStack(ModBlocks.glass_quartz, 16)));
@ -383,9 +385,9 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.fusionheater").setup(200, 100).outputItems(new ItemStack(ModBlocks.fusion_heater, 4))
.inputItems(new OreDictStack(W.plateWelded(), 2), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 2)));
this.register(new GenericRecipe("ass.blankettungsten").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_tungsten, 1))
.inputItems(new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)));
.inputItems(new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 64)));
this.register(new GenericRecipe("ass.blanketdesh").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_desh, 1))
.inputItems(new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)));
.inputItems(new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 64)));
this.register(new GenericRecipe("ass.blanketchlorophyte").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_chlorophyte, 1))
.inputItems(new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48)));
@ -577,9 +579,9 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.fritz").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_fritz, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel)));
this.register(new GenericRecipe("ass.arty").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_arty, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 128), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1)));
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1)));
this.register(new GenericRecipe("ass.himars").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_himars, 1))
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 128), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1)));
.inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1)));
this.register(new GenericRecipe("ass.himarssmall").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL))
.inputItems(new OreDictStack(STEEL.plate(), 24), new OreDictStack(ANY_PLASTIC.ingot(), 12), new ComparableStack(ModItems.rocket_fuel, 48), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 48), new ComparableStack(ModItems.circuit, 6, EnumCircuitType.BASIC)));
this.register(new GenericRecipe("ass.himarssmallhe").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL_HE))
@ -669,6 +671,15 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.50bmgbypass").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_secret, 12, EnumAmmoSecret.BMG50_BLACK.ordinal()))
.inputItems(new ComparableStack(ModItems.casing, 2, EnumCasingType.LARGE_STEEL), new OreDictStack(ANY_SMOKELESS.dust(), 24), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.black_diamond))
.setPools(GenericRecipes.POOL_PREFIX_SECRET + "psalm"));
this.register(new GenericRecipe("chem.shellchlorine").setup(100, 1_000).outputItems(new ItemStack(ModItems.ammo_arty, 1, 9))
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.CHLORINE, 4_000)));
this.register(new GenericRecipe("ass.shellphosgene").setup(100, 1_000).outputItems(new ItemStack(ModItems.ammo_arty, 1, 10))
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.PHOSGENE, 4_000)));
this.register(new GenericRecipe("ass.shellmustard").setup(100, 1_000).outputItems(new ItemStack(ModItems.ammo_arty, 1, 11))
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.MUSTARDGAS, 4_000)));
// tools
this.register(new GenericRecipe("ass.multitool").setup(100, 100).outputItems(new ItemStack(ModItems.multitool_hit, 1))
@ -773,6 +784,19 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
new ComparableStack(ModItems.coin_ufo, 1)).setPools(GenericRecipes.POOL_PREFIX_DISCOVER + "gerald"));
this.register(new GenericRecipe("ass.emptypackage").setup(40, 100).outputItems(new ItemStack(ModItems.fluid_pack_empty, 1))
.inputItems(new OreDictStack(TI.plate(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 2)));
FluidType[] order = Fluids.getInNiceOrder();
for(int i = 1; i < order.length; ++i) {
FluidType type = order[i];
if(type.hasNoContainer()) continue;
this.register(new GenericRecipe("ass.package" + type.getUnlocalizedName()).setup(40, 100).outputItems(new ItemStack(ModItems.fluid_pack_full, 1, type.getID()))
.inputItems(new ComparableStack(ModItems.fluid_pack_empty)).inputFluids(new FluidStack(type, 32_000)));
this.register(new GenericRecipe("ass.unpackage" + type.getUnlocalizedName()).setup(40, 100).setIcon(ItemFluidIcon.make(type, 32_000)).outputItems(new ItemStack(ModItems.fluid_pack_empty))
.inputItems(new ComparableStack(ModItems.fluid_pack_full, 1, type.getID())).outputFluids(new FluidStack(type, 32_000)));
}
if(GeneralConfig.enableMekanismChanges && Loader.isModLoaded("Mekanism")) {
Block mb = (Block) Block.blockRegistry.getObject("Mekanism:MachineBlock");

View File

@ -60,7 +60,7 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("chem.xenonoxy").setupNamed(20, 1_000).setIcon(ModItems.gas_full, Fluids.XENON.getID())
.inputFluids(new FluidStack(Fluids.AIR, 8_000), new FluidStack(Fluids.OXYGEN, 250))
.outputFluids(new FluidStack(Fluids.XENON, 50)));
.outputFluids(new FluidStack(Fluids.XENON, 50)).setPools(GenericRecipes.POOL_PREFIX_ALT + ".xenonoxy"));
this.register(new GenericRecipe("chem.helium3").setupNamed(200, 2_000).setIcon(ModItems.gas_full, Fluids.HELIUM3.getID())
.inputItems(new ComparableStack(ModBlocks.moon_turf, 8))
@ -116,6 +116,12 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
.outputItems(DictFrame.fromOne(ModItems.fuel_additive, EnumFuelAdditive.DEICER)));
/// THE CONC AND ASPHALE ///
this.register(new GenericRecipe("chem.cobble").setup(20, 100)
.inputFluids(new FluidStack(Fluids.WATER, 1_000), new FluidStack(Fluids.LAVA, 25))
.outputItems(new ItemStack(Blocks.cobblestone)));
this.register(new GenericRecipe("chem.stone").setup(60, 500).setPools(GenericRecipes.POOL_PREFIX_DISCOVER)
.inputFluids(new FluidStack(Fluids.WATER, 1_000), new FluidStack(Fluids.LAVA, 25), new FluidStack(Fluids.AIR, 4_000))
.outputItems(new ItemStack(Blocks.stone)));
this.register(new GenericRecipe("chem.concrete").setup(100, 100)
.inputItems(new ComparableStack(ModItems.powder_cement, 1), new ComparableStack(Blocks.gravel, 8), new OreDictStack(KEY_SAND, 8))
.inputFluids(new FluidStack(Fluids.WATER, 2_000))
@ -131,6 +137,11 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
.inputFluids(new FluidStack(Fluids.WATER, 2_000))
.outputItems(new ItemStack(ModBlocks.ducrete_smooth, 8)));
this.register(new GenericRecipe("chem.liquidconk").setup(100, 100)
.inputItems(new ComparableStack(ModItems.powder_cement, 1), new ComparableStack(Blocks.gravel, 8), new OreDictStack(KEY_SAND, 8))
.inputFluids(new FluidStack(Fluids.WATER, 2_000))
.outputFluids(new FluidStack(Fluids.CONCRETE, 16_000)));
this.register(new GenericRecipe("chem.asphalt").setup(100, 100)
.inputItems(new ComparableStack(Blocks.gravel, 2), new OreDictStack(KEY_SAND, 6))
.inputFluids(new FluidStack(Fluids.BITUMEN, 1_000))
@ -209,7 +220,7 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("chem.birkeland").setupNamed(200, 5_000)
.inputFluids(new FluidStack(Fluids.AIR, 8_000), new FluidStack(Fluids.WATER, 2_000))
.outputFluids(new FluidStack(Fluids.NITRIC_ACID, 1_000)));
.outputFluids(new FluidStack(Fluids.NITRIC_ACID, 1_000)).setPools(GenericRecipes.POOL_PREFIX_ALT + ".birkeland"));
this.register(new GenericRecipe("chem.schrabidic").setup(100, 5_000)
.inputItems(new ComparableStack(ModItems.pellet_charged))
@ -268,21 +279,6 @@ public class ChemicalPlantRecipes extends GenericRecipes<GenericRecipe> {
.inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528 ? 1 : 0))
.outputItems(new ItemStack(ModItems.ingot_c4, 4)));
this.register(new GenericRecipe("chem.shellchlorine").setup(100, 1_000)
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.CHLORINE, 4_000))
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 9)));
this.register(new GenericRecipe("chem.shellphosgene").setup(100, 1_000)
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.PHOSGENE, 4_000))
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 10)));
this.register(new GenericRecipe("chem.shellmustard").setup(100, 1_000)
.inputItems(new ComparableStack(ModItems.ammo_arty, 1, 0), new OreDictStack(ANY_PLASTIC.ingot(), 1))
.inputFluids(new FluidStack(Fluids.MUSTARDGAS, 4_000))
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 11)));
/// GLASS ///
this.register(new GenericRecipe("chem.laminate").setup(20, 100)
.inputFluids(new FluidStack(Fluids.XYLENE, 50), new FluidStack(Fluids.PHOSGENE, 50))

View File

@ -264,12 +264,12 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModItems.crystal_cobalt, new ItemStack(ModItems.powder_cobalt, 3));
/* Misc recycling */
ShredderRecipes.setRecipe(ModBlocks.steel_poles, new ItemStack(ModItems.powder_steel_tiny, 3));
ShredderRecipes.setRecipe(ModBlocks.steel_roof, new ItemStack(ModItems.powder_steel_tiny, 13));
ShredderRecipes.setRecipe(ModBlocks.steel_wall, new ItemStack(ModItems.powder_steel_tiny, 13));
ShredderRecipes.setRecipe(ModBlocks.steel_corner, new ItemStack(ModItems.powder_steel_tiny, 26));
ShredderRecipes.setRecipe(ModBlocks.steel_poles, new ItemStack(ModItems.powder_steel_tiny, 2));
ShredderRecipes.setRecipe(ModBlocks.steel_roof, new ItemStack(ModItems.powder_steel_tiny, 9));
ShredderRecipes.setRecipe(ModBlocks.steel_wall, new ItemStack(ModItems.powder_steel_tiny, 9));
ShredderRecipes.setRecipe(ModBlocks.steel_corner, new ItemStack(ModItems.powder_steel_tiny, 18));
ShredderRecipes.setRecipe(ModBlocks.steel_beam, new ItemStack(ModItems.powder_steel_tiny, 3));
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.steel_scaffold, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.powder_steel_tiny, 7));
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.steel_scaffold, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.powder_steel_tiny, 4));
ShredderRecipes.setRecipe(ModItems.coil_copper, new ItemStack(ModItems.powder_red_copper, 1));
ShredderRecipes.setRecipe(ModItems.coil_copper_torus, new ItemStack(ModItems.powder_red_copper, 2));
ShredderRecipes.setRecipe(ModItems.coil_advanced_alloy, new ItemStack(ModItems.powder_advanced_alloy, 1));

View File

@ -37,9 +37,8 @@ public class GenericRecipe {
this.name = name;
}
public boolean isPooled() {
return blueprintPools != null;
}
public boolean isPooled() { return blueprintPools != null; }
public String[] getPools() { return this.blueprintPools; }
public boolean isPartOfPool(String lookingFor) {
if(!isPooled()) return false;
@ -58,7 +57,7 @@ public class GenericRecipe {
public GenericRecipe setNamed() { this.customLocalization = true; return this; }
public GenericRecipe setPools(String... pools) { this.blueprintPools = pools; for(String pool : pools) GenericRecipes.addToPool(pool, this); return this; }
public GenericRecipe inputItems(AStack... input) { this.inputItem = input; return this; }
public GenericRecipe inputItems(AStack... input) { this.inputItem = input; for(AStack stack : this.inputItem) if(stack.stacksize > 64) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; }
public GenericRecipe inputFluids(FluidStack... input) { this.inputFluid = input; return this; }
public GenericRecipe outputItems(IOutput... output) { this.outputItem = output; return this; }
public GenericRecipe outputFluids(FluidStack... output) { this.outputFluid = output; return this; }

View File

@ -50,7 +50,8 @@ public class ItemPoolsComponent {
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4),
weighted(ModItems.circuit, EnumCircuitType.PCB.ordinal(), 1, 3, 5),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
weighted(ModItems.blade_titanium, 0, 1, 8, 1)
weighted(ModItems.blade_titanium, 0, 1, 8, 1),
weighted(ModItems.blueprint_folder, 0, 1, 1, 1)
};
}};
@ -123,7 +124,8 @@ public class ItemPoolsComponent {
weighted(ModItems.toothpicks, 0, 1, 16, 10),
weighted(ModItems.dust, 0, 1, 1, 40),
weighted(ModItems.dust_tiny, 0, 1, 3, 75),
weighted(ModItems.ink, 0, 1, 1, 1)
weighted(ModItems.ink, 0, 1, 1, 1),
weighted(ModItems.blueprint_folder, 0, 1, 1, 5)
};
}};

View File

@ -64,7 +64,8 @@ public class ItemPoolsLegacy {
weighted(ModItems.canister_full, Fluids.DIESEL.getID(), 1, 2, 2),
weighted(ModItems.canister_full, Fluids.BIOFUEL.getID(), 1, 2, 3),
weighted(ModItems.gas_mask_m65, 60, 1, 1, 2),
weighted(ModItems.gas_mask_filter, 0, 1, 1, 3)
weighted(ModItems.gas_mask_filter, 0, 1, 1, 3),
weighted(ModItems.blueprint_folder, 0, 1, 1, 1)
};
}};
@ -130,10 +131,9 @@ public class ItemPoolsLegacy {
weighted(ModItems.bomb_caller, 1, 1, 1, 1),
weighted(ModItems.bomb_caller, 2, 1, 1, 1),
weighted(ModItems.gas_mask_filter, 0, 1, 1, 4),
weighted(ModItems.journal_pip, 0, 1, 1, 1),
weighted(ModItems.journal_bj, 0, 1, 1, 1),
weighted(ModItems.launch_code_piece, 0, 1, 1, 1),
weighted(ModItems.gun_double_barrel, 0, 1, 1, 1),
weighted(ModItems.blueprint_folder, 1, 1, 1, 1)
};
}};

View File

@ -59,6 +59,7 @@ public class ItemPoolsRedRoom {
weighted(ModItems.item_secret, EnumSecretType.SELENIUM_STEEL.ordinal(), 4, 4, 10),
weighted(ModItems.item_secret, EnumSecretType.CONTROLLER.ordinal(), 1, 1, 10),
weighted(ModItems.item_secret, EnumSecretType.CANISTER.ordinal(), 1, 1, 10),
weighted(ModItems.blueprint_folder, 2, 1, 1, 1),
};
}};
}

View File

@ -124,6 +124,7 @@ public class ItemPoolsSingle {
weighted(ModItems.launch_code_piece, 0, 1, 1, 5),
weighted(ModItems.egg_glyphid, 0, 1, 1, 5),
weighted(ModItems.gem_alexandrite, 0, 1, 1, 1),
weighted(ModItems.blueprint_folder, 1, 1, 1, 1)
};
}};
}

View File

@ -1,5 +1,7 @@
package com.hbm.items;
import java.util.HashSet;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.VersatileConfig;
import com.hbm.handler.BucketHandler;
@ -62,6 +64,8 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
public class ModItems {
public static HashSet<Item> excludeNEI = new HashSet();
public static void mainRegistry() {
initializeItem();
@ -844,6 +848,8 @@ public class ModItems {
public static Item fluid_barrel_full;
public static Item fluid_barrel_empty;
public static Item fluid_barrel_infinite;
public static Item fluid_pack_full;
public static Item fluid_pack_empty;
public static Item pipette;
public static Item pipette_boron;
public static Item pipette_laboratory;
@ -1180,13 +1186,11 @@ public class ModItems {
public static Item settings_tool;
public static Item blueprints;
public static Item blueprint_folder;
public static Item template_folder;
public static Item journal_pip;
public static Item journal_bj;
public static Item journal_silver;
public static Item assembly_template;
public static Item chemistry_template;
public static Item chemistry_icon;
@Deprecated public static Item assembly_template;
@Deprecated public static Item chemistry_template;
@Deprecated public static Item chemistry_icon;
public static Item crucible_template;
public static Item fluid_identifier;
public static Item fluid_identifier_multi;
@ -2071,6 +2075,8 @@ public class ModItems {
public static Item hazmat_paa_legs;
public static Item hazmat_paa_boots;
public static Item rebar_placer;
public static Item wand;
public static Item wand_s;
public static Item wand_d;
@ -3999,6 +4005,7 @@ public class ModItems {
upgrade_stack = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_stack").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_stack");
upgrade_ejector = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_ejector").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_ejector");
rebar_placer = new ItemRebarPlacer().setUnlocalizedName("rebar_placer").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":rebar_placer");
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
wand_d = new ItemWandD().setUnlocalizedName("wand_d").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_d");
@ -4097,10 +4104,8 @@ public class ModItems {
mech_key = new ItemCustomLore().setUnlocalizedName("mech_key").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":mech_key");
blueprints = new ItemBlueprints().setUnlocalizedName("blueprints").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprints");
blueprint_folder = new ItemBlueprintFolder().setUnlocalizedName("blueprint_folder").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprint_folder");
template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":template_folder");
journal_pip = new ItemTemplateFolder().setUnlocalizedName("journal_pip").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_pip");
journal_bj = new ItemTemplateFolder().setUnlocalizedName("journal_bj").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_bj");
journal_silver = new ItemTemplateFolder().setUnlocalizedName("journal_silver").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_silver");
assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":assembly_template");
chemistry_template = new ItemChemistryTemplate().setUnlocalizedName("chemistry_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":chemistry_template");
chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null);
@ -4115,6 +4120,8 @@ public class ModItems {
fluid_barrel_empty = new Item().setUnlocalizedName("fluid_barrel_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_barrel");
fluid_barrel_full = new ItemFluidTank().setUnlocalizedName("fluid_barrel_full").setContainerItem(ModItems.fluid_barrel_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_barrel");
fluid_barrel_infinite = new ItemInfiniteFluid(null, 1_000_000_000).setUnlocalizedName("fluid_barrel_infinite").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_barrel_infinite");
fluid_pack_empty = new Item().setUnlocalizedName("fluid_pack_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_pack");
fluid_pack_full = new ItemFluidTank().setUnlocalizedName("fluid_pack_full").setContainerItem(ModItems.fluid_pack_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_pack");
pipette = new ItemPipette().setUnlocalizedName("pipette").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pipette");
pipette_boron = new ItemPipette().setUnlocalizedName("pipette_boron").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pipette_boron");
pipette_laboratory = new ItemPipette().setUnlocalizedName("pipette_laboratory").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pipette_laboratory");
@ -4980,6 +4987,9 @@ public class ModItems {
}
private static void registerItem() {
excludeNEI.add(item_secret);
//Weapons
GameRegistry.registerItem(redstone_sword, redstone_sword.getUnlocalizedName());
GameRegistry.registerItem(big_sword, big_sword.getUnlocalizedName());
@ -5686,6 +5696,10 @@ public class ModItems {
GameRegistry.registerItem(fluid_barrel_empty, fluid_barrel_empty.getUnlocalizedName());
GameRegistry.registerItem(fluid_barrel_full, fluid_barrel_full.getUnlocalizedName());
GameRegistry.registerItem(fluid_barrel_infinite, fluid_barrel_infinite.getUnlocalizedName());
//Packaged fluids
GameRegistry.registerItem(fluid_pack_empty, fluid_pack_empty.getUnlocalizedName());
GameRegistry.registerItem(fluid_pack_full, fluid_pack_full.getUnlocalizedName());
//Pipette
GameRegistry.registerItem(pipette, pipette.getUnlocalizedName());
@ -5739,10 +5753,8 @@ public class ModItems {
//Folders
GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName());
GameRegistry.registerItem(blueprint_folder, blueprint_folder.getUnlocalizedName());
GameRegistry.registerItem(template_folder, template_folder.getUnlocalizedName());
GameRegistry.registerItem(journal_pip, journal_pip.getUnlocalizedName());
GameRegistry.registerItem(journal_bj, journal_bj.getUnlocalizedName());
GameRegistry.registerItem(journal_silver, journal_silver.getUnlocalizedName());
GameRegistry.registerItem(bobmazon, bobmazon.getUnlocalizedName());
GameRegistry.registerItem(bobmazon_hidden, bobmazon_hidden.getUnlocalizedName());
@ -7038,7 +7050,8 @@ public class ModItems {
GameRegistry.registerItem(crystal_horn, crystal_horn.getUnlocalizedName());
GameRegistry.registerItem(crystal_charred, crystal_charred.getUnlocalizedName());
//OP Tools
//Wands, Tools, Other Crap
GameRegistry.registerItem(rebar_placer, rebar_placer.getUnlocalizedName());
GameRegistry.registerItem(wand, wand.getUnlocalizedName());
GameRegistry.registerItem(wand_s, wand_s.getUnlocalizedName());
GameRegistry.registerItem(wand_d, wand_d.getUnlocalizedName());

View File

@ -24,6 +24,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraftforge.oredict.OreDictionary;
@Deprecated
public class ItemAssemblyTemplate extends Item {
@SideOnly(Side.CLIENT)
@ -157,6 +158,7 @@ public class ItemAssemblyTemplate extends Item {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.RED + "Deprecated");
if(!(stack.getItem() instanceof ItemAssemblyTemplate))
return;
@ -198,9 +200,6 @@ public class ItemAssemblyTemplate extends Item {
a++;
}
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", String.join(" / ", names)));
list.add("");
if(out == null) {
list.add("I AM ERROR");
return;

View File

@ -0,0 +1,72 @@
package com.hbm.items.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.inventory.recipes.loader.GenericRecipes;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class ItemBlueprintFolder extends Item {
@SideOnly(Side.CLIENT) protected IIcon iconDiscover;
@SideOnly(Side.CLIENT) protected IIcon iconSecret;
public ItemBlueprintFolder() {
this.setHasSubtypes(true);
this.setMaxStackSize(1);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg) {
super.registerIcons(reg);
this.iconDiscover = reg.registerIcon(this.getIconString() + "_discover");
this.iconSecret = reg.registerIcon(this.getIconString() + "_secret");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return meta == 1 ? iconDiscover : meta == 2 ? iconSecret : itemIcon;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < 2; i++) list.add(new ItemStack(item, 1, i));
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(world.isRemote) return stack;
List<String> pools = new ArrayList();
for(String pool : GenericRecipes.blueprintPools.keySet()) {
if(stack.getItemDamage() == 0 && pool.startsWith(GenericRecipes.POOL_PREFIX_ALT)) pools.add(pool);
if(stack.getItemDamage() == 1 && pool.startsWith(GenericRecipes.POOL_PREFIX_DISCOVER)) pools.add(pool);
if(stack.getItemDamage() == 2 && pool.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) pools.add(pool);
}
if(!pools.isEmpty()) {
stack.stackSize--;
String chosen = pools.get(player.getRNG().nextInt(pools.size()));
ItemStack blueprint = ItemBlueprints.make(chosen);
if(!player.inventory.addItemStackToInventory(blueprint))
player.dropPlayerItemWithRandomChoice(blueprint, false);
}
return stack;
}
}

View File

@ -56,13 +56,19 @@ public class ItemBlueprints extends Item {
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(Entry<String, List<String>> pool : GenericRecipes.blueprintPools.entrySet()) {
list.add(make(pool.getKey()));
String poolName = pool.getKey();
if(!poolName.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) list.add(make(poolName));
}
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(world.isRemote) return stack;
if(!stack.hasTagCompound()) return stack;
String poolName = stack.stackTagCompound.getString("pool");
if(poolName.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) return stack;
if(!player.inventory.hasItem(Items.paper)) return stack;
player.inventory.consumeInventoryItem(Items.paper);
@ -94,7 +100,6 @@ public class ItemBlueprints extends Item {
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.RED + "Right-click to copy (requires paper)");
if(!stack.hasTagCompound()) {
return;
@ -106,6 +111,11 @@ public class ItemBlueprints extends Item {
if(pool == null || pool.isEmpty()) {
return;
}
if(poolName.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) {
list.add(EnumChatFormatting.RED + "Cannot be copied!");
} else {
list.add(EnumChatFormatting.YELLOW + "Right-click to copy (requires paper)");
}
for(String name : pool) {
GenericRecipe recipe = GenericRecipes.pooledBlueprints.get(name);
@ -123,7 +133,7 @@ public class ItemBlueprints extends Item {
return stack.stackTagCompound.getString("pool");
}
public ItemStack make(String pool) {
public static ItemStack make(String pool) {
ItemStack stack = new ItemStack(ModItems.blueprints);
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setString("pool", pool);

View File

@ -37,12 +37,6 @@ public class ItemCatalyst extends Item {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
{
/*list.add("Absolute Energy Bonus: " + powerAbs + "HE");
list.add("Energy Modifier: " + (powerMod >= 1 ? "+" : "") + (Math.round(powerMod * 1000) * .10 - 100) + "%");
list.add("Heat Modifier: " + (heatMod >= 1 ? "+" : "") + (Math.round(heatMod * 1000) * .10 - 100) + "%");
list.add("Fuel Modifier: " + (fuelMod >= 1 ? "+" : "") + (Math.round(fuelMod * 1000) * .10 - 100) + "%");*/
//TODO: do something useful with this
list.add("Adds spice to the core.");
list.add("Look at all those colors!");
}

View File

@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
@Deprecated
public class ItemChemistryIcon extends Item {
@SideOnly(Side.CLIENT)

View File

@ -4,7 +4,6 @@ import java.util.List;
import com.hbm.inventory.recipes.ChemplantRecipes;
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
import com.hbm.items.ModItems;
import com.hbm.util.i18n.I18nUtil;
import cpw.mods.fml.relauncher.Side;
@ -16,6 +15,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
@Deprecated
public class ItemChemistryTemplate extends Item {
public ItemChemistryTemplate() {
@ -51,6 +51,7 @@ public class ItemChemistryTemplate extends Item {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.RED + "Deprecated");
if(!(stack.getItem() instanceof ItemChemistryTemplate))
return;
@ -61,9 +62,6 @@ public class ItemChemistryTemplate extends Item {
return;
}
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
list.add("");
try {
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out_p"));
for(int i = 0; i < 4; i++) {

View File

@ -30,9 +30,7 @@ public class ItemFluidTank extends Item {
for(int i = 1; i < order.length; ++i) {
FluidType type = order[i];
if(type.hasNoContainer())
continue;
if(type.hasNoContainer()) continue;
int id = type.getID();
if(type.needsLeadContainer()) {
@ -46,14 +44,10 @@ public class ItemFluidTank extends Item {
}
}
@Override
public String getItemStackDisplayName(ItemStack stack) {
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
String s1 = ("" + StatCollector.translateToLocal(Fluids.fromID(stack.getItemDamage()).getConditionalName())).trim();
if(s1 != null) {
s = s + " " + s1;
}
String s = ("" + StatCollector.translateToLocalFormatted(this.getUnlocalizedName() + ".name", s1)).trim();
return s;
}
@ -68,12 +62,10 @@ public class ItemFluidTank extends Item {
public void registerIcons(IIconRegister p_94581_1_) {
super.registerIcons(p_94581_1_);
if(this == ModItems.fluid_tank_full)
this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_tank_overlay");
if(this == ModItems.fluid_tank_lead_full)
this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_tank_lead_overlay");
if(this == ModItems.fluid_barrel_full)
this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_barrel_overlay");
if(this == ModItems.fluid_tank_full) this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_tank_overlay");
if(this == ModItems.fluid_tank_lead_full) this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_tank_lead_overlay");
if(this == ModItems.fluid_barrel_full) this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_barrel_overlay");
if(this == ModItems.fluid_pack_full) this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_pack_overlay");
}
@Override
@ -84,18 +76,13 @@ public class ItemFluidTank extends Item {
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int p_82790_2_) {
if(p_82790_2_ == 0) {
public int getColorFromItemStack(ItemStack stack, int pass) {
if(pass == 0) {
return 16777215;
} else {
int j = Fluids.fromID(stack.getItemDamage()).getColor();
if(j < 0) {
j = 16777215;
}
if(j < 0) j = 16777215;
return j;
}
}
}

View File

@ -0,0 +1,340 @@
package com.hbm.items.tool;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType;
import com.hbm.blocks.generic.BlockRebar.TileEntityRebar;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.SlotPattern;
import com.hbm.inventory.gui.GuiInfoContainer;
import com.hbm.items.ItemInventory;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.util.ChatBuilder;
import com.hbm.util.InventoryUtil;
import com.hbm.util.ItemStackUtil;
import com.hbm.util.Tuple.Pair;
import com.hbm.util.i18n.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class ItemRebarPlacer extends Item implements IGUIProvider {
public static List<Pair<Block, Integer>> acceptableConk = new ArrayList();
public ItemRebarPlacer() {
this.setMaxStackSize(1);
acceptableConk.add(new Pair(ModBlocks.concrete, 0));
acceptableConk.add(new Pair(ModBlocks.concrete_rebar, 0));
acceptableConk.add(new Pair(ModBlocks.concrete_smooth, 0));
acceptableConk.add(new Pair(ModBlocks.concrete_pillar, 0));
for(int i = 0; i < 16; i++) acceptableConk.add(new Pair(ModBlocks.concrete_colored, i));
for(int i = 0; i < EnumConcreteType.values().length; i++) acceptableConk.add(new Pair(ModBlocks.concrete_colored_ext, i));
}
public static boolean isValidConk(Item item, int meta) {
for(Pair<Block, Integer> conk : acceptableConk) {
if(item == Item.getItemFromBlock(conk.getKey()) && meta == conk.getValue()) return true;
}
return false;
}
@Override
public int getMaxItemUseDuration(ItemStack stack) {
return 1;
}
// if the placer isn't equipped or no concrete is loaded, forget the cached position
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) {
if(stack.hasTagCompound() && stack.stackTagCompound.hasKey("pos")) {
ItemStack theConk = ItemStackUtil.readStacksFromNBT(stack, 1)[0];
if(!held || theConk == null) {
stack.stackTagCompound.removeTag("pos");
return;
}
if(!isValidConk(theConk.getItem(), theConk.getItemDamage())) {
stack.stackTagCompound.removeTag("pos");
return;
}
}
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if(!world.isRemote && player.isSneaking()) player.openGui(MainRegistry.instance, 0, world, 0, 0, 0);
return stack;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
if(world.isRemote) return true;
if(!stack.hasTagCompound()) {
stack.stackTagCompound = new NBTTagCompound();
ItemStackUtil.addStacksToNBT(stack, new ItemStack[] {new ItemStack(ModBlocks.concrete_rebar)});
}
ItemStack theConk = ItemStackUtil.readStacksFromNBT(stack, 1)[0];
boolean hasConk = theConk != null && isValidConk(theConk.getItem(), theConk.getItemDamage());
if(!hasConk) {
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
.next("] ").color(EnumChatFormatting.DARK_AQUA)
.next("No valid concrete type set!").color(EnumChatFormatting.RED).flush());
return true;
}
ForgeDirection dir = ForgeDirection.getOrientation(side);
if(!stack.stackTagCompound.hasKey("pos")) {
stack.stackTagCompound.setIntArray("pos", new int[] {x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ});
} else {
int rebarLeft = InventoryUtil.countAStackMatches(player, new ComparableStack(ModBlocks.rebar), true);
if(rebarLeft <= 0) {
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
.next("] ").color(EnumChatFormatting.DARK_AQUA)
.next("Out of rebar!").color(EnumChatFormatting.RED).flush());
stack.stackTagCompound.removeTag("pos");
return true;
}
int[] pos = stack.stackTagCompound.getIntArray("pos");
int iX = x + dir.offsetX;
int iY = y + dir.offsetY;
int iZ = z + dir.offsetZ;
int minX = Math.min(pos[0], iX);
int maxX = Math.max(pos[0], iX);
int minY = Math.min(pos[1], iY);
int maxY = Math.max(pos[1], iY);
int minZ = Math.min(pos[2], iZ);
int maxZ = Math.max(pos[2], iZ);
int rebarUsed = 0;
outer: for(int k = minY; k <= maxY; k++) {
for(int j = minZ; j <= maxZ; j++) {
for(int i = minX; i<= maxX; i++) {
if(rebarLeft <= 0) break outer;
if(world.getBlock(i, k, j).isReplaceable(world, i, k, j) && player.canPlayerEdit(i, k, j, side, stack)) {
world.setBlock(i, k, j, ModBlocks.rebar);
TileEntity tile = world.getTileEntity(i, k, j);
if(tile instanceof TileEntityRebar) {
((TileEntityRebar) tile).setup(Block.getBlockFromItem(theConk.getItem()), theConk.getItemDamage());
}
rebarUsed++;
rebarLeft--;
}
}
}
}
InventoryUtil.tryConsumeAStack(player.inventory.mainInventory, 0, player.inventory.mainInventory.length - 1, new ComparableStack(ModBlocks.rebar, rebarUsed));
player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA)
.nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA)
.next("] ").color(EnumChatFormatting.DARK_AQUA)
.next("Placed " + rebarUsed + " rebar!").color(EnumChatFormatting.GREEN).flush());
stack.stackTagCompound.removeTag("pos");
player.inventoryContainer.detectAndSendChanges();
}
return true;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerRebar(player.inventory, new InventoryRebar(player, player.getHeldItem()));
}
@Override
@SideOnly(Side.CLIENT)
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIRebar(player.inventory, new InventoryRebar(player, player.getHeldItem()));
}
public static class InventoryRebar extends ItemInventory {
public InventoryRebar(EntityPlayer player, ItemStack box) {
this.player = player;
this.target = box;
slots = new ItemStack[this.getSizeInventory()];
if(!box.hasTagCompound()) box.setTagCompound(new NBTTagCompound());
ItemStack[] fromNBT = ItemStackUtil.readStacksFromNBT(box, slots.length);
if(fromNBT != null) System.arraycopy(fromNBT, 0, slots, 0, slots.length);
}
@Override public int getSizeInventory() { return 1; }
@Override public String getInventoryName() { return "container.rebar"; }
@Override public boolean hasCustomInventoryName() { return target.hasDisplayName(); }
@Override public int getInventoryStackLimit() { return 1; }
}
public static class ContainerRebar extends Container {
private InventoryRebar rebar;
public ContainerRebar(InventoryPlayer invPlayer, InventoryRebar rebar) {
this.rebar = rebar;
this.addSlotToContainer(new SlotPattern(rebar, 0, 53, 36));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 100 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 158));
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
return null;
}
@Override
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
//L/R: 0
//M3: 3
//SHIFT: 1
//DRAG: 5
// prevents the player from moving around the currently open box
if(mode == 2 && button == player.inventory.currentItem) return null;
if(index == player.inventory.currentItem + 47) return null;
if(index != 0) return super.slotClick(index, button, mode, player);
Slot slot = this.getSlot(index);
ItemStack ret = null;
ItemStack held = player.inventory.getItemStack();
if(slot.getHasStack()) ret = slot.getStack().copy();
slot.putStack(held);
rebar.markDirty();
return ret;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return rebar.isUseableByPlayer(player);
}
@Override
public void onContainerClosed(EntityPlayer player) {
super.onContainerClosed(player);
}
}
public static class GUIRebar extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_rebar.png");
private final InventoryRebar inventory;
public GUIRebar(InventoryPlayer invPlayer, InventoryRebar box) {
super(new ContainerRebar(invPlayer, box));
this.inventory = box;
this.xSize = 176;
this.ySize = 182;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
if(this.isMouseOverSlot(this.inventorySlots.getSlot(0), mouseX, mouseY) && !this.inventorySlots.getSlot(0).getHasStack()) {
List<Object[]> lines = new ArrayList();
List<ItemStack> list = new ArrayList();
for(Pair<Block, Integer> conk : acceptableConk) list.add(new ItemStack(conk.getKey(), 1, conk.getValue()));
ItemStack selected = list.get(0);
if(list.size() > 1) {
int cycle = (int) ((System.currentTimeMillis() % (1000 * list.size())) / 1000);
selected = ((ItemStack) list.get(cycle)).copy();
selected.stackSize = 0;
list.set(cycle, selected);
}
if(list.size() < 10) {
lines.add(list.toArray());
} else if(list.size() < 24) {
lines.add(list.subList(0, list.size() / 2).toArray());
lines.add(list.subList(list.size() / 2, list.size()).toArray());
} else {
int bound0 = (int) Math.ceil(list.size() / 3D);
int bound1 = (int) Math.ceil(list.size() / 3D * 2D);
lines.add(list.subList(0, bound0).toArray());
lines.add(list.subList(bound0, bound1).toArray());
lines.add(list.subList(bound1, list.size()).toArray());
}
lines.add(new Object[] {I18nUtil.resolveKey(selected.getDisplayName())});
this.drawStackText(lines, mouseX, mouseY, this.fontRendererObj);
}
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = I18n.format(this.inventory.getInventoryName());
if(inventory.hasCustomInventoryName()) name = inventory.target.getDisplayName();
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
if(inventory.slots[0] == null || !ItemRebarPlacer.isValidConk(inventory.slots[0].getItem(), inventory.slots[0].getItemDamage()))
drawTexturedModalRect(guiLeft + 87, guiTop + 17, 176, 0, 56, 56);
}
}
}

View File

@ -27,6 +27,8 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
@ -942,7 +944,7 @@ public class Orchestras {
if(timer == 2) {
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? -0.0625 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 2.5F, (float)entity.getRNG().nextGaussian() * -20F + 15F, casing.getName(), false, 60, 0.5D, 20);
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? -0.0625 : -0.125, aiming ? -0.125 : -0.25D, 0, 0.18, -0.12, 0.01, -10F + (float)entity.getRNG().nextGaussian() * 2.5F, (float)entity.getRNG().nextGaussian() * -20F + 15F, casing.getName(), false, 60, 0.5D, 20);
}
}
@ -969,6 +971,11 @@ public class Orchestras {
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:player.gulp", 1F, 1F);
if(timer == 35) entity.worldObj.playSoundAtEntity(entity, "hbm:player.gulp", 1F, 1F);
if(timer == 50) entity.worldObj.playSoundAtEntity(entity, "hbm:player.groan", 1F, 1F);
if(timer == 60) {
entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30 * 20, 2));
entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 30 * 20, 2));
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 10 * 20, 0));
}
}
};

View File

@ -375,7 +375,7 @@ public class XFactory12ga {
).setUnlocalizedName("gun_autoshotgun_shredder");
ModItems.gun_autoshotgun_sexy = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
.dura(5_000).draw(20).inspect(33).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).hideCrosshair(false).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.dura(5_000).draw(20).inspect(65).reloadSequential(true).inspectCancel(false).crosshair(Crosshair.L_CIRCLE).hideCrosshair(false).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
.dmg(64F).delay(4).auto(true).dryfireAfterAuto(true).reload(110).jam(19).sound("hbm:weapon.fire.shotgunAuto", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 100).addConfigs(g12_equestrian_bj, g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus))

View File

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

View File

@ -416,6 +416,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKCooler.class, new RenderRBMKLid());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKStorage.class, new RenderRBMKLid());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKHeater.class, new RenderRBMKLid());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRBMKAutoloader.class, new RenderRBMKAutoloader());
//ITER
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());

View File

@ -458,6 +458,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 4), new Object[] { "SS", "SS", 'S', ModBlocks.steel_beam });
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate_wide), 4), new Object[] { "SS", 'S', ModBlocks.steel_grate });
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 1), new Object[] { "SS", 'S', ModBlocks.steel_grate_wide });
addRecipeAuto(new ItemStack(ModBlocks.rebar, 8), new Object[] { "BB", "BB", 'B', STEEL.bolt() });
addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 0), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeGray" });
addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 1), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeRed" });

View File

@ -1718,6 +1718,11 @@ public class MainRegistry {
ignoreMappings.add("hbm:item.component_limiter");
ignoreMappings.add("hbm:item.bottle2_korl_special");
ignoreMappings.add("hbm:item.bottle2_fritz_special");
ignoreMappings.add("hbm:item.journal_pip");
ignoreMappings.add("hbm:item.journal_bj");
ignoreMappings.add("hbm:item.journal_silver");
ignoreMappings.add("hbm:tile.machine_arc_furnace_off");
ignoreMappings.add("hbm:tile.machine_arc_furnace_on");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -3,6 +3,7 @@ package com.hbm.main;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockAshes;
import com.hbm.blocks.generic.BlockRebar;
import com.hbm.config.ClientConfig;
import com.hbm.config.GeneralConfig;
import com.hbm.entity.mob.EntityHunterChopper;
@ -924,9 +925,9 @@ public class ModEventHandlerClient {
);
String prefix = "Gun ";
int gunScale = 16;
int defaultScale = 1;
int slotScale = gunScale;
//int gunScale = 16;
//int defaultScale = 1;
int slotScale = 16;
boolean ignoreNonNTM = true;
boolean onlyGuns = true;
@ -1138,6 +1139,8 @@ public class ModEventHandlerClient {
public void onRenderWorldLastEvent(RenderWorldLastEvent event) {
Clock.update();
BlockRebar.renderRebar(Minecraft.getMinecraft().theWorld.loadedTileEntityList, event.partialTicks);
GL11.glPushMatrix();

View File

@ -24,14 +24,13 @@ public class NEIRegistry {
handlers.add(new GasCentrifugeRecipeHandler());
handlers.add(new BreederRecipeHandler());
handlers.add(new CyclotronRecipeHandler());
handlers.add(new AssemblerRecipeHandler());
handlers.add(new AssemblyMachineRecipeHandler());
handlers.add(new RefineryRecipeHandler());
handlers.add(new VacuumRecipeHandler());
handlers.add(new CrackingHandler());
handlers.add(new RadiolysisRecipeHandler());
handlers.add(new ReformingHandler());
handlers.add(new HydrotreatingHandler());
handlers.add(new ChemplantRecipeHandler());
handlers.add(new ChemicalPlantRecipeHandler());
handlers.add(new OreSlopperHandler()); //before acidizing
handlers.add(new CrystallizerRecipeHandler());

View File

@ -1565,10 +1565,12 @@ public class ResourceManager {
public static final IModelCustom rbmk_rods_vbo = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/rbmk_rods.obj")).asVBO();
public static final IModelCustom rbmk_crane_console = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/crane_console.obj")).asVBO();
public static final IModelCustom rbmk_crane = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/crane.obj")).asVBO();
public static final IModelCustom rbmk_autoloader = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/autoloader.obj")).asVBO();
public static final IModelCustom rbmk_console = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/rbmk/rbmk_console.obj")).asVBO();
public static final IModelCustom rbmk_debris = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/rbmk/debris.obj"));
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_autoloader_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_autoloader.png");
public static final ResourceLocation rbmk_console_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rbmk_control.png");
public static final IModelCustom hev_battery = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/battery.obj"));
public static final IModelCustom anvil = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/anvil.obj"));

View File

@ -3,6 +3,7 @@ package com.hbm.module.machine;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.recipes.AssemblyMachineRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.util.BobMathUtil;
import api.hbm.energymk2.IEnergyHandlerMK2;
import net.minecraft.item.ItemStack;
@ -21,6 +22,14 @@ public class ModuleMachineAssembler extends ModuleMachineBase {
public GenericRecipe getRecipe() {
return AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(this.recipe);
}
@Override
public void setupTanks(GenericRecipe recipe) {
super.setupTanks(recipe);
if(recipe == null) return;
for(int i = 0; i < inputTanks.length; i++) if(recipe.inputFluid != null && recipe.inputFluid.length > i) inputTanks[i].changeTankSize(BobMathUtil.max(inputTanks[i].getFill(), recipe.inputFluid[i].fill * 2, 4_000));
for(int i = 0; i < outputTanks.length; i++) if(recipe.outputFluid != null && recipe.outputFluid.length > i) outputTanks[i].changeTankSize(BobMathUtil.max(outputTanks[i].getFill(), recipe.outputFluid[i].fill * 2, 4_000));
}
public ModuleMachineAssembler itemInput(int from) { for(int i = 0; i < inputSlots.length; i++) inputSlots[i] = from + i; return this; }
public ModuleMachineAssembler itemOutput(int a) { outputSlots[0] = a; return this; }

View File

@ -112,6 +112,13 @@ public class ItemRenderFlaregun extends ItemRenderWeaponBase {
GL11.glRotated(90, 0, 1, 0);
}
@Override
public void setupEntity(ItemStack stack) {
super.setupEntity(stack);
double scale = 0.5D;
GL11.glScaled(scale, scale, scale);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);

View File

@ -13,13 +13,11 @@ import com.hbm.tileentity.machine.TileEntityMachineAssemblyMachine;
import com.hbm.util.BobMathUtil;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
@ -109,7 +107,6 @@ public class RenderAssemblyMachine extends TileEntitySpecialRenderer implements
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, 1.0625, 0);
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ItemStack stack = recipe.getIcon();
stack.stackSize = 1;

View File

@ -0,0 +1,62 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKAutoloader;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderRBMKAutoloader extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.rbmk_autoloader_tex);
ResourceManager.rbmk_autoloader.renderPart("Base");
TileEntityRBMKAutoloader press = (TileEntityRBMKAutoloader) tile;
double p = (press.lastPiston + (press.renderPiston - press.lastPiston) * interp);
GL11.glTranslated(0, p * -4D, 0);
GL11.glTranslated(0, 4, 0);
ResourceManager.rbmk_autoloader.renderPart("Piston");
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.rbmk_autoloader);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase( ) {
public void renderInventory() {
GL11.glTranslated(0, -6, 0);
GL11.glScaled(1.75, 1.75, 1.75);
}
public void renderCommon() {
GL11.glRotated(180, 0, 1, 0);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.rbmk_autoloader_tex);
ResourceManager.rbmk_autoloader.renderPart("Base");
ResourceManager.rbmk_autoloader.renderPart("Piston");
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
}};
}
}

View File

@ -123,7 +123,7 @@ public class HorsePronter {
GL11.glTranslated(offset.xCoord, offset.yCoord, offset.zCoord);
GL11.glRotated(rotation.xCoord, 0, 1, 0);
GL11.glRotated(rotation.yCoord, 1, 0, 0);
GL11.glRotated(rotation.zCoord, 0, 0, 1); //TODO: check pitch and roll axis
GL11.glRotated(rotation.zCoord, 0, 0, 1);
GL11.glTranslated(-offset.xCoord, -offset.yCoord, -offset.zCoord);
}

View File

@ -75,8 +75,8 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
return this;
}
/** Returns the actual tile entity that represents the core. Only for internal use. */
protected TileEntity getTile() {
/** Returns the actual tile entity that represents the core. Only for internal use, and EnergyControl. */
public TileEntity getTile() {
if(tile == null || tile.isInvalid()) {
tile = this.getTE();
}

View File

@ -14,6 +14,7 @@ import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner;
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
import com.hbm.blocks.generic.BlockRebar.TileEntityRebar;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate;
@ -148,7 +149,6 @@ public class TileMappings {
put(TileEntityCoreInjector.class, "tileentity_v0_injector");
put(TileEntityCoreStabilizer.class, "tileentity_v0_stabilizer");
put(TileEntityCore.class, "tileentity_v0");
put(TileEntityMachineArcFurnace.class, "tileentity_arc_furnace");
put(TileEntityMachineAmgen.class, "tileentity_amgen");
put(TileEntityMachineHephaestus.class, "tileentity_hephaestus");
put(TileEntityGeysir.class, "tileentity_geysir");
@ -402,6 +402,7 @@ public class TileMappings {
put(TileEntityRBMKConsole.class, "tileentity_rbmk_console");
put(TileEntityRBMKInlet.class, "tileentity_rbmk_inlet");
put(TileEntityRBMKOutlet.class, "tileentity_rbmk_outlet");
put(TileEntityRBMKAutoloader.class, "tileentity_rbmk_autoloader");
}
private static void putNetwork() {
@ -456,6 +457,8 @@ public class TileMappings {
put(TileEntityRailSwitch.class, "tileentity_rail_switch");
put(TileEntityRebar.class, "tileentity_rebar");
// OC Compat items
boolean ocPresent = Loader.isModLoaded("OpenComputers");

View File

@ -105,7 +105,7 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
for(int i = 0; i < 2; i++) {
if(slots[i].stackSize <= 0)
slots[i] = new ItemStack(slots[i].getItem().setFull3D());
slots[i] = new ItemStack(slots[i].getItem());
else
slots[i].stackSize--;
if(slots[i].stackSize <= 0)

View File

@ -1,419 +0,0 @@
package com.hbm.tileentity.machine;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.MachineArcFurnace;
import com.hbm.inventory.container.ContainerMachineArcFurnace;
import com.hbm.inventory.gui.GUIMachineArcFurnace;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.util.CompatEnergyControl;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.tile.IInfoProviderEC;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements ISidedInventory, IEnergyReceiverMK2, IGUIProvider, IInfoProviderEC {
private ItemStack slots[];
public int dualCookTime;
public long power;
public static final long maxPower = 50000;
public static final int processingSpeed = 20;
//0: i
//1: o
//2: 1
//3: 2
//4: 3
//5: b
private static final int[] slots_io = new int[] {0, 1, 2, 3, 4, 5};
private String customName;
public TileEntityMachineArcFurnace() {
slots = new ItemStack[6];
}
@Override
public int getSizeInventory() {
return slots.length;
}
@Override
public ItemStack getStackInSlot(int i) {
return slots[i];
}
@Override
public ItemStack getStackInSlotOnClosing(int i) {
if(slots[i] != null)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
} else {
return null;
}
}
@Override
public void setInventorySlotContents(int i, ItemStack itemStack) {
slots[i] = itemStack;
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
{
itemStack.stackSize = getInventoryStackLimit();
}
}
@Override
public String getInventoryName() {
return this.hasCustomInventoryName() ? this.customName : "container.arcFurnace";
}
@Override
public boolean hasCustomInventoryName() {
return this.customName != null && this.customName.length() > 0;
}
public void setCustomName(String name) {
this.customName = name;
markDirty();
}
@Override
public int getInventoryStackLimit() {
return 64;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
{
return false;
}else{
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
}
}
//You scrubs aren't needed for anything (right now)
@Override
public void openInventory() {}
@Override
public void closeInventory() {}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(i == 2 || i == 3 || i == 4)
return itemStack.getItem() == ModItems.arc_electrode;
if(i == 0)
return FurnaceRecipes.smelting().getSmeltingResult(itemStack) != null;
return false;
}
@Override
public ItemStack decrStackSize(int i, int j) {
if(slots[i] != null)
{
if(slots[i].stackSize <= j)
{
ItemStack itemStack = slots[i];
slots[i] = null;
return itemStack;
}
ItemStack itemStack1 = slots[i].splitStack(j);
if (slots[i].stackSize == 0)
{
slots[i] = null;
}
return itemStack1;
} else {
return null;
}
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
NBTTagList list = nbt.getTagList("items", 10);
this.power = nbt.getLong("powerTime");
this.dualCookTime = nbt.getInteger("cookTime");
slots = new ItemStack[getSizeInventory()];
for(int i = 0; i < list.tagCount(); i++)
{
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
byte b0 = nbt1.getByte("slot");
if(b0 >= 0 && b0 < slots.length)
{
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
}
}
customName = nbt.getString("name");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("powerTime", power);
nbt.setInteger("cookTime", dualCookTime);
NBTTagList list = new NBTTagList();
for(int i = 0; i < slots.length; i++)
{
if(slots[i] != null)
{
NBTTagCompound nbt1 = new NBTTagCompound();
nbt1.setByte("slot", (byte)i);
slots[i].writeToNBT(nbt1);
list.appendTag(nbt1);
}
}
nbt.setTag("items", list);
if (customName != null) {
nbt.setString("name", customName);
}
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return slots_io;
}
@Override
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
return this.isItemValidForSlot(i, itemStack);
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
if(i == 1)
return true;
if(i == 2 || i == 3 || i == 4)
return itemStack.getItem() == ModItems.arc_electrode_burnt;
return false;
}
public int getDiFurnaceProgressScaled(int i) {
return (dualCookTime * i) / processingSpeed;
}
public long getPowerRemainingScaled(long i) {
return (power * i) / maxPower;
}
public boolean hasPower() {
return power >= 250;
}
public boolean isProcessing() {
return this.dualCookTime > 0;
}
private boolean hasElectrodes() {
if(slots[2] != null && slots[3] != null && slots[4] != null) {
if((slots[2].getItem() == ModItems.arc_electrode) &&
(slots[3].getItem() == ModItems.arc_electrode) &&
(slots[4].getItem() == ModItems.arc_electrode))
return true;
}
return false;
}
public boolean canProcess() {
if(!hasElectrodes())
return false;
if(slots[0] == null)
{
return false;
}
ItemStack itemStack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
if(itemStack == null)
{
return false;
}
if(slots[1] == null)
{
return true;
}
if(!slots[1].isItemEqual(itemStack)) {
return false;
}
if(slots[1].stackSize < getInventoryStackLimit() && slots[1].stackSize < slots[1].getMaxStackSize()) {
return true;
}else{
return slots[1].stackSize < itemStack.getMaxStackSize();
}
}
private void processItem() {
if(canProcess()) {
ItemStack itemStack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);
if(slots[1] == null)
{
slots[1] = itemStack.copy();
}else if(slots[1].isItemEqual(itemStack)) {
slots[1].stackSize += itemStack.stackSize;
}
for(int i = 0; i < 1; i++)
{
if(slots[i].stackSize <= 0)
{
slots[i] = new ItemStack(slots[i].getItem());
}else{
slots[i].stackSize--;
}
if(slots[i].stackSize <= 0)
{
slots[i] = null;
}
}
}
}
//TODO: fix this punjabi trash
@Override
public void updateEntity() {
boolean flag1 = false;
if(!worldObj.isRemote) {
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
this.trySubscribe(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir);
if(hasPower() && canProcess())
{
dualCookTime++;
power -= 250;
if(power < 0)
power = 0;
if(this.dualCookTime == processingSpeed)
{
this.dualCookTime = 0;
this.processItem();
flag1 = true;
}
}else{
dualCookTime = 0;
}
boolean trigger = true;
if(hasPower() && canProcess() && this.dualCookTime == 0)
{
trigger = false;
}
if(trigger)
{
flag1 = true;
MachineArcFurnace.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
}
if(worldObj.getBlock(xCoord, yCoord, zCoord) == ModBlocks.machine_arc_furnace_off) {
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
if(hasElectrodes() && meta <= 5) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta + 4, 2);
}
if(!hasElectrodes() && meta > 5) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, meta - 4, 2);
}
}
power = Library.chargeTEFromItems(slots, 5, power, maxPower);
networkPackNT(50); // it makes no sense to refactor this to some, but I want to delete the AuxElectricityPacket already
}
if(flag1)
{
this.markDirty();
}
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
buf.writeLong(power);
buf.writeInt(dualCookTime);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
power = buf.readLong();
dualCookTime = buf.readInt();
}
@Override
public void setPower(long i) {
power = i;
}
@Override
public long getPower() {
return power;
}
@Override
public long getMaxPower() {
return maxPower;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerMachineArcFurnace(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIMachineArcFurnace(player.inventory, this);
}
@Override
public void provideExtraInfo(NBTTagCompound data) {
data.setBoolean(CompatEnergyControl.B_ACTIVE, this.hasPower() && this.canProcess());
data.setInteger(CompatEnergyControl.I_PROGRESS, this.dualCookTime);
}
}

View File

@ -11,6 +11,8 @@ import com.hbm.inventory.container.ContainerMachineAssemblyMachine;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIMachineAssemblyMachine;
import com.hbm.inventory.recipes.AssemblyMachineRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
@ -44,7 +46,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
public FluidTank outputTank;
public long power;
public long maxPower = 1_000_000;
public long maxPower = 100_000;
public boolean didProcess = false;
public boolean frame = false;
@ -63,8 +65,8 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
public TileEntityMachineAssemblyMachine() {
super(17);
this.inputTank = new FluidTank(Fluids.NONE, 32_000);
this.outputTank = new FluidTank(Fluids.NONE, 32_000);
this.inputTank = new FluidTank(Fluids.NONE, 4_000);
this.outputTank = new FluidTank(Fluids.NONE, 4_000);
for(int i = 0; i < this.arms.length; i++) this.arms[i] = new AssemblerArm();
@ -85,6 +87,12 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
if(!worldObj.isRemote) {
GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assemblerModule.recipe);
if(recipe != null) {
this.maxPower = recipe.power * 100;
}
this.maxPower = BobMathUtil.max(this.power, this.maxPower, 100_000);
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
upgradeManager.checkSlots(slots, 2, 3);

View File

@ -10,6 +10,8 @@ import com.hbm.inventory.container.ContainerMachineChemicalFactory;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIMachineChemicalFactory;
import com.hbm.inventory.recipes.ChemicalPlantRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
@ -49,7 +51,7 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
public FluidTank lps;
public long power;
public long maxPower = 10_000_000;
public long maxPower = 1_000_000;
public boolean[] didProcess = new boolean[4];
public boolean frame = false;
@ -130,6 +132,16 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
if(!worldObj.isRemote) {
long nextMaxPower = 0;
for(int i = 0; i < 4; i++) {
GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplantModule[i].recipe);
if(recipe != null) {
nextMaxPower += recipe.power * 100;
}
}
this.maxPower = nextMaxPower;
this.maxPower = BobMathUtil.max(this.power, this.maxPower, 1_000_000);
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
upgradeManager.checkSlots(slots, 1, 3);

View File

@ -10,6 +10,8 @@ import com.hbm.inventory.container.ContainerMachineChemicalPlant;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIMachineChemicalPlant;
import com.hbm.inventory.recipes.ChemicalPlantRecipes;
import com.hbm.inventory.recipes.loader.GenericRecipe;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
@ -43,7 +45,7 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem
public FluidTank[] outputTanks;
public long power;
public long maxPower = 1_000_000;
public long maxPower = 100_000;
public boolean didProcess = false;
public boolean frame = false;
@ -83,6 +85,12 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem
if(!worldObj.isRemote) {
GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplantModule.recipe);
if(recipe != null) {
this.maxPower = recipe.power * 100;
}
this.maxPower = BobMathUtil.max(this.power, this.maxPower, 100_000);
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
upgradeManager.checkSlots(slots, 2, 3);

View File

@ -154,7 +154,7 @@ public class TileEntityMachineElectricFurnace extends TileEntityMachineBase impl
for(int i = 1; i < 2; i++) {
if(slots[i].stackSize <= 0) {
slots[i] = new ItemStack(slots[i].getItem().setFull3D());
slots[i] = new ItemStack(slots[i].getItem());
} else {
slots[i].stackSize--;
}

View File

@ -240,7 +240,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory,
{
if(slots[i].stackSize <= 0)
{
slots[i] = new ItemStack(slots[i].getItem().setFull3D());
slots[i] = new ItemStack(slots[i].getItem());
}else{
slots[i].stackSize--;
}

View File

@ -0,0 +1,290 @@
package com.hbm.tileentity.machine.rbmk;
import com.hbm.blocks.machine.rbmk.RBMKBase;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.interfaces.ICopiable;
import com.hbm.inventory.container.ContainerRBMKAutoloader;
import com.hbm.inventory.gui.GUIRBMKAutoloader;
import com.hbm.items.machine.ItemRBMKRod;
import com.hbm.main.MainRegistry;
import com.hbm.sound.AudioWrapper;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class TileEntityRBMKAutoloader extends TileEntityMachineBase implements IGUIProvider, IControlReceiver, ICopiable {
public double piston;
public double renderPiston;
public double lastPiston;
private double syncPiston;
private int turnProgress;
private boolean isRetracting = true;
private int delay = 0;
public static double speed = 0.005D;
public int cycle = 50;
private AudioWrapper audioLift;
public TileEntityRBMKAutoloader() {
super(18);
}
@Override
public String getName() {
return "container.rbmkAutoloader";
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(delay > 0) delay--;
if(delay <= 0 && this.isRetracting && this.piston > 0D) {
this.piston -= this.speed;
if(this.piston <= 0) {
this.piston = 0;
this.delay = 40;
}
}
// check for connected fuel rod and decide whether to begin working
if(isRetracting && worldObj.getTotalWorldTime() % 20 == 0 && this.hasFuel() && this.hasSpace()) {
Block below = worldObj.getBlock(xCoord, yCoord - 1, zCoord);
if(below instanceof RBMKBase) {
int[] pos = ((RBMKBase) below).findCore(worldObj, xCoord, yCoord - 1, zCoord);
TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
if(tile instanceof TileEntityRBMKRod) {
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)) {
this.isRetracting = false;
}
}
}
}
if(delay <= 0 && !this.isRetracting && this.piston < 1D) {
this.piston += this.speed;
if(this.piston >= 1) {
this.piston = 1;
this.delay = 40;
}
}
// once the piston is fully extended
if(!isRetracting && this.piston >= 1D) {
this.piston = 1D;
Block below = worldObj.getBlock(xCoord, yCoord - 1, zCoord);
if(below instanceof RBMKBase) {
int[] pos = ((RBMKBase) below).findCore(worldObj, xCoord, yCoord - 1, zCoord);
TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
if(tile instanceof TileEntityRBMKRod) {
TileEntityRBMKRod rod = (TileEntityRBMKRod) tile;
// try to take out the old fuel rod
if(rod.slots[0] != null && this.hasSpace()) {
for(int i = 9; i < 18; i++) {
if(slots[i] == null) {
slots[i] = rod.slots[0].copy();
rod.slots[0] = null;
break;
}
}
}
// if there's space, try and insert a new fuel rod
if(rod.slots[0] == null) {
for(int i = 0; i < 9; i++) {
ItemStack stack = slots[i];
if(stack != null && stack.getItem() instanceof ItemRBMKRod && ItemRBMKRod.getEnrichment(stack) * 100 >= cycle) {
rod.slots[0] = stack.copy();
slots[i] = null;
break;
}
}
}
this.isRetracting = true;
this.delay = 40;
}
}
}
this.networkPackNT(100);
} else {
this.lastPiston = this.renderPiston;
if(this.turnProgress > 0) {
this.renderPiston = this.renderPiston + ((this.syncPiston - this.renderPiston) / (double) this.turnProgress);
--this.turnProgress;
} else {
this.renderPiston = this.syncPiston;
}
if(this.renderPiston > 0.01 && this.renderPiston < 0.99) {
if(this.audioLift == null || !this.audioLift.isPlaying()) {
this.audioLift = MainRegistry.proxy.getLoopedSound("hbm:door.wgh_start", xCoord, yCoord, zCoord, this.getVolume(0.75F), 25F, 1.0F, 5);
this.audioLift.startSound();
}
this.audioLift.updateVolume(this.getVolume(0.75F));
this.audioLift.keepAlive();
} else {
if(this.audioLift != null) {
this.audioLift.stopSound();
this.audioLift = null;
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:door.wgh_stop", this.getVolume(2F), 1F);
}
}
if(this.renderPiston > 0.99) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "tower");
data.setFloat("lift", 0F);
data.setFloat("base", 0.25F);
data.setFloat("max", 1.5F);
data.setInteger("life", 70 + worldObj.rand.nextInt(30));
data.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextGaussian() * 0.125);
data.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextGaussian() * 0.125);
data.setDouble("posY", yCoord + 0.25);
data.setBoolean("noWind", true);
data.setFloat("alphaMod", 2F);
data.setFloat("strafe", 0.05F);
for(int i = 0; i < 3; i++) MainRegistry.proxy.effectNT(data);
}
}
}
public boolean hasFuel() {
for(int i = 0; i < 9; i++) {
ItemStack stack = slots[i];
if(stack != null && stack.getItem() instanceof ItemRBMKRod && ItemRBMKRod.getEnrichment(stack) * 100 >= cycle) {
return true;
}
}
return false;
}
public boolean hasSpace() {
for(int i = 9; i < 18; i++) if(slots[i] == null) return true;
return false;
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
buf.writeDouble(this.piston);
buf.writeInt(this.cycle);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
this.syncPiston = buf.readDouble();
this.cycle = buf.readInt();
this.turnProgress = 2;
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
return stack.getItem() instanceof ItemRBMKRod && ItemRBMKRod.getEnrichment(stack) * 100 >= cycle && i < 9;
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return this.piston <= 0 ? new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 } : new int[0];
}
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return i >= 9;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
piston = nbt.getDouble("piston");
isRetracting = nbt.getBoolean("ret");
delay = nbt.getInteger("delay");
cycle = nbt.getInteger("cycle");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setDouble("piston", piston);
nbt.setBoolean("ret", isRetracting);
nbt.setInteger("delay", delay);
nbt.setInteger("cycle", cycle);
}
protected AxisAlignedBB aabb;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(aabb != null) return aabb;
aabb = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 9, zCoord + 1);
return aabb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
@Override
public boolean hasPermission(EntityPlayer player) {
return this.isUseableByPlayer(player);
}
@Override
public void receiveControl(NBTTagCompound data) {
if(data.hasKey("minus") && this.cycle > 5) this.cycle -= 5;
if(data.hasKey("plus") && this.cycle < 95) this.cycle += 5;
this.cycle = MathHelper.clamp_int(cycle, 5, 95);
this.markChanged();
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerRBMKAutoloader(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIRBMKAutoloader(player.inventory, this);
}
@Override
public NBTTagCompound getSettings(World world, int x, int y, int z) {
NBTTagCompound data = new NBTTagCompound();
data.setInteger("cycle", cycle);
return data;
}
@Override
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
if(nbt.hasKey("cycle")) {
this.cycle = MathHelper.clamp_int(nbt.getInteger("cycle"), 5, 95);
}
}
}

View File

@ -89,44 +89,28 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
double flux = 0;
for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) {
int rx = i, rz = j;
switch (rotation) {
case 1: // 90°
rx = -j;
rz = i;
break;
case 2: // 180°
rx = -i;
rz = -j;
break;
case 3: // 270°
rx = j;
rz = -i;
break;
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(rbmk.isModerated()) columns[index].data.setBoolean("moderated", true); //false is the default anyway and not setting it when we don't need to reduces cruft
if(te instanceof TileEntityRBMKRod) {
TileEntityRBMKRod fuel = (TileEntityRBMKRod) te;
flux += fuel.lastFluxQuantity;
}
TileEntity te = Compat.getTileStandard(worldObj, targetX + rx, targetY, targetZ + rz);
int index = (i + 7) + (j + 7) * 15;
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(rbmk.isModerated()) columns[index].data.setBoolean("moderated", true); //false is the default anyway and not setting it when we don't need to reduces cruft
if(te instanceof TileEntityRBMKRod) {
TileEntityRBMKRod fuel = (TileEntityRBMKRod) te;
flux += fuel.lastFluxQuantity;
}
} else {
columns[index] = null;
}
} else {
columns[index] = null;
}
}
@ -281,8 +265,9 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
if(key.startsWith("sel_")) {
int x = data.getInteger(key) % 15 - 7;
int z = data.getInteger(key) / 15 - 7;
int index = data.getInteger(key);
int x = getXFromIndex(index);
int z = getZFromIndex(index);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
@ -322,8 +307,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int[] cols = data.getIntArray("cols");
for(int i : cols) {
int x = i % 15 - 7;
int z = i / 15 - 7;
int x = getXFromIndex(i);
int z = getZFromIndex(i);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
@ -339,8 +324,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int[] cols = data.getIntArray("cols");
for(int i : cols) {
int x = i % 15 - 7;
int z = i / 15 - 7;
int x = getXFromIndex(i);
int z = getZFromIndex(i);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
@ -404,6 +389,40 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
rotation = (byte)((rotation + 1) % 4);
}
public int getXFromIndex(int col) {
final int i = col % 15 - 7;
final int j = col / 15 - 7;
switch (rotation) {
case 0: // 0°
return i;
case 1: // 90°
return -j;
case 2: // 180°
return -i;
case 3: // 270°
return j;
}
return i;
}
public int getZFromIndex(int col) {
final int i = col % 15 - 7;
final int j = col / 15 - 7;
switch (rotation) {
case 0: // 0°
return j;
case 1: // 90°
return i;
case 2: // 180°
return -j;
case 3: // 270°
return -i;
}
return j;
}
public static class RBMKColumn {
public ColumnType type;
@ -556,13 +575,32 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int x = args.checkInteger(0) - 7;
int y = -args.checkInteger(1) + 7;
int i = (y + 7) * 15 + (x + 7);
int i = x;
int j = y;
switch (rotation) {
case 0:
break;
case 1:
i = y;
j = -x;
break;
case 2:
i = -x;
j = -y;
break;
case 3:
i = -y;
j = x;
break;
}
int index = (j + 7) * 15 + (i + 7);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + y);
if (te instanceof TileEntityRBMKBase) {
TileEntityRBMKBase column = (TileEntityRBMKBase) te;
NBTTagCompound column_data = columns[i].data;
NBTTagCompound column_data = columns[index].data;
LinkedHashMap<String, Object> data_table = new LinkedHashMap<>();
data_table.put("type", column.getConsoleType().name());
data_table.put("hullTemp", column_data.getDouble("heat"));

View File

@ -2,7 +2,7 @@ package com.hbm.uninos;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
@ -16,7 +16,7 @@ public abstract class NodeNet<R, P, L extends GenNode> {
public static Random rand = new Random();
public boolean valid = true;
public Set<L> links = new HashSet();
public Set<L> links = new LinkedHashSet();
public HashMap<R, Long> receiverEntries = new HashMap();
public HashMap<P, Long> providerEntries = new HashMap();

View File

@ -2,7 +2,7 @@ package com.hbm.uninos.networkproviders;
import com.hbm.uninos.INetworkProvider;
public class PneumaticNetworkProvider implements INetworkProvider<PneumaticNetwork>{
public class PneumaticNetworkProvider implements INetworkProvider<PneumaticNetwork> {
public static PneumaticNetworkProvider THE_PROVIDER = new PneumaticNetworkProvider();

View File

@ -0,0 +1,9 @@
package com.hbm.uninos.networkproviders;
import com.hbm.uninos.NodeNet;
public class RebarNetwork extends NodeNet {
@Override
public void update() { }
}

View File

@ -0,0 +1,13 @@
package com.hbm.uninos.networkproviders;
import com.hbm.uninos.INetworkProvider;
public class RebarNetworkProvider implements INetworkProvider<RebarNetwork> {
public static RebarNetworkProvider THE_PROVIDER = new RebarNetworkProvider();
@Override
public RebarNetwork provideNetwork() {
return new RebarNetwork();
}
}

View File

@ -144,8 +144,8 @@ public class ShadyUtil {
Field field = ReflectionHelper.findField(test, decode(offset(checksum, -2)));
if(field != null) {
System.out.println("TEST SECTION START");
Class toLoad = Class.forName(decode(offset(testCase, -2)));
Field toRead = ReflectionHelper.findField(toLoad, decode(offset(testValue, -2)));
//Class toLoad = Class.forName(decode(offset(testCase, -2)));
//Field toRead = ReflectionHelper.findField(toLoad, decode(offset(testValue, -2)));
//ModEventHandler.reference = toRead;
System.out.println("TEST SECTION END");
}

View File

@ -7,7 +7,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@ -22,13 +21,8 @@ public class LogicBlockInteractions {
public static LinkedHashMap<String, Consumer<Object[]>> interactions = new LinkedHashMap<>();
public static Consumer<Object[]> TEST = (array) -> {
World world = (World) array[0];
LogicBlock.TileEntityLogicBlock logic = (LogicBlock.TileEntityLogicBlock) array[1];
int x = (int) array[2];
int y = (int) array[3];
int z = (int) array[4];
EntityPlayer player = (EntityPlayer) array[5];
int side = (int) array[6];
if(logic.phase > 1) return;

View File

@ -437,6 +437,7 @@ container.radGen=Strahlenbetriebener Generator
container.radar=Radar
container.radiobox=UKW-Sender
container.radiorec=UKW Radio
container.rbmkAutoloader=RBMK-Ladeautomat
container.rbmkBoiler=RBMK Dampfkanal
container.rbmkControl=RBMK Steuerstäbe
container.rbmkControlAuto=RBMK Automatische Steuerstäbe
@ -449,6 +450,7 @@ container.reactor=Brutreaktor
container.reactorControl=Reaktorfernsteuerung
container.reactorLarge=Großer Atomreaktor
container.reactorSmall=Atomreaktor
container.rebar=Armiereisen-Platzierer
container.reix=Rei-X Hauptrechner
container.rtg=Radioisotopengenerator
container.rtgFurnace=RTG-Ofen
@ -752,6 +754,7 @@ hbmfluid.coalgas=Kohlebenzin
hbmfluid.coalgas_leaded=Bleikohlebenzin
hbmfluid.colloid=Kolloid
hbmfluid.coaloil=Kohleöl
hbmfluid.concrete=Nassbeton
hbmfluid.coolant=Kühlflüssigkeit
hbmfluid.coolant_hot=Heiße Kühlflüssigkeit
hbmfluid.crackoil=Crack-Öl
@ -1417,6 +1420,7 @@ item.blades_schrabidium.name=Schrabidiumsägeblatt
item.blades_steel.name=Stahlsägeblatt
item.blades_titanium.name=Titansägeblatt
item.blowtorch.name=Lötlampe
item.blueprint_folder.name=Blaupausenbuch
item.blueprints.name=Blaupausen
item.board_copper.name=Kupfertafel
item.boat_rubber.name=Schlauchboot
@ -1966,7 +1970,7 @@ item.fleija_igniter.name=Impulszünder
item.fleija_kit.name=F.L.E.I.J.A. Kit
item.fleija_propellant.name=Schrabidiumtreibladung
item.fluid_barrel_empty.name=Leeres Fass
item.fluid_barrel_full.name=Flüssigkeitsfass:
item.fluid_barrel_full.name=Flüssigkeitsfass: %s
item.fluid_barrel_infinite.name=Unendliches Fass
item.fluid_duct.name=Flüssigkeitsrohr:
item.fluid_identifier.name=Flüssigkeits-Kennzeichnung
@ -1977,10 +1981,12 @@ item.fluid_identifier.usage2=einer maximalen Reichweite von 64 Rohren zuzuweisen
item.fluid_identifier_multi.name=Multi-Flüssigkeits-Kennzeichnung
item.fluid_identifier_multi.info=Universelle Flüssigkeits-Kennzeichnung für:
item.fluid_identifier_multi.info2=Sekundärer Typ:
item.fluid_pack_empty.name=Großer Flüssigkeitsbehälter
item.fluid_pack_full.name=%s (Abgepackt)
item.fluid_tank_empty.name=Leere universelle Flüssigkeitszelle
item.fluid_tank_full.name=Universelle Flüssigkeitszelle:
item.fluid_tank_full.name=Universelle Flüssigkeitszelle: %s
item.fluid_tank_lead_empty.name=Leere Gefahrenstoffzelle
item.fluid_tank_lead_full.name=Gefahrenstoffzelle:
item.fluid_tank_lead_full.name=Gefahrenstoffzelle: %s
item.fluorite.name=Fluorit
item.flywheel_beryllium.name=Berylliumschwungscheibe
item.fmn.name=Flunitrazepamtablette
@ -3114,6 +3120,7 @@ item.rbmk_tool.set=RBMK verlinkt!
item.reacher.name=Wolfram-Greifzange
item.reactor_core.name=Brutreaktorkern
item.reactor_sensor.name=Reaktor-Fernsensor
item.rebar_placer.name=Armiereisen-Platzierer
item.record.glass.desc=? ? ?
item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core
item.record.ss.desc=Valve - Sector Sweep
@ -4027,6 +4034,7 @@ tile.concrete_colored_ext.pink.name=Builder's Choice Concrete - Männliches Pink
tile.concrete_colored_ext.purple.name=Builder's Choice Concrete - Mysteriöses Lila
tile.concrete_colored_ext.sand.name=Builder's Choice Concrete - Wüstensturm
tile.concrete_pillar.name=Stahlbetonsäule
tile.concrete_rebar.name=Stahlbeton
tile.concrete_slab.asphalt.name=Asphaltstufe
tile.concrete_slab.concrete.name=Betonfliesenstufe
tile.concrete_slab.concrete_asbestos.name=Asbestbetonstufe
@ -4722,6 +4730,7 @@ tile.rail_large_switch.name=Normalspur-Weiche (15m, Links)
tile.rail_large_switch_flipped.name=Normalspur-Weiche (15m, Rechts)
tile.rail_wood.name=Holzschienen
tile.rbmk_absorber.name=RBMK Bor-Neutronenabsorber
tile.rbmk_autoloader.name=RBMK-Ladeautomat
tile.rbmk_blank.name=RBMK Strukturteil
tile.rbmk_boiler.name=RBMK Dampfkanal
tile.rbmk_cooler.name=RBMK Kühler
@ -4750,6 +4759,7 @@ tile.reactor_ejector.name=Reaktor-Brennstoffauswurf
tile.reactor_element.name=Reaktorkammer
tile.reactor_hatch.name=Kraftwerkszugriffsluke
tile.reactor_inserter.name=Reaktor-Brennstoffeinlass
tile.rebar.name=Armierungseisen
tile.red_barrel.name=Explosives Fass
tile.red_cable.name=Rotes Kupferkabel
tile.red_cable_classic.name=Rotes Kupferkabel (Klassisch)

View File

@ -841,6 +841,7 @@ container.radar=Radar
container.radiobox=FM Transmitter
container.radiolysis=RTG and Radiolysis Chamber
container.radiorec=FM Radio
container.rbmkAutoloader=RBMK Autoloader
container.rbmkBoiler=RBMK Steam Channel
container.rbmkControl=RBMK Control Rods
container.rbmkControlAuto=RBMK Automatic Control Rods
@ -853,6 +854,7 @@ container.reactorBreeding=Breeding Reactor
container.reactorControl=Reactor Remote Control Block
container.reactorLarge=Big Nuclear Reactor
container.reactorResearch=Research Reactor
container.rebar=Rebar Placer
container.reix=Rei-X Mainframe
container.rtg=RT Generator
container.rtgFurnace=RTG Furnace
@ -1461,6 +1463,7 @@ hbmfluid.coalgas=Coal Gasoline
hbmfluid.coalgas_leaded=Leaded Coal Gasoline
hbmfluid.coaloil=Coal Oil
hbmfluid.colloid=Colloid
hbmfluid.concrete=Liquid Concrete
hbmfluid.coolant=Coolant
hbmfluid.coolant_hot=Hot Coolant
hbmfluid.crackoil=Cracked Oil
@ -2161,6 +2164,7 @@ item.blades_desh.name=Desh Shredder Blades
item.blades_steel.name=Steel Shredder Blades
item.blades_titanium.name=Titanium Shredder Blades
item.blowtorch.name=Blowtorch
item.blueprint_folder.name=Blueprint Booklet
item.blueprints.name=Blueprints
item.board_copper.name=Copper Panel
item.boat_rubber.name=Rubber Boat
@ -2772,7 +2776,7 @@ item.fleija_igniter.name=Pulse Igniter
item.fleija_kit.name=F.L.E.I.J.A. Kit
item.fleija_propellant.name=Schrabidium Propellant
item.fluid_barrel_empty.name=Empty Fluid Barrel
item.fluid_barrel_full.name=Fluid Barrel:
item.fluid_barrel_full.name=Fluid Barrel: %s
item.fluid_barrel_infinite.name=Infinite Fluid Barrel
item.fluid_duct.name=Fluid Duct:
item.fluid_identifier.name=Fluid Identifier
@ -2783,10 +2787,12 @@ item.fluid_identifier.usage2=up to a maximum range of 64 ducts.
item.fluid_identifier_multi.name=Multi Fluid Identifier
item.fluid_identifier_multi.info=Universal fluid identifier for:
item.fluid_identifier_multi.info2=Secondary type:
item.fluid_pack_empty.name=Large Fluid Container
item.fluid_pack_full.name=Packaged %s
item.fluid_tank_empty.name=Empty Universal Fluid Tank
item.fluid_tank_full.name=Universal Fluid Tank:
item.fluid_tank_full.name=Universal Fluid Tank: %s
item.fluid_tank_lead_empty.name=Empty Hazardous Material Tank
item.fluid_tank_lead_full.name=Hazardous Material Tank:
item.fluid_tank_lead_full.name=Hazardous Material Tank: %s
item.fluorite.name=Fluorite
item.flywheel_beryllium.name=Beryllium Flywheel
item.fmn.name=Flunitrazepam Tablet
@ -4069,6 +4075,7 @@ item.rbmk_tool.set=RBMK linked!
item.reacher.name=Tungsten Reacher
item.reactor_core.name=Breeding Reactor Core
item.reactor_sensor.name=Reactor Remote Sensor
item.rebar_placer.name=Rebar Placer
item.record.glass.desc=? ? ?
item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core
item.record.ss.desc=Valve - Sector Sweep
@ -5143,6 +5150,7 @@ tile.concrete_colored_ext.pink.name=Builder's Choice Concrete - Manly Pink
tile.concrete_colored_ext.purple.name=Builder's Choice Concrete - Mysterious Purple
tile.concrete_colored_ext.sand.name=Builder's Choice Concrete - Desert Storm
tile.concrete_pillar.name=Rebar Reinforced Concrete Pillar
tile.concrete_rebar.name=Reinforced Concrete
tile.concrete_slab.asphalt.name=Asphalt Slab
tile.concrete_slab.concrete.name=Concrete Tile Slab
tile.concrete_slab.concrete_asbestos.name=Asbestos Concrete Slab
@ -5870,6 +5878,7 @@ tile.rail_large_switch_flipped.name=Standard Gauge Switch Rail (15m, Right)
tile.rail_narrow.name=Narrow Gauge Cart Rail
tile.rail_wood.name=Wooden Tracks
tile.rbmk_absorber.name=RBMK Boron Neutron Absorber
tile.rbmk_autoloader.name=RBMK Autoloader
tile.rbmk_blank.name=RBMK Structural Column
tile.rbmk_boiler.name=RBMK Steam Channel
tile.rbmk_console.name=RBMK Console
@ -5901,6 +5910,7 @@ tile.reactor_ejector.name=Reactor Waste Ejector
tile.reactor_element.name=Reactor Chamber
tile.reactor_hatch.name=Reactor Access Hatch
tile.reactor_inserter.name=Reactor Fuel Inserter
tile.rebar.name=Rebar
tile.red_barrel.name=Explosive Barrel
tile.red_cable.name=Red Copper Cable
tile.red_cable_classic.name=Red Copper Cable (Classic)

View File

@ -773,6 +773,7 @@ container.leadBox=Свинцевий ящик
container.machineAmmoPress=Прес для боєприпасів
container.machineArcWelder=Дуговий зварювальник
container.machineArcFurnaceLarge=Дугова піч
container.machineAssemblyMachine=Збиральна машина
container.machineBoiler=Нагрівач нафти
container.machineChemicalFactory=Хімічна фабрика
container.machineChemicalPlant=Хімічний завод
@ -925,7 +926,7 @@ damage.item=Опір до:
damage.category.EN=Енергії
damage.category.EXPL=Вибухів
damage.category.FIRE=Вогню
damage.category.PROJ=Снарядів
damage.category.PHYS=Фізики
damage.exact.drown=Утоплення
damage.exact.fall=Падіння
damage.exact.LASER=Лазерів
@ -1033,7 +1034,7 @@ desc.gui.rtg.pellets=Допустимі пелети:
desc.gui.rtg.pelletHeat=%s (%s тепла)
desc.gui.rtg.pelletPower=%s (%s HE/тік)
desc.gui.template=§9Шаблони§r$Шаблони можна створювати за$допомогою Папки шаблонів машин.
desc.gui.turbinegas.automode=§2Режим автоматичного дроселювання турбіни§r$Натиснувши кнопку "AUTO", турбіна$втоматично відрегулює виробництво електроенергії$на основі необхідної енергії в мережі
desc.gui.turbinegas.automode=§2Режим автоматичного дроселювання турбіни§r$Натиснувши кнопку "AUTO", турбіна$втоматично відрегулює виробництво електроенергії$на основі необхідної енергії в мережі$та рівня палива у внутрішньому баку
desc.gui.turbinegas.fuels=§6Допустимі види палива:§r
desc.gui.turbinegas.warning=§cНизький рівень палива або мастила!§r
desc.gui.zirnox.coolant=§3Охолодження§r$CO2 передає тепло від реактора до води.$Це скип'ятить її до надзвичайно гарячу пару$Ефективність охолодження та виробництва пари$залежить від тиску.
@ -1805,6 +1806,7 @@ item.ammo_secret.folly_sm.name=Срібна куля
item.ammo_secret.g12_equestrian.name=Флешетний снаряд з залізничними цвяхами 12-го калібру
item.ammo_secret.m44_equestrian.name=.44 Magnum Череполом
item.ammo_secret.p35_800.name=.35-800 V9
item.ammo_secret.p35_800_bl.name=.35-800 V9 (Чорна блискавка)
item.ammo_standard.b75.name=Болт .75
item.ammo_standard.b75_exp.name=Болт .75 (Розривний)
item.ammo_standard.b75_inc.name=Болт .75 (Запальний)
@ -2159,6 +2161,7 @@ item.blades_desh.name=Деш леза подрібнювача
item.blades_steel.name=Стальні леза подрібнювача
item.blades_titanium.name=Титанові леза подрібнювача
item.blowtorch.name=Паяльна лампа
item.blueprints.name=Креслення
item.board_copper.name=Мідна панель
item.boat_rubber.name=Гумовий човен
item.bobmazon.name=Бобмазон
@ -2389,6 +2392,7 @@ item.chopper_torso.name=Корпус Гвинтокрила Мисливця
item.chopper_wing.name=Крило Гвинтокрила Мисливця
item.chunk_ore.malachite.name=Шматок малахіту
item.chunk_ore.rare.name=Шматок рідкоземельної руди
item.chunk_ore.moonstone.name=Місячний камінь
item.chunk_ore.cryolite.name=Шматок кріоліту
item.cigarette.name=Сигарети торгової марки FFI
item.cinnebar.name=Кіновар
@ -3992,6 +3996,7 @@ item.radx.desc=Збільшує стійкість до радіації на 0.
item.rag.name=Тканина
item.rag_damp.name=Волога тканина
item.rag_piss.name=Просочена сечею ганчірка
item.rangefinder.name=Прилад для вимірювання відстані
item.rbmk_fuel_balefire.name=Паливний стрижень РБМК BF
item.rbmk_fuel_balefire_gold.name=Паливний стрижень РБМК флешголду
item.rbmk_fuel_drx.name=§cПаливний стрижень РБМК Дігамма§r
@ -5276,6 +5281,7 @@ tile.ducrete_smooth_stairs.name=Сходи з уранобетону
tile.dummy_block.name=Dummy Block
tile.dummy_port.name=Dummy Block (Electricity Port)
tile.dungeon_chain.name=Металевий ланцюг
tile.logic_block.name=Dungeon Action Block
tile.dynamite.name=Динаміт
tile.emp_bomb.name=Пристрій електромагнітного іпульсу
tile.factory_advanced_conductor.name=Advanced Factory Electricity Port
@ -5475,8 +5481,9 @@ tile.machine_arc_welder.name=Дуговий зварювальник
tile.machine_armor_table.name=Стіл модифікації броні
tile.machine_ashpit.name=Зольник
tile.machine_ashpit.desc=Збирає попіл з топок та нагрівальних печей
tile.machine_assembler.name=Збиральна машина
tile.machine_assembler.name=Збиральна машина (Legacy)
tile.machine_assemfac.name=Збиральна фабрика
tile.machine_assembly_machine.name=Збиральна машина
tile.machine_autocrafter.name=Автоматичний верстак
tile.machine_autosaw.name=Автоматична пила
tile.machine_autosaw.desc=Вирубує рослини поруч, заново висажує дерева$Приймає:$-Деревну смолу$-Етанол$-Риб'ячий жир$-Важку нафту
@ -5799,6 +5806,7 @@ tile.plasma_heater.name=Нагрівач плазми
tile.plushie.name=%s плюшка
tile.pneumatic_tube.name=Пневматична труба
tile.pneumatic_tube.desc=Надсилає предмети за допомогою стисненого повітря.$Клацніть правою кнопкою миші викруткою, щоб перемкнути вхід.$Клацніть правою кнопкою миші з шифтом та викруткою, щоб перемкнути вихід.$Входи можна налаштувати та підключити до стисненого повітря.$Надсилає один стак чотири рази на секунду.
tile.pneumatic_tube_paintable.name=Пневматична труба, яку можна пофарбувати
tile.pole_satellite_receiver.name=Супутникова тарілка
tile.pole_top.name=Верхівка антени
tile.press_preheater.name=Burner Press Preheater
@ -6058,6 +6066,7 @@ tile.volcano_rad_core.name=Радіоактивне вулканічне ядр
tile.wand_air.name=Structure Wand Block (Air)
tile.wand_loot.name=Structure Wand Block (Lootable)
tile.wand_jigsaw.name=Structure Wand Block (Jigsaw)
tile.wand_logic.name=Structure Wand Block (Logic)
tile.waste_earth.name=Мертва трава
tile.waste_leaves.name=Мертве листя
tile.waste_log.name=Обвуглене дерево
@ -6221,4 +6230,6 @@ desc.gui.upgrade.afterburner= * §dФорсаж§r: Складається до
desc.gui.upgrade.effectiveness= * §aЕфективність§r: Складається до 3 рівнів
desc.gui.upgrade.overdrive= * §7Перевантаження§r: Складається до 3 рівнів
desc.gui.upgrade.power= * §1Енергозбереження§r: Складається до 3 рівнів
desc.gui.upgrade.speed= * §4Швидкість§r: Складається до 3 рівнів
desc.gui.upgrade.speed= * §4Швидкість§r: Складається до 3 рівнів
tile.oc_cable_paintable.name=Мережевий кабель, який можна фарбувати

File diff suppressed because it is too large Load Diff

View File

@ -222,6 +222,7 @@
"weapon.explosionSmallNear": {"category": "player", "sounds": ["weapon/explosionSmallNear1", "weapon/explosionSmallNear2", "weapon/explosionSmallNear3"]},
"weapon.explosionSmallFar": {"category": "player", "sounds": ["weapon/explosionSmallFar1", "weapon/explosionSmallFar2"]},
"weapon.explosionTiny": {"category": "player", "sounds": ["weapon/explosionTiny1", "weapon/explosionTiny2"]},
"weapon.hkShoot": {"category": "player", "sounds": [{"name": "weapon/hkShoot", "stream": false}]},
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 180 B

Some files were not shown because too many files have changed in this diff Show More