more caching because sure

This commit is contained in:
Bob 2026-01-03 12:22:56 +01:00
parent a7afacfaf2
commit b20d5f46b2
24 changed files with 193 additions and 174 deletions

View File

@ -1,9 +1,20 @@
## Added
* New battery system
* Energy storage blocks, capacitors and battery items are now deprecated, but can still be used
* There is now new types of battery items, as well as capacitor items
* Instead of energy storage blocks, there is now a battery socket, which allows those new items to be connected to the power grid
* Battery sockets act like cables, they will connect power grids when two cables are plugged into them in different directions
* Self-chargers and creative batteries are still around, as well as spark batteries which are needed for the balefire bomb
## Changed ## Changed
* Updated italian localization
* After not being part of worldgen for a long time, oily coal is finally being removed * After not being part of worldgen for a long time, oily coal is finally being removed
* The rare metal blocks that had been unobtainable and unused for the longest time have been removed * The rare metal blocks that had been unobtainable and unused for the longest time have been removed
* The schrabidium transmutator's grace period is over, it is finally being destroyed * The schrabidium transmutator's grace period is over, it is finally being destroyed
* Most of the legacy fusion reactor components, which were unobtainable and unusable, have been removed * Most of the legacy fusion reactor components, which were unobtainable and unusable, have been removed
* The block ID economy is looking better than ever * The block ID economy is looking better than ever
* Infinite water barrels can now be crafted with any water container and not just buckets
* OpenComputers integration for the PWR can now also read the heat capacity stats
## Fixed ## Fixed
* Fixed meteors using a nonexistant keepalive timer, causing potential audio flickering in certain cases * Fixed meteors using a nonexistant keepalive timer, causing potential audio flickering in certain cases

View File

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

View File

@ -3,7 +3,6 @@ package api.hbm.energymk2;
import com.hbm.handler.threading.PacketThreading; import com.hbm.handler.threading.PacketThreading;
import com.hbm.interfaces.NotableComments; import com.hbm.interfaces.NotableComments;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos; import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.Nodespace.PowerNode; import api.hbm.energymk2.Nodespace.PowerNode;
@ -39,7 +38,7 @@ public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) { public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z); TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false; boolean red = false;
if(te instanceof IEnergyConductorMK2) { if(te instanceof IEnergyConductorMK2) {

View File

@ -5,7 +5,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode; import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace; import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos; import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority; import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
@ -28,7 +27,7 @@ public interface IFluidReceiverMK2 extends IFluidUserMK2 {
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) { public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z); TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false; boolean red = false;
if(te instanceof IFluidConnectorMK2) { if(te instanceof IFluidConnectorMK2) {

View File

@ -6,7 +6,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode; import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace; import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos; import com.hbm.util.fauxpointtwelve.DirPos;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -30,7 +29,7 @@ public interface IFluidStandardSenderMK2 extends IFluidProviderMK2 {
public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) { public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) {
TileEntity te = Compat.getTileStandard(world, x, y, z); TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false; boolean red = false;
if(te instanceof IFluidConnectorMK2) { if(te instanceof IFluidConnectorMK2) {

View File

@ -1,7 +1,55 @@
package api.hbm.tile; package api.hbm.tile;
import java.util.HashMap;
import java.util.Map;
import com.hbm.util.Compat;
import com.hbm.util.Tuple.Quartet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
/** For anything that should be removed off networks when considered unloaded, only affects providers and receivers, not links. Must not necessarily be a tile. */ /** For anything that should be removed off networks when considered unloaded, only affects providers and receivers, not links. Must not necessarily be a tile. */
public interface ILoadedTile { public interface ILoadedTile {
public boolean isLoaded(); public boolean isLoaded();
// should we gunk this into the API? no, but i don't care
public static class TileAccessCache {
public static Map<Quartet, TileAccessCache> cache = new HashMap();
public static int NULL_CACHE = 20;
public static int NONNULL_CACHE = 60;
public TileEntity tile;
public long expiresOn;
public TileAccessCache(TileEntity tile, long expiresOn) {
this.tile = tile;
this.expiresOn = expiresOn;
}
public boolean hasExpired(long worldTime) {
if(tile != null && tile.isInvalid()) return true;
if(worldTime >= expiresOn) return true;
if(tile instanceof ILoadedTile && !((ILoadedTile) tile).isLoaded()) return true;
return false;
}
public static Quartet publicCumRag = new Quartet(0, 0, 0, 0);
public static TileEntity getTileOrCache(World world, int x, int y, int z) {
publicCumRag.mangle(x, y, z, world.provider.dimensionId);
TileAccessCache cache = TileAccessCache.cache.get(publicCumRag);
if(cache == null || cache.hasExpired(world.getTotalWorldTime())) {
TileEntity tile = Compat.getTileStandard(world, x, y, z);
cache = new TileAccessCache(tile, world.getTotalWorldTime() + (tile == null ? NULL_CACHE : NONNULL_CACHE));
TileAccessCache.cache.put(publicCumRag.clone(), cache);
return tile;
} else {
return cache.tile;
}
}
}
} }

View File

@ -1,7 +1,6 @@
package com.hbm.blocks.machine; package com.hbm.blocks.machine;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.tileentity.machine.TileEntityRadiobox; import com.hbm.tileentity.machine.TileEntityRadiobox;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -47,31 +46,17 @@ public class Radiobox extends BlockContainer {
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { 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; int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0) if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
{ if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
world.setBlockMetadataWithNotify(x, y, z, 2, 2); if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
} if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 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 @Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote) if(world.isRemote) {
{
return true; return true;
} else if(!player.isSneaking()) } else if(!player.isSneaking()) {
{
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z); TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) { if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) {
@ -93,78 +78,53 @@ public class Radiobox extends BlockContainer {
return true; return true;
} else { } else {
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_radiobox, world, x, y, z);
//return true;
return false; return false;
} }
} }
@Override @Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
{
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_); int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
float f = 0.0625F; float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f); this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) switch(te) {
{
case 4: case 4:
case 8: case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 2: case 2:
case 6: case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 5: case 5:
case 9: case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 3: case 3:
case 7: case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
} }
} }
@Override @Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
int te = world.getBlockMetadata(x, y, z); int te = world.getBlockMetadata(x, y, z);
float f = 0.0625F; float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f); this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) switch(te) {
{
case 4: case 4:
case 8: case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 2: case 2:
case 6: case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 5: case 5:
case 9: case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 3: case 3:
case 7: case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
} }
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
} }
public void breakBlock(World world, int x, int y, int z, Block b, int m) { public void breakBlock(World world, int x, int y, int z, Block b, int m) {
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z); TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
if(box.infinite) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.battery_spark)));
if(box.infinite) { super.breakBlock(world, x, y, z, b, m);
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, ItemBattery.getEmptyBattery(ModItems.battery_spark))); }
}
super.breakBlock(world, x, y, z, b, m);
}
} }

