Merge branch 'master' into NEI-schenanigans

This commit is contained in:
70000hp 2024-07-10 12:16:45 -04:00
commit 851d6fb0bf
142 changed files with 13890 additions and 924 deletions

View File

@ -1,26 +1,6 @@
## Changed
* Updated boxducts
* All boxducts are now way cleaner, only having bolts on intersections, with straight parts only having very light seams
* Intersections now have unique textures for each size
* Copper boxducts now have a much nicer color gradient
* Exhaust pipes now have a more rusted appearance
* Added an alternate recipe for blank upgrades using integrated circuits and polymer instead of analog circuits
* Update the soyuz and orbital module recipes
* Simplified the recipes, fewer microcrafting parts
* Both now use low-density elements which are made from aluminium/titanium, fiberglass and hard plastic
* Both now make use of more advanced electronics, although in smaller numbers
* Removed the recipes for the satellite deco blocks, those will be phased out soon. Existing deco blocks can still be crafted back into functional satellites
* Moved the satellite recipes to the welder, the attachment is now welded onto the common satellite body
* Simplified the satellite recipes, adjusted cost based on utility (depth scanner, death ray and resonator are more expensive than the mapper/radar)
* CTRL + ALT view now shows the item's internal name and domain
* Adjusted Mekanism compat
* Decreased crafting complexity and time for the digiminer assembler recipe
* Replaced recipes for the wind turbine and atomic disassembler
* Added a config option for toggling Mekanism compat
* Added recipe caching to the combinator funnel, meaning it no longer has to iterate over the entire recipe list all the time for compression/automation, this should improve performance by a fair bit
* Diodes now use silicon nuggets instead of nether quartz
* Aluminium wire's coloring is now consistent with the ingot
* Changed bedrock ore processing time in the electrolyzer to 60 ticks
## Fixed
* Fixed crash caused by PRISM updating unloaded worlds
* Hopefully fixed another crash caused by PRISM (reproduction was unreliable and sporadic, not confirmed)
* Fixed issue where the NEI universal handler can not correctly display more than 4 outputs (now supports up to 8, which should cover all possible electrolyzer cases too)
* Fixed the metal electrolysis duration variable not being part of the config

View File

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

View File

@ -2,6 +2,7 @@ package api.hbm.energymk2;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.Compat;
import api.hbm.energymk2.Nodespace.PowerNode;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -24,7 +25,7 @@ public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
public default void tryProvide(World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = Compat.getTileStandard(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {

View File

@ -2,6 +2,7 @@ package api.hbm.energymk2;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.Compat;
import api.hbm.energymk2.Nodespace.PowerNode;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -30,7 +31,7 @@ public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = Compat.getTileStandard(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {

View File

@ -3,6 +3,7 @@ package api.hbm.fluid;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.Compat;
import api.hbm.tile.ILoadedTile;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -45,7 +46,7 @@ public interface IFluidConnector extends ILoadedTile {
*/
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = Compat.getTileStandard(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConductor) {

View File

@ -4,6 +4,7 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.Compat;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
@ -71,7 +72,7 @@ public interface IFluidUser extends IFluidConnector {
public static IPipeNet getPipeNet(World world, int x, int y, int z, FluidType type) {
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = Compat.getTileStandard(world, x, y, z);
if(te instanceof IFluidConductor) {
IFluidConductor con = (IFluidConductor) te;

View File

@ -526,7 +526,6 @@ public class ModBlocks {
public static Block lox_barrel;
public static Block taint_barrel;
public static Block crashed_balefire;
public static Block rejuvinator;
public static Block fireworks;
public static Block dynamite;
public static Block tnt;
@ -591,6 +590,7 @@ public class ModBlocks {
public static Block spikes;
public static Block charger;
public static Block floodlight;
public static Block tesla;
@ -791,6 +791,7 @@ public class ModBlocks {
public static Block crane_boxer;
public static Block crane_unboxer;
public static Block crane_splitter;
public static Block crane_partitioner;
public static Block drone_waypoint;
public static Block drone_crate;
@ -1098,7 +1099,6 @@ public class ModBlocks {
public static Block rbmk_loader;
public static Block rbmk_steam_inlet;
public static Block rbmk_steam_outlet;
public static Block rbmk_heatex;
public static Block pribris;
public static Block pribris_burning;
public static Block pribris_radiating;
@ -1491,6 +1491,7 @@ public class ModBlocks {
spotlight_halogen = new Spotlight(Material.iron, 32, LightType.HALOGEN, true).setBlockName("spotlight_halogen").setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":flood_lamp");
spotlight_halogen_off = new Spotlight(Material.iron, 32, LightType.HALOGEN, false).setBlockName("spotlight_halogen_off").setBlockTextureName(RefStrings.MODID + ":flood_lamp_off");
spotlight_beam = new SpotlightBeam().setBlockName("spotlight_beam");
floodlight = new Floodlight(Material.iron).setBlockName("floodlight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
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");
@ -1911,6 +1912,7 @@ public class ModBlocks {
crane_boxer = new CraneBoxer().setBlockName("crane_boxer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
crane_unboxer = new CraneUnboxer().setBlockName("crane_unboxer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
crane_splitter = new CraneSplitter().setBlockName("crane_splitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":crane_side");
crane_partitioner = new CranePartitioner().setBlockName("crane_partitioner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":crane_partitioner_side");
fan = new MachineFan().setBlockName("fan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
piston_inserter = new PistonInserter().setBlockName("piston_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -2125,7 +2127,6 @@ public class ModBlocks {
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");
rbmk_heatex = new RBMKHeatex(Material.iron).setBlockName("rbmk_heatex").setCreativeTab(null).setHardness(50.0F).setResistance(60.0F).setBlockTextureName(RefStrings.MODID + ":rbmk_heatex");
pribris = new RBMKDebris().setBlockName("pribris").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris");
pribris_burning = new RBMKDebrisBurning().setBlockName("pribris_burning").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_burning");
pribris_radiating = new RBMKDebrisRadiating().setBlockName("pribris_radiating").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_radiating");
@ -2629,6 +2630,7 @@ public class ModBlocks {
GameRegistry.registerBlock(spotlight_halogen, spotlight_halogen.getUnlocalizedName());
GameRegistry.registerBlock(spotlight_halogen_off, spotlight_halogen_off.getUnlocalizedName());
GameRegistry.registerBlock(spotlight_beam, spotlight_beam.getUnlocalizedName());
register(floodlight);
//Reinforced Blocks
GameRegistry.registerBlock(asphalt, ItemBlockBlastInfo.class, asphalt.getUnlocalizedName());
@ -2717,6 +2719,7 @@ public class ModBlocks {
//Charger
GameRegistry.registerBlock(charger, charger.getUnlocalizedName());
//GameRegistry.registerBlock(floodlight, floodlight.getUnlocalizedName());
//Decoration Blocks
GameRegistry.registerBlock(block_meteor, block_meteor.getUnlocalizedName());
@ -2892,7 +2895,6 @@ public class ModBlocks {
GameRegistry.registerBlock(therm_endo, therm_endo.getUnlocalizedName());
GameRegistry.registerBlock(therm_exo, therm_exo.getUnlocalizedName());
GameRegistry.registerBlock(emp_bomb, emp_bomb.getUnlocalizedName());
//GameRegistry.registerBlock(rejuvinator, rejuvinator.getUnlocalizedName());
GameRegistry.registerBlock(det_cord, det_cord.getUnlocalizedName());
GameRegistry.registerBlock(det_charge, det_charge.getUnlocalizedName());
GameRegistry.registerBlock(det_nuke, det_nuke.getUnlocalizedName());
@ -3110,7 +3112,6 @@ public class ModBlocks {
register(rbmk_loader);
register(rbmk_steam_inlet);
register(rbmk_steam_outlet);
GameRegistry.registerBlock(rbmk_heatex, rbmk_heatex.getUnlocalizedName());
GameRegistry.registerBlock(pribris, pribris.getUnlocalizedName());
GameRegistry.registerBlock(pribris_burning, pribris_burning.getUnlocalizedName());
GameRegistry.registerBlock(pribris_radiating, pribris_radiating.getUnlocalizedName());
@ -3162,6 +3163,7 @@ public class ModBlocks {
register(conveyor_chute);
register(conveyor_lift);
register(crane_splitter);
register(crane_partitioner);
register(drone_waypoint);
register(drone_crate);
register(drone_waypoint_request);

View File

@ -0,0 +1,86 @@
package com.hbm.blocks.machine;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class Floodlight extends BlockContainer {
public Floodlight(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityFloodlight();
}
@Override public int getRenderType() { return -1; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
//only method that respects sides, called first for orientation
@Override
public int onBlockPlaced(World world, int x, int y, int z, int side, float fX, float fY, float fZ, int meta) {
return side;
}
//only method with player param, called second for variable rotation
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
int meta = world.getBlockMetadata(x, y, z);
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
float rotation = player.rotationPitch;
if(meta == 0 || meta == 1) {
if(i == 0 || i == 2) world.setBlockMetadataWithNotify(x, y, z, meta + 6, 3);
if(meta == 1) if(i == 0 || i == 1) rotation = 180F - rotation;
if(meta == 0) if(i == 0 || i == 3) rotation = 180F - rotation;
}
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof TileEntityFloodlight) {
TileEntityFloodlight floodlight = (TileEntityFloodlight) tile;
floodlight.rotation = -Math.round(rotation / 5F) * 5F;
}
}
public static class TileEntityFloodlight extends TileEntity {
public float rotation;
@Override
public Packet getDescriptionPacket() {
NBTTagCompound nbt = new NBTTagCompound();
this.writeToNBT(nbt);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
this.readFromNBT(pkt.func_148857_g());
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.rotation = nbt.getFloat("rotation");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setFloat("rotation", rotation);
}
}
}

View File

@ -1,12 +1,15 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityMachineOreSlopper;
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;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineOreSlopper extends BlockDummyable {
@ -17,6 +20,7 @@ public class MachineOreSlopper extends BlockDummyable {
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityMachineOreSlopper();
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
return null;
}
@ -32,6 +36,40 @@ public class MachineOreSlopper extends BlockDummyable {
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
this.bounding.clear();
//Base
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.5, 0, -1.5, 3.5, 1, 1.5));
//Slop bucket
this.bounding.add(AxisAlignedBB.getBoundingBox(0.5, 1, -1.5, 3.5, 3.25, 1.5));
//Shredder
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, 0.25, 3.25, -0.75));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, 0.75, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2.25, 1, -1.5, -2, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(0, 1, -1.5, 0.25, 3.25, 1.5));
this.bounding.add(AxisAlignedBB.getBoundingBox(-2, 1, -0.75, 0, 2, 0.75));
//Outlet
this.bounding.add(AxisAlignedBB.getBoundingBox(-3.25, 1, -1, -2.25, 3, 1));
return standardOpenBehavior(world, x, y, z, player, side);
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
x += dir.offsetX * o;
z += dir.offsetZ * o;
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x + dir.offsetX * 3, y, z + dir.offsetZ * 3);
this.makeExtra(world, x - dir.offsetX * 3, y, z - dir.offsetZ * 3);
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
this.makeExtra(world, x - rot.offsetX, y, z - rot.offsetZ);
this.makeExtra(world, x + dir.offsetX * 2 + rot.offsetX, y, z + dir.offsetZ * 2 + rot.offsetZ);
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX, y, z + dir.offsetZ * 2 - rot.offsetZ);
this.makeExtra(world, x - dir.offsetX * 2 + rot.offsetX, y, z - dir.offsetZ * 2 + rot.offsetZ);
this.makeExtra(world, x - dir.offsetX * 2 - rot.offsetX, y, z - dir.offsetZ * 2 - rot.offsetZ);
}
}

View File

@ -1,15 +1,23 @@
package com.hbm.blocks.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntitySolarBoiler;
import com.hbm.util.I18nUtil;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineSolarBoiler extends BlockDummyable {
public class MachineSolarBoiler extends BlockDummyable implements ILookOverlay {
public MachineSolarBoiler(Material mat) {
super(mat);
@ -45,4 +53,28 @@ public class MachineSolarBoiler extends BlockDummyable {
this.makeExtra(world, x, y + 2, z);
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
int[] pos = findCore(world, x, y, z);
if(pos == null)
return;
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
if(!(te instanceof TileEntitySolarBoiler))
return;
TileEntitySolarBoiler boiler = (TileEntitySolarBoiler) te;
List<String> text = new ArrayList<>();
FluidTank[] tanks = boiler.getAllTanks();
for(int i = 0; i < tanks.length; i++)
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tanks[i].getTankType().getLocalizedName() + ": " + tanks[i].getFill() + "/" + tanks[i].getMaxFill() + "mB");
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
}
}

View File

@ -1,18 +0,0 @@
package com.hbm.blocks.machine.rbmk;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class RBMKHeatex extends BlockContainer {
public RBMKHeatex(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return null;
}
}

View File

@ -143,6 +143,7 @@ public class BlockCableGauge extends BlockContainer implements IBlockMultiPass,
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_power_gauge";
}

View File

@ -0,0 +1,237 @@
package com.hbm.blocks.network;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.entity.item.EntityMovingItem;
import com.hbm.inventory.recipes.CrystallizerRecipes;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.util.InventoryUtil;
import api.hbm.conveyor.IConveyorBelt;
import api.hbm.conveyor.IConveyorItem;
import api.hbm.conveyor.IConveyorPackage;
import api.hbm.conveyor.IEnterableBlock;
import cpw.mods.fml.client.registry.RenderingRegistry;
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.inventory.IInventory;
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.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class CranePartitioner extends BlockContainer implements IConveyorBelt, IEnterableBlock, ITooltipProvider {
@SideOnly(Side.CLIENT) public IIcon iconTop;
@SideOnly(Side.CLIENT) public IIcon iconBack;
@SideOnly(Side.CLIENT) public IIcon iconBelt;
@SideOnly(Side.CLIENT) public IIcon iconInner;
@SideOnly(Side.CLIENT) public IIcon iconInnerSide;
public CranePartitioner() {
super(Material.iron);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
super.registerBlockIcons(iconRegister);
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":crane_top");
this.iconBack = iconRegister.registerIcon(RefStrings.MODID + ":crane_partitioner_back");
this.iconBelt = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_belt");
this.iconInner = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_inner");
this.iconInnerSide = iconRegister.registerIcon(RefStrings.MODID + ":crane_splitter_inner_side");
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityCranePartitioner();
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
@Override public int getRenderType() { return renderID; }
@Override public boolean isOpaqueCube() { return false; }
@Override public boolean renderAsNormalBlock() { return false; }
@Override public boolean canItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) { return getTravelDirection(world, x, y, z, null) == dir; }
@Override public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { return false; }
@Override public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { }
@Override
public boolean canItemStay(World world, int x, int y, int z, Vec3 itemPos) {
return true;
}
@Override
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
Vec3 snap = this.getClosestSnappingPosition(world, x, y, z, itemPos);
Vec3 dest = Vec3.createVectorHelper(snap.xCoord - dir.offsetX * speed, snap.yCoord - dir.offsetY * speed, snap.zCoord - dir.offsetZ * speed);
Vec3 motion = Vec3.createVectorHelper((dest.xCoord - itemPos.xCoord), (dest.yCoord - itemPos.yCoord), (dest.zCoord - itemPos.zCoord));
double len = motion.lengthVector();
Vec3 ret = Vec3.createVectorHelper(itemPos.xCoord + motion.xCoord / len * speed, itemPos.yCoord + motion.yCoord / len * speed, itemPos.zCoord + motion.zCoord / len * speed);
return ret;
}
@Override
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
double posX = x + 0.5;
double posZ = z + 0.5;
if(dir.offsetX != 0) posX = itemPos.xCoord;
if(dir.offsetZ != 0) posZ = itemPos.zCoord;
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
}
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
int meta = world.getBlockMetadata(x, y, z);
return ForgeDirection.getOrientation(meta);
}
@Override
public void onItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
TileEntityCranePartitioner partitioner = (TileEntityCranePartitioner) world.getTileEntity(x, y, z);
ItemStack stack = entity.getItemStack();
ItemStack remainder = null;
if(CrystallizerRecipes.getAmount(stack) > 0) {
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 0, 8, stack);
} else {
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 9, 17, stack);
}
if(remainder != null) {
EntityItem item = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
world.spawnEntityInWorld(item);
}
}
public static class TileEntityCranePartitioner extends TileEntityMachineBase {
public TileEntityCranePartitioner() {
super(18);
}
@Override public String getName() { return "container.partitioner"; }
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
List<ItemStack> stacks = new ArrayList();
for(int i = 0; i < 9; i++) if(slots[i] != null) stacks.add(slots[i]);
stacks.sort(stackSizeComparator);
boolean markDirty = false;
for(ItemStack stack : stacks) {
int amount = CrystallizerRecipes.getAmount(stack);
while(stack.stackSize >= amount) {
ItemStack entityStack = stack.copy();
entityStack.stackSize = amount;
stack.stackSize -= amount;
EntityMovingItem item = new EntityMovingItem(worldObj);
item.setItemStack(entityStack);
item.setPosition(xCoord + 0.5, yCoord + 0.25, zCoord + 0.5);
worldObj.spawnEntityInWorld(item);
}
}
for(int i = 0; i < 9; i++) if(slots[i] != null && slots[i].stackSize <= 0) slots[i] = null;
if(markDirty) this.markDirty();
}
}
public static Comparator<ItemStack> stackSizeComparator = new Comparator<ItemStack>() {
@Override
public int compare(ItemStack o1, ItemStack o2) {
return (int) Math.signum(o1.stackSize - o2.stackSize);
}
};
@Override
public boolean canExtractItem(int slot, ItemStack stack, int side) {
return slot >= 9;
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
return i <= 8 && CrystallizerRecipes.getAmount(stack) >= 1;
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return new int[] { 0, 1, 2, 3, 4, 5, 6 ,7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
}
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
private final Random dropRandom = new Random();
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
TileEntity tile = world.getTileEntity(x, y, z);
if(tile instanceof IInventory) {
IInventory battery = (IInventory) tile;
for(int i = 0; i < battery.getSizeInventory(); ++i) {
ItemStack itemstack = battery.getStackInSlot(i);
if(itemstack != null) {
float f = this.dropRandom.nextFloat() * 0.8F + 0.1F;
float f1 = this.dropRandom.nextFloat() * 0.8F + 0.1F;
float f2 = this.dropRandom.nextFloat() * 0.8F + 0.1F;
while(itemstack.stackSize > 0) {
int j1 = this.dropRandom.nextInt(21) + 10;
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
itemstack.stackSize -= j1;
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + 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.dropRandom.nextGaussian() * f3;
entityitem.motionY = (float) this.dropRandom.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float) this.dropRandom.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
}
}
}
world.func_147453_f(x, y, z, block);
}
super.breakBlock(world, x, y, z, block, meta);
}
}

View File

@ -153,6 +153,7 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
this.deltaLastSecond = Math.max(nbt.getLong("deltaS"), 0);
}
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_fluid_gauge";
}

View File

@ -36,6 +36,7 @@ public class GeneralConfig {
public static boolean enableSteamParticles = true;
public static boolean enableSoundExtension = true;
public static boolean enableMekanismChanges = true;
public static int normalSoundChannels = 200;
public static int hintPos = 0;
public static boolean enableExpensiveMode = false;
@ -105,6 +106,9 @@ public class GeneralConfig {
enableSteamParticles = config.get(CATEGORY_GENERAL, "1.38_enableSteamParticles", true, "If disabled, auxiliary cooling towers and large cooling towers will not emit steam particles when in use.").getBoolean(true);
enableSoundExtension = config.get(CATEGORY_GENERAL, "1.39_enableSoundExtension", true, "If enabled, will change the limit for how many sounds can play at once.").getBoolean(true);
enableMekanismChanges = config.get(CATEGORY_GENERAL, "1.40_enableMekanismChanges", true, "If enabled, will change some of Mekanism's recipes.").getBoolean(true);
normalSoundChannels = CommonConfig.createConfigInt(config, CATEGORY_GENERAL, "1.41_normalSoundChannels",
"The amount of channels to create while 1.39_enableSoundExtension is enabled.\n" +
"Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100);
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);

View File

@ -33,6 +33,7 @@ public class WorldConfig {
public static int bedrockOilSpawn = 200;
public static int meteoriteSpawn = 500;
public static boolean newBedrockOres = true;
public static int bedrockIronSpawn = 100;
public static int bedrockCopperSpawn = 200;
public static int bedrockBoraxSpawn = 50;
@ -154,6 +155,7 @@ public class WorldConfig {
bedrockOilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.22_bedrockOilSpawnRate", "Spawns a bedrock oil node every nTH chunk", 200);
meteoriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.23_meteoriteSpawnRate", "Spawns a fallen meteorite every nTH chunk", 200);
newBedrockOres = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.NB_newBedrockOres", "Enables the newer genreric bedrock ores", true);
bedrockIronSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B00_bedrockIronWeight", "Spawn weight for iron bedrock ore", 100);
bedrockCopperSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B01_bedrockCopperWeight", "Spawn weight for copper bedrock ore", 200);
bedrockBoraxSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.B02_bedrockBoraxWeight", "Spawn weight for borax bedrock ore", 50);

View File

@ -33,6 +33,7 @@ public class PowderRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_semtex_mix, 1), new Object[] { ModItems.solid_fuel, ModItems.ballistite, KNO.dust() });
CraftingManager.addShapelessAuto(new ItemStack(Items.clay_ball, 4), new Object[] { KEY_SAND, ModItems.dust, ModItems.dust, Fluids.WATER.getDict(1_000) });
CraftingManager.addShapelessAuto(new ItemStack(Items.clay_ball, 4), new Object[] { Blocks.clay }); //clay uncrafting because placing and breaking it isn't worth anyone's time
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_cement, 4), new Object[] { LIMESTONE.dust(), Items.clay_ball, Items.clay_ball, Items.clay_ball });
//Other
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_steel_dusted, 1), new Object[] { STEEL.ingot(), COAL.dust() });
@ -67,6 +68,7 @@ public class PowderRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 2), new Object[] { COAL.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 4), new Object[] { F.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 8), new Object[] { PB.dust(), S.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 12), new Object[] { LIMESTONE.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 12), new Object[] { CA.dust(), KEY_SAND });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 16), new Object[] { BORAX.dust(), KEY_SAND });

View File

@ -131,7 +131,7 @@ public class ToolRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModBlocks.geiger), new Object[] { ModItems.geiger_counter });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.digamma_diagnostic), new Object[] { ModItems.geiger_counter, PO210.billet(), ASBESTOS.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pollution_detector, 1), new Object[] { "SFS", "SCS", " S ", 'S', STEEL.plate(), 'F', ModItems.filter_coal, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ore_density_scanner, 1), new Object[] { "VVV", "CSC", "GGG", " S ", 'V', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_CHASSIS), 'G', GOLD.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ore_density_scanner, 1), new Object[] { "VVV", "CSC", "GGG", 'V', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_CHASSIS), 'G', GOLD.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', ANY_PLASTIC.ingot(), 'S', STEEL.plate() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.coltan_tool, 1), new Object[] { "ACA", "CXC", "ACA", 'A', ALLOY.ingot(), 'C', CINNABAR.crystal(), 'X', Items.compass });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.reacher, 1), new Object[] { "BIB", "P P", "B B", 'B', W.bolt(), 'I', W.ingot(), 'P', ANY_RUBBER.ingot() });