View File

@ -0,0 +1,46 @@
package com.hbm.commands;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.ChatBuilder;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.EnumChatFormatting;
public class CommandReapNetworks extends CommandBase {
@Override
public String getCommandName() {
return "ntmreapnetworks";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/ntmreapnetworks";
}
@Override
public void processCommand(ICommandSender sender, String[] args) {
try {
UniNodespace.activeNodeNets.forEach((net) -> {
net.links.forEach((link) -> { ((GenNode)link).expired = true; });
net.links.clear();
net.providerEntries.clear();
net.receiverEntries.clear();
});
UniNodespace.activeNodeNets.clear();
UniNodespace.worlds.clear();
} catch(Exception ex) {
sender.addChatMessage(ChatBuilder.start("----------------------------------").color(EnumChatFormatting.GRAY).flush());
sender.addChatMessage(ChatBuilder.start("An error has occoured during network reap, consult the log for details.").color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start(ex.getLocalizedMessage()).color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start(ex.getStackTrace()[0].toString()).color(EnumChatFormatting.RED).flush());
sender.addChatMessage(ChatBuilder.start("----------------------------------").color(EnumChatFormatting.GRAY).flush());
throw ex;
}
}
}

View File

@ -9,6 +9,7 @@ import static com.hbm.inventory.OreDictManager.*;
import com.hbm.items.ItemEnums.EnumPlantType; import com.hbm.items.ItemEnums.EnumPlantType;
import com.hbm.items.ItemGenericPart.EnumPartType; import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType; import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.tool.ItemBlowtorch; import com.hbm.items.tool.ItemBlowtorch;
import com.hbm.items.tool.ItemModMinecart; import com.hbm.items.tool.ItemModMinecart;
@ -62,10 +63,10 @@ public class ToolRecipes {
addShovel( DESH.ingot(), ModItems.desh_shovel); addShovel( DESH.ingot(), ModItems.desh_shovel);
addHoe( DESH.ingot(), ModItems.desh_hoe); addHoe( DESH.ingot(), ModItems.desh_hoe);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, KEY_STICK }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, KEY_STICK });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', ANY_PLASTIC.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', ANY_PLASTIC.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK });
@ -136,7 +137,7 @@ public class ToolRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.mirror_tool), new Object[] { " A ", " IA", "I ", 'A', AL.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_tool), new Object[] { " A ", " IA", "I ", 'A', PB.ingot(), 'I', IRON.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', ModItems.battery_generic }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.power_net_tool), new Object[] { "WRW", " I ", " B ", 'W', MINGRADE.wireFine(), 'R', REDSTONE.dust(), 'I', IRON.ingot(), 'B', EnumBatteryPack.BATTERY_LEAD.stack() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.analysis_tool), new Object[] { " G", " S ", "S ", 'G', KEY_ANYPANE, 'S', STEEL.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.analysis_tool), new Object[] { " G", " S ", "S ", 'G', KEY_ANYPANE, 'S', STEEL.ingot() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.toolbox), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.toolbox), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() });

View File

@ -794,7 +794,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(STEEL.shell(), 3), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(STEEL.shell(), 3), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg")); .setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turrettauon").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_tauon, 1)) this.register(new GenericRecipe("ass.turrettauon").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_tauon, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(CU.ingot(), 32), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.battery_lithium, 1), new ComparableStack(ModItems.crt_display, 1)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.motor_desh, 1), new OreDictStack(CU.ingot(), 32), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg")); .setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.turretrichard").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_richard, 1)) this.register(new GenericRecipe("ass.turretrichard").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_richard, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.shell(), 8), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.shell(), 8), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
@ -803,7 +803,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 10), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 10), new OreDictStack(WEAPONSTEEL.mechanism(), 3), new ComparableStack(ModBlocks.crate_steel, 1), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg")); .setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.maxwell").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_maxwell, 1)) this.register(new GenericRecipe("ass.maxwell").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_maxwell, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 4), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.magnetron, 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8), new ComparableStack(ModItems.crt_display, 1)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.CAPACITOR_NIOBIUM), new OreDictStack(STEEL.ingot(), 24), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 4), new OreDictStack(BIGMT.mechanism(), 3), new ComparableStack(ModItems.magnetron, 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8), new ComparableStack(ModItems.crt_display, 1))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg")); .setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
this.register(new GenericRecipe("ass.fritz").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_fritz, 1)) this.register(new GenericRecipe("ass.fritz").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_fritz, 1))
.inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel)) .inputItems(new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel))