View File

@ -4,8 +4,10 @@ import com.hbm.entity.logic.IChunkLoader;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -29,6 +31,30 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
super(world);
}
@Override
public boolean hitByEntity(Entity attacker) {
if(attacker instanceof EntityPlayer && !worldObj.isRemote) {
this.setDead();
for (ItemStack stack : slots) {
if(stack != null)
this.entityDropItem(stack, 1F);
}
int meta = 0;
//whether it is an express drone
if(this.dataWatcher.getWatchableObjectByte(11) == 1)
meta = 2;
if(chunkLoading)
meta += 1;
this.entityDropItem(new ItemStack(ModItems.drone, 1, meta), 1F);
}
return false;
}
@Override
protected void entityInit() {
super.entityInit();
@ -53,7 +79,7 @@ public class EntityDeliveryDrone extends EntityDroneBase implements IInventory,
@Override
public double getSpeed() {
return this.dataWatcher.getWatchableObjectByte(11) == 1 ? 0.375 : 0.125;
return this.dataWatcher.getWatchableObjectByte(11) == 1 ? 0.375 * 3 : 0.375;
}
@Override

View File

@ -112,7 +112,9 @@ public abstract class EntityDroneBase extends Entity {
this.motionZ = dist.zCoord * speed;
}
}
if(isCollidedHorizontally){
motionY += 1;
}
this.moveEntity(motionX, motionY, motionZ);
}
}

View File