View File

@ -6,6 +6,7 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.FluidContainer; import com.hbm.inventory.FluidContainer;
import com.hbm.inventory.FluidContainerRegistry; import com.hbm.inventory.FluidContainerRegistry;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.util.Tuple.Triplet; import com.hbm.util.Tuple.Triplet;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@ -48,32 +49,17 @@ public class MachineRecipes {
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>(); ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
fuels.add(new ItemStack(ModItems.battery_potato)); fuels.add(new ItemStack(ModItems.battery_potato));
fuels.add(new ItemStack(ModItems.battery_potatos)); fuels.add(new ItemStack(ModItems.battery_potatos));
fuels.add(new ItemStack(ModItems.battery_generic));
fuels.add(new ItemStack(ModItems.battery_red_cell));
fuels.add(new ItemStack(ModItems.battery_red_cell_6));
fuels.add(new ItemStack(ModItems.battery_red_cell_24));
fuels.add(new ItemStack(ModItems.battery_advanced));
fuels.add(new ItemStack(ModItems.battery_advanced_cell));
fuels.add(new ItemStack(ModItems.battery_advanced_cell_4));
fuels.add(new ItemStack(ModItems.battery_advanced_cell_12));
fuels.add(new ItemStack(ModItems.battery_lithium));
fuels.add(new ItemStack(ModItems.battery_lithium_cell));
fuels.add(new ItemStack(ModItems.battery_lithium_cell_3));
fuels.add(new ItemStack(ModItems.battery_lithium_cell_6));
fuels.add(new ItemStack(ModItems.battery_schrabidium));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_2));
fuels.add(new ItemStack(ModItems.battery_schrabidium_cell_4));
fuels.add(new ItemStack(ModItems.battery_trixite));
fuels.add(new ItemStack(ModItems.battery_spark));
fuels.add(new ItemStack(ModItems.battery_spark_cell_6));
fuels.add(new ItemStack(ModItems.battery_spark_cell_25));
fuels.add(new ItemStack(ModItems.battery_spark_cell_100));
fuels.add(new ItemStack(ModItems.battery_spark_cell_1000));
fuels.add(new ItemStack(ModItems.battery_spark_cell_10000));
fuels.add(new ItemStack(ModItems.battery_spark_cell_power));
fuels.add(new ItemStack(ModItems.fusion_core)); fuels.add(new ItemStack(ModItems.fusion_core));
fuels.add(new ItemStack(ModItems.energy_core)); fuels.add(new ItemStack(ModItems.energy_core));
for(EnumBatteryPack num : EnumBatteryPack.values()) fuels.add(new ItemStack(ModItems.battery_pack, 1, num.ordinal()));
fuels.add(new ItemStack(ModItems.battery_creative));
fuels.add(new ItemStack(ModItems.battery_sc_uranium));
fuels.add(new ItemStack(ModItems.battery_sc_technetium));
fuels.add(new ItemStack(ModItems.battery_sc_plutonium));
fuels.add(new ItemStack(ModItems.battery_sc_polonium));
fuels.add(new ItemStack(ModItems.battery_sc_gold));
fuels.add(new ItemStack(ModItems.battery_sc_lead));
fuels.add(new ItemStack(ModItems.battery_sc_americium));
return fuels; return fuels;
} }

View File

@ -740,8 +740,6 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)), new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 1)), new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 1)),
new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F), new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F),
new AnvilOutput(new ItemStack(ModItems.battery_generic, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_advanced, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.01F) new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.01F)
} }
@ -753,7 +751,6 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)), new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 2)), new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 2)),
new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F), new AnvilOutput(new ItemStack(Items.bread, 1), 0.5F),
new AnvilOutput(new ItemStack(ModItems.battery_lithium, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_sc_uranium, 1), 0.1F), new AnvilOutput(new ItemStack(ModItems.battery_sc_uranium, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.05F) new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.05F)

View File

@ -9,6 +9,7 @@ import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType; import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted; import com.hbm.items.machine.ItemRTGPelletDepleted;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.tool.ItemBlowtorch; import com.hbm.items.tool.ItemBlowtorch;
import net.minecraft.init.Items; import net.minecraft.init.Items;
@ -45,7 +46,7 @@ public class ItemPoolsComponent {
weighted(ModItems.coil_copper_torus, 0, 1, 2, 3), weighted(ModItems.coil_copper_torus, 0, 1, 2, 3),
weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 1, 8, 5), weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 1, 8, 5),
weighted(ModItems.piston_selenium, 0, 1, 1, 3), weighted(ModItems.piston_selenium, 0, 1, 1, 3),
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 3), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 3),
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4), weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4),
weighted(ModItems.circuit, EnumCircuitType.PCB.ordinal(), 1, 3, 5), weighted(ModItems.circuit, EnumCircuitType.PCB.ordinal(), 1, 3, 5),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3), weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
@ -81,7 +82,7 @@ public class ItemPoolsComponent {
weighted(ModItems.missile_generic, 0, 1, 1, 4), weighted(ModItems.missile_generic, 0, 1, 1, 4),
weighted(ModItems.missile_incendiary, 0, 1, 1, 4), weighted(ModItems.missile_incendiary, 0, 1, 1, 4),
weighted(ModItems.gas_mask_m65, 0, 1, 1, 5), weighted(ModItems.gas_mask_m65, 0, 1, 1, 5),
weighted(ModItems.battery_advanced, 0, 1, 1, 5), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 3),
weighted(ModItems.designator, 0, 1, 1, 5), weighted(ModItems.designator, 0, 1, 1, 5),
weighted(ModItems.thruster_small, 0, 1, 1, 5), weighted(ModItems.thruster_small, 0, 1, 1, 5),
weighted(ModItems.thruster_medium, 0, 1, 1, 4), weighted(ModItems.thruster_medium, 0, 1, 1, 4),