@ -13,10 +13,13 @@ import com.hbm.tileentity.network.TileEntityDroneProvider;
import com.hbm.tileentity.network.TileEntityDroneRequester;
import com.hbm.util.fauxpointtwelve.BlockPos;
import net.minecraft.entity.Entity;
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.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -30,6 +33,25 @@ public class EntityRequestDrone extends EntityDroneBase {
UNLOAD, DOCK
}
@Override
public void setTarget(double x, double y, double z) {
this.targetX = x;
this.targetY = y + 1;
this.targetZ = z;
}
@Override
public boolean hitByEntity(Entity attacker) {
if(attacker instanceof EntityPlayer && !worldObj.isRemote) {
this.setDead();
if(heldItem != null)
this.entityDropItem(heldItem, 1F);
this.entityDropItem(new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal()), 1F);
}
return false;
}
public EntityRequestDrone(World world) {
super(world);
}
@ -61,78 +83,114 @@ public class EntityRequestDrone extends EntityDroneBase {
} else if(next instanceof AStack && heldItem == null) {
AStack aStack = (AStack) next;
TileEntity tile = worldObj.getTileEntity((int) Math.floor(posX), (int) Math.floor(posY - 1), (int) Math.floor(posZ));
if(tile instanceof TileEntityDroneProvider) {
TileEntityDroneProvider provider = (TileEntityDroneProvider) tile;
for(int i = 0; i < provider.slots.length; i++) {
ItemStack stack = provider.slots[i];
if(stack != null && aStack.matchesRecipe(stack, true)) {
this.heldItem = stack.copy();
this.setAppearance(1);
worldObj.playSoundEffect(posX, posY, posZ, "hbm:item.unpack", 0.5F, 0.75F);
provider.slots[i] = null;
provider.markDirty();
break;
//to make DAMN sure this fuckin idiot doesnt miss the dock
Vec3 pos = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 nextPos = Vec3.createVectorHelper(this.posX, this.posY - 4, this.posZ);
MovingObjectPosition mop = this.worldObj.rayTraceBlocks(pos, nextPos);
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
TileEntity tile = worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (tile instanceof TileEntityDroneProvider) {
TileEntityDroneProvider provider = (TileEntityDroneProvider) tile;
for (int i = 0; i < provider.slots.length; i++) {
ItemStack stack = provider.slots[i];
if (stack != null && aStack.matchesRecipe(stack, true)) {
this.heldItem = stack.copy();
this.setAppearance(1);
worldObj.playSoundEffect(posX, posY, posZ, "hbm:item.unpack", 0.5F, 0.75F);
provider.slots[i] = null;
provider.markDirty();
break;
}
}
}
}
nextActionTimer = 5;
} else if(next == DroneProgram.UNLOAD && this.heldItem != null) {
TileEntity tile = worldObj.getTileEntity((int) Math.floor(posX), (int) Math.floor(posY - 1), (int) Math.floor(posZ));
if(tile instanceof TileEntityDroneRequester) {
TileEntityDroneRequester requester = (TileEntityDroneRequester) tile;
for(int i = 9; i < 18; i++) {
ItemStack stack = requester.slots[i];
if(stack != null && stack.getItem() == heldItem.getItem() && stack.getItemDamage() == heldItem.getItemDamage()) {
int toTransfer = Math.min(stack.getMaxStackSize() - stack.stackSize, heldItem.stackSize);
requester.slots[i].stackSize += toTransfer;
this.heldItem.stackSize -= toTransfer;
Vec3 pos = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 nextPos = Vec3.createVectorHelper(this.posX, this.posY - 4, this.posZ);
MovingObjectPosition mop = this.worldObj.rayTraceBlocks(pos, nextPos);
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
TileEntity tile = worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (tile instanceof TileEntityDroneRequester) {
TileEntityDroneRequester requester = (TileEntityDroneRequester) tile;
for (int i = 9; i < 18; i++) {
ItemStack stack = requester.slots[i];
if (stack != null && stack.getItem() == heldItem.getItem() && stack.getItemDamage() == heldItem.getItemDamage()) {
int toTransfer = Math.min(stack.getMaxStackSize() - stack.stackSize, heldItem.stackSize);
requester.slots[i].stackSize += toTransfer;
this.heldItem.stackSize -= toTransfer;
}
}
}
if(this.heldItem.stackSize <= 0) this.heldItem = null;
if(this.heldItem != null) for(int i = 9; i < 18; i++) {
if(requester.slots[i] == null) {
requester.slots[i] = this.heldItem.copy();
this.heldItem = null;
break;
if (this.heldItem.stackSize <= 0) this.heldItem = null;
if (this.heldItem != null) for (int i = 9; i < 18; i++) {
if (requester.slots[i] == null) {
requester.slots[i] = this.heldItem.copy();
this.heldItem = null;
break;
}
}
if (this.heldItem == null) {
this.setAppearance(0);
worldObj.playSoundEffect(posX, posY, posZ, "hbm:item.unpack", 0.5F, 0.75F);
}
requester.markDirty();
}
if(this.heldItem == null) {
this.setAppearance(0);
worldObj.playSoundEffect(posX, posY, posZ, "hbm:item.unpack", 0.5F, 0.75F);
}
requester.markDirty();
}
nextActionTimer = 5;
} else if(next == DroneProgram.DOCK) {
TileEntity tile = worldObj.getTileEntity((int) Math.floor(posX), (int) Math.floor(posY - 1), (int) Math.floor(posZ));
if(tile instanceof TileEntityDroneDock) {
TileEntityDroneDock dock = (TileEntityDroneDock) tile;
for(int i = 0; i < dock.slots.length; i++) {
if(dock.slots[i] == null) {
this.setDead();
dock.slots[i] = new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal());
this.worldObj.playSoundEffect(dock.xCoord + 0.5, dock.yCoord + 0.5, dock.zCoord + 0.5, "hbm:block.storageClose", 2.0F, 1.0F);
break;
Vec3 pos = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
Vec3 nextPos = Vec3.createVectorHelper(this.posX, this.posY - 4, this.posZ);
MovingObjectPosition mop = this.worldObj.rayTraceBlocks(pos, nextPos);
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
TileEntity tile = worldObj.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (tile instanceof TileEntityDroneDock) {
TileEntityDroneDock dock = (TileEntityDroneDock) tile;
ItemStack drone = new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal());
for (int i = 0; i < dock.slots.length; i++) {
if (dock.slots[i] == null) {
this.setDead();
if(heldItem != null){
if(i != 9 && dock.slots[i + 1] == null){
dock.slots[i + 1] = heldItem.copy();
}
}
dock.slots[i] = drone.copy();
this.worldObj.playSoundEffect(dock.xCoord + 0.5, dock.yCoord + 0.5, dock.zCoord + 0.5, "hbm:block.storageClose", 2.0F, 1.0F);
break;
} else if (dock.slots[i].isItemEqual(drone) && dock.slots[i].stackSize < 64){
this.setDead();
if(heldItem != null){
if(i != 9 && dock.slots[i + 1] == null){
dock.slots[i + 1] = heldItem.copy();
}
}
dock.slots[i].stackSize++;
this.worldObj.playSoundEffect(dock.xCoord + 0.5, dock.yCoord + 0.5, dock.zCoord + 0.5, "hbm:block.storageClose", 2.0F, 1.0F);
break;
}
}
}
}
if(!this.isDead) {
if (!this.isDead) {
this.setDead();
if(heldItem != null)
this.entityDropItem(heldItem, 1F);
this.entityDropItem(new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal()), 1F);
}
}
}
}
@ -141,7 +199,7 @@ public class EntityRequestDrone extends EntityDroneBase {
@Override
public double getSpeed() {
return 0.5D;
return 0.6D;
}
@Override

View File

@ -60,7 +60,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
((EntityPlayer)player).triggerAchievement(MainRegistry.achManhattan);
}
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10 && strength >= 75) {
radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2);
}

View File

@ -64,7 +64,6 @@ public class EntityCreeperNuclear extends EntityCreeper {
@Override
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) {
super.dropFewItems(p_70628_1_, p_70628_2_);
if(rand.nextInt(3) == 0)

View File

@ -67,6 +67,7 @@ public class CompatHandler {
* @return String
*/
@Override
@Optional.Method(modid = "OpenComputers")
default String getComponentName() {
return "ntm_null";
}
@ -77,6 +78,7 @@ public class CompatHandler {
* @return If the side should be able to connect.
*/
@Override
@Optional.Method(modid = "OpenComputers")
default boolean canConnectNode(ForgeDirection side) {
return true;
}
@ -85,9 +87,11 @@ public class CompatHandler {
* Function to give more information when analyzing the block. Multiple entries in the array will be sent to the user in the order of the array.
* @return Additional text to add in the form of lang entries (ex: "analyze.basic2").
*/
@Optional.Method(modid = "OpenComputers")
default String[] getExtraInfo() {return new String[] {"analyze.noInfo"};}
@Override
@Optional.Method(modid = "OpenComputers")
default Node[] onAnalyze(EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
player.addChatComponentMessage(new ChatComponentTranslation("analyze.basic1").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
player.addChatComponentMessage(new ChatComponentTranslation("analyze.basic2").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
@ -99,7 +103,7 @@ public class CompatHandler {
player.addChatComponentMessage(new ChatComponentTranslation(info).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
}
TileEntity te = (TileEntity) this;
if(Array.getLength(this.methods()) == 0 && te instanceof TileEntityProxyCombo || this.getComponentName().equals("ntm_null"))
if((Array.getLength(this.methods()) == 0 && te instanceof TileEntityProxyCombo) || this.getComponentName().equals("ntm_null"))
player.addChatComponentMessage(new ChatComponentTranslation("analyze.error").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
return null;
}
@ -109,6 +113,7 @@ public class CompatHandler {
* @return Array of methods to expose to the computer.
*/
@Override
@Optional.Method(modid = "OpenComputers")
default String[] methods() {return new String[0];}
/**
@ -116,6 +121,7 @@ public class CompatHandler {
* @return Data to the computer as a return from the function.
*/
@Override
@Optional.Method(modid = "OpenComputers")
default Object[] invoke(String method, Context context, Arguments args) throws Exception {return null;}
}
}

View File

@ -234,6 +234,28 @@ public abstract class NEIUniversalHandler extends TemplateRecipeHandler implemen
{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, 32}, {120, 32},
};
case 7: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 32}, {120, 32},
{138, 24},
};
case 8: return new int[][] {
{102, 6}, {120, 6},
{102, 24}, {120, 24},
{102, 32}, {120, 32},
{138, 24}, {138, 32},
};
}
return new int[count][2];

View File

@ -168,6 +168,8 @@ public class OreDictManager {
public static final DictFrame BBRONZE = new DictFrame("BismuthBronze");
/** ARSENIC BRONZE */
public static final DictFrame ABRONZE = new DictFrame("ArsenicBronze");
/** BISMUTH STRONTIUM CALCIUM COPPER OXIDE */
public static final DictFrame BSCCO = new DictFrame("BSCCO");
/** LEAD */
public static final DictFrame PB = new DictFrame("Lead");
public static final DictFrame BI = new DictFrame("Bismuth");
@ -229,6 +231,7 @@ public class OreDictManager {
public static final DictFrame VOLCANIC = new DictFrame("Volcanic");
public static final DictFrame HEMATITE = new DictFrame("Hematite");
public static final DictFrame MALACHITE = new DictFrame("Malachite");
public static final DictFrame LIMESTONE = new DictFrame("Limestone");
public static final DictFrame SLAG = new DictFrame("Slag");
/*
* HAZARDS, MISC
@ -280,6 +283,7 @@ public class OreDictManager {
/*
* FISSION FRAGMENTS
*/
public static final DictFrame SR = new DictFrame("Strontium");
public static final DictFrame SR90 = new DictFrame("Strontium90", "Sr90");
public static final DictFrame I131 = new DictFrame("Iodine131", "I131");
public static final DictFrame XE135 = new DictFrame("Xenon135", "Xe135");
@ -375,6 +379,7 @@ public class OreDictManager {
CDALLOY .ingot(ingot_cdalloy) .block(block_cdalloy);
BBRONZE .ingot(ingot_bismuth_bronze);
ABRONZE .ingot(ingot_arsenic_bronze);
BSCCO .ingot(ingot_bscco);
PB .nugget(nugget_lead) .ingot(ingot_lead) .dust(powder_lead) .plate(plate_lead) .block(block_lead) .ore(ore_lead);
BI .nugget(nugget_bismuth) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth) .block(block_bismuth);
AS .nugget(nugget_arsenic) .ingot(ingot_arsenic);
@ -427,6 +432,7 @@ public class OreDictManager {
VOLCANIC .gem(gem_volcanic) .ore(DictFrame.fromOne(ore_basalt, EnumBasaltOreType.GEM));
HEMATITE .ore(fromOne(stone_resource, EnumStoneType.HEMATITE));
MALACHITE .ore(fromOne(stone_resource, EnumStoneType.MALACHITE));
LIMESTONE .dust(powder_limestone) .ore(fromOne(stone_resource, EnumStoneType.LIMESTONE));
SLAG .block(block_slag);
/*
@ -472,6 +478,7 @@ public class OreDictManager {
/*
* FISSION FRAGMENTS
*/
SR .hot(1F) .hydro(1F) .dust(powder_strontium);
SR90 .rad(HazardRegistry.sr90) .hot(1F) .hydro(1F) .dustSmall(powder_sr90_tiny) .dust(powder_sr90) .ingot(ingot_sr90) .billet(billet_sr90) .nugget(nugget_sr90);
I131 .rad(HazardRegistry.i131) .hot(1F) .dustSmall(powder_i131_tiny) .dust(powder_i131);
XE135 .rad(HazardRegistry.xe135) .hot(10F) .dustSmall(powder_xe135_tiny) .dust(powder_xe135);

View File

@ -1,12 +1,17 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotCraftingOutput;
import com.hbm.items.ModItems;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.items.machine.ItemMachineUpgrade;
import com.hbm.tileentity.machine.TileEntityMachineOreSlopper;
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.Slot;
import net.minecraft.item.ItemStack;
public class ContainerOreSlopper extends Container {
@ -29,8 +34,8 @@ public class ContainerOreSlopper extends Container {
this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 7, 134, 54));
this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 8, 152, 54));
//Upgrades
this.addSlotToContainer(new Slot(slopper, 0, 62, 72));
this.addSlotToContainer(new Slot(slopper, 0, 80, 72));
this.addSlotToContainer(new Slot(slopper, 9, 62, 72));
this.addSlotToContainer(new Slot(slopper, 10, 80, 72));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
@ -43,6 +48,52 @@ public class ContainerOreSlopper extends Container {
}
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int par2) {
ItemStack var3 = null;
Slot var4 = (Slot) this.inventorySlots.get(par2);
if(var4 != null && var4.getHasStack()) {
ItemStack var5 = var4.getStack();
var3 = var5.copy();
if(par2 <= 10) {
if(!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true)) {
return null;
}
} else {
if(var3.getItem() == ModItems.bedrock_ore_base) {
if(!this.mergeItemStack(var5, 2, 3, false)) {
return null;
}
} else if(var3.getItem() instanceof ItemMachineUpgrade) {
if(!this.mergeItemStack(var5, 9, 11, false)) {
return null;
}
} else if(var3.getItem() instanceof IItemFluidIdentifier) {
if(!this.mergeItemStack(var5, 1, 2, false)) {
return null;
}
} else if(var3.getItem() instanceof IBatteryItem || var3.getItem() == ModItems.battery_creative) {
if(!this.mergeItemStack(var5, 0, 1, false)) {
return null;
}
} else {
return null;
}
}
if(var5.stackSize == 0) {
var4.putStack((ItemStack) null);
} else {
var4.onSlotChanged();
}
}
return var3;
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return slopper.isUseableByPlayer(player);

View File

@ -494,6 +494,7 @@ public class Fluids {
metaOrder.add(SEEDSLURRY);
metaOrder.add(COLLOID);
metaOrder.add(VITRIOL);
metaOrder.add(SLOP);
metaOrder.add(IONGEL);
metaOrder.add(PEROXIDE);
metaOrder.add(SULFURIC_ACID);

View File

@ -354,7 +354,7 @@ public class GUIAnvil extends GuiContainer {
for(AStack stack : recipe.input) {
if(stack instanceof ComparableStack) {
ItemStack input = ((ComparableStack) stack).toStack();
list.add(input.getDisplayName().toLowerCase(Locale.US));
try { list.add(input.getDisplayName().toLowerCase(Locale.US)); } catch(Exception ex) { list.add("I AM ERROR"); }
} else if(stack instanceof OreDictStack) {
OreDictStack input = (OreDictStack) stack;
@ -362,9 +362,8 @@ public class GUIAnvil extends GuiContainer {
if(ores.size() > 0) {
for(ItemStack ore : ores) {
list.add(ore.getDisplayName().toLowerCase(Locale.US));
try { list.add(ore.getDisplayName().toLowerCase(Locale.US)); } catch(Exception ex) { list.add("I AM ERROR"); }
}
}
}
}

View File

@ -23,12 +23,21 @@ public class GUIOreSlopper extends GuiInfoContainer {
this.xSize = 176;
this.ySize = 204;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
slopper.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 18, 34, 52);
slopper.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 18, 16, 52);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 18, 16, 52, slopper.power, slopper.maxPower);
}
@Override
protected void drawGuiContainerForegroundLayer( int i, int j) {
String name = this.slopper.hasCustomInventoryName() ? this.slopper.getInventoryName() : I18n.format(this.slopper.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2 - 9, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}
@ -37,5 +46,17 @@ public class GUIOreSlopper extends GuiInfoContainer {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
int i = (int) (slopper.progress * 35);
drawTexturedModalRect(guiLeft + 62, guiTop + 52 - i, 176, 34 - i, 34, i);
int j = (int) (slopper.power * 52 / slopper.maxPower);
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 176, 86 - j, 16, j);
if(slopper.power >= slopper.consumption)
drawTexturedModalRect(guiLeft + 12, guiTop + 4, 202, 34, 9, 12);
slopper.tanks[0].renderTank(guiLeft + 26, guiTop + 70, this.zLevel, 16, 52);
slopper.tanks[1].renderTank(guiLeft + 116, guiTop + 70, this.zLevel, 16, 52);
}
}

View File

@ -90,7 +90,7 @@ public class Mats {
public static final NTMMaterial MAT_PB209 = makeSmeltable(8209, PB209, 0x7B535D).setShapes(NUGGET, BILLET, INGOT, DUST).m();
public static final NTMMaterial MAT_SCHRABIDIUM = makeSmeltable(12626, SA326, 0x32FFFF, 0x005C5C, 0x32FFFF).setShapes(NUGGET, WIRE, BILLET, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_SOLINIUM = makeSmeltable(12627, SA327, 0xA2E6E0, 0x00433D, 0x72B6B0).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
public static final NTMMaterial MAT_SCHRABIDATE = makeSmeltable(12600, SBD, 0x77C0D7, 0x39005E, 0x6589B4).setShapes(INGOT, DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_SCHRABIDATE = makeSmeltable(12600, SBD, 0x77C0D7, 0x39005E, 0x6589B4).setShapes(INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
public static final NTMMaterial MAT_SCHRARANIUM = makeSmeltable(12601, SRN, 0x2B3227, 0x2B3227, 0x24AFAC).setShapes(INGOT, BLOCK).m();
public static final NTMMaterial MAT_GHIORSIUM = makeSmeltable(12836, GH336, 0xF4EFE1, 0x2A3306, 0xC6C6A1).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
@ -111,6 +111,7 @@ public class Mats {
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(DUSTTINY, INGOT, DUST, BLOCK).m();
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(NUGGET, WIRE, DUSTTINY, BILLET, INGOT, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(DUST).m();
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(DUST).m();
public static final NTMMaterial MAT_CALCIUM = makeSmeltable(2000, CA, 0xCFCFA6, 0x747F6E, 0xB7B784).setShapes(INGOT, DUST).m();
public static final NTMMaterial MAT_LITHIUM = makeSmeltable(300, LI, 0xFFFFFF, 0x818181, 0xD6D6D6).setShapes(INGOT, DUST, BLOCK).m();
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(INGOT, DUST).m();
@ -130,6 +131,7 @@ public class Mats {
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setShapes(INGOT, CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT).m();
public static final NTMMaterial MAT_BBRONZE = makeSmeltable(_AS + 16, BBRONZE, 0xE19A69, 0x485353, 0x987D65).setShapes(INGOT, CASTPLATE).m();
public static final NTMMaterial MAT_ABRONZE = makeSmeltable(_AS + 17, ABRONZE, 0xDB9462, 0x203331, 0x77644D).setShapes(INGOT, CASTPLATE).m();
public static final NTMMaterial MAT_BSCCO = makeSmeltable(_AS + 18, BSCCO, 0x767BF1, 0x000000, 0x5E62C0).setShapes(INGOT, DENSEWIRE).m();
public static final NTMMaterial MAT_MAGTUNG = makeSmeltable(_AS + 8, MAGTUNG, 0x22A2A2, 0x0F0F0F, 0x22A2A2).setShapes(WIRE, INGOT, DUST, DENSEWIRE, BLOCK).m();
public static final NTMMaterial MAT_CMB = makeSmeltable(_AS + 9, CMB, 0x6F6FB4, 0x000011, 0x6F6FB4).setShapes(INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK).m();
public static final NTMMaterial MAT_DNT = makeSmeltable(_AS + 15, DNT, 0x7582B9, 0x16000E, 0x455289).setShapes(INGOT, DUST, DENSEWIRE, BLOCK).m();

View File

@ -35,8 +35,10 @@ import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraftforge.oredict.OreDictionary;
public class ArcFurnaceRecipes extends SerializableRecipe {
public static HashMap<AStack, ArcFurnaceRecipe> recipes = new HashMap();
public static HashMap<ComparableStack, ArcFurnaceRecipe> fastCacheSolid = new HashMap();
public static HashMap<ComparableStack, ArcFurnaceRecipe> fastCacheLiquid = new HashMap();
@Override
public void registerDefaults() {
@ -56,11 +58,11 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
for(BedrockOreType type : BedrockOreType.values()) {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 2)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 3)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 4)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type, 2)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type, 3)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type, 4)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type, 2)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type, 3)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type, 4)));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(5)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(2))));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(5))));
@ -149,15 +151,24 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
}
}
ComparableStack cacheKey = new ComparableStack(stack).makeSingular();
if(!liquid && fastCacheSolid.containsKey(cacheKey)) return fastCacheSolid.get(cacheKey);
if(liquid && fastCacheLiquid.containsKey(cacheKey)) return fastCacheLiquid.get(cacheKey);
for(Entry<AStack, ArcFurnaceRecipe> entry : recipes.entrySet()) {
if(entry.getKey().matchesRecipe(stack, true)) {
ArcFurnaceRecipe rec = entry.getValue();
if((liquid && rec.fluidOutput != null) || (!liquid && rec.solidOutput != null)) {
if(!liquid) fastCacheSolid.put(cacheKey, rec);
if(liquid) fastCacheLiquid.put(cacheKey, rec);
return rec;
}
}
}
if(!liquid) fastCacheSolid.put(cacheKey, null);
if(liquid) fastCacheLiquid.put(cacheKey, null);
return null;
}
@ -199,6 +210,8 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
@Override
public void deleteRecipes() {
recipes.clear();
fastCacheSolid.clear();
fastCacheLiquid.clear();
}
@Override

View File

@ -42,6 +42,8 @@ public class ArcWelderRecipes extends SerializableRecipe {
new OreDictStack(AL.plate(), 4), new OreDictStack(FIBER.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot())));
recipes.add(new ArcWelderRecipe(DictFrame.fromOne(ModItems.part_generic, EnumPartType.LDE), 200, 10_000L,
new OreDictStack(TI.plate(), 2), new OreDictStack(FIBER.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot())));
recipes.add(new ArcWelderRecipe(DictFrame.fromOne(ModItems.part_generic, EnumPartType.HDE), 600, 25_000_000L, new FluidStack(Fluids.STELLAR_FLUX, 4_000),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 2), new OreDictStack(CMB.plateWelded(), 1), new ComparableStack(ModItems.ingot_cft)));
//Dense Wires
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_ALLOY.id), 100, 10_000L,

View File