View File

@ -4,6 +4,7 @@ import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.material.Mats; import com.hbm.inventory.material.Mats;
import com.hbm.items.ItemEnums.EnumCasingType; import com.hbm.items.ItemEnums.EnumCasingType;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType; import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType; import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType; import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
@ -52,8 +53,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.casing, EnumCasingType.SMALL.ordinal(), 4, 10, 3), weighted(ModItems.casing, EnumCasingType.SMALL.ordinal(), 4, 10, 3),
weighted(ModItems.casing, EnumCasingType.SHOTSHELL.ordinal(), 4, 10, 3), weighted(ModItems.casing, EnumCasingType.SHOTSHELL.ordinal(), 4, 10, 3),
weighted(ModItems.cordite, 0, 4, 6, 5), weighted(ModItems.cordite, 0, 4, 6, 5),
weighted(ModItems.battery_generic, 0, 1, 1, 4), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.battery_advanced, 0, 1, 1, 2),
weighted(ModItems.scrap, 0, 1, 3, 10), weighted(ModItems.scrap, 0, 1, 3, 10),
weighted(ModItems.dust, 0, 2, 4, 9), weighted(ModItems.dust, 0, 2, 4, 9),
weighted(ModItems.bottle_opener, 0, 1, 1, 2), weighted(ModItems.bottle_opener, 0, 1, 1, 2),
@ -79,8 +79,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 2, 3, 7), weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 2, 3, 7),
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 1, 4), weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 1, 4),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 2), weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 2),
weighted(ModItems.battery_generic, 0, 1, 1, 4), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.battery_advanced, 0, 1, 1, 3),
weighted(ModItems.powder_iodine, 0, 1, 1, 1), weighted(ModItems.powder_iodine, 0, 1, 1, 1),
weighted(ModItems.powder_bromine, 0, 1, 1, 1), weighted(ModItems.powder_bromine, 0, 1, 1, 1),
weighted(ModBlocks.steel_poles, 0, 1, 4, 8), weighted(ModBlocks.steel_poles, 0, 1, 4, 8),
@ -116,9 +115,7 @@ public class ItemPoolsLegacy {
weighted(ModItems.grenade_smart, 0, 1, 3, 3), weighted(ModItems.grenade_smart, 0, 1, 3, 3),
weighted(ModItems.grenade_mirv, 0, 1, 1, 2), weighted(ModItems.grenade_mirv, 0, 1, 1, 2),
weighted(ModItems.stealth_boy, 0, 1, 1, 2), weighted(ModItems.stealth_boy, 0, 1, 1, 2),
weighted(ModItems.battery_advanced, 0, 1, 1, 3), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LITHIUM.ordinal(), 1, 1, 1),
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 2),
weighted(ModItems.battery_schrabidium, 0, 1, 1, 1),
weighted(ModItems.syringe_awesome, 0, 1, 1, 1), weighted(ModItems.syringe_awesome, 0, 1, 1, 1),
weighted(ModItems.fusion_core, 0, 1, 1, 4), weighted(ModItems.fusion_core, 0, 1, 1, 4),
weighted(ModItems.bottle_nuka, 0, 1, 3, 6), weighted(ModItems.bottle_nuka, 0, 1, 3, 6),
@ -215,7 +212,7 @@ public class ItemPoolsLegacy {
//spaceship double chests //spaceship double chests
new ItemPool(POOL_SPACESHIP) {{ new ItemPool(POOL_SPACESHIP) {{
this.pool = new WeightedRandomChestContent[] { this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.battery_advanced, 0, 1, 1, 5), weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LEAD.ordinal(), 1, 1, 2),
weighted(ModItems.ingot_advanced_alloy, 0, 2, 16, 5), weighted(ModItems.ingot_advanced_alloy, 0, 2, 16, 5),
weighted(ModItems.wire_fine, Mats.MAT_ALLOY.id, 8, 32, 5), weighted(ModItems.wire_fine, Mats.MAT_ALLOY.id, 8, 32, 5),
weighted(ModItems.coil_advanced_alloy, 0, 2, 16, 5), weighted(ModItems.coil_advanced_alloy, 0, 2, 16, 5),

View File

@ -42,7 +42,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_STANDARD) {{ new ItemPool(POOL_VAULT_STANDARD) {{
this.pool = new WeightedRandomChestContent[] { this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ingot_desh, 0, 2, 6, 1), weighted(ModItems.ingot_desh, 0, 2, 6, 1),
weighted(ModItems.battery_advanced_cell_4, 0, 1, 1, 1),
weighted(ModItems.powder_desh_mix, 0, 1, 5, 1), weighted(ModItems.powder_desh_mix, 0, 1, 5, 1),
weighted(Items.diamond, 0, 3, 6, 1), weighted(Items.diamond, 0, 3, 6, 1),
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD.ordinal(), 1, 1, 1), weighted(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD.ordinal(), 1, 1, 1),
@ -59,7 +58,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_REINFORCED) {{ new ItemPool(POOL_VAULT_REINFORCED) {{
this.pool = new WeightedRandomChestContent[] { this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ingot_desh, 0, 6, 16, 1), weighted(ModItems.ingot_desh, 0, 6, 16, 1),
weighted(ModItems.battery_lithium, 0, 1, 1, 1),
weighted(ModItems.powder_power, 0, 1, 5, 1), weighted(ModItems.powder_power, 0, 1, 5, 1),
weighted(ModItems.sat_chip, 0, 1, 1, 1), weighted(ModItems.sat_chip, 0, 1, 1, 1),
weighted(Items.diamond, 0, 5, 9, 1), weighted(Items.diamond, 0, 5, 9, 1),
@ -81,7 +79,6 @@ public class ItemPoolsSingle {
weighted(ModItems.gun_carbine, 0, 1, 1, 1), weighted(ModItems.gun_carbine, 0, 1, 1, 1),
weighted(ModItems.ammo_standard, EnumAmmo.R762_DU.ordinal(), 16, 32, 1), weighted(ModItems.ammo_standard, EnumAmmo.R762_DU.ordinal(), 16, 32, 1),
weighted(ModItems.gun_congolake, 0, 1, 1, 1), weighted(ModItems.gun_congolake, 0, 1, 1, 1),
weighted(ModItems.battery_schrabidium_cell, 0, 1, 1, 1),
weighted(ModItems.circuit, EnumCircuitType.ADVANCED.ordinal(), 6, 12, 1) weighted(ModItems.circuit, EnumCircuitType.ADVANCED.ordinal(), 6, 12, 1)
}; };
}}; }};

View File

@ -1631,8 +1631,6 @@ public class ModItems {
@Deprecated public static Item battery_advanced; @Deprecated public static Item battery_advanced;
@Deprecated public static Item battery_lithium; @Deprecated public static Item battery_lithium;
@Deprecated public static Item battery_schrabidium; @Deprecated public static Item battery_schrabidium;
@Deprecated public static Item battery_spark;
@Deprecated public static Item battery_trixite;
@Deprecated public static Item battery_red_cell; @Deprecated public static Item battery_red_cell;
@Deprecated public static Item battery_red_cell_6; @Deprecated public static Item battery_red_cell_6;
@Deprecated public static Item battery_red_cell_24; @Deprecated public static Item battery_red_cell_24;
@ -1656,6 +1654,8 @@ public class ModItems {
public static Item battery_pack; public static Item battery_pack;
public static Item battery_creative; public static Item battery_creative;
public static Item cube_power; public static Item cube_power;
@Deprecated public static Item battery_spark;
@Deprecated public static Item battery_trixite;
public static Item battery_sc_uranium; public static Item battery_sc_uranium;
public static Item battery_sc_technetium; public static Item battery_sc_technetium;
@ -3873,8 +3873,8 @@ public class ModItems {
battery_advanced = new ItemBattery(20000, 500, 500).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_new"); battery_advanced = new ItemBattery(20000, 500, 500).setUnlocalizedName("battery_advanced").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_advanced_new");
battery_lithium = new ItemBattery(250000, 1000, 1000).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium"); battery_lithium = new ItemBattery(250000, 1000, 1000).setUnlocalizedName("battery_lithium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_lithium");
battery_schrabidium = new ItemBattery(1000000, 5000, 5000).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_new"); battery_schrabidium = new ItemBattery(1000000, 5000, 5000).setUnlocalizedName("battery_schrabidium").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_schrabidium_new");
battery_spark = new ItemBattery(100000000, 2000000, 2000000).setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark"); battery_spark = new Item().setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":battery_spark");
battery_trixite = new ItemBattery(5000000, 40000, 200000).setUnlocalizedName("battery_trixite").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_trixite"); battery_trixite = new Item().setUnlocalizedName("battery_trixite").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":battery_trixite");
battery_red_cell = new ItemBattery(15000, 100, 100).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell"); battery_red_cell = new ItemBattery(15000, 100, 100).setUnlocalizedName("battery_red_cell").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell");
battery_red_cell_6 = new ItemBattery(15000 * 6, 100, 100).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_6"); battery_red_cell_6 = new ItemBattery(15000 * 6, 100, 100).setUnlocalizedName("battery_red_cell_6").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_6");
battery_red_cell_24 = new ItemBattery(15000 * 24, 100, 100).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_24"); battery_red_cell_24 = new ItemBattery(15000 * 24, 100, 100).setUnlocalizedName("battery_red_cell_24").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_red_cell_24");

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.hbm.interfaces.IOrderedEnum; import com.hbm.interfaces.IOrderedEnum;
import com.hbm.items.ItemEnumMulti; import com.hbm.items.ItemEnumMulti;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.util.BobMathUtil; import com.hbm.util.BobMathUtil;
@ -67,6 +68,7 @@ public class ItemBatteryPack extends ItemEnumMulti implements IBatteryItem {
} }
public boolean isCapacitor() { return this.ordinal() > BATTERY_QUANTUM.ordinal(); } public boolean isCapacitor() { return this.ordinal() > BATTERY_QUANTUM.ordinal(); }
public ItemStack stack() { return new ItemStack(ModItems.battery_pack, 1, this.ordinal()); }
} }
@Override @Override
@ -95,7 +97,7 @@ public class ItemBatteryPack extends ItemEnumMulti implements IBatteryItem {
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i); stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i);
} else { } else {
stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", this.getMaxCharge(stack) - i); stack.stackTagCompound.setLong("charge", 0);
} }
} }
@ -105,7 +107,7 @@ public class ItemBatteryPack extends ItemEnumMulti implements IBatteryItem {
return stack.stackTagCompound.getLong("charge"); return stack.stackTagCompound.getLong("charge");
} else { } else {
stack.stackTagCompound = new NBTTagCompound(); stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", getMaxCharge(stack)); stack.stackTagCompound.setLong("charge", 0);
return stack.stackTagCompound.getLong("charge"); return stack.stackTagCompound.getLong("charge");
} }
} }