@ -466,6 +466,13 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)
}, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_ore_slopper, 1), new AStack[] {
new OreDictStack(STEEL.plateCast(), 6),
new OreDictStack(TI.plate(), 8),
new OreDictStack(CU.pipe(), 3),
new ComparableStack(ModItems.motor, 3),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)
}, 200);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.STEEL.ordinal()), new AStack[] {
new OreDictStack(STEEL.ingot(), 12),
new OreDictStack(W.ingot(), 4)
@ -632,18 +639,12 @@ public class AssemblerRecipes extends SerializableRecipe {
}, 1200);
makeRecipe(new ComparableStack(ModItems.sat_gerald, 1), new AStack[] {
new ComparableStack(ModItems.burnt_bark, 1),
new ComparableStack(ModItems.combine_scrap, 1),
new ComparableStack(ModItems.crystal_horn, 1),
new ComparableStack(ModItems.crystal_charred, 1),
new ComparableStack(ModBlocks.pink_log, 1),
new ComparableStack(ModItems.mp_warhead_15_balefire, 1),
new ComparableStack(ModBlocks.det_nuke, 16),
new OreDictStack(STAR.ingot(), 32),
new ComparableStack(ModItems.coin_creeper, 1),
new ComparableStack(ModItems.coin_radiation, 1),
new ComparableStack(ModItems.coin_maskman, 1),
new ComparableStack(ModItems.coin_worm, 1),
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[] {
@ -1077,8 +1078,8 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 16),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16),
new OreDictStack(SBD.wireDense(), 32),
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.QUANTUM),
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_icf_press, 1), new AStack[] {
new OreDictStack(GOLD.plateCast(), 8),

View File

@ -518,9 +518,9 @@ public class CentrifugeRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), new ItemStack(Blocks.gravel)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), new ItemStack(Blocks.gravel)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type), ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type, 2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type, 2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type, 2), ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type, 2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
@ -530,20 +530,9 @@ public class CentrifugeRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1, 2), ItemBedrockOreNew.extract(type.byproductAcid2, 2), ItemBedrockOreNew.extract(type.byproductAcid3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1, 2), ItemBedrockOreNew.extract(type.byproductSolvent2, 2), ItemBedrockOreNew.extract(type.byproductSolvent3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1, 2), ItemBedrockOreNew.extract(type.byproductRad2, 2), ItemBedrockOreNew.extract(type.byproductRad3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1, 1), ItemBedrockOreNew.extract(type.byproductAcid2, 1), ItemBedrockOreNew.extract(type.byproductAcid3, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1, 1), ItemBedrockOreNew.extract(type.byproductSolvent2, 1), ItemBedrockOreNew.extract(type.byproductSolvent3, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1, 1), ItemBedrockOreNew.extract(type.byproductRad2, 1), ItemBedrockOreNew.extract(type.byproductRad3, 1), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)});
}
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");

View File

@ -184,12 +184,14 @@ public class ChemplantRecipes extends SerializableRecipe {
.outputItems(new ItemStack(ModItems.plate_kevlar, 4)));
recipes.add(new ChemRecipe(55, "CONCRETE", 100)
.inputItems(
new ComparableStack(ModItems.powder_cement, 1),
new ComparableStack(Blocks.gravel, 8),
new OreDictStack(KEY_SAND, 8))
.inputFluids(new FluidStack(Fluids.WATER, 2000))
.outputItems(new ItemStack(ModBlocks.concrete_smooth, 16)));
recipes.add(new ChemRecipe(56, "CONCRETE_ASBESTOS", 100)
.inputItems(
new ComparableStack(ModItems.powder_cement, 1),
new ComparableStack(Blocks.gravel, 2),
new OreDictStack(KEY_SAND, 2),
(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) ?
@ -199,9 +201,10 @@ public class ChemplantRecipes extends SerializableRecipe {
.outputItems(new ItemStack(ModBlocks.concrete_asbestos, 16)));
recipes.add(new ChemRecipe(79, "DUCRETE", 150)
.inputItems(
new ComparableStack(ModItems.powder_cement, 4),
new ComparableStack(Blocks.gravel, 2),
new OreDictStack(KEY_SAND, 8),
new OreDictStack(U238.billet(), 2),
new ComparableStack(Items.clay_ball, 4))
new OreDictStack(U238.billet(), 2))
.inputFluids(new FluidStack(Fluids.WATER, 2000))
.outputItems(new ItemStack(ModBlocks.ducrete_smooth, 8)));
recipes.add(new ChemRecipe(57, "SOLID_FUEL", 200)
@ -409,7 +412,7 @@ public class ChemplantRecipes extends SerializableRecipe {
.outputFluids(new FluidStack(1000, Fluids.LPG)));
recipes.add(new ChemRecipe(34, "OIL_SAND", 200)
.inputItems(new ComparableStack(ModBlocks.ore_oil_sand, 16), new OreDictStack(ANY_TAR.any(), 1))
.outputItems(new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4))
.outputItems(new ItemStack(Blocks.sand, 16))
.outputFluids(new FluidStack(1000, Fluids.BITUMEN)));
recipes.add(new ChemRecipe(35, "ASPHALT", 100)
.inputItems(new ComparableStack(Blocks.gravel, 2), new ComparableStack(Blocks.sand, 6))

View File

@ -64,6 +64,8 @@ public class CokerRecipes extends SerializableRecipe {
registerRecipe(CALCIUM_SOLUTION, 125, new ItemStack(ModItems.powder_calcium), new FluidStack(SPENTSTEAM, 100));
//only cokable gas to extract sulfur content
registerRecipe(SOURGAS, 250, new ItemStack(ModItems.sulfur), new FluidStack(GAS_COKER, 150));
registerRecipe(SLOP, 1000, new ItemStack(ModItems.powder_limestone), new FluidStack(COLLOID, 250));
registerRecipe(VITRIOL, 4000, new ItemStack(ModItems.powder_iron), new FluidStack(SULFURIC_ACID, 500));
}
private static void registerAuto(FluidType fluid, FluidType type) {

View File

@ -54,6 +54,7 @@ public class CombinationRecipes extends SerializableRecipe {
recipes.put(SODALITE.gem(), new Pair(new ItemStack(ModItems.powder_sodium), new FluidStack(Fluids.CHLORINE, 100)));
recipes.put(new ComparableStack(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.BAUXITE)), new Pair(new ItemStack(ModItems.ingot_aluminium, 2), new FluidStack(Fluids.REDMUD, 250)));
recipes.put(NA.dust(), new Pair(null, new FluidStack(Fluids.SODIUM, 100)));
recipes.put(LIMESTONE.dust(), new Pair(new ItemStack(ModItems.powder_calcium), new FluidStack(Fluids.CARBONDIOXIDE, 50)));
recipes.put(KEY_LOG, new Pair(new ItemStack(Items.coal, 1 ,1), new FluidStack(Fluids.WOODOIL, 250)));
recipes.put(KEY_SAPLING, new Pair(DictFrame.fromOne(ModItems.powder_ash, EnumAshType.WOOD), new FluidStack(Fluids.WOODOIL, 50)));

View File

@ -112,6 +112,10 @@ public class CrucibleRecipes extends SerializableRecipe {
.inputs(new MaterialStack(Mats.MAT_TUNGSTEN, i), new MaterialStack(Mats.MAT_SCHRABIDIUM, n * 1))
.outputs(new MaterialStack(Mats.MAT_MAGTUNG, i)));
recipes.add(new CrucibleRecipe(17, "crucible.bscco", 3, new ItemStack(ModItems.ingot_bscco))
.inputs(new MaterialStack(Mats.MAT_BISMUTH, n * 2), new MaterialStack(Mats.MAT_STRONTIUM, n * 2), new MaterialStack(Mats.MAT_CALCIUM, n * 2), new MaterialStack(Mats.MAT_COPPER, n * 3))
.outputs(new MaterialStack(Mats.MAT_BSCCO, i)));
registerMoldsForNEI();
}

View File

@ -46,6 +46,7 @@ public class CrystallizerRecipes extends SerializableRecipe {
//'Object' is either a ComparableStack or the key for the ore dict
private static HashMap<Pair<Object, FluidType>, CrystallizerRecipe> recipes = new HashMap();
private static HashMap<Object, Integer> amounts = new HashMap(); // for use in the partitioner
@Override
public void registerDefaults() {
@ -155,17 +156,20 @@ public class CrystallizerRecipes extends SerializableRecipe {
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
int sulf = 4;
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing).setReq(sulf), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing).setReq(sulf), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing).setReq(sulf), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
int solv = 4;
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing).setReq(solv), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing).setReq(solv), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing).setReq(solv), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250));
int rad = 4;
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing).setReq(rad), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing).setReq(rad), new FluidStack(Fluids.WATER, 250));
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing).setReq(rad), new FluidStack(Fluids.WATER, 250));
FluidStack primary = new FluidStack(Fluids.HYDROGEN, 250);
registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary);
@ -238,22 +242,41 @@ public class CrystallizerRecipes extends SerializableRecipe {
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
Pair compKey = new Pair(comp, type);
if(recipes.containsKey(compKey))
return recipes.get(compKey);
if(recipes.containsKey(compKey)) return recipes.get(compKey);
String[] dictKeys = comp.getDictKeys();
for(String key : dictKeys) {
Pair dictKey = new Pair(key, type);
if(recipes.containsKey(dictKey))
return recipes.get(dictKey);
if(recipes.containsKey(dictKey)) return recipes.get(dictKey);
}
comp.meta = OreDictionary.WILDCARD_VALUE;
if(recipes.containsKey(compKey)) return recipes.get(compKey);
return null;
}
public static int getAmount(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return 0;
ComparableStack comp = new ComparableStack(stack.getItem(), 1, stack.getItemDamage());
if(amounts.containsKey(comp)) return amounts.get(comp);
String[] dictKeys = comp.getDictKeys();
for(String key : dictKeys) {
if(amounts.containsKey(key)) return amounts.get(key);
}
comp.meta = OreDictionary.WILDCARD_VALUE;
if(amounts.containsKey(comp)) return amounts.get(comp);
return 0;
}
public static HashMap getRecipes() {
@ -289,6 +312,7 @@ public class CrystallizerRecipes extends SerializableRecipe {
public static void registerRecipe(Object input, CrystallizerRecipe recipe, FluidStack stack) {
recipe.acidAmount = stack.fill;
recipes.put(new Pair(input, stack.type), recipe);
amounts.put(input, recipe.itemAmount);
}
public static class CrystallizerRecipe {
@ -362,6 +386,7 @@ public class CrystallizerRecipes extends SerializableRecipe {
@Override
public void deleteRecipes() {
recipes.clear();
amounts.clear();
}
@Override

View File

@ -24,8 +24,10 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
@Override
public void registerDefaults() {
recipes.put(Fluids.WATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.HYDROGEN, 200), new FluidStack(Fluids.OXYGEN, 200)));
recipes.put(Fluids.HEAVYWATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.DEUTERIUM, 200), new FluidStack(Fluids.OXYGEN, 200)));
recipes.put(Fluids.WATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.HYDROGEN, 200), new FluidStack(Fluids.OXYGEN, 200), 10));
recipes.put(Fluids.HEAVYWATER, new ElectrolysisRecipe(2_000, new FluidStack(Fluids.DEUTERIUM, 200), new FluidStack(Fluids.OXYGEN, 200), 10));
recipes.put(Fluids.VITRIOL, new ElectrolysisRecipe(1_000, new FluidStack(Fluids.SULFURIC_ACID, 500), new FluidStack(Fluids.CHLORINE, 500), new ItemStack(ModItems.powder_iron), new ItemStack(ModItems.ingot_mercury)));
recipes.put(Fluids.SLOP, new ElectrolysisRecipe(1_000, new FluidStack(Fluids.MERCURY, 250), new FluidStack(Fluids.NONE, 0), new ItemStack(ModItems.niter, 2), new ItemStack(ModItems.powder_limestone, 2), new ItemStack(ModItems.sulfur)));
recipes.put(Fluids.POTASSIUM_CHLORIDE, new ElectrolysisRecipe(250, new FluidStack(Fluids.CHLORINE, 125), new FluidStack(Fluids.NONE, 0), new ItemStack(ModItems.dust)));
recipes.put(Fluids.CALCIUM_CHLORIDE, new ElectrolysisRecipe(250, new FluidStack(Fluids.CHLORINE, 125), new FluidStack(Fluids.CALCIUM_SOLUTION, 125)));
@ -49,6 +51,11 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
return recipes;
}
public static ElectrolysisRecipe getRecipe(FluidType type) {
if(type == null)
return null;
return recipes.get(type);
}
@Override
public String getFileName() {
@ -73,10 +80,13 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
FluidStack output1 = this.readFluidStack(obj.get("output1").getAsJsonArray());
FluidStack output2 = this.readFluidStack(obj.get("output2").getAsJsonArray());
int duration = 20;
if(obj.has("duraion")) duration = obj.get("duration").getAsInt();
ItemStack[] byproducts = new ItemStack[0];
if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray());
recipes.put(input.type, new ElectrolysisRecipe(input.fill, output1, output2, byproducts));
recipes.put(input.type, new ElectrolysisRecipe(input.fill, output1, output2, duration, byproducts));
}
@Override
@ -92,6 +102,8 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
for(ItemStack stack : rec.getValue().byproduct) this.writeItemStack(stack, writer);
writer.endArray();
}
writer.name("duration").value(rec.getValue().duration);
}
public static class ElectrolysisRecipe {
@ -99,12 +111,23 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
public FluidStack output2;
public int amount;
public ItemStack[] byproduct;
public int duration;
public ElectrolysisRecipe(int amount, FluidStack output1, FluidStack output2, ItemStack... byproduct) {
this.output1 = output1;
this.output2 = output2;
this.amount = amount;
this.byproduct = byproduct;
this.duration = 20;
}
public ElectrolysisRecipe(int amount, FluidStack output1, FluidStack output2, int duration, ItemStack... byproduct) {
this.output1 = output1;
this.output2 = output2;
this.amount = amount;
this.byproduct = byproduct;
this.duration = duration;
}
}
}

View File

@ -134,34 +134,40 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
for(BedrockOreType type : BedrockOreType.values()) {
MaterialStack f0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(7));
MaterialStack f1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(4));
MaterialStack f0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(12));
MaterialStack f1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(6));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ElectrolysisMetalRecipe(
f0 != null ? f0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
f1 != null ? f1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
f0 == null ? ItemBedrockOreNew.extract(type.primary1, 7) : new ItemStack(ModItems.dust),
f1 == null ? ItemBedrockOreNew.extract(type.primary2, 4) : new ItemStack(ModItems.dust)));
MaterialStack s0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(4));
MaterialStack s1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(7));
60,
f0 == null ? ItemBedrockOreNew.extract(type.primary1, 12) : new ItemStack(ModItems.dust),
f1 == null ? ItemBedrockOreNew.extract(type.primary2, 6) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));
MaterialStack s0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(6));
MaterialStack s1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(12));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ElectrolysisMetalRecipe(
s0 != null ? s0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
s1 != null ? s1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)),
s0 == null ? ItemBedrockOreNew.extract(type.primary1, 4) : new ItemStack(ModItems.dust),
s1 == null ? ItemBedrockOreNew.extract(type.primary2, 7) : new ItemStack(ModItems.dust)));
60,
s0 == null ? ItemBedrockOreNew.extract(type.primary1, 6) : new ItemStack(ModItems.dust),
s1 == null ? ItemBedrockOreNew.extract(type.primary2, 12) : new ItemStack(ModItems.dust),
ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)));
MaterialStack c0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2));
MaterialStack c1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(2));
recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ElectrolysisMetalRecipe(
c0 != null ? c0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)),
c1 != null ? c1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)),
60,
c0 == null ? ItemBedrockOreNew.extract(type.primary1, 2) : new ItemStack(ModItems.dust),
c1 == null ? ItemBedrockOreNew.extract(type.primary2, 2) : new ItemStack(ModItems.dust)));
}
}
public static ElectrolysisMetalRecipe getRecipe(ItemStack stack) {
if(stack == null || stack.getItem() == null)
return null;
ComparableStack comp = new ComparableStack(stack).makeSingular();
if(recipes.containsKey(comp)) return recipes.get(comp);
@ -229,7 +235,10 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
ItemStack[] byproducts = new ItemStack[0];
if(obj.has("byproducts")) byproducts = this.readItemStackArray(obj.get("byproducts").getAsJsonArray());
recipes.put(input, new ElectrolysisMetalRecipe(output1, output2, byproducts));
int duration = 600;
if(obj.has("duration")) duration = obj.get("duration").getAsInt();
recipes.put(input, new ElectrolysisMetalRecipe(output1, output2, duration, byproducts));
}
@Override
@ -257,6 +266,8 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
for(ItemStack stack : rec.getValue().byproduct) this.writeItemStack(stack, writer);
writer.endArray();
}
writer.name("duration").value(rec.getValue().duration);
}
public static class ElectrolysisMetalRecipe {
@ -264,11 +275,19 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
public MaterialStack output1;
public MaterialStack output2;
public ItemStack[] byproduct;
public int duration;
public ElectrolysisMetalRecipe(MaterialStack output1, MaterialStack output2, ItemStack... byproduct) {
this.output1 = output1;
this.output2 = output2;
this.byproduct = byproduct;
this.duration = 600;
}
public ElectrolysisMetalRecipe(MaterialStack output1, MaterialStack output2, int duration, ItemStack... byproduct) {
this.output1 = output1;
this.output2 = output2;
this.byproduct = byproduct;
this.duration = duration;
}
}
}

View File

@ -54,6 +54,7 @@ public class LiquefactionRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(Blocks.packed_ice), new FluidStack(1000, Fluids.WATER));
recipes.put(new ComparableStack(Items.ender_pearl), new FluidStack(100, Fluids.ENDERJUICE));
recipes.put(new ComparableStack(ModItems.pellet_charged), new FluidStack(4000, Fluids.HELIUM4));
recipes.put(new ComparableStack(ModBlocks.ore_oil_sand), new FluidStack(100, Fluids.BITUMEN));
recipes.put(new ComparableStack(Items.sugar), new FluidStack(100, Fluids.ETHANOL));
recipes.put(new ComparableStack(ModBlocks.plant_flower, 1, 3), new FluidStack(150, Fluids.ETHANOL));
@ -67,10 +68,6 @@ public class LiquefactionRecipes extends SerializableRecipe {
recipes.put(new ComparableStack(Blocks.tallgrass, 1, 1), new FluidStack(100, Fluids.SEEDSLURRY));
recipes.put(new ComparableStack(Blocks.tallgrass, 1, 2), new FluidStack(100, Fluids.SEEDSLURRY));
recipes.put(new ComparableStack(Blocks.vine), new FluidStack(100, Fluids.SEEDSLURRY));
//recipes.put(new ComparableStack(ModItems.solid_fuel_bf), new FluidStack(250, Fluids.BALEFIRE));
//TODO: more recipes as the crack oil derivatives are added
}
public static FluidStack getOutput(ItemStack stack) {

View File

@ -98,6 +98,13 @@ public class SILEXRecipes {
recipes.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.DEATH.getID()), new SILEXRecipe(1000, 1000, 4)
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_impure_osmiridium), 1))
);
recipes.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.VITRIOL.getID()), new SILEXRecipe(1000, 1000, EnumWavelengths.IR)
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_bromine), 5))
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_iodine), 5))
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_iron), 5))
.addOut(new WeightedRandomObject(new ItemStack(ModItems.sulfur), 15))
);
for(int i = 0; i < 5; i++) {

View File

@ -171,7 +171,7 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(Blocks.clay, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(Blocks.hardened_clay, new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(Blocks.tnt, new ItemStack(Items.gunpowder, Compat.isModLoaded(Compat.MOD_GT6) ? 4 : 5));
ShredderRecipes.setRecipe(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.LIMESTONE), new ItemStack(ModItems.powder_calcium));
ShredderRecipes.setRecipe(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.LIMESTONE), new ItemStack(ModItems.powder_limestone, 4));
ShredderRecipes.setRecipe(ModBlocks.stone_gneiss, new ItemStack(ModItems.powder_lithium_tiny, 1));
ShredderRecipes.setRecipe(ModItems.powder_lapis, new ItemStack(ModItems.powder_cobalt_tiny, 1));
ShredderRecipes.setRecipe(ModItems.fragment_neodymium, new ItemStack(ModItems.powder_neodymium_tiny, 1));
@ -208,6 +208,7 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModBlocks.machine_well, new ItemStack(ModItems.powder_steel, 32));
ShredderRecipes.setRecipe(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE), new ItemStack(ModItems.powder_desh_mix));
ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2));
ShredderRecipes.setRecipe(ModBlocks.block_slag, new ItemStack(ModItems.powder_cement, 4));
List<ItemStack> logs = OreDictionary.getOres("logWood");
List<ItemStack> planks = OreDictionary.getOres("plankWood");
@ -284,6 +285,7 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModBlocks.steel_grate, new ItemStack(ModItems.powder_steel_tiny, 3));
ShredderRecipes.setRecipe(ModItems.pipes_steel, new ItemStack(ModItems.powder_steel, 27));
ShredderRecipes.setRecipe(ModBlocks.machine_fluidtank, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(new ItemStack(ModItems.bedrock_ore, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Blocks.gravel));
/* Sellafite scrapping */
ShredderRecipes.setRecipe(ModBlocks.sellafield_slaked, new ItemStack(Blocks.gravel));

View File

@ -91,6 +91,19 @@ public class SolderingRecipes extends SerializableRecipe {
new OreDictStack(PB.wireFine(), 12)}
));
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.QUANTUM.ordinal()), 400, 100_000,
new FluidStack(Fluids.HELIUM4, 1_000),
new AStack[] {
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CHIP_QUANTUM),
new ComparableStack(ModItems.circuit, lbsm ? 4 : 16, EnumCircuitType.CHIP_BISMOID),
new ComparableStack(ModItems.circuit, lbsm ? 1 : 4, EnumCircuitType.ATOMIC_CLOCK)},
new AStack[] {
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.PCB),
new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},
new AStack[] {
new OreDictStack(PB.wireFine(), 16)}
));
/*
* COMPUTERS
*/
@ -110,14 +123,25 @@ public class SolderingRecipes extends SerializableRecipe {
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED.ordinal()), 600, 25_000,
new AStack[] {
new ComparableStack(ModItems.circuit, lbsm ? 8 : 16, EnumCircuitType.CHIP_BISMOID),
new ComparableStack(ModItems.circuit, lbsm ? 16 : 48, EnumCircuitType.CAPACITOR),
new ComparableStack(ModItems.circuit, lbsm ? 8 : 32, EnumCircuitType.CAPACITOR_TANTALIUM)},
new ComparableStack(ModItems.circuit, lbsm ? 16 : 48, EnumCircuitType.CAPACITOR_TANTALIUM),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ATOMIC_CLOCK)},
new AStack[] {
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_CHASSIS),
new ComparableStack(ModItems.upgrade_speed_3)},
new AStack[] {
new OreDictStack(PB.wireFine(), 24)}
));
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_QUANTUM.ordinal()), 600, 250_000,
new AStack[] {
new ComparableStack(ModItems.circuit, lbsm ? 8 : 16, EnumCircuitType.CHIP_QUANTUM),
new ComparableStack(ModItems.circuit, lbsm ? 16 : 48, EnumCircuitType.CHIP_BISMOID),
new ComparableStack(ModItems.circuit, lbsm ? 1 : 8, EnumCircuitType.ATOMIC_CLOCK)},
new AStack[] {
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER_ADVANCED),
new ComparableStack(ModItems.upgrade_overdrive_1)},
new AStack[] {
new OreDictStack(PB.wireFine(), 32)}
));
/*
* UPGRADES

View File

@ -9,6 +9,7 @@ import java.util.Map.Entry;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.FluidStack;
import com.hbm.inventory.OreDictManager.DictFrame;
import com.hbm.inventory.fluid.FluidType;
@ -69,6 +70,7 @@ public class SolidificationRecipes extends SerializableRecipe {
registerRecipe(WATZ, 1000, ModItems.ingot_mud);
registerRecipe(REDMUD, 1000, Items.iron_ingot);
registerRecipe(SODIUM, 100, ModItems.powder_sodium);
registerRecipe(SLOP, 250, ModBlocks.ore_oil_sand);
registerRecipe(OIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE));
registerRecipe(CRACKOIL, SF_CRACK, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK));

View File

@ -13,7 +13,8 @@ public class ItemGenericPart extends ItemEnumMulti {
PISTON_PNEUMATIC("piston_pneumatic"),
PISTON_HYDRAULIC("piston_hydraulic"),
PISTON_ELECTRIC("piston_electric"),
LDE("low_density_element");
LDE("low_density_element"),
HDE("heavy_duty_element");
private String texName;

View File

@ -116,6 +116,8 @@ public class ModItems {
public static Item coal_infernal;
public static Item cinnebar;
public static Item powder_ash;
public static Item powder_limestone;
public static Item powder_cement;
public static Item niter;
public static Item ingot_copper;
@ -146,6 +148,7 @@ public class ModItems {
public static Item ingot_cdalloy;
public static Item ingot_bismuth_bronze;
public static Item ingot_arsenic_bronze;
public static Item ingot_bscco;
public static Item lithium;
public static Item ingot_zirconium;
public static Item ingot_hes;
@ -2566,6 +2569,7 @@ public class ModItems {
ingot_cdalloy = new Item().setUnlocalizedName("ingot_cdalloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_cdalloy");
ingot_bismuth_bronze = new Item().setUnlocalizedName("ingot_bismuth_bronze").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_bismuth_bronze");
ingot_arsenic_bronze = new Item().setUnlocalizedName("ingot_arsenic_bronze").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_arsenic_bronze");
ingot_bscco = new Item().setUnlocalizedName("ingot_bscco").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_bscco");
niter = new Item().setUnlocalizedName("niter").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":salpeter");
ingot_copper = new Item().setUnlocalizedName("ingot_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_copper");
@ -2757,6 +2761,8 @@ public class ModItems {
coal_infernal = new Item().setUnlocalizedName("coal_infernal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coal_infernal");
cinnebar = new Item().setUnlocalizedName("cinnebar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cinnebar");
powder_ash = new ItemEnumMulti(EnumAshType.class, true, true).setUnlocalizedName("powder_ash").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_ash");
powder_limestone = new Item().setUnlocalizedName("powder_limestone").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_limestone");
powder_cement = new Item().setUnlocalizedName("powder_cement").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_cement");
ingot_gh336 = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("ingot_gh336").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_gh336");
nugget_gh336 = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("nugget_gh336").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_gh336");
@ -5659,6 +5665,7 @@ public class ModItems {
GameRegistry.registerItem(ingot_cdalloy, ingot_cdalloy.getUnlocalizedName());
GameRegistry.registerItem(ingot_bismuth_bronze, ingot_bismuth_bronze.getUnlocalizedName());
GameRegistry.registerItem(ingot_arsenic_bronze, ingot_arsenic_bronze.getUnlocalizedName());
GameRegistry.registerItem(ingot_bscco, ingot_bscco.getUnlocalizedName());
GameRegistry.registerItem(ingot_lead, ingot_lead.getUnlocalizedName());
GameRegistry.registerItem(ingot_bismuth, ingot_bismuth.getUnlocalizedName());
GameRegistry.registerItem(ingot_arsenic, ingot_arsenic.getUnlocalizedName());
@ -5918,6 +5925,8 @@ public class ModItems {
GameRegistry.registerItem(dust_tiny, dust_tiny.getUnlocalizedName());
GameRegistry.registerItem(fallout, fallout.getUnlocalizedName());
GameRegistry.registerItem(powder_ash, powder_ash.getUnlocalizedName());
GameRegistry.registerItem(powder_limestone, powder_limestone.getUnlocalizedName());
GameRegistry.registerItem(powder_cement, powder_cement.getUnlocalizedName());
//Powders
GameRegistry.registerItem(powder_fire, powder_fire.getUnlocalizedName());

View File

@ -23,18 +23,22 @@ public class ItemCircuit extends ItemEnumMulti {
list.add(new ItemStack(item, 1, EnumCircuitType.VACUUM_TUBE.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CAPACITOR.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CAPACITOR_TANTALIUM.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.ATOMIC_CLOCK.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.PCB.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.SILICON.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CHIP.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CHIP_BISMOID.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CHIP_QUANTUM.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.ANALOG.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.BASIC.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.ADVANCED.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CAPACITOR_BOARD.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.BISMOID.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.QUANTUM.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CONTROLLER_CHASSIS.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CONTROLLER.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CONTROLLER_ADVANCED.ordinal()));
list.add(new ItemStack(item, 1, EnumCircuitType.CONTROLLER_QUANTUM.ordinal()));
}
public static enum EnumCircuitType {
@ -53,6 +57,10 @@ public class ItemCircuit extends ItemEnumMulti {
CONTROLLER_CHASSIS,
CONTROLLER,
CONTROLLER_ADVANCED,
QUANTUM,
CHIP_QUANTUM,
CONTROLLER_QUANTUM,
ATOMIC_CLOCK,
}
@Override

View File

@ -120,10 +120,10 @@ public class ItemBedrockOreNew extends Item {
// primary sulfuric solvent radsolvent
LIGHT_METAL( 0xFFFFFF, 0x353535, "light", IRON, CU, TI, AL, AL, CHLOROCALCITE, LI, NA, CHLOROCALCITE, LI, NA),
HEAVY_METAL( 0x868686, 0x000000, "heavy", W, PB, GOLD, GOLD, BE, W, PB, GOLD, BI, BI, GOLD),
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, B, ZR, CO, ND, ZR),
RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, SR, ZR, NB, ND, SR),
ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", U, TH232, RA226, RA226, PO210, RA226, RA226, PO210, TC99, TC99, U238),
NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", COAL, S, LIGNITE, KNO, F, P_RED, F, S, CHLOROCALCITE, SI, SI),
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", DIAMOND, SODALITE, CINNABAR, ASBESTOS, REDSTONE, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE);
CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", REDSTONE, CINNABAR, SODALITE, ASBESTOS, DIAMOND, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE);
//sediment
public int light;

View File

@ -152,20 +152,32 @@ public class HbmWorldGen implements IWorldGenerator {
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.malachiteSpawn, 16, 6, 40, ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal());
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.limestoneSpawn, 12, 25, 30, ModBlocks.stone_resource, EnumStoneType.LIMESTONE.ordinal());
if(rand.nextInt(3) == 0) {
@SuppressWarnings("unchecked")
WeightedRandomGeneric<BedrockOreDefinition> item = (WeightedRandomGeneric<BedrockOreDefinition>) WeightedRandom.getRandomItem(rand, BedrockOre.weightedOres);
BedrockOreDefinition def = item.get();
if(GeneralConfig.enable528 && GeneralConfig.enable528BedrockReplacement) {
BedrockOreDefinition replacement = BedrockOre.replacements.get(def.id);
if(replacement != null) def = replacement;
if(WorldConfig.newBedrockOres) {
if(rand.nextInt(10) == 0) {
int randPosX = i + rand.nextInt(2) + 8;
int randPosZ = j + rand.nextInt(2) + 8;
BedrockOre.generate(world, randPosX, randPosZ, new ItemStack(ModItems.bedrock_ore_base), null, 0xD78A16, 1);
}
} else {
if(rand.nextInt(3) == 0) {
@SuppressWarnings("unchecked")
WeightedRandomGeneric<BedrockOreDefinition> item = (WeightedRandomGeneric<BedrockOreDefinition>) WeightedRandom.getRandomItem(rand, BedrockOre.weightedOres);
BedrockOreDefinition def = item.get();
if(GeneralConfig.enable528 && GeneralConfig.enable528BedrockReplacement) {
BedrockOreDefinition replacement = BedrockOre.replacements.get(def.id);
if(replacement != null) def = replacement;
}
int randPosX = i + rand.nextInt(2) + 8;
int randPosZ = j + rand.nextInt(2) + 8;
BedrockOre.generate(world, randPosX, randPosZ, def.stack, def.acid, def.color, def.tier);
}
int randPosX = i + rand.nextInt(2) + 8;
int randPosZ = j + rand.nextInt(2) + 8;
BedrockOre.generate(world, randPosX, randPosZ, def.stack, def.acid, def.color, def.tier);
}
for(int k = 0; k < WorldConfig.randomSpawn; k++) {
@ -388,8 +400,8 @@ public class HbmWorldGen implements IWorldGenerator {
}
if(WorldConfig.minefreq > 0 && GeneralConfig.enableMines && rand.nextInt(WorldConfig.minefreq) == 0) {
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
int x = i + rand.nextInt(16) + 8;
int z = j + rand.nextInt(16) + 8;
int y = world.getHeightValue(x, z);
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z)) {

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 (5000)";
public static final String VERSION = "1.0.27 BETA (5020)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -54,6 +54,7 @@ import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
@ -152,7 +153,7 @@ public class ClientProxy extends ServerProxy {
Jars.initJars();
if(GeneralConfig.enableSoundExtension) {
SoundSystemConfig.setNumberNormalChannels(1000);
SoundSystemConfig.setNumberNormalChannels(GeneralConfig.normalSoundChannels);
SoundSystemConfig.setNumberStreamingChannels(50);
}
}
@ -184,6 +185,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoBlockAltW.class, new RenderDecoBlockAlt());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoBlockAltF.class, new RenderDecoBlockAlt());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDemonLamp.class, new RenderDemonLamp());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFloodlight.class, new RenderFloodlight());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLoot.class, new RenderLoot());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPedestal.class, new RenderPedestalTile());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBobble.class, new RenderBobble());
@ -873,6 +875,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerBlockHandler(new RenderLight());
RenderingRegistry.registerBlockHandler(new RenderCRT());
RenderingRegistry.registerBlockHandler(new RenderToaster());
RenderingRegistry.registerBlockHandler(new RenderPartitioner());
RenderingRegistry.registerBlockHandler(new RenderFoundryBasin());
RenderingRegistry.registerBlockHandler(new RenderFoundryMold());
@ -1962,7 +1965,9 @@ public class ClientProxy extends ServerProxy {
held == Item.getItemFromBlock(ModBlocks.drone_crate_provider) ||
held == Item.getItemFromBlock(ModBlocks.drone_crate_requester) ||
held == Item.getItemFromBlock(ModBlocks.drone_dock) ||
held == Item.getItemFromBlock(ModBlocks.drone_waypoint_request)) {
held == Item.getItemFromBlock(ModBlocks.drone_waypoint_request) ||
held == Item.getItemFromBlock(ModBlocks.drone_waypoint) ||
held == ModItems.drone_linker) {
double mX = data.getDouble("mX");
double mY = data.getDouble("mY");
double mZ = data.getDouble("mZ");

View File

@ -124,7 +124,10 @@ public class CraftingManager {
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), new Object[] { "I", "S", "W", 'I', ModItems.plate_polymer, 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.SILICON), 'W', GOLD.wireFine() });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_BISMOID), new Object[] { "III", "SNS", "WWW", 'I', ModItems.plate_polymer, 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.SILICON), 'N', ANY_BISMOID.nugget(), 'W', CU.wireFine() });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_BISMOID), new Object[] { "III", "SNS", "WWW", 'I', ModItems.plate_polymer, 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.SILICON), 'N', ANY_BISMOID.nugget(), 'W', GOLD.wireFine() });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_QUANTUM), new Object[] { "HHH", "SIS", "WWW", 'H', ANY_HARDPLASTIC.ingot(), 'S', BSCCO.wireDense(), 'I', ModItems.pellet_charged, 'W', CU.wireFine() });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP_QUANTUM), new Object[] { "HHH", "SIS", "WWW", 'H', ANY_HARDPLASTIC.ingot(), 'S', BSCCO.wireDense(), 'I', ModItems.pellet_charged, 'W', GOLD.wireFine() });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER_CHASSIS), new Object[] { "PPP", "CBB", "PPP", 'P', ANY_PLASTIC.ingot(), 'C', ModItems.crt_display, 'B', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.PCB) });
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ATOMIC_CLOCK), new Object[] { "ICI", "CSC", "ICI", 'I', ModItems.plate_polymer, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'S', SR.dust() });
addRecipeAuto(new ItemStack(ModItems.crt_display, 4), new Object[] { " A ", "SGS", " T ", 'A', AL.dust(), 'S', STEEL.plate(), 'G', KEY_ANYPANE, 'T', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
@ -980,19 +983,20 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModBlocks.crane_unboxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_STICK, 'P', Items.shears, 'C', ModBlocks.conveyor });
addRecipeAuto(new ItemStack(ModBlocks.crane_router), new Object[] { "PIP", "ICI", "PIP", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', ModItems.plate_polymer, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
addRecipeAuto(new ItemStack(ModBlocks.crane_splitter), new Object[] { "III", "PCP", "III", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', STEEL.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
addRecipeAuto(new ItemStack(ModBlocks.crane_partitioner), new Object[] { " M ", "BCB", 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'B', ModBlocks.conveyor, 'C', ModBlocks.crate_steel });
addRecipeAuto(new ItemStack(ModBlocks.machine_conveyor_press), new Object[] { "CPC", "CBC", "CCC", 'C', CU.plate(), 'P', ModBlocks.machine_epress, 'B', ModBlocks.conveyor });
addRecipeAuto(new ItemStack(ModBlocks.radar_screen), new Object[] { "PCP", "SRS", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'S', STEEL.plate(), 'R', ModItems.crt_display });
addRecipeAuto(new ItemStack(ModItems.radar_linker), new Object[] { "S", "C", "P", 'S', ModItems.crt_display, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'P', STEEL.plate() });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL.ordinal()), new Object[] { "PPP", "HCH", " B ", 'P', ANY_PLASTIC.ingot(), 'H', STEEL.shell(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'B', ModBlocks.crate_steel });
addRecipeAuto(new ItemStack(ModItems.drone, 2, EnumDroneType.PATROL.ordinal()), new Object[] { " P ", "HCH", " B ", 'P', ANY_PLASTIC.ingot(), 'H', STEEL.pipe(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'B', STEEL.shell() });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_CHUNKLOADING.ordinal()), new Object[] { "E", "D", 'E', Items.ender_pearl, 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS.ordinal()), new Object[] { " P ", "KDK", " P ", 'P', TI.plateWelded(), 'K', Fluids.KEROSENE.getDict(1_000), 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS_CHUNKLOADING.ordinal()), new Object[] { "E", "D", 'E', Items.ender_pearl, 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS_CHUNKLOADING.ordinal()), new Object[] { " P ", "KDK", " P ", 'P', TI.plateWelded(), 'K', Fluids.KEROSENE.getDict(1_000), 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_CHUNKLOADING.ordinal()) });
addShapelessAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL.ordinal()), new Object[] { new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_CHUNKLOADING.ordinal()) });
addShapelessAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS.ordinal()), new Object[] { new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS_CHUNKLOADING.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal()), new Object[] { "E", "D", 'E', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL_EXPRESS.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone, 1, EnumDroneType.REQUEST.ordinal()), new Object[] { "E", "D", 'E', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'D', new ItemStack(ModItems.drone, 1, EnumDroneType.PATROL.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.drone_linker), new Object[] { "T", "C", 'T', ModBlocks.drone_waypoint, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
addRecipeAuto(new ItemStack(ModBlocks.drone_waypoint, 4), new Object[] { "G", "T", "C", 'G', KEY_GREEN, 'T', Blocks.redstone_torch, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });

View File

@ -87,6 +87,7 @@ import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.util.EnumHelper;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -353,6 +354,7 @@ public class MainRegistry {
ChestGenHooks.addItem(ChestGenHooks.BONUS_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.no9), 1, 1, 7));
EntityMappings.writeMappings();
//CompatNER.init();
ForgeChunkManager.setForcedChunkLoadingCallback(this, new LoadingCallback() {
@ -1339,6 +1341,7 @@ public class MainRegistry {
ignoreMappings.add("hbm:tile.ore_verticium");
ignoreMappings.add("hbm:item.warhead_mirvlet");
ignoreMappings.add("hbm:item.generator_front");
ignoreMappings.add("hbm:tile.rbmk_heatex");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -51,8 +51,6 @@ import com.hbm.items.armor.ItemArmorMod;
import com.hbm.items.armor.ItemModRevive;
import com.hbm.items.armor.ItemModShackles;
import com.hbm.items.food.ItemConserve.EnumFoodType;
import com.hbm.items.special.ItemBedrockOreBase;
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
import com.hbm.items.tool.ItemGuideBook.BookType;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.lib.HbmCollection;
@ -123,7 +121,6 @@ import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.FoodStats;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;

View File

@ -1491,6 +1491,7 @@ public class ResourceManager {
public static final IModelCustom pipe_neo = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/pipe_neo.obj"));
public static final IModelCustom difurnace_extension = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/difurnace_extension.obj"));
public static final IModelCustom splitter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/splitter.obj"));
public static final IModelCustom crane_buffer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/crane_buffer.obj"));
public static final IModelCustom rail_narrow_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow.obj"));
public static final IModelCustom rail_narrow_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow_bend.obj"));
public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj"));

View File

@ -0,0 +1,75 @@
package com.hbm.render.block;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.network.CranePartitioner;
import com.hbm.main.ResourceManager;
import com.hbm.render.util.ObjUtil;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class RenderPartitioner implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
tessellator.setColorOpaque_F(1, 1, 1);
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslatef(0F, -0.5F, 0F);
tessellator.startDrawingQuads();
drawPartitioner(tessellator, block, 0, false);
tessellator.draw();
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator tessellator = Tessellator.instance;
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
int meta = world.getBlockMetadata(x, y, z);
float rotation = 0;
if(meta == 2) rotation = 90F / 180F * (float) Math.PI;
if(meta == 4) rotation = 180F / 180F * (float) Math.PI;
if(meta == 5) rotation = 0F / 180F * (float) Math.PI;
if(meta == 3) rotation = 270F / 180F * (float)Math.PI;
drawPartitioner(tessellator, block, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
return true;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
private static void drawPartitioner(Tessellator tessellator, Block block, float rotation, boolean shadeNormals) {
CranePartitioner partitioner = (CranePartitioner) block;
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "Side", partitioner.getIcon(0, 0), tessellator, rotation, shadeNormals);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "Back", partitioner.iconBack, tessellator, rotation, shadeNormals);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "Top_Top.001", partitioner.iconTop, tessellator, rotation, shadeNormals);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "Inner", partitioner.iconInner, tessellator, rotation, shadeNormals);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "InnerSide", partitioner.iconInnerSide, tessellator, rotation, shadeNormals);
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.crane_buffer, "Belt", partitioner.iconBelt, tessellator, rotation, shadeNormals);
}
@Override
public int getRenderId() {
return CranePartitioner.renderID;
}
}

View File

@ -0,0 +1,58 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
import com.hbm.lib.RefStrings;
import com.hbm.render.loader.HFRWavefrontObject;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelCustom;
public class RenderFloodlight extends TileEntitySpecialRenderer {
public static final IModelCustom floodlight = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/floodlight.obj"));
public static final ResourceLocation tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/floodlight.png");
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y + 0.5D, z + 0.5D);
int meta = tileEntity.getBlockMetadata();
switch(meta) {
case 0: case 6: GL11.glRotated(180, 1, 0, 0); break;
case 1: case 7: break;
case 2: GL11.glRotated(90, 1, 0, 0); GL11.glRotated(180, 0, 0, 1); break;
case 3: GL11.glRotated(90, 1, 0, 0); break;
case 4: GL11.glRotated(90, 1, 0, 0); GL11.glRotated(90, 0, 0, 1); break;
case 5: GL11.glRotated(90, 1, 0, 0); GL11.glRotated(270, 0, 0, 1); break;
}
GL11.glTranslated(0, -0.5, 0);
if(meta != 0 && meta != 1) GL11.glRotated(90, 0, 1, 0);
bindTexture(tex);
floodlight.renderPart("Base");
TileEntityFloodlight floodtile = (TileEntityFloodlight) tileEntity;
float rotation = floodtile.rotation;
if(meta == 0 || meta == 6) rotation -= 90;
if(meta == 1 || meta == 7) rotation += 90;
GL11.glTranslated(0, 0.5, 0);
GL11.glRotatef(rotation, 0, 0, 1);
GL11.glTranslated(0, -0.5, 0);
floodlight.renderPart("Lights");
RenderArcFurnace.fullbright(true);
floodlight.renderPart("Lamps");
RenderArcFurnace.fullbright(false);
GL11.glPopMatrix();
}
}

View File

@ -4,10 +4,15 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.util.RenderDecoItem;
import com.hbm.tileentity.machine.TileEntityMachineOreSlopper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -15,6 +20,8 @@ import net.minecraft.util.MathHelper;
import net.minecraftforge.client.IItemRenderer;
public class RenderOreSlopper extends TileEntitySpecialRenderer implements IItemRendererProvider {
private RenderItem itemRenderer = new RenderDecoItem(this);
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
@ -29,39 +36,66 @@ public class RenderOreSlopper extends TileEntitySpecialRenderer implements IItem
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
}
TileEntityMachineOreSlopper slopper = (TileEntityMachineOreSlopper) tile;
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.ore_slopper_tex);
ResourceManager.ore_slopper.renderPart("Base");
GL11.glPushMatrix();
double slide = slopper.prevSlider + (slopper.slider - slopper.prevSlider) * interp;
GL11.glTranslated(0, 0, slide * -3);
ResourceManager.ore_slopper.renderPart("Slider");
GL11.glPushMatrix();
double extend = Math.sin(((tile.getWorldObj().getTotalWorldTime() + interp) * 0.1 % (Math.PI * 2))) * 0.625+ 0.625;
double extend = (slopper.prevBucket + (slopper.bucket - slopper.prevBucket) * interp) * 1.5;
GL11.glTranslated(0, -MathHelper.clamp_double(extend - 0.25, 0, 1.25), 0);
ResourceManager.ore_slopper.renderPart("Hydraulics");
GL11.glTranslated(0, -MathHelper.clamp_double(extend, 0, 1.25), 0);
ResourceManager.ore_slopper.renderPart("Bucket");
if(slopper.animation == slopper.animation.LIFTING) {
GL11.glTranslated(0.0625D, 4.3125D, 2D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glRotatef(90, 0F, 1F, 0F);
GL11.glRotatef(-90, 1F, 0F, 0F);
ItemStack stack = new ItemStack(ModItems.bedrock_ore, 1, 0);
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
item.getEntityItem().stackSize = 1;
item.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
GL11.glScaled(1.75, 1.75, 1.75);
itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
bindTexture(ResourceManager.ore_slopper_tex);
}
GL11.glPopMatrix();
GL11.glPopMatrix();
double speed = 10;
double blades = slopper.prevBlades + (slopper.blades - slopper.prevBlades) * interp;
GL11.glPushMatrix();
GL11.glTranslated(0.375, 2.75, 0);
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * speed, 0, 0, 1);
GL11.glRotated(blades, 0, 0, 1);
GL11.glTranslated(-0.375, -2.75, 0);
ResourceManager.ore_slopper.renderPart("BladesLeft");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(-0.375, 2.75, 0);
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * -speed, 0, 0, 1);
GL11.glRotated(-blades, 0, 0, 1);
GL11.glTranslated(0.375, -2.75, 0);
ResourceManager.ore_slopper.renderPart("BladesRight");
GL11.glPopMatrix();
double fan = slopper.prevFan + (slopper.fan - slopper.prevFan) * interp;
GL11.glPushMatrix();
GL11.glTranslated(0, 1.875, -1);
GL11.glRotated((tile.getWorldObj().getTotalWorldTime() % 360 + interp) * -25, 1, 0, 0);
GL11.glRotated(-fan, 1, 0, 0);
GL11.glTranslated(0, -1.875, 1);
ResourceManager.ore_slopper.renderPart("Fan");
GL11.glPopMatrix();

View File

@ -18,6 +18,8 @@ public class TileEntityProxyBase extends TileEntityLoadedBase {
public TileEntity getTE() {
if(worldObj == null) return null;
if(cachedPosition != null) {
TileEntity te = Compat.getTileStandard(worldObj, cachedPosition.getX(), cachedPosition.getY(), cachedPosition.getZ());
if(te != null && !(te instanceof TileEntityProxyBase)) return te;

View File

@ -548,6 +548,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
}
@Override // please work
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
if(this.getTile() instanceof OCComponent)
return ((OCComponent) this.getTile()).getComponentName();
@ -555,6 +556,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
}
@Override
@Optional.Method(modid = "OpenComputers")
public boolean canConnectNode(ForgeDirection side) { //thank you vaer
if(this.getTile() instanceof OCComponent)
return (this.getTile().getBlockMetadata() & 6) == 6 && ((OCComponent) this.getTile()).canConnectNode(side);
@ -562,6 +564,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] getExtraInfo() {
if(this.getTile() instanceof OCComponent)
return new String[] {"analyze.dummy"};
@ -569,6 +572,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
if(this.getTile() instanceof OCComponent)
return ((OCComponent) this.getTile()).methods();
@ -576,6 +580,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
if(this.getTile() instanceof OCComponent)
return ((OCComponent) this.getTile()).invoke(method, context, args);

View File

@ -17,6 +17,7 @@ import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
import com.hbm.blocks.machine.BlockICF.TileEntityBlockICF;
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight;
import com.hbm.blocks.machine.MachineCapacitor.TileEntityCapacitor;
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
@ -24,6 +25,7 @@ import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
import com.hbm.blocks.network.BlockCableGauge.TileEntityCableGauge;
import com.hbm.blocks.network.BlockCablePaintable.TileEntityCablePaintable;
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
import com.hbm.blocks.network.CranePartitioner.TileEntityCranePartitioner;
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
import com.hbm.blocks.network.FluidDuctPaintable.TileEntityPipePaintable;
import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
@ -91,6 +93,7 @@ public class TileMappings {
put(TileEntityMachineExposureChamber.class, "tileentity_exposure_chamber");
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
put(TileEntityMachineExcavator.class, "tileentity_ntm_excavator");
put(TileEntityMachineOreSlopper.class, "tileentity_ore_slopper");
put(TileEntityFluidDuctSimple.class, "tileentity_universal_duct_simple");
put(TileEntityFluidDuct.class, "tileentity_universal_duct");
put(TileEntityMachineDrain.class, "tileentity_fluid_drain");
@ -182,6 +185,7 @@ public class TileMappings {
put(TileEntitySILEX.class, "tileentity_silex");
put(TileEntityFEL.class, "tileentity_fel");
put(TileEntityDemonLamp.class, "tileentity_demonlamp");
put(TileEntityFloodlight.class, "tileentity_floodlight");
put(TileEntityLantern.class, "tileentity_lantern_ordinary");
put(TileEntityLanternBehemoth.class, "tileentity_lantern_behemoth");
put(TileEntityStorageDrum.class, "tileentity_waste_storage_drum");
@ -395,6 +399,7 @@ public class TileMappings {
put(TileEntityCraneUnboxer.class, "tileentity_unboxer");
put(TileEntityCraneRouter.class, "tileentity_router");
put(TileEntityCraneSplitter.class, "tileentity_splitter");
put(TileEntityCranePartitioner.class, "tileentity_partitioner");
put(TileEntityFan.class, "tileentity_fan");
put(TileEntityPistonInserter.class, "tileentity_piston_inserter");

View File

@ -472,6 +472,7 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_launch_pad";
}
@ -526,6 +527,7 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getEnergyInfo",
@ -536,6 +538,8 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getEnergyInfo"):
@ -548,8 +552,7 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
return getTier(context, args);
case ("launch"):
return launch(context, args);
}
}
throw new NoSuchMethodException();
}
}
}

View File

@ -649,6 +649,7 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_custom_launch_pad";
}
@ -714,6 +715,8 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
return new Object[] {false};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getEnergyInfo",
@ -725,6 +728,8 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getEnergyInfo"):

View File

@ -318,6 +318,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_turbine";
}
@ -367,6 +368,8 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
return new Object[] {tanks[0].getFill(), tanks[0].getMaxFill(), tanks[1].getFill(), tanks[1].getMaxFill(), CompatHandler.steamTypeToInt(tanks[0].getTankType())};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getFluid",
@ -376,6 +379,8 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getFluid"):

View File

@ -275,6 +275,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "dfc_emitter";
}

View File

@ -197,6 +197,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "dfc_injector";
}

View File

@ -190,6 +190,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "dfc_receiver";
}

View File

@ -172,6 +172,7 @@ public class TileEntityCoreStabilizer extends TileEntityMachineBase implements I
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "dfc_stabilizer";
}

View File

@ -28,6 +28,7 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IUpgradeInfoProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.util.BobMathUtil;
import com.hbm.util.CrucibleUtil;
import com.hbm.util.I18nUtil;
import com.hbm.util.fauxpointtwelve.DirPos;
@ -59,16 +60,14 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
public int usageFluid;
public int progressFluid;
public static final int processFluidTimeBase = 20;
public int processFluidTime;
public int processFluidTime = 100;
public int progressOre;
public static final int processOreTimeBase = 600;
public int processOreTime;
public int processOreTime = 600;
public MaterialStack leftStack;
public MaterialStack rightStack;
public int maxMaterial = MaterialShapes.BLOCK.q(16);
public FluidTank[] tanks;
public TileEntityElectrolyser() {
@ -88,7 +87,7 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
tanks[2] = new FluidTank(Fluids.OXYGEN, 16000);
tanks[3] = new FluidTank(Fluids.NITRIC_ACID, 16000);
}
@Override
public int[] getAccessibleSlotsFromSide(int meta) {
return new int[] { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
@ -114,13 +113,13 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
public void updateEntity() {
if(!worldObj.isRemote) {
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
this.tanks[0].setType(3, 4, slots);
this.tanks[0].loadTank(5, 6, slots);
this.tanks[1].unloadTank(7, 8, slots);
this.tanks[2].unloadTank(9, 10, slots);
if(worldObj.getTotalWorldTime() % 20 == 0) {
for(DirPos pos : this.getConPos()) {
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
@ -131,46 +130,46 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
if(tanks[2].getFill() > 0) this.sendFluid(tanks[2], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
}
UpgradeManager.eval(slots, 1, 2);
int speedLevel = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
int powerLevel = Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3);
processFluidTime = processFluidTimeBase - processFluidTimeBase * speedLevel / 4;
processOreTime = processOreTimeBase - processOreTimeBase * speedLevel / 4;
usageOre = usageOreBase - usageOreBase * powerLevel / 4;
usageFluid = usageFluidBase - usageFluidBase * powerLevel / 4;
if(this.canProcessFluid()) {
this.progressFluid++;
this.power -= this.usageFluid;
if(this.progressFluid >= this.processFluidTime) {
this.processFluids();
this.progressFluid = 0;
this.markChanged();
for(int i = 0; i < getCycleCount(); i++) {
if (this.canProcessFluid()) {
this.progressFluid++;
this.power -= this.usageFluid;
if (this.progressFluid >= this.getDurationFluid()) {
this.processFluids();
this.progressFluid = 0;
this.markChanged();
}
}
if (this.canProcessMetal()) {
this.progressOre++;
this.power -= this.usageOre;
if (this.progressOre >= this.getDurationMetal()) {
this.processMetal();
this.progressOre = 0;
this.markChanged();
}
}
}
if(this.canProcesMetal()) {
this.progressOre++;
this.power -= this.usageOre;
if(this.progressOre >= this.processOreTime) {
this.processMetal();
this.progressOre = 0;
this.markChanged();
}
}
if(this.leftStack != null) {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
List<MaterialStack> toCast = new ArrayList();
toCast.add(this.leftStack);
Vec3 impact = Vec3.createVectorHelper(0, 0, 0);
MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2D, zCoord + 0.5D + dir.offsetZ * 5.875D, 6, true, toCast, MaterialShapes.NUGGET.q(3), impact);
MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2D, zCoord + 0.5D + dir.offsetZ * 5.875D, 6, true, toCast, MaterialShapes.NUGGET.q(3) * Math.max (getCycleCount() * speedLevel, 1), impact);
if(didPour != null) {
NBTTagCompound data = new NBTTagCompound();
@ -181,19 +180,19 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
data.setFloat("base", 0.625F);
data.setFloat("len", Math.max(1F, yCoord - (float) (Math.ceil(impact.yCoord) - 0.875) + 2));
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2, zCoord + 0.5D + dir.offsetZ * 5.875D), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 50));
if(this.leftStack.amount <= 0) this.leftStack = null;
}
}
if(this.rightStack != null) {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
List<MaterialStack> toCast = new ArrayList();
toCast.add(this.rightStack);
Vec3 impact = Vec3.createVectorHelper(0, 0, 0);
MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2D, zCoord + 0.5D + dir.offsetZ * 5.875D, 6, true, toCast, MaterialShapes.NUGGET.q(3), impact);
MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2D, zCoord + 0.5D + dir.offsetZ * 5.875D, 6, true, toCast, MaterialShapes.NUGGET.q(3) * Math.max (getCycleCount() * speedLevel, 1), impact);
if(didPour != null) {
NBTTagCompound data = new NBTTagCompound();
@ -204,19 +203,19 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
data.setFloat("base", 0.625F);
data.setFloat("len", Math.max(1F, yCoord - (float) (Math.ceil(impact.yCoord) - 0.875) + 2));
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5D + dir.offsetX * 5.875D, yCoord + 2, zCoord + 0.5D + dir.offsetZ * 5.875D), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 50));
if(this.rightStack.amount <= 0) this.rightStack = null;
}
}
NBTTagCompound data = new NBTTagCompound();
data.setLong("power", this.power);
data.setInteger("progressFluid", this.progressFluid);
data.setInteger("progressOre", this.progressOre);
data.setInteger("usageOre", this.usageOre);
data.setInteger("usageFluid", this.usageFluid);
data.setInteger("processFluidTime", this.processFluidTime);
data.setInteger("processOreTime", this.processOreTime);
data.setInteger("processFluidTime", this.getDurationFluid());
data.setInteger("processOreTime", this.getDurationMetal());
if(this.leftStack != null) {
data.setInteger("leftType", leftStack.material.id);
data.setInteger("leftAmount", leftStack.amount);
@ -229,11 +228,11 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
this.networkPack(data, 50);
}
}
public DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
return new DirPos[] {
new DirPos(xCoord - dir.offsetX * 6, yCoord, zCoord - dir.offsetZ * 6, dir.getOpposite()),
new DirPos(xCoord - dir.offsetX * 6 + rot.offsetX, yCoord, zCoord - dir.offsetZ * 6 + rot.offsetZ, dir.getOpposite()),
@ -247,7 +246,7 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
@Override
public void networkUnpack(NBTTagCompound nbt) {
super.networkUnpack(nbt);
this.power = nbt.getLong("power");
this.progressFluid = nbt.getInteger("progressFluid");
this.progressOre = nbt.getInteger("progressOre");
@ -261,48 +260,48 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
else this.rightStack = null;
for(int i = 0; i < 4; i++) tanks[i].readFromNBT(nbt, "t" + i);
}
public boolean canProcessFluid() {
if(this.power < usageFluid) return false;
ElectrolysisRecipe recipe = ElectrolyserFluidRecipes.recipes.get(tanks[0].getTankType());
if(recipe == null) return false;
if(recipe.amount > tanks[0].getFill()) return false;
if(recipe.output1.type == tanks[1].getTankType() && recipe.output1.fill + tanks[1].getFill() > tanks[1].getMaxFill()) return false;
if(recipe.output2.type == tanks[2].getTankType() && recipe.output2.fill + tanks[2].getFill() > tanks[2].getMaxFill()) return false;
if(recipe.byproduct != null) {
for(int i = 0; i < recipe.byproduct.length; i++) {
ItemStack slot = slots[11 + i];
ItemStack byproduct = recipe.byproduct[i];
if(slot == null) continue;
if(!slot.isItemEqual(byproduct)) return false;
if(slot.stackSize + byproduct.stackSize > slot.getMaxStackSize()) return false;
}
}
return true;
}
public void processFluids() {
ElectrolysisRecipe recipe = ElectrolyserFluidRecipes.recipes.get(tanks[0].getTankType());
tanks[0].setFill(tanks[0].getFill() - recipe.amount);
tanks[1].setTankType(recipe.output1.type);
tanks[2].setTankType(recipe.output2.type);
tanks[1].setFill(tanks[1].getFill() + recipe.output1.fill);
tanks[2].setFill(tanks[2].getFill() + recipe.output2.fill);
if(recipe.byproduct != null) {
for(int i = 0; i < recipe.byproduct.length; i++) {
ItemStack slot = slots[11 + i];
ItemStack byproduct = recipe.byproduct[i];
if(slot == null) {
slots[11 + i] = byproduct.copy();
} else {
@ -311,63 +310,63 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
}
}
}
public boolean canProcesMetal() {
public boolean canProcessMetal() {
if(slots[14] == null) return false;
if(this.power < usageOre) return false;
if(this.tanks[3].getFill() < 100) return false;
ElectrolysisMetalRecipe recipe = ElectrolyserMetalRecipes.getRecipe(slots[14]);
if(recipe == null) return false;
if(leftStack != null) {
if(recipe.output1.material != leftStack.material) return false;
if(recipe.output1.amount + leftStack.amount > this.maxMaterial) return false;
}
if(rightStack != null) {
if(recipe.output2.material != rightStack.material) return false;
if(recipe.output2.amount + rightStack.amount > this.maxMaterial) return false;
}
if(recipe.byproduct != null) {
for(int i = 0; i < recipe.byproduct.length; i++) {
ItemStack slot = slots[15 + i];
ItemStack byproduct = recipe.byproduct[i];
if(slot == null) continue;
if(!slot.isItemEqual(byproduct)) return false;
if(slot.stackSize + byproduct.stackSize > slot.getMaxStackSize()) return false;
}
}
return true;
}
public void processMetal() {
ElectrolysisMetalRecipe recipe = ElectrolyserMetalRecipes.getRecipe(slots[14]);
if(leftStack == null) {
leftStack = new MaterialStack(recipe.output1.material, recipe.output1.amount);
} else {
leftStack.amount += recipe.output1.amount;
}
if(rightStack == null) {
rightStack = new MaterialStack(recipe.output2.material, recipe.output2.amount);
} else {
rightStack.amount += recipe.output2.amount;
}
if(recipe.byproduct != null) {
for(int i = 0; i < recipe.byproduct.length; i++) {
ItemStack slot = slots[15 + i];
ItemStack byproduct = recipe.byproduct[i];
if(slot == null) {
slots[15 + i] = byproduct.copy();
} else {
@ -375,11 +374,30 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
}
}
}
this.tanks[3].setFill(this.tanks[3].getFill() - 100);
this.decrStackSize(14, 1);
}
public int getDurationMetal() {
ElectrolysisMetalRecipe result = ElectrolyserMetalRecipes.getRecipe(slots[14]);
int base = result != null ? result.duration : 600;
int speed = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3) - Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 1);
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
}
public int getDurationFluid() {
ElectrolysisRecipe result = ElectrolyserFluidRecipes.getRecipe(tanks[0].getTankType());
int base = result != null ? result.duration : 100;
int speed = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3) - Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 1);
return (int) Math.ceil((base * Math.max(1F - 0.25F * speed, 0.2)));
}
public int getCycleCount() {
int speed = UpgradeManager.getLevel(UpgradeType.OVERDRIVE);
return Math.min(1 + speed * 2, 7);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
@ -395,16 +413,16 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
else this.rightStack = null;
for(int i = 0; i < 4; i++) tanks[i].readFromNBT(nbt, "t" + i);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("power", this.power);
nbt.setInteger("progressFluid", this.progressFluid);
nbt.setInteger("progressOre", this.progressOre);
nbt.setInteger("processFluidTime", this.processFluidTime);
nbt.setInteger("processOreTime", this.processOreTime);
nbt.setInteger("processFluidTime", getDurationFluid());
nbt.setInteger("processOreTime", getDurationMetal());
if(this.leftStack != null) {
nbt.setInteger("leftType", leftStack.material.id);
nbt.setInteger("leftAmount", leftStack.amount);
@ -414,13 +432,14 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
nbt.setInteger("rightAmount", rightStack.amount);
}
for(int i = 0; i < 4; i++) tanks[i].writeToNBT(nbt, "t" + i);
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 5,
@ -431,10 +450,10 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
zCoord + 6
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
@ -501,7 +520,7 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
@Override
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
return type == UpgradeType.SPEED || type == UpgradeType.POWER;
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
}
@Override
@ -509,9 +528,14 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_electrolyser));
if(type == UpgradeType.SPEED) {
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 25) + "%"));
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 100) + "%"));
}
if(type == UpgradeType.POWER) {
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 25) + "%"));
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (25) + "%"));
}
if(type == UpgradeType.OVERDRIVE) {
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
}
}
@ -519,6 +543,7 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
public int getMaxLevel(UpgradeType type) {
if(type == UpgradeType.SPEED) return 3;
if(type == UpgradeType.POWER) return 3;
if(type == UpgradeType.OVERDRIVE) return 3;
return 0;
}
}

View File

@ -70,6 +70,7 @@ public class TileEntityGeiger extends TileEntity implements SimpleComponent, IIn
return rads;
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_geiger";
}

View File

@ -295,6 +295,7 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
//OC stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_icf_reactor";
}
@ -345,6 +346,8 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getHeat",
@ -356,6 +359,8 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch (method) {
case ("getHeat"):

View File

@ -669,6 +669,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_fusion";
}
@ -724,6 +725,8 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
return new Object[] {"N/A", "N/A"};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getEnergyInfo",
@ -736,6 +739,8 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyRece
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch (method) {
case ("getEnergyInfo"):

View File

@ -132,6 +132,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
if(this.progress >= 1F) {
this.process();
this.progress = 0;
this.markDirty();
this.delay = (int) (120 / (upgrade * 0.5 + 1));
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, 10F);
}

View File

@ -391,7 +391,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
public int getMaxLevel(UpgradeType type) {
if(type == UpgradeType.SPEED) return 3;
if(type == UpgradeType.EFFECT) return 3;
if(type == UpgradeType.OVERDRIVE) return 2;
if(type == UpgradeType.OVERDRIVE) return 3;
return 0;
}
}

View File

@ -325,6 +325,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_turbine";
}
@ -374,6 +375,8 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
return new Object[] {tanks[0].getFill(), tanks[0].getMaxFill(), tanks[1].getFill(), tanks[1].getMaxFill(), CompatHandler.steamTypeToInt(tanks[0].getTankType())};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getFluid",
@ -383,6 +386,8 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getFluid"):

View File

@ -1,32 +1,55 @@
package com.hbm.tileentity.machine;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.UpgradeManager;
import com.hbm.inventory.container.ContainerOreSlopper;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.gui.GUIOreSlopper;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
import com.hbm.items.special.ItemBedrockOreBase;
import com.hbm.items.special.ItemBedrockOreNew;
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade;
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.IUpgradeInfoProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.util.I18nUtil;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.fluid.IFluidStandardTransceiver;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
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.client.gui.GuiScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineOreSlopper extends TileEntityMachineBase implements IGUIProvider {
public class TileEntityMachineOreSlopper extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver, IGUIProvider, IUpgradeInfoProvider {
public long power;
public static final long maxPower = 1_000_000;
public static final long maxPower = 100_000;
public static final int waterUsedBase = 1_000;
public int waterUsed = waterUsedBase;
@ -41,9 +64,13 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
public float prevSlider;
public float bucket;
public float prevBucket;
public float blades;
public float prevBlades;
public float fan;
public float prevFan;
public int delay;
public static FluidTank[] tanks;
public FluidTank[] tanks;
public double[] ores = new double[BedrockOreType.values().length];
public TileEntityMachineOreSlopper() {
@ -65,6 +92,8 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
@Override
public void updateEntity() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
if(!worldObj.isRemote) {
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
@ -73,11 +102,23 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
FluidType conversion = this.getFluidOutput(tanks[0].getTankType());
if(conversion != null) tanks[1].setTankType(conversion);
for(DirPos pos : getConPos()) {
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
if(tanks[1].getFill() > 0) this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
this.processing = false;
UpgradeManager.eval(slots, 9, 10);
int speed = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
int efficiency = Math.min(UpgradeManager.getLevel(UpgradeType.EFFECT), 3);
this.consumption = this.consumptionBase + (this.consumptionBase * speed) / 2 + (this.consumptionBase * efficiency);
if(canSlop()) {
this.power -= this.consumption;
this.progress += 1F/200F;
this.progress += 1F / (200 - speed * 50);
this.processing = true;
boolean markDirty = false;
@ -85,7 +126,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
progress -= 1F;
for(BedrockOreType type : BedrockOreType.values()) {
ores[type.ordinal()] += ItemBedrockOreBase.getOreAmount(slots[2], type);
ores[type.ordinal()] += (ItemBedrockOreBase.getOreAmount(slots[2], type) * (1D + efficiency * 0.1));
}
this.decrStackSize(2, 1);
@ -96,6 +137,22 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
if(markDirty) this.markDirty();
List<Entity> entities = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord + 1, zCoord - 0.5, xCoord + 1.5, yCoord + 3, zCoord + 1.5).offset(dir.offsetX, 0, dir.offsetZ));
for(Entity e : entities) {
e.attackEntityFrom(ModDamageSource.turbofan, 1000F);
if(!e.isEntityAlive() && e instanceof EntityLivingBase) {
NBTTagCompound vdat = new NBTTagCompound();
vdat.setString("type", "giblets");
vdat.setInteger("ent", e.getEntityId());
vdat.setInteger("cDiv", 5);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(vdat, e.posX, e.posY + e.height * 0.5, e.posZ), new TargetPoint(e.dimension, e.posX, e.posY + e.height * 0.5, e.posZ, 150));
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
}
}
} else {
this.progress = 0;
}
@ -109,16 +166,46 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
for(int i = 3; i <= 8; i++) if(slots[i] == null) {
slots[i] = output; ores[type.ordinal()] -= 1F; continue outer;
}
break outer;
}
}
this.networkPackNT(150);
} else {
this.prevSlider = this.slider;
this.prevBucket = this.bucket;
this.prevBlades = this.blades;
this.prevFan = this.fan;
if(this.processing) {
this.blades += 15F;
this.fan += 35F;
if(blades >= 360) {
blades -= 360;
prevBlades -= 360;
}
if(fan >= 360) {
fan -= 360;
prevFan -= 360;
}
if(animation == animation.DUMPING && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 4, zCoord + 0.5) <= 50) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaExt");
data.setString("mode", "blockdust");
data.setInteger("block", Block.getIdFromBlock(Blocks.iron_block));
data.setDouble("posX", xCoord + 0.5 + dir.offsetX + worldObj.rand.nextGaussian() * 0.25);
data.setDouble("posY", yCoord + 4.25);
data.setDouble("posZ", zCoord + 0.5 + dir.offsetZ + worldObj.rand.nextGaussian() * 0.25);
data.setDouble("mY", -0.2D);
MainRegistry.proxy.effectNT(data);
}
if(delay > 0) {
delay--;
return;
@ -142,7 +229,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
}
break;
case MOVE_SHREDDER:
this.slider += 1/60F;
this.slider += 1/50F;
if(slider >= 1F) {
slider = 1F;
animation = SlopperAnimation.DUMPING;
@ -153,7 +240,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
animation = SlopperAnimation.MOVE_BUCKET;
break;
case MOVE_BUCKET:
this.slider -= 1/60F;
this.slider -= 1/50F;
if(slider <= 0F) {
animation = SlopperAnimation.LOWERING;
delay = 10;
@ -163,19 +250,76 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
}
}
}
public DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
return new DirPos[] {
new DirPos(xCoord + dir.offsetX * 4, yCoord, zCoord + dir.offsetZ * 4, dir),
new DirPos(xCoord - dir.offsetX * 4, yCoord, zCoord - dir.offsetZ * 4, dir.getOpposite()),
new DirPos(xCoord + rot.offsetX * 2, yCoord, zCoord + rot.offsetZ * 2, rot),
new DirPos(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite()),
new DirPos(xCoord + dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 2, rot),
new DirPos(xCoord + dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 2, rot.getOpposite()),
new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 2, rot),
new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 2, rot.getOpposite())
};
}
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
return slot == 2 && stack.getItem() == ModItems.bedrock_ore_base;
}
@Override
public boolean canExtractItem(int i, ItemStack stack, int j) {
return i >= 3 && i <= 8;
}
private static final int[] slot_access = new int[] {2, 3, 4, 5, 6, 7, 8};
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return slot_access;
}
@Override public void serialize(ByteBuf buf) {
super.serialize(buf);
buf.writeLong(power);
buf.writeLong(consumption);
buf.writeFloat(progress);
buf.writeBoolean(processing);
tanks[0].serialize(buf);
tanks[1].serialize(buf);
}
@Override public void deserialize(ByteBuf buf) {
super.deserialize(buf);
this.power = buf.readLong();
this.consumption = buf.readLong();
this.progress = buf.readFloat();
this.processing = buf.readBoolean();
tanks[0].deserialize(buf);
tanks[1].deserialize(buf);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.power = nbt.getLong("power");
this.progress = nbt.getFloat("progress");
tanks[0].readFromNBT(nbt, "water");
tanks[1].readFromNBT(nbt, "slop");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("power", power);
nbt.setFloat("progress", progress);
tanks[0].writeToNBT(nbt, "water");
tanks[1].writeToNBT(nbt, "slop");
}
public boolean canSlop() {
@ -192,6 +336,39 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
return null;
}
@Override public long getPower() { return power; }
@Override public void setPower(long power) { this.power = power; }
@Override public long getMaxPower() { return maxPower; }
@Override public FluidTank[] getAllTanks() { return tanks; }
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] {tanks[1]}; }
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {tanks[0]}; }
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 3,
yCoord,
zCoord - 3,
xCoord + 4,
yCoord + 7,
zCoord + 4
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerOreSlopper(player.inventory, this);
@ -202,4 +379,29 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIOreSlopper(player.inventory, this);
}
@Override
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
return type == UpgradeType.SPEED || type == UpgradeType.EFFECT;
}
@Override
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_ore_slopper));
if(type == UpgradeType.SPEED) {
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 25) + "%"));
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 50) + "%"));
}
if(type == UpgradeType.EFFECT) {
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_EFFICIENCY, "+" + (level * 10) + "%"));
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 100) + "%"));
}
}
@Override
public int getMaxLevel(UpgradeType type) {
if(type == UpgradeType.SPEED) return 3;
if(type == UpgradeType.EFFECT) return 3;
return 0;
}
}

View File

@ -603,6 +603,7 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
//OC compat!
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_radar";
}
@ -684,6 +685,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
return new Object[]{false, e.posX, e.posY, e.posZ, type};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getSettings",
@ -698,6 +701,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getSettings"):

View File

@ -217,6 +217,7 @@ public class TileEntityMachineReactorBreeding extends TileEntityMachineBase impl
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "breeding_reactor";
}

View File

@ -340,6 +340,7 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_turbine";
}

View File

@ -557,6 +557,7 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_gas_turbine";
}
@ -641,6 +642,8 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
tanks[3].getFill(), tanks[3].getMaxFill()};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getFluid",
@ -657,6 +660,8 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getFluid"):

View File

@ -220,6 +220,7 @@ public class TileEntityMicrowave extends TileEntityMachineBase implements IEnerg
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "microwave";
}

View File

@ -547,6 +547,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_pwr_control";
}

View File

@ -255,6 +255,7 @@ public class TileEntityReactorControl extends TileEntityMachineBase implements I
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "reactor_control";
}

View File

@ -397,6 +397,7 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "research_reactor";
}
@ -431,6 +432,8 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
return new Object[] {heat, level, targetLevel, totalFlux};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getTemp",
@ -441,6 +444,8 @@ public class TileEntityReactorResearch extends TileEntityMachineBase implements
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getTemp"):

View File

@ -548,6 +548,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "zirnox_reactor";
}
@ -601,6 +602,8 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
return new Object[] {};
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {
"getTemp",
@ -614,6 +617,8 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch(method) {
case ("getTemp"):

View File

@ -10,16 +10,21 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.lib.Library;
import com.hbm.packet.BufPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.IBufPacketReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import api.hbm.fluid.IFluidStandardTransceiver;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver {
public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFluidAcceptor, IFluidSource, IFluidStandardTransceiver, IBufPacketReceiver {
private FluidTank water;
private FluidTank steam;
@ -56,6 +61,8 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
this.sendFluid(steam, worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
heat = 0;
networkPackNT(15);
} else {
//a delayed queue of mirror positions because we can't expect the boiler to always tick first
@ -190,4 +197,20 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
public FluidTank[] getAllTanks() {
return new FluidTank[] { water, steam };
}
public void networkPackNT(int range) {
if(!worldObj.isRemote) PacketDispatcher.wrapper.sendToAllAround(new BufPacket(xCoord, yCoord, zCoord, this), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
}
@Override
public void serialize(ByteBuf buf) {
water.serialize(buf);
steam.serialize(buf);
}
@Override
public void deserialize(ByteBuf buf) {
water.deserialize(buf);
steam.deserialize(buf);
}
}

View File

@ -338,6 +338,7 @@ public class TileEntityCraneConsole extends TileEntity implements INBTPacketRece
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_crane";
}

View File

@ -33,7 +33,6 @@ import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.ArrayList;
import java.util.List;
@ -345,6 +344,7 @@ public class TileEntityRBMKBoiler extends TileEntityRBMKSlottedBase implements I
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_boiler";
}

View File

@ -14,6 +14,7 @@ import com.hbm.inventory.gui.GUIRBMKConsole;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKControlManual.RBMKColor;
import com.hbm.util.Compat;
import com.hbm.util.EnumUtil;
import com.hbm.util.I18nUtil;
@ -88,7 +89,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) {
TileEntity te = worldObj.getTileEntity(targetX + i, targetY, targetZ + j);
TileEntity te = Compat.getTileStandard(worldObj, targetX + i, targetY, targetZ + j);
int index = (i + 7) + (j + 7) * 15;
if(te instanceof TileEntityRBMKBase) {
@ -266,7 +267,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int x = data.getInteger(key) % 15 - 7;
int z = data.getInteger(key) / 15 - 7;
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + z);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
if(te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -307,7 +308,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int x = i % 15 - 7;
int z = i / 15 - 7;
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + z);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
if(te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -324,7 +325,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int x = i % 15 - 7;
int z = i / 15 - 7;
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + z);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + z);
if(te instanceof TileEntityRBMKBoiler) {
TileEntityRBMKBoiler rod = (TileEntityRBMKBoiler) te;
@ -521,6 +522,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_console";
}
@ -533,7 +535,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int i = (y + 7) * 15 + (x + 7);
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + y);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + y);
if (te instanceof TileEntityRBMKBase) {
TileEntityRBMKBase column = (TileEntityRBMKBase) te;
@ -602,7 +604,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
boolean foundRods = false;
for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) {
TileEntity te = worldObj.getTileEntity(targetX + i, targetY, targetZ + j);
TileEntity te = Compat.getTileStandard(worldObj, targetX + i, targetY, targetZ + j);
if (te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -628,7 +630,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int y = -args.checkInteger(1) + 7;
double new_level = args.checkDouble(2);
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + y);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + y);
if (te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -651,7 +653,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
if(color >= 0 && color <=4){
for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) {
TileEntity te = worldObj.getTileEntity(targetX + i, targetY, targetZ + j);
TileEntity te = Compat.getTileStandard(worldObj, targetX + i, targetY, targetZ + j);
if (te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -681,7 +683,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
int y = -args.checkInteger(1) + 7;
int new_color = args.checkInteger(2);
if(new_color >= 0 && new_color <=4){
TileEntity te = worldObj.getTileEntity(targetX + x, targetY, targetZ + y);
TileEntity te = Compat.getTileStandard(worldObj, targetX + x, targetY, targetZ + y);
if (te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;
@ -700,7 +702,7 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
boolean hasRods = false;
for(int i = -7; i <= 7; i++) {
for(int j = -7; j <= 7; j++) {
TileEntity te = worldObj.getTileEntity(targetX + i, targetY, targetZ + j);
TileEntity te = Compat.getTileStandard(worldObj, targetX + i, targetY, targetZ + j);
if (te instanceof TileEntityRBMKControlManual) {
TileEntityRBMKControlManual rod = (TileEntityRBMKControlManual) te;

View File

@ -11,7 +11,6 @@ import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase implements SimpleComponent, CompatHandler.OCComponent {
@ -125,6 +124,7 @@ public abstract class TileEntityRBMKControl extends TileEntityRBMKSlottedBase im
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_control_rod";
}

View File

@ -17,7 +17,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
@ -147,6 +146,7 @@ public class TileEntityRBMKCooler extends TileEntityRBMKBase implements IFluidAc
//do some opencomputers stuff
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_cooler";
}

View File

@ -29,7 +29,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.ArrayList;
import java.util.List;
@ -279,6 +278,7 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
//opencomputers stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_heater";
}

View File

@ -27,7 +27,6 @@ import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implements IRBMKFluxReceiver, IFluidStandardSender, SimpleComponent, CompatHandler.OCComponent {
@ -224,6 +223,7 @@ public class TileEntityRBMKOutgasser extends TileEntityRBMKSlottedBase implement
//do some opencomputers stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_outgasser";
}

View File

@ -393,6 +393,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "rbmk_fuel_rod";
}

View File

@ -401,6 +401,7 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_fluid_tank";
}
@ -430,11 +431,18 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {"getFluidStored", "getMaxStored", "getTypeStored", "getInfo"};
return new String[] {
"getFluidStored",
"getMaxStored",
"getTypeStored",
"getInfo"
};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch (method) {
case "getFluidStored":

View File

@ -290,6 +290,7 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
// do some opencomputer stuff
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_energy_storage"; //ok if someone else can figure out how to do this that'd be nice (change the component name based on the type of storage block)
}

View File

@ -488,6 +488,7 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
}
@Override
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_fluid_tank";
}
@ -517,11 +518,17 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
}
@Override
@Optional.Method(modid = "OpenComputers")
public String[] methods() {
return new String[] {"getFluidStored", "getMaxStored", "getTypeStored", "getInfo"};
return new String[] {
"getFluidStored",
"getMaxStored",
"getTypeStored",
"getInfo"};
}
@Override
@Optional.Method(modid = "OpenComputers")
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
switch (method) {
case "getFluidStored":

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