View File

@ -181,10 +181,6 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.piston_selenium, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.piston_selenium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.DIESEL.getID())); player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.DIESEL.getID()));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.BIOFUEL.getID())); player.inventory.addItemStackToInventory(new ItemStack(ModItems.canister_full, 16, Fluids.BIOFUEL.getID()));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_advanced_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_advanced_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_lithium, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_potato, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.screwdriver, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_excavator, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_excavator, 1));
@ -383,7 +379,6 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_range, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_range, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_manual, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.designator_manual, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.battery_schrabidium_cell_4, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_generic, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_generic, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_strong, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_strong, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_burst, 1)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_burst, 1));

View File

@ -443,7 +443,7 @@ public class LegoClient {
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1); double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5); GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5);
int colorInner = ((int)(r * age) << 16) | ((int)(g * age) << 8) | (int) (b * age); int colorInner = ((int)(r * age) << 16) | ((int)(g * age) << 8) | (int) (b * age);
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), 0F, 8, 0.0625F); BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), 0F, 4, 0.025F);
GL11.glPopMatrix(); GL11.glPopMatrix();
RenderArcFurnace.fullbright(false); RenderArcFurnace.fullbright(false);
} }

View File

@ -42,7 +42,7 @@ public class MagazineElectricEngine implements IMagazine {
@Override public void reloadAction(ItemStack stack, IInventory inventory) { } @Override public void reloadAction(ItemStack stack, IInventory inventory) { }
@Override public SpentCasing getCasing(ItemStack stack, IInventory inventory) { return null; } @Override public SpentCasing getCasing(ItemStack stack, IInventory inventory) { return null; }
@Override public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) { return new ItemStack(ModItems.battery_generic); } @Override public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) { return new ItemStack(ModItems.battery_creative); }
@Override public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) { return BobMathUtil.getShortNumber(getAmount(stack, player.inventory)) + "/" + BobMathUtil.getShortNumber(this.capacity) + "HE"; } @Override public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) { return BobMathUtil.getShortNumber(getAmount(stack, player.inventory)) + "/" + BobMathUtil.getShortNumber(this.capacity) + "HE"; }
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); } @Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }

View File

@ -525,18 +525,6 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModBlocks.charge_semtex, 1), new Object[] { ModItems.stick_semtex, ModItems.stick_semtex, ModItems.stick_semtex, ModItems.ducttape }); addShapelessAuto(new ItemStack(ModBlocks.charge_semtex, 1), new Object[] { ModItems.stick_semtex, ModItems.stick_semtex, ModItems.stick_semtex, ModItems.ducttape });
addShapelessAuto(new ItemStack(ModBlocks.charge_c4, 1), new Object[] { ModItems.stick_c4, ModItems.stick_c4, ModItems.stick_c4, ModItems.ducttape }); addShapelessAuto(new ItemStack(ModBlocks.charge_c4, 1), new Object[] { ModItems.stick_c4, ModItems.stick_c4, ModItems.stick_c4, ModItems.ducttape });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_generic), new Object[] { " A ", "PRP", "PRP", 'A', AL.wireFine(), 'P', AL.plate(), 'R', REDSTONE.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PSP", "PLP", 'A', MINGRADE.wireFine(), 'P', CU.plate(), 'S', "sulfur", 'L', PB.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PLP", "PSP", 'A', MINGRADE.wireFine(), 'P', CU.plate(), 'S', "sulfur", 'L', PB.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PSP", "PLP", 'A', MINGRADE.wireFine(), 'P', CU.plate(), 'S', "dustSulfur", 'L', PB.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PLP", "PSP", 'A', MINGRADE.wireFine(), 'P', CU.plate(), 'S', "dustSulfur", 'L', PB.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_lithium), new Object[] { "A A", "PSP", "PLP", 'A', GOLD.wireFine(), 'P', TI.plate(), 'S', LI.dust(), 'L', CO.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_lithium), new Object[] { "A A", "PLP", "PSP", 'A', GOLD.wireFine(), 'P', TI.plate(), 'S', LI.dust(), 'L', CO.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium), new Object[] { " A ", "PNP", "PSP", 'A', SA326.wireFine(), 'P', SA326.plate(), 'S', SA326.dust(), 'N', NP237.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium), new Object[] { " A ", "PSP", "PNP", 'A', SA326.wireFine(), 'P', SA326.plate(), 'S', SA326.dust(), 'N', NP237.dust() });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark), new Object[] { "P", "S", "S", 'P', ModItems.plate_dineutronium, 'S', ModItems.powder_spark_mix });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_trixite), new Object[] { " A ", "PSP", "PTP", 'A', AL.wireFine(), 'P', AL.plate(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_trixite), new Object[] { " A ", "PTP", "PSP", 'A', AL.wireFine(), 'P', AL.plate(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
addRecipeAuto(ItemBattery.getFullBattery(ModItems.energy_core), new Object[] { "PCW", "TRD", "PCW", 'P', ALLOY.plate(), 'C', ModItems.coil_advanced_alloy, 'W', ALLOY.wireFine(), 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', W.ingot() }); addRecipeAuto(ItemBattery.getFullBattery(ModItems.energy_core), new Object[] { "PCW", "TRD", "PCW", 'P', ALLOY.plate(), 'C', ModItems.coil_advanced_alloy, 'W', ALLOY.wireFine(), 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', W.ingot() });
addRecipeAuto(ItemBattery.getFullBattery(ModItems.energy_core), new Object[] { "PCW", "TDR", "PCW", 'P', ALLOY.plate(), 'C', ModItems.coil_advanced_alloy, 'W', ALLOY.wireFine(), 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', W.ingot() }); addRecipeAuto(ItemBattery.getFullBattery(ModItems.energy_core), new Object[] { "PCW", "TDR", "PCW", 'P', ALLOY.plate(), 'C', ModItems.coil_advanced_alloy, 'W', ALLOY.wireFine(), 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', W.ingot() });
addRecipeAuto(new ItemStack(ModItems.hev_battery, 4), new Object[] { " W ", "IEI", "ICI", 'W', GOLD.wireFine(), 'I', ModItems.plate_polymer, 'E', REDSTONE.dust(), 'C', CO.dust() }); addRecipeAuto(new ItemStack(ModItems.hev_battery, 4), new Object[] { " W ", "IEI", "ICI", 'W', GOLD.wireFine(), 'I', ModItems.plate_polymer, 'E', REDSTONE.dust(), 'C', CO.dust() });
@ -544,26 +532,6 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModItems.hev_battery, 1), new Object[] { ModBlocks.hev_battery }); addShapelessAuto(new ItemStack(ModItems.hev_battery, 1), new Object[] { ModBlocks.hev_battery });
addShapelessAuto(new ItemStack(ModBlocks.hev_battery, 1), new Object[] { ModItems.hev_battery }); addShapelessAuto(new ItemStack(ModBlocks.hev_battery, 1), new Object[] { ModItems.hev_battery });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_red_cell), new Object[] { "WBW", "PBP", "WBW", 'W', AL.wireFine(), 'P', AL.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_generic) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell), new Object[] { "WBW", "PBP", "WBW", 'W', MINGRADE.wireFine(), 'P', CU.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell), new Object[] { "WBW", "PBP", "WBW", 'W', GOLD.wireFine(), 'P', TI.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell), new Object[] { "WBW", "PBP", "WBW", 'W', SA326.wireFine(), 'P', SA326.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_red_cell_6), new Object[] { "BBB", "WPW", "BBB", 'W', AL.wireFine(), 'P', AL.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_red_cell) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_4), new Object[] { "BWB", "WPW", "BWB", 'W', MINGRADE.wireFine(), 'P', CU.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_3), new Object[] { "WPW", "BBB", "WPW", 'W', GOLD.wireFine(), 'P', TI.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_2), new Object[] { "WPW", "BWB", "WPW", 'W', SA326.wireFine(), 'P', SA326.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_red_cell_24), new Object[] { "BWB", "WPW", "BWB", 'W', AL.wireFine(), 'P', AL.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_red_cell_6) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_12), new Object[] { "WPW", "BBB", "WPW", 'W', MINGRADE.wireFine(), 'P', CU.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_4) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_6), new Object[] { "WPW", "BWB", "WPW", 'W', GOLD.wireFine(), 'P', TI.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_3) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_4), new Object[] { "WPW", "BWB", "WPW", 'W', SA326.wireFine(), 'P', SA326.plate(), 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_2) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_6), new Object[] { "BW", "PW", "BW", 'W', MAGTUNG.wireFine(), 'P', ModItems.powder_spark_mix, 'B', ItemBattery.getEmptyBattery(ModItems.battery_spark) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_25), new Object[] { "W W", "SCS", "PSP", 'W', MAGTUNG.wireFine(), 'P', ModItems.plate_dineutronium, 'S', ModItems.powder_spark_mix, 'C', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_6) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_100), new Object[] { "W W", "BPB", "SSS", 'W', MAGTUNG.wireFine(), 'P', ModItems.plate_dineutronium, 'S', ModItems.powder_spark_mix, 'B', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_25) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_1000), new Object[] { "PCP", "CSC", "PCP", 'S', ModItems.singularity_spark, 'P', ModItems.powder_spark_mix, 'C', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_100) });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_2500), new Object[] { "SCS", "CVC", "SCS", 'C', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_100), 'V', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_1000), 'S', ModItems.powder_spark_mix });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_10000), new Object[] { "OSO", "SVS", "OSO", 'S', ModItems.singularity_spark, 'V', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_2500), 'O', ModItems.ingot_osmiridium });
addRecipeAuto(ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_power), new Object[] { "YSY", "SCS", "YSY", 'S', ModItems.singularity_spark, 'C', ItemBattery.getEmptyBattery(ModItems.battery_spark_cell_10000), 'Y', ModItems.billet_yharonite });
addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potato), new Object[] { Items.potato, AL.wireFine(), CU.wireFine() }); addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potato), new Object[] { Items.potato, AL.wireFine(), CU.wireFine() });
addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potatos), new Object[] { ItemBattery.getFullBattery(ModItems.battery_potato), ModItems.turret_chip, REDSTONE.dust() }); addShapelessAuto(ItemBattery.getFullBattery(ModItems.battery_potatos), new Object[] { ItemBattery.getFullBattery(ModItems.battery_potato), ModItems.turret_chip, REDSTONE.dust() });
@ -637,7 +605,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModItems.ams_core_sing, 1), new Object[] { "EAE", "ASA", "EAE", 'E', ModItems.plate_euphemium, 'A', ModItems.cell_anti_schrabidium, 'S', ModItems.singularity }); addRecipeAuto(new ItemStack(ModItems.ams_core_sing, 1), new Object[] { "EAE", "ASA", "EAE", 'E', ModItems.plate_euphemium, 'A', ModItems.cell_anti_schrabidium, 'S', ModItems.singularity });
addRecipeAuto(new ItemStack(ModItems.ams_core_wormhole, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.plate_dineutronium, 'P', ModItems.powder_spark_mix, 'S', ModItems.singularity }); addRecipeAuto(new ItemStack(ModItems.ams_core_wormhole, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.plate_dineutronium, 'P', ModItems.powder_spark_mix, 'S', ModItems.singularity });
addRecipeAuto(new ItemStack(ModItems.ams_core_eyeofharmony, 1), new Object[] { "ALA", "LSL", "ALA", 'A', ModItems.plate_dalekanium, 'L', new ItemStack(ModItems.fluid_barrel_full, 1, Fluids.LAVA.getID()), 'S', ModItems.black_hole }); addRecipeAuto(new ItemStack(ModItems.ams_core_eyeofharmony, 1), new Object[] { "ALA", "LSL", "ALA", 'A', ModItems.plate_dalekanium, 'L', new ItemStack(ModItems.fluid_barrel_full, 1, Fluids.LAVA.getID()), 'S', ModItems.black_hole });
addRecipeAuto(new ItemStack(ModItems.ams_core_thingy), new Object[] { "NSN", "NGN", "G G", 'N', GOLD.nugget(), 'G', GOLD.ingot(), 'S', ModItems.battery_spark_cell_10000 }); addRecipeAuto(new ItemStack(ModItems.ams_core_thingy), new Object[] { "NSN", "NGN", "G G", 'N', GOLD.nugget(), 'G', GOLD.ingot(), 'S', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()) });
addRecipeAuto(new ItemStack(ModItems.photo_panel), new Object[] { " G ", "IPI", " C ", 'G', KEY_ANYPANE, 'I', ModItems.plate_polymer, 'P', NETHERQUARTZ.dust(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.PCB) }); addRecipeAuto(new ItemStack(ModItems.photo_panel), new Object[] { " G ", "IPI", " C ", 'G', KEY_ANYPANE, 'I', ModItems.plate_polymer, 'P', NETHERQUARTZ.dust(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.PCB) });
addRecipeAuto(new ItemStack(ModBlocks.machine_satlinker), new Object[] { "PSP", "SCS", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'C', ModItems.sat_chip }); addRecipeAuto(new ItemStack(ModBlocks.machine_satlinker), new Object[] { "PSP", "SCS", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'C', ModItems.sat_chip });
addRecipeAuto(new ItemStack(ModBlocks.machine_keyforge), new Object[] { "PCP", "WSW", "WSW", 'P', STEEL.plate(), 'S', W.ingot(), 'C', ModItems.padlock, 'W', KEY_PLANKS }); addRecipeAuto(new ItemStack(ModBlocks.machine_keyforge), new Object[] { "PCP", "WSW", "WSW", 'P', STEEL.plate(), 'S', W.ingot(), 'C', ModItems.padlock, 'W', KEY_PLANKS });

View File

@ -664,6 +664,7 @@ public class MainRegistry {
event.registerServerCommand(new CommandReloadServer()); event.registerServerCommand(new CommandReloadServer());
event.registerServerCommand(new CommandLocate()); event.registerServerCommand(new CommandLocate());
event.registerServerCommand(new CommandCustomize()); event.registerServerCommand(new CommandCustomize());
event.registerServerCommand(new CommandReapNetworks());
ArcFurnaceRecipes.registerFurnaceSmeltables(); // because we have to wait for other mods to take their merry ass time to register recipes ArcFurnaceRecipes.registerFurnaceSmeltables(); // because we have to wait for other mods to take their merry ass time to register recipes
} }

View File

@ -3,6 +3,7 @@ package com.hbm.uninos;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.Map.Entry; import java.util.Map.Entry;
@ -23,7 +24,7 @@ import net.minecraft.world.World;
*/ */
public class UniNodespace { public class UniNodespace {
public static HashMap<World, UniNodeWorld> worlds = new HashMap(); public static Map<World, UniNodeWorld> worlds = new HashMap();
public static Set<NodeNet> activeNodeNets = new HashSet(); public static Set<NodeNet> activeNodeNets = new HashSet();
public static GenNode getNode(World world, int x, int y, int z, INetworkProvider type) { public static GenNode getNode(World world, int x, int y, int z, INetworkProvider type) {
@ -73,7 +74,7 @@ public class UniNodespace {
} }
updateNetworks(); updateNetworks();
resetReapTimer(); updateReapTimer();
} }
private static void updateNetworks() { private static void updateNetworks() {
@ -87,8 +88,9 @@ public class UniNodespace {
} }
} }
private static void resetReapTimer() { private static void updateReapTimer() {
if(reapTimer <= 0) reapTimer = 5 * 60 * 20; // 5 minutes is more than plenty if(reapTimer <= 0) reapTimer = 5 * 60 * 20; // 5 minutes is more than plenty
else reapTimer--;
} }
/** Goes over each connection point of the given node, tries to find neighbor nodes and to join networks with them */ /** Goes over each connection point of the given node, tries to find neighbor nodes and to join networks with them */

View File

@ -194,6 +194,17 @@ public class Tuple {
public Z getZ() { public Z getZ() {
return this.z; return this.z;
} }
/// flavor town ///
public void mangle(W w, X x, Y y, Z z) {
this.w = w;
this.x = x;
this.y = y;
this.z = z;
}
public Quartet<W,X,Y,Z> clone() {
return new Quartet(w, x, y, z);
}
} }
public static class Quintet<V,W,X,Y,Z> { public static class Quintet<V,W,X,Y,Z> {