Merge branch 'master' into METADATA

This commit is contained in:
WolfEclipses 2026-01-09 20:52:29 -05:00 committed by GitHub
commit 5ec68643f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
94 changed files with 8679 additions and 1268 deletions

View File

@ -1,14 +1,20 @@
## Added
* Creative klystron
* Always outputs as much KyU as the most demanding existing recipe needs
## Changed
* 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 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
* The block ID economy is looking better than ever
* Updated chinese and russian localization
* Increased density of osmiridium ores in tom craters considerably (from 1:500 to 1:200)
* Added a new server setting called `ENABLE_MKU` to toggle contageon effects, spread and save (part of `/ntmserver`)
* Extended logging now logs uses of MKU
* Mass storage units now display their held item on a display
* Improved HUD gauges, electric chestplates with jetpacks installed now two gauges side by side
## Fixed
* Fixed meteors using a nonexistant keepalive timer, causing potential audio flickering in certain cases
* Fixed 528 coltan deposit config misspelling
* Potentially fixed a performance issue caused by transmission networks not being deleted when they have no active links
* Fixed multi output recipe objects not deserializing right, causing the precision assembler config to not load
* Fixed pedestal recipes not using the correct register option, making custom config files wipe all clay tablets
* Fixed custom fluids breaking when using the `/ntmreload` command
* Fixed missing battery socket tooltip
* Potentially fixed an issue in regards to some hidden structures spawning
* Fixed FEnSU not immediately applying the muffler effect when used
* Fixed fluid counter valve not having a recipe
* Fixed issue where `/ntmreload` would break registered fluids from addons
* Fixed yet another issue regarding crates
* Fixed RBMK fluid heaters losing their tank types when unable to boil anything

View File

@ -1,15 +1,15 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5546
mod_build_number=5570
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
\ grangerave (explosion algorithms),\
\ Hoboy (textures, models),\
\ Drillgon200 (effects, models, porting),\
\ Drillgon200 (effects, models),\
\ MartinTheDragon (calculator, chunk-based fallout, bendable cranes, pipe improvements, PWR sounds),\
\ Alcater (GUI textures, porting),\
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures),\
\ Alcater (GUI textures),\
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures, MSU displays),\
\ Pheo (textures, various machines, models, weapons),\
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
\ UFFR (RTG pellets, guns, casings, euphemium capacitor, nucleartech.wiki),\
@ -22,6 +22,7 @@ credits=HbMinecraft,\
\ Doctor17 (russian localization)),\
\ Pashtet (russian localization),\
\ 7H40 (russian localization),\
\ RayzerHan (russian localization),\
\ Bismarck (chinese localization),\
\ Creeper-banner (chinese localization),\
\ 5467864 (chinese localization),\
@ -34,8 +35,10 @@ credits=HbMinecraft,\
\ Herobrine 457985 (chinese localization),\
\ xxwinhere (chinese localization),\
\ Nycticoraxnightheron (chinese localization),\
\ NarekoMichigami810 (chinese localization),\
\ Maksymisio (polish localization)\
\ el3ctro4ndre (italian localization),\
\ Goaty1208 (italian localization),\
\ Pu-238 (Tom impact effects),\
\ Frooz (gun models),\
\ VT-6/24 (models, textures),\
@ -55,18 +58,22 @@ credits=HbMinecraft,\
\ Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration, turbine spinup),\
\ BallOfEnergy1 (OpenComputers integration, RBMK and packet optimization, crate backpacks),\
\ PewPewCricket (OpenComputers integration),\
\ kelllllen (OpenComputers integration),\
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
\ Abel1502 (abilities GUI, optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
\ Darek505 (armor rendering compatibility fix),\
\ ranch21 (improved HUD gauges),\
\ SuperCraftAlex (tooltips)\
\ Ice-Arrow (research reactor tweaks),\
\ 245tt (anvil GUI improvements),\
\ KoblizekXD (doors),\
\ FOlkvangrField (custom machine parts),\
\ RosaTryp (centrifuge config),\
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration),\
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration, fluid counter valve),\
\ Dash (PA particle serialization fix),\
\ archiecarrot123 (armor rendering compatibility fix),\
\ mikkerlo (mining laser & builder's jetpack improvements),\
\ icomet (refactoring),\
\ martemen (project settings),\
\ OvermindDL1 (project settings),\

View File

@ -3,6 +3,7 @@ package api.hbm.block;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@Deprecated
public interface IDrillInteraction {
/**

View File

@ -1,5 +1,6 @@
package api.hbm.block;
@Deprecated
public interface IMiningDrill {
/**

View File

@ -2,7 +2,6 @@ package api.hbm.energymk2;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import api.hbm.energymk2.Nodespace.PowerNode;
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) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {

View File

@ -3,7 +3,6 @@ package api.hbm.energymk2;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.interfaces.NotableComments;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
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) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IEnergyConductorMK2) {

View File

@ -5,7 +5,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
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) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConnectorMK2) {

View File

@ -6,7 +6,6 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.Compat;
import com.hbm.util.fauxpointtwelve.DirPos;
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) {
TileEntity te = Compat.getTileStandard(world, x, y, z);
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
boolean red = false;
if(te instanceof IFluidConnectorMK2) {

View File

@ -1,7 +1,55 @@
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. */
public interface ILoadedTile {
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

@ -13,6 +13,7 @@ import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
import com.hbm.blocks.machine.pile.*;
@ -743,13 +744,14 @@ public class ModBlocks {
public static Block machine_microwave;
public static Block machine_battery_socket;
public static Block machine_battery_redd;
@Deprecated public static Block machine_battery_potato;
@Deprecated public static Block machine_battery;
@Deprecated public static Block machine_lithium_battery;
@Deprecated public static Block machine_schrabidium_battery;
@Deprecated public static Block machine_dineutronium_battery;
public static Block machine_fensu;
@Deprecated public static Block machine_fensu;
@Deprecated public static Block capacitor_bus;
public static Block capacitor_copper; // neat for structures
@ -787,6 +789,7 @@ public class ModBlocks {
public static Block pipe_anchor;
public static Block fluid_valve;
public static Block fluid_switch;
public static Block fluid_counter_valve;
public static Block fluid_pump;
public static Block machine_drain;
public static Block radio_torch_sender;
@ -899,6 +902,7 @@ public class ModBlocks {
public static Block fusion_component;
public static Block fusion_torus;
public static Block fusion_klystron;
public static Block fusion_klystron_creative;
public static Block fusion_breeder;
public static Block fusion_collector;
public static Block fusion_boiler;
@ -1864,12 +1868,14 @@ public class ModBlocks {
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
machine_battery_socket = new MachineBatterySocket().setBlockName("machine_battery_socket").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
machine_battery_redd = new MachineBatteryREDD().setBlockName("machine_battery_redd").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
capacitor_bus = new MachineCapacitorBus(Material.iron).setBlockName("capacitor_bus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
capacitor_copper = new MachineCapacitor(Material.iron, 1_000_000L, "copper").setBlockName("capacitor_copper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper");
@ -1921,6 +1927,7 @@ public class ModBlocks {
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_valve = new FluidValve(Material.iron).setBlockName("fluid_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_switch = new FluidSwitch(Material.iron).setBlockName("fluid_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_counter_valve = new FluidCounterValve(Material.iron).setBlockName("fluid_counter_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
fluid_pump = new FluidPump(Material.iron).setBlockName("fluid_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_drain = new MachineDrain(Material.iron).setBlockName("machine_drain").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
@ -2035,6 +2042,7 @@ public class ModBlocks {
fusion_component = new BlockFusionComponent().setBlockName("fusion_component").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_component");
fusion_torus = new MachineFusionTorus().setBlockName("fusion_torus").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_klystron = new MachineFusionKlystron().setBlockName("fusion_klystron").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_klystron_creative = new MachineFusionKlystronCreative().setBlockName("fusion_klystron_creative").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_breeder = new MachineFusionBreeder().setBlockName("fusion_breeder").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_collector = new MachineFusionCollector().setBlockName("fusion_collector").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3210,6 +3218,7 @@ public class ModBlocks {
register(pipe_anchor);
register(fluid_duct_gauge);
register(fluid_valve);
register(fluid_counter_valve);
register(fluid_switch);
register(fluid_pump);
register(machine_drain);
@ -3266,6 +3275,7 @@ public class ModBlocks {
register(barrel_tcalloy);
register(barrel_antimatter);
register(machine_battery_socket);
register(machine_battery_redd);
register(machine_battery_potato);
register(machine_battery);
register(machine_lithium_battery);
@ -3418,6 +3428,7 @@ public class ModBlocks {
register(fusion_component);
register(fusion_torus);
register(fusion_klystron);
register(fusion_klystron_creative);
register(fusion_breeder);
register(fusion_collector);
register(fusion_boiler);

View File

@ -1,26 +1,15 @@
package com.hbm.blocks.generic;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.util.i18n.I18nUtil;
import api.hbm.block.IDrillInteraction;
import api.hbm.block.IMiningDrill;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
public class BlockCluster extends Block implements IDrillInteraction, ITooltipProvider {
public class BlockCluster extends Block {
public BlockCluster(Material mat) {
super(mat);
@ -28,32 +17,7 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
@Override
public Item getItemDropped(int i, Random rand, int j) {
return null;
}
@Override
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
if(player instanceof FakePlayer || player == null) {
return;
}
if(!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots) {
Item drop = getDrop();
if(drop == null)
return;
float f = 0.7F;
double mX = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double mY = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
double mZ = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
EntityItem entityitem = new EntityItem(world, (double) x + mX, (double) y + mY, (double) z + mZ, new ItemStack(drop));
entityitem.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(entityitem);
}
return getDrop();
}
private Item getDrop() {
@ -65,24 +29,4 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
return null;
}
@Override
public boolean canBreak(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return drill.getDrillRating() > 70 || world.rand.nextFloat() < 0.05;
}
@Override
public ItemStack extractResource(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return drill.getDrillRating() <= 70 ? new ItemStack(getDrop()) : null;
}
@Override
public float getRelativeHardness(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return this.getBlockHardness(world, x, y, z);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.cluster"));
}
}

View File

@ -33,6 +33,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
@ -40,7 +41,8 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@SideOnly(Side.CLIENT) private IIcon[] iconTop;
@SideOnly(Side.CLIENT) private IIcon[] iconSide;
@SideOnly(Side.CLIENT) private IIcon[] iconFront;
public BlockMassStorage() {
super(Material.iron);
}
@ -50,15 +52,23 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = new IIcon[4];
this.iconSide = new IIcon[4];
this.iconFront = new IIcon[4];
this.iconTop[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_iron");
this.iconSide[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_iron");
this.iconFront[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_iron");
this.iconTop[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_desh");
this.iconSide[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_desh");
this.iconFront[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_desh");
this.iconTop[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top");
this.iconSide[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side");
this.iconFront[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front");
this.iconTop[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_wood");
this.iconSide[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_wood");
this.iconFront[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_wood");
}
@Override
@ -74,20 +84,24 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
int meta = this.rectify(metadata);
return side == 1 ? this.iconTop[meta] : (side == 0 ? this.iconTop[meta] : this.iconSide[meta]);
int dir = (metadata / getSubCount()) + 2;
if(side == 0 || side == 1) return iconTop[meta];
if(side == dir) return iconFront[meta];
return iconSide[meta];
}
@Override
public int damageDropped(int meta) {
return meta;
return rectify(meta);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityMassStorage(getCapacity(meta));
}
public int getCapacity(int meta) {
meta = rectify(meta);
return meta == 3 ? 100 : meta == 0 ? 10_000 : meta == 1 ? 100_000 : meta == 2 ? 1_000_000 : 0;
}
@ -108,121 +122,129 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
return false;
}
}
private static boolean dropInv = true;
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
ItemStack drop = new ItemStack(this, 1, world.getBlockMetadata(x, y, z));
ItemStack drop = new ItemStack(this, 1, rectify(world.getBlockMetadata(x, y, z)));
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
NBTTagCompound nbt = new NBTTagCompound();
if(inv != null) {
for(int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if(stack == null)
continue;
NBTTagCompound slot = new NBTTagCompound();
stack.writeToNBT(slot);
nbt.setTag("slot" + i, slot);
}
}
if(inv instanceof TileEntityLockableBase) {
TileEntityLockableBase lockable = (TileEntityLockableBase) inv;
if(lockable.isLocked()) {
nbt.setInteger("lock", lockable.getPins());
nbt.setDouble("lockMod", lockable.getMod());
}
}
if(inv instanceof TileEntityMassStorage && nbt.func_150296_c().size() > 0) {
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
nbt.setInteger("stack", storage.getStockpile());
}
if(!nbt.hasNoTags()) {
drop.stackTagCompound = nbt;
}
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
}
dropInv = false;
boolean flag = world.setBlockToAir(x, y, z);
dropInv = true;
return flag;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
if(inv != null && stack.hasTagCompound()) {
for(int i = 0; i < inv.getSizeInventory(); i++) {
inv.setInventorySlotContents(i, ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
}
if(inv instanceof TileEntityMassStorage) {
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
if(stack.stackTagCompound.hasKey("lock")) {
storage.setPins(stack.stackTagCompound.getInteger("lock"));
storage.setMod(stack.stackTagCompound.getDouble("lockMod"));
storage.lock();
}
storage.setStockpile(stack.stackTagCompound.getInteger("stack"));
}
}
super.onBlockPlacedBy(world, x, y, z, player, stack);
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
int meta = stack.getItemDamage();
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, meta, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, meta + 3 * getSubCount(), 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, meta + 1 * getSubCount(), 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, meta + 2 * getSubCount(), 2);
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
if(dropInv) {
ISidedInventory sided = (ISidedInventory) world.getTileEntity(x, y, z);
Random rand = world.rand;
if(sided != null) {
for(int i1 = 0; i1 < sided.getSizeInventory(); ++i1) {
if(i1 == 1) continue; //do NOT drop the filter item
ItemStack itemstack = sided.getStackInSlot(i1);
if(itemstack != null) {
float f = rand.nextFloat() * 0.8F + 0.1F;
float f1 = rand.nextFloat() * 0.8F + 0.1F;
float f2 = rand.nextFloat() * 0.8F + 0.1F;
while(itemstack.stackSize > 0) {
int j1 = rand.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) rand.nextGaussian() * f3;
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
@ -231,7 +253,7 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
}
}
}
world.func_147453_f(x, y, z, block);
}
}
@ -251,51 +273,51 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if(!(te instanceof TileEntityMassStorage))
return;
TileEntityMassStorage storage = (TileEntityMassStorage) te;
List<String> text = new ArrayList();
String title = "Empty";
boolean full = storage.type != null;
if(full) {
title = storage.type.getDisplayName();
text.add(String.format(Locale.US, "%,d", storage.getStockpile()) + " / " + String.format(Locale.US, "%,d", storage.getCapacity()));
double percent = (double) storage.getStockpile() / (double) storage.getCapacity();
int charge = (int) Math.floor(percent * 10_000D);
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
text.add("&[" + color + "&]" + (charge / 100D) + "%");
}
ILookOverlay.printGeneric(event, title, full ? 0xffff00 : 0x00ffff, full ? 0x404000 : 0x004040, text);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
if(!stack.hasTagCompound()) return;
ItemStack type = ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot1"));
if(type != null) {
list.add(EnumChatFormatting.GOLD + type.getDisplayName());
list.add(String.format(Locale.US, "%,d", stack.stackTagCompound.getInteger("stack")) + " / " + String.format(Locale.US, "%,d", getCapacity(stack.getItemDamage())));
}
}
@Override
public boolean hasComparatorInputOverride() {
return true;
}
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
return ((TileEntityMassStorage) world.getTileEntity(x, y, z)).redstone;

View File

@ -1,7 +1,6 @@
package com.hbm.blocks.machine;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBattery;
import com.hbm.tileentity.machine.TileEntityRadiobox;
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) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0)
{
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if(i == 1)
{
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if(i == 2)
{
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if(i == 3)
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
@Override
public boolean 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;
} else if(!player.isSneaking())
{
} else if(!player.isSneaking()) {
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) {
@ -93,78 +78,53 @@ public class Radiobox extends BlockContainer {
return true;
} else {
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_radiobox, world, x, y, z);
//return true;
return false;
}
}
@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_);
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
switch(te)
{
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
case 8:
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
case 2:
case 6:
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
case 5:
case 9:
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
case 3:
case 7:
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
}
}
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
int te = world.getBlockMetadata(x, y, z);
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
switch(te)
{
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
switch(te) {
case 4:
case 8:
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
break;
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
case 2:
case 6:
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
break;
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
case 5:
case 9:
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
break;
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
case 3:
case 7:
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
break;
case 7: 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);
}
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);
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) {
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);
}
super.breakBlock(world, x, y, z, b, m);
}
}

View File

@ -33,15 +33,8 @@ public class MachineFusionKlystron extends BlockDummyable implements ITooltipPro
return super.standardOpenBehavior(world, x, y, z, player, 0);
}
@Override
public int[] getDimensions() {
return new int[] { 3, 0, 4, 3, 2, 2 };
}
@Override
public int getOffset() {
return 3;
}
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
@Override public int getOffset() { return 3; }
@Override
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {

View File

@ -0,0 +1,48 @@
package com.hbm.blocks.machine.fusion;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.tileentity.machine.fusion.TileEntityFusionKlystronCreative;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineFusionKlystronCreative extends BlockDummyable implements ITooltipProvider {
public MachineFusionKlystronCreative() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityFusionKlystronCreative();
return null;
}
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
@Override public int getOffset() { return 3; }
@Override
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
return super.checkRequirement(world, x, y, z, dir, o) &&
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, x, y, z, dir);
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, this, dir);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
addStandardInfo(stack, player, list, ext);
}
}

View File

@ -0,0 +1,68 @@
package com.hbm.blocks.network;
import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.network.TileEntityFluidCounterValve;
import com.hbm.util.i18n.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
import java.util.ArrayList;
import java.util.List;
public class FluidCounterValve extends FluidDuctBase implements ILookOverlay, ITooltipProvider {
@SideOnly(Side.CLIENT)
private IIcon iconOn;
public FluidCounterValve(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconOn = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_on");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_off");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return metadata == 1 ? iconOn : blockIcon;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityFluidCounterValve();
}
@Override
public void printHook(Pre event, World world, int x, int y, int z) {
TileEntity te = world.getTileEntity(x, y, z);
if(!(te instanceof TileEntityFluidCounterValve))
return;
TileEntityFluidCounterValve duct = (TileEntityFluidCounterValve) te;
List<String> text = new ArrayList<>();
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
text.add("Counter: " + duct.getCounter());
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -0,0 +1,50 @@
package com.hbm.blocks.network;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineBatteryREDD extends BlockDummyable {
public MachineBatteryREDD() {
super(Material.iron);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityBatteryREDD();
if(meta >= 6) return new TileEntityProxyCombo().power().conductor();
return null;
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
return standardOpenBehavior(world, x, y, z, player, side);
}
@Override public int[] getDimensions() { return new int[] {9, 0, 2, 2, 4, 4}; }
@Override public int getOffset() { return 2; }
@Override
protected 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 * 2 + rot.offsetX * 2, y, z + dir.offsetZ * 2 + rot.offsetZ * 2);
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX * 2, y, z + dir.offsetZ * 2 - rot.offsetZ * 2);
this.makeExtra(world, x - dir.offsetX * 2 + rot.offsetX * 2, y, z - dir.offsetZ * 2 + rot.offsetZ * 2);
this.makeExtra(world, x - dir.offsetX * 2 - rot.offsetX * 2, y, z - dir.offsetZ * 2 - rot.offsetZ * 2);
this.makeExtra(world, x + rot.offsetX * 4, y, z + rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4, y, z - rot.offsetZ * 4);
}
}

View File

@ -35,6 +35,7 @@ public class MachineBatterySocket extends BlockDummyable implements ITooltipProv
@Override public int[] getDimensions() { return new int[] {1, 0, 1, 0, 1, 0}; }
@Override public int getOffset() { return 0; }
@Override
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);

View File

@ -0,0 +1,49 @@
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.ChatComponentText;
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();
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Nodespace cleared :)"));
} 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

@ -20,6 +20,7 @@ public class ServerConfig extends RunningConfig {
public static ConfigWrapper<Boolean> CRATE_OPEN_HELD = new ConfigWrapper(true);
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
private static void initDefaults() {
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
@ -32,6 +33,7 @@ public class ServerConfig extends RunningConfig {
configMap.put("CRATE_OPEN_HELD", CRATE_OPEN_HELD);
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
configMap.put("ENABLE_MKU", ENABLE_MKU);
}
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */

View File

@ -9,6 +9,7 @@ import static com.hbm.inventory.OreDictManager.*;
import com.hbm.items.ItemEnums.EnumPlantType;
import com.hbm.items.ItemGenericPart.EnumPartType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.tool.ItemBlowtorch;
import com.hbm.items.tool.ItemModMinecart;
@ -62,10 +63,10 @@ public class ToolRecipes {
addShovel( DESH.ingot(), ModItems.desh_shovel);
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_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_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_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_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', 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', 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', EnumBatteryPack.BATTERY_LEAD.stack() });
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.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.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.toolbox), new Object[] { "CCC", "CIC", 'C', CU.plate(), 'I', IRON.ingot() });

View File

@ -311,6 +311,9 @@ public class WeaponRecipes {
//Nuke parts
CraftingManager.addRecipeAuto(new ItemStack(ModItems.n2_charge, 1), new Object[] { " D ", "ERE", " D ", 'D', ModItems.ducttape, 'E', ModBlocks.det_charge, 'R', REDSTONE.block() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_spark, 1), new Object[] { " W ", "DSD", "DSD", 'W', MAGTUNG.wireDense(), 'D', ModItems.plate_dineutronium, 'S', ModItems.powder_spark_mix });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_trixite, 1), new Object[] { " W ", "DSD", "DTD", 'W', MAGTUNG.wireDense(), 'D', BIGMT.plateCast(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.battery_trixite, 1), new Object[] { " W ", "DTD", "DSD", 'W', MAGTUNG.wireDense(), 'D', BIGMT.plateCast(), 'S', ModItems.powder_power, 'T', ModItems.crystal_trixite });
//Custom nuke rods
CraftingManager.addRecipeAuto(new ItemStack(ModItems.custom_tnt, 1), new Object[] { " C ", "TIT", "TIT", 'C', CU.plate(), 'I', IRON.plate(), 'T', ANY_HIGHEXPLOSIVE.ingot() });

View File

@ -110,7 +110,7 @@ public class ExplosionTom {
if(y <= craterFloor) {
if(worldObj.rand.nextInt(499) < 1) {
if(worldObj.rand.nextInt(200) == 0) {
worldObj.setBlock(pX, y, pZ, ModBlocks.ore_tektite_osmiridium, 0, 2);
} else {
worldObj.setBlock(pX, y, pZ, ModBlocks.tektite, 0, 2);

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.UUID;
import com.hbm.config.RadiationConfig;
import com.hbm.config.ServerConfig;
import com.hbm.entity.mob.EntityDuck;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.lib.ModDamageSource;
@ -261,6 +262,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
/// CONTAGION ///
public static int getContagion(EntityLivingBase entity) {
if(!ServerConfig.ENABLE_MKU.get()) return 0;
return getData(entity).contagion;
}
@ -315,7 +317,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
props.setFloat("hfr_digamma", digamma);
props.setInteger("hfr_asbestos", asbestos);
props.setInteger("hfr_bomb", bombTimer);
props.setInteger("hfr_contagion", contagion);
if(ServerConfig.ENABLE_MKU.get()) props.setInteger("hfr_contagion", contagion);
props.setInteger("hfr_blacklung", blacklung);
props.setInteger("hfr_oil", oil);
props.setInteger("hfr_fire", fire);
@ -343,7 +345,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
digamma = props.getFloat("hfr_digamma");
asbestos = props.getInteger("hfr_asbestos");
bombTimer = props.getInteger("hfr_bomb");
contagion = props.getInteger("hfr_contagion");
if(ServerConfig.ENABLE_MKU.get()) contagion = props.getInteger("hfr_contagion");
blacklung = props.getInteger("hfr_blacklung");
oil = props.getInteger("hfr_oil");
fire = props.getInteger("hfr_fire");

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.hbm.config.GeneralConfig;
import com.hbm.config.RadiationConfig;
import com.hbm.config.ServerConfig;
import com.hbm.config.WorldConfig;
import com.hbm.entity.mob.EntityCreeperNuclear;
import com.hbm.entity.mob.EntityDuck;
@ -371,6 +372,7 @@ public class EntityEffectHandler {
}
private static void handleContagion(EntityLivingBase entity) {
if(!ServerConfig.ENABLE_MKU.get()) return;
World world = entity.worldObj;
@ -676,7 +678,7 @@ public class EntityEffectHandler {
FlameCreator.composeEffect(entity.worldObj, x - living.width / 2 + living.width * rand.nextDouble(), y + rand.nextDouble() * living.height, z - living.width / 2 + living.width * rand.nextDouble(), FlameCreator.META_BLACK);
}
if(props.fire > 0 || props.phosphorus > 0 || props.balefire > 0) if(!entity.isEntityAlive()) ConfettiUtil.decideConfetti(living, DamageSource.onFire);
if(props.fire > 0 || props.phosphorus > 0 || props.balefire > 0 || props.blackFire > 0) if(!entity.isEntityAlive()) ConfettiUtil.decideConfetti(living, DamageSource.onFire);
}
private static void handleDashing(Entity entity) {

View File

@ -0,0 +1,62 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotNonRetarded;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
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 ContainerBatteryREDD extends Container {
protected TileEntityBatteryREDD socket;
public ContainerBatteryREDD(InventoryPlayer invPlayer, TileEntityBatteryREDD tedf) {
this.socket = tedf;
this.addSlotToContainer(new SlotNonRetarded(socket, 0, 26, 53));
this.addSlotToContainer(new SlotNonRetarded(socket, 1, 80, 53));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 99 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 157));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return socket.isUseableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack copy = null;
Slot slot = (Slot) this.inventorySlots.get(index);
if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
copy = stack.copy();
if(index <= 1) {
if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) return null;
} else {
if(!this.mergeItemStack(stack, 0, 2, false)) return null;
}
if(stack.stackSize == 0) {
slot.putStack((ItemStack) null);
} else {
slot.onSlotChanged();
}
}
return copy;
}
}

View File

@ -103,6 +103,13 @@ public class FluidType {
/** For CompatFluidRegistry */
public FluidType(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
setupForeign(name, id, color, p, f, r, symbol, texture);
Fluids.foreignFluids.add(this);
Fluids.metaOrder.add(this);
}
public FluidType setupForeign(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
this.stringId = name;
this.color = color;
this.unlocalized = "hbmfluid." + name.toLowerCase(Locale.US);
@ -115,7 +122,7 @@ public class FluidType {
this.id = id;
Fluids.register(this, id);
Fluids.foreignFluids.add(this);
return this;
}
public FluidType setTemp(int temperature) {

View File

@ -884,7 +884,7 @@ public class Fluids {
}
}
private static HashMap<String, FluidType> fluidMigration = new HashMap(); // since reloading would create new fluid instances, and those break existing machines
public static HashMap<String, FluidType> fluidMigration = new HashMap(); // since reloading would create new fluid instances, and those break existing machines
public static void reloadFluids(){
File folder = MainRegistry.configHbmDir;
@ -901,6 +901,7 @@ public class Fluids {
customFluids.clear();
for(FluidType type : foreignFluids) {
fluidMigration.put(type.getName(), type);
idMapping.remove(type.getID());
registerOrder.remove(type);
nameMapping.remove(type.getName());

View File

@ -0,0 +1,87 @@
package com.hbm.inventory.gui;
import java.math.BigInteger;
import java.util.Locale;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.inventory.container.ContainerBatteryREDD;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
public class GUIBatteryREDD extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_battery_redd.png");
private TileEntityBatteryREDD battery;
public GUIBatteryREDD(InventoryPlayer invPlayer, TileEntityBatteryREDD tedf) {
super(new ContainerBatteryREDD(invPlayer, tedf));
battery = tedf;
this.xSize = 176;
this.ySize = 181;
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
}
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
NBTTagCompound data = new NBTTagCompound();
if(this.checkClick(x, y, 133, 16, 18, 18)) { this.click(); data.setBoolean("low", true); }
if(this.checkClick(x, y, 133, 52, 18, 18)) { this.click(); data.setBoolean("high", true); }
if(this.checkClick(x, y, 152, 35, 16, 16)) { this.click(); data.setBoolean("priority", true); }
if(!data.hasNoTags()) PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, battery.xCoord, battery.yCoord, battery.zCoord));
}
@Override
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.battery.hasCustomInventoryName() ? this.battery.getInventoryName() : I18n.format(this.battery.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
GL11.glPushMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glScaled(0.5, 0.5, 1);
String label = String.format(Locale.US, "%,d", battery.power) + " HE";
this.fontRendererObj.drawString(label, 242 - this.fontRendererObj.getStringWidth(label), 45, 0x00ff00);
String deltaText = String.format(Locale.US, "%,d", battery.delta) + " HE/s";
int comp = battery.delta.compareTo(BigInteger.ZERO);
if(comp > 0) deltaText = EnumChatFormatting.GREEN + "+" + deltaText;
else if(comp < 0) deltaText = EnumChatFormatting.RED + deltaText;
else deltaText = EnumChatFormatting.YELLOW + "+" + deltaText;
this.fontRendererObj.drawString(deltaText, 242 - this.fontRendererObj.getStringWidth(deltaText), 65, 0x00ff00);
GL11.glPopMatrix();
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
drawTexturedModalRect(guiLeft + 133, guiTop + 16, 176, 52 + battery.redLow * 18, 18, 18);
drawTexturedModalRect(guiLeft + 133, guiTop + 52, 176, 52 + battery.redHigh * 18, 18, 18);
drawTexturedModalRect(guiLeft + 152, guiTop + 35, 194, 52 + battery.priority.ordinal() * 16 - 16, 16, 16);
}
}

View File

@ -99,6 +99,12 @@ public class GUIBatterySocket extends GuiInfoContainer {
IBatteryItem item = (IBatteryItem) battery.slots[0].getItem();
long power = item.getCharge(battery.slots[0]);
long maxPower = item.getMaxCharge(battery.slots[0]);
if(power > Long.MAX_VALUE / 100) {
power /= 100;
maxPower /= 100;
}
if(maxPower <= 1) maxPower = 1;
int p = (int) (power * 52 / maxPower); // won't work then flying too close to the sun (the limits of the LONG data type)
drawTexturedModalRect(guiLeft + 62, guiTop + 69 - p, 176, 52 - p, 34, p);
}

View File

@ -14,6 +14,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.config.GeneralConfig;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.fluid.FluidType;
@ -59,23 +60,25 @@ public class AnnihilatorRecipes extends SerializableRecipe {
@Override
public void registerDefaults() {
recipes.put(STEEL.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "steel"))));
recipes.put(SI.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip"))));
recipes.put(BI.nugget(), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_bismoid"))));
recipes.put(ModItems.pellet_charged, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_quantum"))));
recipes.put(U.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "gascent"))));
recipes.put(ANY_PLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "plastic"))));
recipes.put(RUBBER.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "rubber"))));
recipes.put(FERRO.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "ferrouranium"))));
recipes.put(SR.dust(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "strontium"))));
recipes.put(ANY_HARDPLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "hardplastic"))));
recipes.put(ANY_RESISTANTALLOY.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "tcalloy"))));
recipes.put(ModItems.powder_chlorophyte, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"))));
recipes.put(new ComparableStack(ModItems.ammo_standard, 1, EnumAmmo.BMG50_FMJ), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "bmg"))));
recipes.put(new ComparableStack(ModItems.ammo_arty, 1, 0), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "arty"))));
recipes.put(new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "controller"))));
if(GeneralConfig.enable528) {
recipes.put(STEEL.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "steel"))));
recipes.put(SI.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip"))));
recipes.put(BI.nugget(), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_bismoid"))));
recipes.put(ModItems.pellet_charged, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chip_quantum"))));
recipes.put(U.billet(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "gascent"))));
recipes.put(ANY_PLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "plastic"))));
recipes.put(RUBBER.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("512"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "rubber"))));
recipes.put(FERRO.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "ferrouranium"))));
recipes.put(SR.dust(), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "strontium"))));
recipes.put(ANY_HARDPLASTIC.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "hardplastic"))));
recipes.put(ANY_RESISTANTALLOY.ingot(), new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "tcalloy"))));
recipes.put(ModItems.powder_chlorophyte, new AnnihilatorRecipe(new Pair(new BigInteger("1024"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"))));
recipes.put(new ComparableStack(ModItems.ammo_standard, 1, EnumAmmo.BMG50_FMJ), new AnnihilatorRecipe(new Pair(new BigInteger("256"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "bmg"))));
recipes.put(new ComparableStack(ModItems.ammo_arty, 1, 0), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "arty"))));
recipes.put(new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new AnnihilatorRecipe(new Pair(new BigInteger("128"), ItemBlueprints.make(GenericRecipes.POOL_PREFIX_528 + "controller"))));
}
}
@Override public String getFileName() { return "hbmAnnihilator.json"; }

View File

@ -83,7 +83,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
this.register(new GenericRecipe("ass.platebismuth").setup(200, 100).outputItems(new ItemStack(ModItems.plate_bismuth, 1))
.inputItems(new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)));
this.register(new GenericRecipe("ass.plateeuphemium").setup(600, 100).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new ComparableStack(ModItems.ingot_osmiridium)));
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
this.register(new GenericRecipe("ass.platednt").setup(600, 100).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
@ -422,16 +422,16 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 8_000))
.outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 8_000)));
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_fensu, 1))
.inputItems(new ComparableStack(ModItems.ingot_electronium, 32),
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
new ComparableStack(ModItems.battery_pack, 16, EnumBatteryPack.BATTERY_QUANTUM),
new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 64),
new OreDictStack(DURA.block(), 16),
new OreDictStack(STAR.block(), 64),
new ComparableStack(ModBlocks.machine_transformer_dnt, 8),
new ComparableStack(ModItems.coil_magnetized_tungsten, 24),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 32),
new OreDictStack(MAGTUNG.wireDense(), 32),
new ComparableStack(ModItems.plate_dineutronium, 64),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64))
@ -439,11 +439,11 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
new ComparableStack(ModItems.battery_pack, 16, EnumBatteryPack.BATTERY_QUANTUM),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.FERRO_PLATING),
new OreDictStack(STAR.block(), 64),
new ComparableStack(ModBlocks.machine_transformer_dnt, 8),
new ComparableStack(ModItems.coil_magnetized_tungsten, 24),
new ComparableStack(ModItems.powder_magic, 64),
new ComparableStack(ModItems.plate_dineutronium, 24),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
new OreDictStack(CMB.plateCast(), 64),
new ComparableStack(ModItems.ingot_u238m2),
new ComparableStack(ModItems.ingot_cft, 64),
new ComparableStack(ModItems.ingot_cft, 64)));
@ -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))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
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"));
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))
@ -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))
.setPools528(GenericRecipes.POOL_PREFIX_528 + "bmg"));
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"));
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))

View File

@ -16,6 +16,7 @@ import net.minecraft.item.ItemStack;
public class FusionRecipes extends GenericRecipes<FusionRecipe> {
public static final FusionRecipes INSTANCE = new FusionRecipes();
public long maxInput;
@Override public int inputItemLimit() { return 0; }
@Override public int inputFluidLimit() { return 3; }
@ -120,6 +121,18 @@ public class FusionRecipes extends GenericRecipes<FusionRecipe> {
.outputItems(new ItemStack(ModItems.powder_gold))); // eough
}
@Override
public void registerPost() {
super.registerPost();
this.maxInput = 0;
// set max value for creative klystron
for(FusionRecipe recipe : this.recipeOrderedList) {
if(recipe.ignitionTemp > this.maxInput) this.maxInput = recipe.ignitionTemp;
}
}
// foresight! yeah!
@Override
public void readExtraData(JsonElement element, FusionRecipe recipe) {

View File

@ -6,6 +6,7 @@ import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.FluidContainer;
import com.hbm.inventory.FluidContainerRegistry;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.util.Tuple.Triplet;
import net.minecraft.init.Blocks;
@ -48,32 +49,17 @@ public class MachineRecipes {
ArrayList<ItemStack> fuels = new ArrayList<ItemStack>();
fuels.add(new ItemStack(ModItems.battery_potato));
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.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;
}

View File

@ -740,8 +740,6 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 1)),
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)
}
@ -753,7 +751,6 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.scrap, 1)),
new AnvilOutput(new ItemStack(ModItems.coil_tungsten, 2)),
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.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.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.tool.ItemBlowtorch;
import net.minecraft.init.Items;
@ -45,7 +46,7 @@ public class ItemPoolsComponent {
weighted(ModItems.coil_copper_torus, 0, 1, 2, 3),
weighted(ModItems.wire_fine, Mats.MAT_MINGRADE.id, 1, 8, 5),
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.PCB.ordinal(), 1, 3, 5),
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_incendiary, 0, 1, 1, 4),
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.thruster_small, 0, 1, 1, 5),
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.items.ItemEnums.EnumCasingType;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
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.SHOTSHELL.ordinal(), 4, 10, 3),
weighted(ModItems.cordite, 0, 4, 6, 5),
weighted(ModItems.battery_generic, 0, 1, 1, 4),
weighted(ModItems.battery_advanced, 0, 1, 1, 2),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.scrap, 0, 1, 3, 10),
weighted(ModItems.dust, 0, 2, 4, 9),
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.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 1, 4),
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 2),
weighted(ModItems.battery_generic, 0, 1, 1, 4),
weighted(ModItems.battery_advanced, 0, 1, 1, 3),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_REDSTONE.ordinal(), 1, 1, 1),
weighted(ModItems.powder_iodine, 0, 1, 1, 1),
weighted(ModItems.powder_bromine, 0, 1, 1, 1),
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_mirv, 0, 1, 1, 2),
weighted(ModItems.stealth_boy, 0, 1, 1, 2),
weighted(ModItems.battery_advanced, 0, 1, 1, 3),
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 2),
weighted(ModItems.battery_schrabidium, 0, 1, 1, 1),
weighted(ModItems.battery_pack, EnumBatteryPack.BATTERY_LITHIUM.ordinal(), 1, 1, 1),
weighted(ModItems.syringe_awesome, 0, 1, 1, 1),
weighted(ModItems.fusion_core, 0, 1, 1, 4),
weighted(ModItems.bottle_nuka, 0, 1, 3, 6),
@ -215,7 +212,7 @@ public class ItemPoolsLegacy {
//spaceship double chests
new ItemPool(POOL_SPACESHIP) {{
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.wire_fine, Mats.MAT_ALLOY.id, 8, 32, 5),
weighted(ModItems.coil_advanced_alloy, 0, 2, 16, 5),

View File

@ -42,7 +42,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_STANDARD) {{
this.pool = new WeightedRandomChestContent[] {
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(Items.diamond, 0, 3, 6, 1),
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD.ordinal(), 1, 1, 1),
@ -59,7 +58,6 @@ public class ItemPoolsSingle {
new ItemPool(POOL_VAULT_REINFORCED) {{
this.pool = new WeightedRandomChestContent[] {
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.sat_chip, 0, 1, 1, 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.ammo_standard, EnumAmmo.R762_DU.ordinal(), 16, 32, 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)
};
}};

View File

@ -1631,8 +1631,6 @@ public class ModItems {
@Deprecated public static Item battery_advanced;
@Deprecated public static Item battery_lithium;
@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_6;
@Deprecated public static Item battery_red_cell_24;
@ -1656,6 +1654,8 @@ public class ModItems {
public static Item battery_pack;
public static Item battery_creative;
public static Item cube_power;
public static Item battery_spark;
public static Item battery_trixite;
public static Item battery_sc_uranium;
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_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_spark = new ItemBattery(100000000, 2000000, 2000000).setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(null).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_spark = new Item().setUnlocalizedName("battery_spark").setMaxStackSize(1).setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":battery_spark");
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_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");
@ -3896,7 +3896,7 @@ public class ModItems {
battery_spark_cell_power = new ItemBattery(100000000L * 1000000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
battery_pack = new ItemBatteryPack().setUnlocalizedName("battery_pack").setTextureName(RefStrings.MODID + ":battery_generic_new");
battery_creative = new Item().setUnlocalizedName("battery_creative").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_creative_new");
battery_creative = new ItemBatteryCreative().setUnlocalizedName("battery_creative").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_creative_new");
cube_power = new ItemBattery(1000000000000000000L, 1000000000000000L, 1000000000000000L).setUnlocalizedName("cube_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":cube_power");
battery_sc_uranium = new ItemSelfcharger(5).setUnlocalizedName("battery_sc_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_uranium");

View File

@ -20,6 +20,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import java.util.Random;
import javax.annotation.Nonnull;
public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider {
@ -89,6 +91,8 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
}
public static class InventoryCrate extends ItemInventory {
public static Random rand = new Random();
public InventoryCrate(EntityPlayer player, ItemStack crate) {
this.player = player;
@ -133,6 +137,11 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
public boolean hasCustomInventoryName() {
return target.hasDisplayName();
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return player.getHeldItem() == this.target;
}
@Override
public void markDirty() { // You have been blessed by the unfuck
@ -140,6 +149,8 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
// Preserve existing NBT so we keep lock data and piders
NBTTagCompound nbt = target.stackTagCompound != null ? target.stackTagCompound : new NBTTagCompound();
int invSize = this.getSizeInventory();
nbt.removeTag("stacklock");
for(int i = 0; i < invSize; i++) {
@ -154,8 +165,10 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
nbt.setTag("slot" + i, slot);
}
if (nbt.hasNoTags()) {
if(nbt.hasNoTags()) {
nbt = null;
} else {
nbt.setLong("stacklock", rand.nextLong()); // add shit that prevents crates from stacking
}
target.setTagCompound(nbt);

View File

@ -0,0 +1,18 @@
package com.hbm.items.machine;
import api.hbm.energymk2.IBatteryItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemBatteryCreative extends Item implements IBatteryItem {
@Override public void chargeBattery(ItemStack stack, long i) { }
@Override public void setCharge(ItemStack stack, long i) { }
@Override public void dischargeBattery(ItemStack stack, long i) { }
@Override public long getCharge(ItemStack stack) { return Long.MAX_VALUE / 2L; }
@Override public long getMaxCharge(ItemStack stack) { return Long.MAX_VALUE; }
@Override public long getChargeRate(ItemStack stack) { return Long.MAX_VALUE / 100L; }
@Override public long getDischargeRate(ItemStack stack) { return Long.MAX_VALUE / 100L; }
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.hbm.interfaces.IOrderedEnum;
import com.hbm.items.ItemEnumMulti;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
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 ItemStack stack() { return new ItemStack(ModItems.battery_pack, 1, this.ordinal()); }
}
@Override
@ -95,7 +97,7 @@ public class ItemBatteryPack extends ItemEnumMulti implements IBatteryItem {
stack.stackTagCompound.setLong("charge", stack.stackTagCompound.getLong("charge") - i);
} else {
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");
} else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("charge", getMaxCharge(stack));
stack.stackTagCompound.setLong("charge", 0);
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.canister_full, 16, Fluids.DIESEL.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.screwdriver, 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_range, 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_strong, 1));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.missile_burst, 1));

View File

@ -3,12 +3,16 @@ package com.hbm.items.special;
import java.util.List;
import java.util.Random;
import org.apache.logging.log4j.Level;
import com.hbm.config.GeneralConfig;
import com.hbm.config.VersatileConfig;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.handler.ArmorModHandler;
import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import api.hbm.fluidmk2.IFillableItem;
@ -336,6 +340,9 @@ public class ItemSyringe extends Item {
HbmLivingProps.setContagion(entity, 3 * 60 * 60 * 20);
world.playSoundAtEntity(entity, "hbm:item.syringe", 1.0F, 1.0F);
stack.stackSize--;
if(GeneralConfig.enableExtendedLogging)
MainRegistry.logger.log(Level.INFO, "[MKU] " + entityPlayer.getCommandSenderName() + " used an MKU syringe!");
}
}

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);
GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5);
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();
RenderArcFurnace.fullbright(false);
}

View File

@ -42,7 +42,7 @@ public class MagazineElectricEngine implements IMagazine {
@Override public void reloadAction(ItemStack stack, IInventory inventory) { }
@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 void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }

View File

@ -522,12 +522,12 @@ public class HbmWorldGen implements IWorldGenerator {
private static void genBlueprintChest(World world, Random rand, int i, int j, int boundsX, int boundsZ) {
if(Math.abs(i) < 100 && Math.abs(j) < 100) return;
if(rand.nextBoolean()) return;
if(rand.nextInt(20) < 10) return; // nextBoolean would have weird periodicity to it, hoping that a larger int range has more variance
int cX = Math.abs(i) % boundsX;
int cZ = Math.abs(j) % boundsZ;
if(cX <= 0 && cX + 16 >= 0 && cZ <= 0 && cZ + 16 >= 0) {
if(cX >= 0 && cX < 16 && cZ >= 0 && cZ < 16) {
int x = i + 8;
int z = j + 8;
int y = world.getHeightValue(x, z) - rand.nextInt(2);

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

View File

@ -307,6 +307,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForceField.class, new RenderMachineForceField());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFENSU.class, new RenderFENSU());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatterySocket.class, new RenderBatterySocket());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatteryREDD.class, new RenderBatteryREDD());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineLargeTurbine.class, new RenderBigTurbine());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineReactorBreeding.class, new RenderBreeder());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySolarBoiler.class, new RenderSolarBoiler());
@ -429,6 +430,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionTorusStruct.class, new RenderFusionTorusMultiblock());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionTorus.class, new RenderFusionTorus());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionKlystron.class, new RenderFusionKlystron());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionKlystronCreative.class, new RenderFusionKlystronCreative());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionBreeder.class, new RenderFusionBreeder());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionCollector.class, new RenderFusionCollector());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFusionBoiler.class, new RenderFusionBoiler());
@ -441,6 +443,8 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDoorGeneric.class, new RenderDoorGeneric());
//storage
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMassStorage.class, new RenderMassStorage());
//NBTStructure
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWandStructure.class, new RenderWandStructure());
}

View File

@ -526,18 +526,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_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", "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() });
@ -545,26 +533,6 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModItems.hev_battery, 1), new Object[] { ModBlocks.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_potatos), new Object[] { ItemBattery.getFullBattery(ModItems.battery_potato), ModItems.turret_chip, REDSTONE.dust() });
@ -613,6 +581,7 @@ public class CraftingManager {
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_gauge), new Object[] { ModBlocks.fluid_duct_paintable, STEEL.ingot(), DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
addRecipeAuto(new ItemStack(ModBlocks.fluid_valve, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.fluid_duct_paintable });
addRecipeAuto(new ItemStack(ModBlocks.fluid_switch, 1), new Object[] { "S", "W", 'S', REDSTONE.dust(), 'W', ModBlocks.fluid_duct_paintable });
addRecipeAuto(new ItemStack(ModBlocks.fluid_counter_valve, 1), new Object[] { "S", "W", 'S', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'W', ModBlocks.fluid_switch });
addRecipeAuto(new ItemStack(ModBlocks.fluid_pump, 1), new Object[] { " S ", "PGP", "IMI", 'S', STEEL.shell(), 'P', STEEL.pipe(), 'G', GRAPHITE.ingot(), 'I', STEEL.ingot(), 'M', ModItems.motor });
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 8), new Object[] { "CRC", 'C', CU.plateCast(), 'R', ANY_RUBBER.ingot() });
addRecipeAuto(new ItemStack(ModBlocks.pneumatic_tube, 24), new Object[] { "CRC", 'C', CU.plateWelded(), 'R', ANY_RUBBER.ingot() });
@ -638,7 +607,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_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_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(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 });

View File

@ -664,6 +664,7 @@ public class MainRegistry {
event.registerServerCommand(new CommandReloadServer());
event.registerServerCommand(new CommandLocate());
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
}

View File

@ -59,6 +59,7 @@ import com.hbm.tileentity.bomb.TileEntityNukeCustom;
import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry;
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType;
import com.hbm.util.*;
import com.hbm.util.Tuple;
import com.hbm.util.ArmorRegistry.HazardClass;
import com.hbm.util.i18n.I18nUtil;
import com.hbm.wiaj.GuiWorldInAJar;
@ -230,7 +231,7 @@ public class ModEventHandlerClient {
((ILookOverlay) entity).printHook(event, world, 0, 0, 0);
}
}
GL11.glColor4f(1F, 1F, 1F, 1F);
}
@ -395,6 +396,26 @@ public class ModEventHandlerClient {
}
}
private List<Tuple.Pair<Float, Integer>> getBars(ItemStack stack, EntityPlayer player) {
List<Tuple.Pair<Float, Integer>> bars = new ArrayList<>();
if(stack.getItem() instanceof ArmorFSBPowered && ArmorFSBPowered.hasFSBArmorIgnoreCharge(player)) {
float charge = 1F - (float) ((ArmorFSBPowered) stack.getItem()).getDurabilityForDisplay(stack);
bars.add(new Tuple.Pair<Float, Integer>(charge, 0x00FF00));
}
if(stack.getItem() instanceof JetpackFueledBase) {
JetpackFueledBase jetpack = (JetpackFueledBase) stack.getItem();
float fuel = (float) JetpackFueledBase.getFuel(stack) / jetpack.maxFuel;
bars.add(new Tuple.Pair<Float, Integer>(fuel, jetpack.fuel.getColor()));
}
return bars;
}
@SubscribeEvent(receiveCanceled = true, priority = EventPriority.LOW)
public void onHUDRenderBar(RenderGameOverlayEvent.Post event) {
@ -405,6 +426,32 @@ public class ModEventHandlerClient {
if(event.type == event.type.ARMOR) {
List<List<Tuple.Pair<Float, Integer>>> barsList = new ArrayList<>();
for (int i = 0; i < 4; i++) {
barsList.add(new ArrayList<>());
ItemStack stack = player.inventory.armorInventory[i];
if(stack == null)
continue;
barsList.get(i).addAll(getBars(stack, player));
if (!(ArmorModHandler.hasMods(stack)))
continue;
for (ItemStack mod : ArmorModHandler.pryMods(stack)) {
if (mod == null) continue;
barsList.get(i).addAll(getBars(mod, player));
}
}
GL11.glDisable(GL11.GL_TEXTURE_2D);
tess.startDrawingQuads();
if(ForgeHooks.getTotalArmorValue(player) == 0) {
GuiIngameForge.left_height -= 10;
}
@ -413,69 +460,55 @@ public class ModEventHandlerClient {
int height = event.resolution.getScaledHeight();
int left = width / 2 - 91;
if(ArmorFSB.hasFSBArmorIgnoreCharge(player)) {
ArmorFSB chestplate = (ArmorFSB) player.inventory.armorInventory[2].getItem();
boolean noHelmet = chestplate.noHelmet;
for (List<Tuple.Pair<Float, Integer>> bars : barsList) {
GL11.glDisable(GL11.GL_TEXTURE_2D);
tess.startDrawingQuads();
if (bars.isEmpty())
continue;
for(int i = 0; i < (noHelmet ? 3 : 4); i++) {
int top = height - GuiIngameForge.left_height + 7;
int top = height - GuiIngameForge.left_height + 7;
for (int i = 0; i < bars.size(); i++) {
ItemStack stack = player.inventory.armorInventory[i];
float val = bars.get(i).key;
int hstart, hend;
if(!(stack != null && stack.getItem() instanceof ArmorFSBPowered))
break;
if (i == 0) {
hstart = left;
hend = hstart + (bars.size() == 1 ? 81 : 40);
} else {
int bl = (int) Math.ceil(40F / (bars.size() - 1));
// :(
hstart = left + 41 + bl * (i - 1);
hend = i == bars.size() - 1 ? left + 81 : hstart + bl;
float tot = 1F - (float) ((ArmorFSBPowered) stack.getItem()).getDurabilityForDisplay(stack);
if (i != 1) hstart += 1;
}
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
tess.addVertex(left - 0.5, top - 0.5, 0);
tess.addVertex(left - 0.5, top + 1.5, 0);
tess.addVertex(left + 81.5, top + 1.5, 0);
tess.addVertex(left + 81.5, top - 0.5, 0);
tess.addVertex(hstart, top - 1, 0);
tess.addVertex(hstart, top + 2, 0);
tess.addVertex(hend, top + 2, 0);
tess.addVertex(hend, top - 1, 0);
tess.setColorOpaque_F(1F - tot, tot, 0F);
tess.addVertex(left, top, 0);
tess.addVertex(left, top + 1, 0);
tess.addVertex(left + 81 * tot, top + 1, 0);
tess.addVertex(left + 81 * tot, top, 0);
float valx = hstart + (hend - hstart - 1) * val;
GuiIngameForge.left_height += 3;
int color = bars.get(i).value;
float r = ((color >> 16) & 0xFF) / 255F;
float g = ((color >> 8) & 0xFF) / 255F;
float b = (color & 0xFF) / 255F;
tess.setColorOpaque_F(r, g, b);
tess.addVertex(hstart+1, top, 0);
tess.addVertex(hstart+1, top + 1, 0);
tess.addVertex(valx, top + 1, 0);
tess.addVertex(valx, top, 0);
}
tess.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
} else if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof JetpackFueledBase) {
ItemStack stack = player.inventory.armorInventory[2];
float tot = (float) ((JetpackFueledBase) stack.getItem()).getFuel(stack) / (float) ((JetpackFueledBase) stack.getItem()).getMaxFill(stack);
int top = height - GuiIngameForge.left_height + 3;
GL11.glDisable(GL11.GL_TEXTURE_2D);
tess.startDrawingQuads();
tess.setColorOpaque_F(0.25F, 0.25F, 0.25F);
tess.addVertex(left - 0.5, top - 0.5, 0);
tess.addVertex(left - 0.5, top + 4.5, 0);
tess.addVertex(left + 81.5, top + 4.5, 0);
tess.addVertex(left + 81.5, top - 0.5, 0);
tess.setColorOpaque_F(1F - tot, tot, 0F);
tess.addVertex(left, top, 0);
tess.addVertex(left, top + 4, 0);
tess.addVertex(left + 81 * tot, top + 4, 0);
tess.addVertex(left + 81 * tot, top, 0);
tess.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GuiIngameForge.left_height += 4;
}
tess.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
}
@ -955,7 +988,7 @@ public class ModEventHandlerClient {
ItemDepletedFuel.class,
ItemFluidDuct.class
);
String prefix = "Gun ";
//int gunScale = 16;
//int defaultScale = 1;
@ -1069,11 +1102,11 @@ public class ModEventHandlerClient {
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onClientTickLast(ClientTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
long millis = Clock.get_ms();
if(millis == 0) millis = System.currentTimeMillis();
if(GeneralConfig.enableLoadScreenReplacement && loadingScreenReplacementRetry < 25 && !(mc.loadingScreen instanceof LoadingScreenRendererNT) && millis > lastLoadScreenReplacement + 5_000) {
mc.loadingScreen = new LoadingScreenRendererNT(mc);
lastLoadScreenReplacement = millis;
@ -1171,7 +1204,7 @@ public class ModEventHandlerClient {
public void onRenderWorldLastEvent(RenderWorldLastEvent event) {
Clock.update();
BlockRebar.renderRebar(Minecraft.getMinecraft().theWorld.loadedTileEntityList, event.partialTicks);
GL11.glPushMatrix();
@ -1262,7 +1295,7 @@ public class ModEventHandlerClient {
if(chestplate.thermal) thermalSights = true;
}
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT && ItemGunBaseNT.aimingProgress == 1) {
ItemGunBaseNT gun = (ItemGunBaseNT) player.getHeldItem().getItem();
for(int i = 0; i < gun.getConfigCount(); i++) if(gun.getConfig(player.getHeldItem(), i).hasThermalSights(player.getHeldItem())) thermalSights = true;

View File

@ -271,6 +271,7 @@ public class ResourceManager {
//FENSU
public static final IModelCustom battery_socket = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/battery.obj")).asVBO();
public static final IModelCustom battery_redd = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fensu2.obj")).asVBO();
public static final IModelCustom fensu = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fensu.obj")).asVBO();
//Radar
@ -719,6 +720,7 @@ public class ResourceManager {
public static final ResourceLocation fusion_plasma_glow_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/plasma_glow.png");
public static final ResourceLocation fusion_plasma_sparkle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/plasma_sparkle.png");
public static final ResourceLocation fusion_klystron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/klystron.png");
public static final ResourceLocation fusion_klystron_creative_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/klystron_creative.png");
public static final ResourceLocation fusion_breeder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/breeder.png");
public static final ResourceLocation fusion_collector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/collector.png");
public static final ResourceLocation fusion_boiler_tex = new ResourceLocation(RefStrings.MODID, "textures/models/fusion/boiler.png");
@ -739,6 +741,7 @@ public class ResourceManager {
//FENSU
public static final ResourceLocation battery_socket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/battery_socket.png");
public static final ResourceLocation battery_redd_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu2.png");
public static final ResourceLocation fensu_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu.png");
//Radar

View File

@ -0,0 +1,264 @@
package com.hbm.render.tileentity;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.render.util.BeamPronter;
import com.hbm.render.util.BeamPronter.EnumBeamType;
import com.hbm.render.util.BeamPronter.EnumWaveType;
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
import com.hbm.util.BobMathUtil;
import com.hbm.util.Clock;
import com.hbm.util.Vec3NT;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraftforge.client.IItemRenderer;
public class RenderBatteryREDD extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z + 0.5);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - 10) {
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.battery_redd_tex);
ResourceManager.battery_redd.renderPart("Base");
GL11.glPushMatrix();
GL11.glTranslated(0, 5.5, 0);
TileEntityBatteryREDD redd = (TileEntityBatteryREDD) tile;
float speed = redd.getSpeed();
double rot = redd.prevRotation + (redd.rotation - redd.prevRotation) * interp;
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -5.5, 0);
ResourceManager.battery_redd.renderPart("Wheel");
RenderArcFurnace.fullbright(true);
ResourceManager.battery_redd.renderPart("Lights");
RenderArcFurnace.fullbright(false);
GL11.glPushMatrix();
GL11.glTranslated(0, 5.5, 0);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDepthMask(false);
Vec3NT vec = new Vec3NT(0, 0, 4);
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
double len = 4.25D;
double width = 0.125D;
double span = speed * 0.75;
if(span > 0) for(int j = -1; j <= 1; j += 2) {
for(int i = 0; i < 8; i++) {
double xOffset = 0.8125 * j;
vec.setComponents(0, 1, 0);
vec.rotateAroundXDeg(i * 45D);
tess.setColorRGBA_F(1F, 1F, 0F, 0.75F);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
vec.rotateAroundXDeg(span);
tess.setColorRGBA_F(1F, 1F, 0F, 0.5F);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
tess.setColorRGBA_F(1F, 1F, 0F, 0.5F);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
vec.rotateAroundXDeg(span);
tess.setColorRGBA_F(1F, 1F, 0F, 0.25F);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
tess.setColorRGBA_F(1F, 1F, 0F, 0.25F);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
vec.rotateAroundXDeg(span);
tess.setColorRGBA_F(1F, 1F, 0F, 0F);
tess.addVertex(xOffset, vec.yCoord * len + vec.yCoord * width, vec.zCoord * len + vec.zCoord * width);
tess.addVertex(xOffset, vec.yCoord * len - vec.yCoord * width, vec.zCoord * len - vec.zCoord * width);
}
}
tess.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopAttrib();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
renderSparkle(tile);
GL11.glPopMatrix();
if(speed > 0) renderZaps(tile);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
protected void renderSparkle(TileEntity tile) {
TileEntityBatteryREDD redd = (TileEntityBatteryREDD) tile;
long time = Clock.get_ms();
float alpha = 0.45F + (float) (Math.sin(time / 1000D) * 0.15F);
float alphaMult = redd.getSpeed() / 15F;
float r = 1.0F;
float g = 0.25F;
float b = 0.75F;
double mainOsc = BobMathUtil.sps(time / 1000D) % 1D;
double sparkleSpin = time / 250D * -1 % 1D;
double sparkleOsc = Math.sin(time / 1000D) * 0.5D % 1D;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glDepthMask(false);
GL11.glColor4f(r, g, b, alpha * alphaMult);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
bindTexture(ResourceManager.fusion_plasma_tex);
GL11.glTranslated(0, mainOsc, 0);
ResourceManager.battery_redd.renderPart("Plasma");
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
// cost-cutting measure, don't render extra layers from more than 100m away
if(MainRegistry.proxy.me().getDistanceSq(tile.xCoord + 0.5, tile.yCoord + 2.5, tile.zCoord + 0.5) < 100 * 100) {
GL11.glColor4f(r * 2, g * 2, b * 2, 0.75F * alphaMult);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
bindTexture(ResourceManager.fusion_plasma_sparkle_tex);
GL11.glTranslated(sparkleSpin, sparkleOsc, 0);
ResourceManager.battery_redd.renderPart("Plasma");
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glLoadIdentity();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
}
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glPopAttrib();
GL11.glEnable(GL11.GL_CULL_FACE);
}
protected void renderZaps(TileEntity tile) {
Random rand = new Random(tile.getWorldObj().getTotalWorldTime() / 5);
rand.nextBoolean();
if(rand.nextBoolean()) {
GL11.glPushMatrix();
GL11.glTranslated(3.125, 5.5, 0);
BeamPronter.prontBeam(Vec3.createVectorHelper(-1.375, -2.625, 3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 15, 0.25F, 3, 0.0625F);
BeamPronter.prontBeam(Vec3.createVectorHelper(-1.375, -2.625, 3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 1, 0, 3, 0.0625F);
GL11.glPopMatrix();
}
if(rand.nextBoolean()) {
GL11.glPushMatrix();
GL11.glTranslated(-3.125, 5.5, 0);
BeamPronter.prontBeam(Vec3.createVectorHelper(1.375, -2.625, 3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 15, 0.25F, 3, 0.0625F);
BeamPronter.prontBeam(Vec3.createVectorHelper(1.375, -2.625, 3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 1, 0, 3, 0.0625F);
GL11.glPopMatrix();
}
if(rand.nextBoolean()) {
GL11.glPushMatrix();
GL11.glTranslated(3.125, 5.5, 0);
BeamPronter.prontBeam(Vec3.createVectorHelper(-1.375, -2.625, -3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 15, 0.25F, 3, 0.0625F);
BeamPronter.prontBeam(Vec3.createVectorHelper(-1.375, -2.625, -3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 1, 0, 3, 0.0625F);
GL11.glPopMatrix();
}
if(rand.nextBoolean()) {
GL11.glPushMatrix();
GL11.glTranslated(-3.125, 5.5, 0);
BeamPronter.prontBeam(Vec3.createVectorHelper(1.375, -2.625, -3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 15, 0.25F, 3, 0.0625F);
BeamPronter.prontBeam(Vec3.createVectorHelper(1.375, -2.625, -3.75), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x404040, 0x002040, (int)(System.currentTimeMillis() % 1000) / 50, 1, 0, 3, 0.0625F);
GL11.glPopMatrix();
}
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.machine_battery_redd);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -3, 0);
GL11.glScaled(2.5, 2.5, 2.5);
}
public void renderCommon() {
GL11.glRotated(-90, 0, 1, 0);
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.battery_redd_tex);
ResourceManager.battery_redd.renderPart("Base");
ResourceManager.battery_redd.renderPart("Wheel");
GL11.glDisable(GL11.GL_LIGHTING);
ResourceManager.battery_redd.renderPart("Lights");
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -0,0 +1,79 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import com.hbm.tileentity.machine.fusion.TileEntityFusionKlystronCreative;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderFusionKlystronCreative extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y, z + 0.5);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
}
TileEntityFusionKlystronCreative klystron = (TileEntityFusionKlystronCreative) tile;
GL11.glTranslated(-1, 0, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.fusion_klystron_creative_tex);
ResourceManager.fusion_klystron.renderPart("Klystron");
GL11.glPushMatrix();
float rot = klystron.prevFan + (klystron.fan - klystron.prevFan) * interp;
GL11.glTranslated(0, 2.5, 0);
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -2.5, 0);
ResourceManager.fusion_klystron.renderPart("Rotor");
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.fusion_klystron_creative);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -3, 1);
GL11.glScaled(3.5, 3.5, 3.5);
GL11.glRotated(90, 0, 1, 0);
}
public void renderCommon() {
GL11.glScaled(0.5, 0.5, 0.5);
GL11.glRotatef(90, 0F, 1F, 0F);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.fusion_klystron_creative_tex);
ResourceManager.fusion_klystron.renderPart("Klystron");
double rot = (System.currentTimeMillis() / 10) % 360D;
GL11.glTranslated(0, 2.5, 0);
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -2.5, 0);
ResourceManager.fusion_klystron.renderPart("Rotor");
GL11.glShadeModel(GL11.GL_FLAT);
}};
}
}

View File

@ -0,0 +1,136 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.hbm.render.util.RenderDecoItem;
import com.hbm.tileentity.machine.storage.TileEntityMassStorage;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@SideOnly(Side.CLIENT)
public class RenderMassStorage extends TileEntitySpecialRenderer {
private RenderItem itemRenderer = new RenderDecoItem(this);
@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
if(!(tile instanceof TileEntityMassStorage)) return;
TileEntityMassStorage storage = (TileEntityMassStorage) tile;
if(storage.type == null) return;
Minecraft mc = Minecraft.getMinecraft();
int dir = storage.getBlockMetadata() / 4;
// fuck this shit, push pop the whole ass lighting state then for all I fucken care
GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_LIGHTING_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_TRANSFORM_BIT);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glDisable(GL11.GL_NORMALIZE);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
GL11.glPushMatrix();
{
// align to block
GL11.glTranslated(x, y, z);
// align item (and flip)
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
GL11.glRotatef(180.0F, 0, 0, 1);
switch(dir) {
case 1: GL11.glRotatef(180.0F, 0, 1, 0); break;
case 2: GL11.glRotatef(-90.0F, 0, 1, 0); break;
case 3: GL11.glRotatef(90.0F, 0, 1, 0); break;
}
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
GL11.glTranslatef(0, 0, -0.005F); // offset to prevent z-fighting
GL11.glScalef(1.0F / 16.0F, 1.0F / 16.0F, -0.0001F); // scale to block size
GL11.glPushMatrix();
{
GL11.glTranslatef(4.0F, 2.5F, 0); // adjust to centered location
GL11.glScalef(8.0F / 16.0F, 8.0F / 16.0F, 1); // scale to 8 pixels across
if(mc.gameSettings.fancyGraphics) {
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, storage.type, 0, 0);
} else {
itemRenderer.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, storage.type, 0, 0, true);
}
}
GL11.glPopMatrix();
GL11.glColor3f(1, 1, 1);
String text = getTextForCount(storage.getStockpile(), mc.fontRenderer.getUnicodeFlag());
int textX = 32 - mc.fontRenderer.getStringWidth(text) / 2;
int textY = 44;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glPushMatrix();
{
GL11.glScalef(4.0F / 16.0F, 4.0F / 16.0F, 4.0F / 16.0F);
int fontColor = 0x00FF00;
// funky text shadow rendering with no z-fighting and alpha testing still enabled
mc.fontRenderer.drawString(text, textX + 1, textY + 1, (fontColor & 16579836) >> 2 | fontColor & -16777216);
GL11.glTranslatef(0, 0, 1);
mc.fontRenderer.drawString(text, textX, textY, 0x00FF00);
}
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
double fraction = (double) storage.getStockpile() / (double) storage.getCapacity();
GL11.glColor3d(1.0 - fraction, fraction, 0.0);
double bMinX = 2;
double bMaxX = 2 + fraction * 12;
double bMinY = 13.5;
double bMaxY = 14;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertex(bMinX, bMaxY, 0);
tessellator.addVertex(bMaxX, bMaxY, 0);
tessellator.addVertex(bMaxX, bMinY, 0);
tessellator.addVertex(bMinX, bMinY, 0);
tessellator.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
}
GL11.glPopMatrix();
GL11.glPopAttrib();
}
private String getTextForCount(int stackSize, boolean isUnicode) {
if(stackSize >= 100000000 || (stackSize >= 1000000 && isUnicode)) return String.format("%.0fM", stackSize / 1000000f);
if(stackSize >= 1000000) return String.format("%.1fM", stackSize / 1000000f);
if(stackSize >= 100000 || (stackSize >= 10000 && isUnicode)) return String.format("%.0fK", stackSize / 1000f);
if(stackSize >= 10000) return String.format("%.1fK", stackSize / 1000f);
return String.valueOf(stackSize);
}
}

View File

@ -9,6 +9,8 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
public class BeamPronter {
public static Random rand = new Random();
public static enum EnumWaveType {
RANDOM, SPIRAL
@ -51,7 +53,7 @@ public class BeamPronter {
Tessellator tessellator = Tessellator.instance;
Vec3 unit = Vec3.createVectorHelper(0, 1, 0);
Random rand = new Random(start);
rand.setSeed(start);
double length = skeleton.lengthVector();
double segLength = length / segments;
double lastX = 0;

View File

@ -1,16 +1,29 @@
package com.hbm.render.util;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
/**
* For small items as part of a TESR, e.g. items in a press
* @author hbm
*/
public class RenderDecoItem extends RenderItem {
public RenderDecoItem(TileEntitySpecialRenderer render) {
this.setRenderManager(RenderManager.instance);
}
@ -34,4 +47,147 @@ public class RenderDecoItem extends RenderItem {
public boolean shouldSpreadItems() {
return false;
}
/**
* Fixes z-fighting issues with item glints when using GUI (flat) rendering in world, from StorageDrawers 1.7.10
*/
private static final ResourceLocation RES_ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
private RenderBlocks renderBlocksRi = new RenderBlocks();
@Override
public void renderItemIntoGUI(FontRenderer fontRenderer, TextureManager texManager, ItemStack itemStack, int x, int y, boolean renderEffect) {
if(itemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemStack.getItem()).getRenderType())) {
renderItemIntoGUIBlock(fontRenderer, texManager, itemStack, x, y, renderEffect);
return;
}
Item item = itemStack.getItem();
int meta = itemStack.getItemDamage();
ResourceLocation loc = itemStack.getItem().requiresMultipleRenderPasses()
? (item.getSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture)
: (texManager.getResourceLocation(itemStack.getItemSpriteNumber()));
for(int i = 0; i < item.getRenderPasses(meta); ++i) {
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
texManager.bindTexture(loc);
IIcon icon = itemStack.getItem().requiresMultipleRenderPasses()
? item.getIcon(itemStack, i)
: itemStack.getIconIndex();
if(icon == null) continue;
int color = itemStack.getItem().getColorFromItemStack(itemStack, i);
float r = (float)(color >> 16 & 255) / 255.0F;
float g = (float)(color >> 8 & 255) / 255.0F;
float b = (float)(color & 255) / 255.0F;
if(renderWithColor)
GL11.glColor4f(r, g, b, 1.0F);
GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
GL11.glPolygonOffset(-1f, -1);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
renderIcon(x, y, icon, 16, 16);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
if(renderEffect && itemStack.hasEffect(i))
renderEffect(texManager, x, y);
GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
}
}
@Override
public void renderEffect(TextureManager manager, int x, int y) {
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
manager.bindTexture(RES_ITEM_GLINT);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
renderGlint(x, y, 16, 16);
GL11.glDepthMask(true);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
private void renderGlint(int x, int y, int w, int h) {
for(int i = 0; i < 2; ++i) {
OpenGlHelper.glBlendFunc(772, 1, 0, 0);
float uScale = 0.00390625F;
float vScale = 0.00390625F;
float u = (Minecraft.getSystemTime() % (3000 + i * 1873)) / (3000.0F + i * 1873) * 256.0F;
float v = 0.0F;
float hScale = (i < 1) ? 4.0F : -1.0F;
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(x + 0, y + h, 0, (u + (float)h * hScale) * uScale, (v + (float)h) * vScale);
tessellator.addVertexWithUV(x + w, y + h, 0, (u + (float)w + (float)h * hScale) * uScale, (v + (float)h) * vScale);
tessellator.addVertexWithUV(x + w, y + 0, 0, (u + (float)w) * uScale, (v + 0.0F) * vScale);
tessellator.addVertexWithUV(x + 0, y + 0, 0, (u + 0.0F) * uScale, (v + 0.0F) * vScale);
tessellator.draw();
}
}
private void renderItemIntoGUIBlock(FontRenderer fontRenderer, TextureManager texManager, ItemStack itemStack, int x, int y, boolean renderEffect) {
texManager.bindTexture(TextureMap.locationBlocksTexture);
Block block = Block.getBlockFromItem(itemStack.getItem());
if(block.getRenderBlockPass() != 0) {
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
} else {
GL11.glAlphaFunc(GL11.GL_GREATER, 0.5F);
GL11.glDisable(GL11.GL_BLEND);
}
GL11.glPushMatrix();
GL11.glTranslatef(x - 2, y + 3, zLevel - 3);
GL11.glScalef(10, 10, 10);
GL11.glTranslatef(1, 0.5f, 1);
GL11.glScalef(1, 1, -1);
GL11.glRotatef(210, 1, 0, 0);
GL11.glRotatef(45, 0, 1, 0);
int color = itemStack.getItem().getColorFromItemStack(itemStack, 0);
float r = (float)(color >> 16 & 255) / 255.0F;
float g = (float)(color >> 8 & 255) / 255.0F;
float b = (float)(color & 255) / 255.0F;
if(this.renderWithColor)
GL11.glColor4f(r * 1, g * 1, b * 1, 1.0F);
GL11.glRotatef(-90, 0, 1, 0);
GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
GL11.glPolygonOffset(-1f, -1f);
this.renderBlocksRi.useInventoryTint = this.renderWithColor;
this.renderBlocksRi.renderBlockAsItem(block, itemStack.getItemDamage(), 1);
this.renderBlocksRi.useInventoryTint = true;
GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
if(block.getRenderBlockPass() == 0)
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glPopMatrix();
}
}

View File

@ -82,6 +82,7 @@ public class TileMappings {
put(TileEntityDecoPoleSatelliteReceiver.class, "tileentity_satellitereceicer");
put(TileEntityMachineBattery.class, "tileentity_battery");
put(TileEntityBatterySocket.class, "tileentity_battery_socket");
put(TileEntityBatteryREDD.class, "tileentity_battery_redd");
put(TileEntityCapacitor.class, "tileentity_capacitor");
put(TileEntityMachineWoodBurner.class, "tileentity_wood_burner");
put(TileEntityRedBarrel.class, "tileentity_barrel");
@ -417,6 +418,7 @@ public class TileMappings {
put(TileEntityFusionTorusStruct.class, "tileentity_fusion_torus_struct");
put(TileEntityFusionTorus.class, "tileentity_fusion_torus");
put(TileEntityFusionKlystron.class, "tileentity_fusion_klystron");
put(TileEntityFusionKlystronCreative.class, "tileentity_fusion_klystron_creative");
put(TileEntityFusionBreeder.class, "tileentity_fusion_breeder");
put(TileEntityFusionCollector.class, "tileentity_fusion_collector");
put(TileEntityFusionBoiler.class, "tileentity_fusion_boiler");
@ -443,6 +445,7 @@ public class TileMappings {
put(TileEntityPipeExhaust.class, "tileentity_pipe_exhaust");
put(TileEntityPipeExhaustPaintable.class, "tileentity_pipe_exhaust_paintable");
put(TileEntityFluidValve.class, "tileentity_pipe_valve");
put(TileEntityFluidCounterValve.class, "tileentity_pipe_counter_valve");
put(TileEntityFluidPump.class, "tileentity_pipe_pump");
put(TileEntityPipeAnchor.class, "tileentity_pioe_anchor");

View File

@ -96,6 +96,8 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IEnergyPr
public void updateEntity() {
if(!worldObj.isRemote) {
this.power *= 0.95;
this.info = new double[3];

View File

@ -394,7 +394,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
@Override
public boolean canInsertItem(int slot, ItemStack stack, int side) {
if(slot < 3) return lid >= 1 && stack.getItem() == ModItems.arc_electrode;
if(slot < 3) return stack.getItem() == ModItems.arc_electrode;
if(slot >= 25) {
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack, this.liquidMode);
if(recipe == null) return false;
@ -405,7 +405,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
if(slot < 3) return lid >= 1 && stack.getItem() == ModItems.arc_electrode;
if(slot < 3) return stack.getItem() == ModItems.arc_electrode;
if(slot > 4) {
ArcFurnaceRecipe recipe = ArcFurnaceRecipes.getOutput(stack, this.liquidMode);
if(recipe == null) return false;

View File

@ -120,6 +120,8 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
tanks[0].setType(0, 1, slots);
tanks[0].loadTank(2, 3, slots);
power = Library.chargeItemsFromTE(slots, 4, power, maxPower);
this.power *= 0.95;
FluidType in = tanks[0].getTankType();
boolean valid = false;

View File

@ -28,8 +28,6 @@ import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import com.hbm.util.i18n.I18nUtil;
import api.hbm.block.IDrillInteraction;
import api.hbm.block.IMiningDrill;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.fluid.IFluidStandardSender;
import cpw.mods.fml.relauncher.Side;
@ -53,7 +51,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IEnergyReceiverMK2, IMiningDrill, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider {
public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardSender, IGUIProvider, IUpgradeInfoProvider {
public long power;
public int age = 0;
@ -325,17 +323,6 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
}
}
if(normal && b instanceof IDrillInteraction) {
IDrillInteraction in = (IDrillInteraction) b;
ItemStack drop = in.extractResource(worldObj, targetX, targetY, targetZ, meta, this);
if(drop != null) {
worldObj.spawnEntityInWorld(new EntityItem(worldObj, targetX + 0.5, targetY + 0.5, targetZ + 0.5, drop.copy()));
}
doesBreak = in.canBreak(worldObj, targetX, targetY, targetZ, meta, this);
}
if(doesBreak) {
if(normal) b.dropBlockAsItem(worldObj, targetX, targetY, targetZ, meta, fortune);
worldObj.func_147480_a(targetX, targetY, targetZ, false);
@ -464,106 +451,68 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
}
public int getRange() {
int range = 1;
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_effect_1)
range += 2;
else if(slots[i].getItem() == ModItems.upgrade_effect_2)
range += 4;
else if(slots[i].getItem() == ModItems.upgrade_effect_3)
range += 6;
if(slots[i].getItem() == ModItems.upgrade_effect_1) range += 2;
else if(slots[i].getItem() == ModItems.upgrade_effect_2) range += 4;
else if(slots[i].getItem() == ModItems.upgrade_effect_3) range += 6;
}
}
return Math.min(range, 25);
}
public boolean hasNullifier() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_nullifier)
return true;
if(slots[i].getItem() == ModItems.upgrade_nullifier) return true;
}
}
return false;
}
public boolean hasSmelter() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_smelter)
return true;
if(slots[i].getItem() == ModItems.upgrade_smelter) return true;
}
}
return false;
}
public boolean hasShredder() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_shredder)
return true;
if(slots[i].getItem() == ModItems.upgrade_shredder) return true;
}
}
return false;
}
public boolean hasCentrifuge() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_centrifuge)
return true;
if(slots[i].getItem() == ModItems.upgrade_centrifuge) return true;
}
}
return false;
}
public boolean hasCrystallizer() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_crystallizer)
return true;
if(slots[i].getItem() == ModItems.upgrade_crystallizer) return true;
}
}
return false;
}
public boolean doesScream() {
for(int i = 1; i < 9; i++) {
if(slots[i] != null) {
if(slots[i].getItem() == ModItems.upgrade_screm)
return true;
if(slots[i].getItem() == ModItems.upgrade_screm) return true;
}
}
return false;
}
@ -646,6 +595,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
super.readFromNBT(nbt);
tank.readFromNBT(nbt, "oil");
power = nbt.getLong("power");
isOn = nbt.getBoolean("isOn");
redstonePowered = false;
}
@ -655,19 +605,10 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
super.writeToNBT(nbt);
tank.writeToNBT(nbt, "oil");
nbt.setLong("power", power);
nbt.setBoolean("isOn", isOn);
}
@Override
public DrillType getDrillTier() {
return DrillType.HITECH;
}
@Override
public int getDrillRating() {
return 100;
}
@Override
public FluidTank[] getSendingTanks() {
return new FluidTank[] { tank };

View File

@ -282,6 +282,8 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
tanks[0].setType(0, 1, slots);
tanks[0].loadTank(2, 3, slots);
power = Library.chargeItemsFromTE(slots, 4, power, maxPower);
this.power *= 0.95;
FluidType in = tanks[0].getTankType();
boolean valid = false;

View File

@ -34,6 +34,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@ -102,36 +103,8 @@ public class TileEntityFusionKlystron extends TileEntityMachineBase implements I
if(output < outputTarget / 50) output = 0;
if(klystronNode == null || klystronNode.expired) {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getOpposite();
klystronNode = UniNodespace.getNode(worldObj, xCoord + dir.offsetX * 4, yCoord + 2, zCoord + dir.offsetZ * 4, KlystronNetworkProvider.THE_PROVIDER);
if(klystronNode == null) {
klystronNode = new GenNode(KlystronNetworkProvider.THE_PROVIDER,
new BlockPos(xCoord + dir.offsetX * 4, yCoord + 2, zCoord + dir.offsetZ * 4))
.setConnections(new DirPos(xCoord + dir.offsetX * 5, yCoord + 2, zCoord + dir.offsetZ * 5, dir));
UniNodespace.createNode(worldObj, klystronNode);
}
}
if(klystronNode.net != null) klystronNode.net.addProvider(this);
if(klystronNode != null && klystronNode.net != null) {
KlystronNetwork net = (KlystronNetwork) klystronNode.net;
for(Object o : net.receiverEntries.entrySet()) {
Entry e = (Entry) o;
if(e.getKey() instanceof TileEntityFusionTorus) { // replace this with an interface should we ever get more acceptors
TileEntityFusionTorus torus = (TileEntityFusionTorus) e.getKey();
if(torus.isLoaded() && !torus.isInvalid()) { // check against zombie network members
torus.klystronEnergy += this.output;
break; // we only do one anyway
}
}
}
}
this.klystronNode = handleKNode(klystronNode, this);
provideKyU(klystronNode, this.output);
this.networkPackNT(100);
@ -173,6 +146,56 @@ public class TileEntityFusionKlystron extends TileEntityMachineBase implements I
}
}
}
/** Ensures the k-node exists, is loaded, and the klystron is a provider in the k-net. Returns a new klystron node if none existed, or the previous one. */
public static GenNode handleKNode(GenNode klystronNode, TileEntity that) {
World worldObj = that.getWorldObj();
int xCoord = that.xCoord;
int yCoord = that.yCoord;
int zCoord = that.zCoord;
if(klystronNode == null || klystronNode.expired) {
ForgeDirection dir = ForgeDirection.getOrientation(that.getBlockMetadata() - 10).getOpposite();
klystronNode = UniNodespace.getNode(worldObj, xCoord + dir.offsetX * 4, yCoord + 2, zCoord + dir.offsetZ * 4, KlystronNetworkProvider.THE_PROVIDER);
if(klystronNode == null) {
klystronNode = new GenNode(KlystronNetworkProvider.THE_PROVIDER,
new BlockPos(xCoord + dir.offsetX * 4, yCoord + 2, zCoord + dir.offsetZ * 4))
.setConnections(new DirPos(xCoord + dir.offsetX * 5, yCoord + 2, zCoord + dir.offsetZ * 5, dir));
UniNodespace.createNode(worldObj, klystronNode);
}
}
if(klystronNode.net != null) klystronNode.net.addProvider(that);
return klystronNode;
}
/** Provides klystron energy to the k-net of the supplied k-node, returns true is a connection is established */
public static boolean provideKyU(GenNode klystronNode, long output) {
boolean connected = false;
if(klystronNode != null && klystronNode.net != null) {
KlystronNetwork net = (KlystronNetwork) klystronNode.net;
for(Object o : net.receiverEntries.entrySet()) {
Entry e = (Entry) o;
if(e.getKey() instanceof TileEntityFusionTorus) { // replace this with an interface should we ever get more acceptors
TileEntityFusionTorus torus = (TileEntityFusionTorus) e.getKey();
if(torus.isLoaded() && !torus.isInvalid()) { // check against zombie network members
torus.klystronEnergy += output;
connected = true;
break; // we only do one anyway
}
}
}
}
return connected;
}
public DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);

View File

@ -0,0 +1,137 @@
package com.hbm.tileentity.machine.fusion;
import com.hbm.inventory.recipes.FusionRecipes;
import com.hbm.main.MainRegistry;
import com.hbm.sound.AudioWrapper;
import com.hbm.tileentity.TileEntityLoadedBase;
import com.hbm.uninos.GenNode;
import com.hbm.uninos.UniNodespace;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
public class TileEntityFusionKlystronCreative extends TileEntityLoadedBase {
protected GenNode klystronNode;
public float fan;
public float prevFan;
public float fanSpeed;
public static final float FAN_ACCELERATION = 0.125F;
public boolean isConnected = false;
private AudioWrapper audio;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
this.klystronNode = TileEntityFusionKlystron.handleKNode(klystronNode, this);
this.isConnected = TileEntityFusionKlystron.provideKyU(klystronNode, FusionRecipes.INSTANCE.maxInput);
this.networkPackNT(100);
} else {
if(this.isConnected) this.fanSpeed += FAN_ACCELERATION;
else this.fanSpeed -= FAN_ACCELERATION;
this.fanSpeed = MathHelper.clamp_float(this.fanSpeed, 0F, 5F);
this.prevFan = this.fan;
this.fan += this.fanSpeed;
if(this.fan >= 360F) {
this.fan -= 360F;
this.prevFan -= 360F;
}
if(this.fanSpeed > 0 && MainRegistry.proxy.me().getDistanceSq(xCoord + 0.5, yCoord + 2.5, zCoord + 0.5) < 30 * 30) {
float speed = this.fanSpeed / 5F;
if(audio == null) {
audio = MainRegistry.proxy.getLoopedSound("hbm:block.fel", xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 15F, speed, 20);
audio.startSound();
} else {
audio.updateVolume(getVolume(speed));
audio.updatePitch(speed);
audio.keepAlive();
}
} else {
if(audio != null) {
if(audio.isPlaying()) audio.stopSound();
audio = null;
}
}
}
}
@Override
public void onChunkUnload() {
super.onChunkUnload();
if(audio != null) {
audio.stopSound();
audio = null;
}
}
@Override
public void invalidate() {
super.invalidate();
if(audio != null) {
audio.stopSound();
audio = null;
}
if(!worldObj.isRemote) {
if(this.klystronNode != null) UniNodespace.destroyNode(worldObj, klystronNode);
}
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
buf.writeBoolean(isConnected);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
this.isConnected = buf.readBoolean();
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 4,
yCoord,
zCoord - 4,
xCoord + 5,
yCoord + 5,
zCoord + 5
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -70,7 +70,13 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
this.heat -= (step.heatReq * ops / TU_PER_DEGREE) * trait.getEfficiency(HeatingType.HEATEXCHANGER);
}
if(eff <= 0) {
feed.setTankType(Fluids.NONE);
steam.setTankType(Fluids.NONE);
}
} else {
feed.setTankType(Fluids.NONE);
steam.setTankType(Fluids.NONE);
}

View File

@ -0,0 +1,184 @@
package com.hbm.tileentity.machine.storage;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.EnumUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IBatteryItem;
import api.hbm.energymk2.IEnergyConductorMK2;
import api.hbm.energymk2.IEnergyProviderMK2;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.energymk2.Nodespace;
import api.hbm.energymk2.Nodespace.PowerNode;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
public abstract class TileEntityBatteryBase extends TileEntityMachineBase implements IEnergyConductorMK2, IEnergyProviderMK2, IEnergyReceiverMK2, IControlReceiver, IGUIProvider {
public byte lastRedstone = 0;
public long prevPowerState = 0;
public static final int mode_input = 0;
public static final int mode_buffer = 1;
public static final int mode_output = 2;
public static final int mode_none = 3;
public short redLow = 0;
public short redHigh = 2;
public ConnectionPriority priority = ConnectionPriority.LOW;
protected PowerNode node;
public TileEntityBatteryBase(int slotCount) {
super(slotCount);
}
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(priority == null || priority.ordinal() == 0 || priority.ordinal() == 4) {
priority = ConnectionPriority.LOW;
}
if(this.node == null || this.node.expired) {
this.node = (PowerNode) UniNodespace.getNode(worldObj, xCoord, yCoord, zCoord, Nodespace.THE_POWER_PROVIDER);
if(this.node == null || this.node.expired) {
this.node = this.createNode();
UniNodespace.createNode(worldObj, this.node);
}
}
if(this.node != null && this.node.hasValidNet()) switch(this.getRelevantMode(false)) {
case mode_input: this.node.net.removeProvider(this); this.node.net.addReceiver(this); break;
case mode_output: this.node.net.addProvider(this); this.node.net.removeReceiver(this); break;
case mode_buffer: this.node.net.addProvider(this); this.node.net.addReceiver(this); break;
case mode_none: this.node.net.removeProvider(this); this.node.net.removeReceiver(this); break;
}
byte comp = this.getComparatorPower();
if(comp != this.lastRedstone) this.markDirty();
this.lastRedstone = comp;
prevPowerState = this.getPower();
this.networkPackNT(100);
}
}
public byte getComparatorPower() {
double frac = (double) this.getPower() / (double) this.getMaxPower() * 15D;
return (byte) (MathHelper.clamp_int((int) frac + 1, 0, 15)); //to combat eventual rounding errors with the FEnSU's stupid maxPower
}
@Override
public PowerNode createNode() {
return new PowerNode(this.getPortPos()).setConnections(this.getConPos());
}
@Override
public void invalidate() {
super.invalidate();
if(!worldObj.isRemote) {
if(this.node != null) {
UniNodespace.destroyNode(worldObj, xCoord, yCoord, zCoord, Nodespace.THE_POWER_PROVIDER);
}
}
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
return stack.getItem() instanceof IBatteryItem;
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
buf.writeShort(redLow);
buf.writeShort(redHigh);
buf.writeByte(priority.ordinal());
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
redLow = buf.readShort();
redHigh = buf.readShort();
priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, buf.readByte());
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.redLow = nbt.getShort("redLow");
this.redHigh = nbt.getShort("redHigh");
this.lastRedstone = nbt.getByte("lastRedstone");
this.priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, nbt.getByte("priority"));
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setShort("redLow", redLow);
nbt.setShort("redHigh", redHigh);
nbt.setByte("lastRedstone", lastRedstone);
nbt.setByte("priority", (byte) this.priority.ordinal());
}
@Override public boolean allowDirectProvision() { return false; }
@Override public ConnectionPriority getPriority() { return this.priority; }
public abstract BlockPos[] getPortPos();
public abstract DirPos[] getConPos();
private short modeCache = 0;
public short getRelevantMode(boolean useCache) {
if(useCache) return this.modeCache;
boolean powered = false;
for(BlockPos pos : getPortPos()) if(worldObj.isBlockIndirectlyGettingPowered(pos.getX(), pos.getY(), pos.getZ())) { powered = true; break; }
this.modeCache = powered ? this.redHigh : this.redLow;
return this.modeCache;
}
@Override public boolean hasPermission(EntityPlayer player) { return this.isUseableByPlayer(player); }
@Override
public void receiveControl(NBTTagCompound data) {
if(data.hasKey("low")) {
this.redLow++;
if(this.redLow > 3) this.redLow = 0;
}
if(data.hasKey("high")) {
this.redHigh++;
if(this.redHigh > 3) this.redHigh = 0;
}
if(data.hasKey("priority")) {
int ordinal = this.priority.ordinal();
ordinal++;
if(ordinal > ConnectionPriority.HIGH.ordinal()) ordinal = ConnectionPriority.LOW.ordinal();
this.priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, ordinal);
}
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -0,0 +1,221 @@
package com.hbm.tileentity.machine.storage;
import java.math.BigInteger;
import com.hbm.inventory.container.ContainerBatteryREDD;
import com.hbm.inventory.gui.GUIBatteryREDD;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.sound.AudioWrapper;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityBatteryREDD extends TileEntityBatteryBase {
public float prevRotation = 0F;
public float rotation = 0F;
public BigInteger[] log = new BigInteger[20];
public BigInteger delta = BigInteger.valueOf(0);
public BigInteger power = BigInteger.valueOf(0);
private AudioWrapper audio;
public TileEntityBatteryREDD() {
super(2);
}
@Override public String getName() { return "container.batteryREDD"; }
@Override
public void updateEntity() {
BigInteger prevPower = new BigInteger(power.toByteArray());
super.updateEntity();
if(!worldObj.isRemote) {
long toAdd = Library.chargeTEFromItems(slots, 0, 0, this.getMaxPower());
if(toAdd > 0) this.power = this.power.add(BigInteger.valueOf(toAdd));
long toRemove = this.getPower() - Library.chargeItemsFromTE(slots, 1, this.getPower(), this.getMaxPower());
if(toRemove > 0)this.power = this.power.subtract(BigInteger.valueOf(toRemove));
// same implementation as for batteries, however retooled to use bigints because fuck
BigInteger avg = this.power.add(prevPower).divide(BigInteger.valueOf(2));
this.delta = avg.subtract(this.log[0] == null ? BigInteger.ZERO : this.log[0]);
for(int i = 1; i < this.log.length; i++) {
this.log[i - 1] = this.log[i];
}
this.log[19] = avg;
} else {
this.prevRotation = this.rotation;
this.rotation += this.getSpeed();
if(rotation >= 360) {
rotation -= 360;
prevRotation -= 360;
}
float pitch = 0.5F + this.getSpeed() / 15F * 1.5F;
if(this.prevRotation != this.rotation && MainRegistry.proxy.me().getDistanceSq(xCoord + 0.5, yCoord + 5.5, zCoord + 0.5) < 30 * 30) {
if(this.audio == null || !this.audio.isPlaying()) {
this.audio = MainRegistry.proxy.getLoopedSound("hbm:block.fensuHum", xCoord, yCoord, zCoord, this.getVolume(1.5F), 25F, pitch, 5);
this.audio.startSound();
}
this.audio.updateVolume(this.getVolume(1.5F));
this.audio.updatePitch(pitch);
this.audio.keepAlive();
} else {
if(this.audio != null) {
this.audio.stopSound();
this.audio = null;
}
}
}
}
public float getSpeed() {
return (float) Math.min(Math.pow(Math.log(this.power.doubleValue() * 0.05 + 1) * 0.05F, 5), 15F);
}
@Override
public void onChunkUnload() {
super.onChunkUnload();
if(audio != null) {
audio.stopSound();
audio = null;
}
}
@Override
public void invalidate() {
super.invalidate();
if(audio != null) {
audio.stopSound();
audio = null;
}
}
@Override
public void serialize(ByteBuf buf) {
super.serialize(buf);
byte[] array0 = this.power.toByteArray();
buf.writeInt(array0.length);
for(byte b : array0) buf.writeByte(b);
byte[] array1 = this.delta.toByteArray();
buf.writeInt(array1.length);
for(byte b : array1) buf.writeByte(b);
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
byte[] array0 = new byte[buf.readInt()];
for(int i = 0 ; i < array0.length; i++) array0[i] = buf.readByte();
this.power = new BigInteger(array0);
byte[] array1 = new byte[buf.readInt()];
for(int i = 0 ; i < array1.length; i++) array1[i] = buf.readByte();
this.delta = new BigInteger(array1);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.power = new BigInteger(nbt.getByteArray("power"));
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setByteArray("power", this.power.toByteArray());
}
@Override
public BlockPos[] getPortPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
return new BlockPos[] {
new BlockPos(xCoord + dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 + rot.offsetZ * 2),
new BlockPos(xCoord + dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2 - rot.offsetZ * 2),
new BlockPos(xCoord - dir.offsetX * 2 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 2),
new BlockPos(xCoord - dir.offsetX * 2 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 2),
new BlockPos(xCoord + rot.offsetX * 4, yCoord, zCoord + rot.offsetZ * 4),
new BlockPos(xCoord - rot.offsetX * 4, yCoord, zCoord - rot.offsetZ * 4),
};
}
@Override
public DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
return new DirPos[] {
new DirPos(xCoord + dir.offsetX * 3 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 3 + rot.offsetZ * 2, dir),
new DirPos(xCoord + dir.offsetX * 3 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 3 - rot.offsetZ * 2, dir),
new DirPos(xCoord - dir.offsetX * 3 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ * 2, dir.getOpposite()),
new DirPos(xCoord - dir.offsetX * 3 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 3 - rot.offsetZ * 2, dir.getOpposite()),
new DirPos(xCoord + rot.offsetX * 5, yCoord, zCoord + rot.offsetZ * 5, rot),
new DirPos(xCoord - rot.offsetX * 5, yCoord, zCoord - rot.offsetZ * 5, rot.getOpposite()),
};
}
@Override
public void usePower(long power) {
this.power = this.power.subtract(BigInteger.valueOf(power));
}
@Override
public long transferPower(long power) {
this.power = this.power.add(BigInteger.valueOf(power));
return 0L;
}
@Override public long getPower() { return this.power.min(BigInteger.valueOf(getMaxPower() / 2)).longValue(); } // for provision
@Override public void setPower(long power) { } // not needed since we use transferPower and usePower directly
@Override public long getMaxPower() { return Long.MAX_VALUE / 100L; } // for connection speed
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerBatteryREDD(player.inventory, this); }
@Override public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIBatteryREDD(player.inventory, this); }
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 4,
yCoord,
zCoord - 4,
xCoord + 5,
yCoord + 10,
zCoord + 5
);
}
return bb;
}
}

View File

@ -1,52 +1,32 @@
package com.hbm.tileentity.machine.storage;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.container.ContainerBatterySocket;
import com.hbm.inventory.gui.GUIBatterySocket;
import com.hbm.items.ModItems;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.uninos.UniNodespace;
import com.hbm.util.CompatEnergyControl;
import com.hbm.util.EnumUtil;
import com.hbm.util.fauxpointtwelve.BlockPos;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.energymk2.IBatteryItem;
import api.hbm.energymk2.IEnergyConductorMK2;
import api.hbm.energymk2.IEnergyProviderMK2;
import api.hbm.energymk2.IEnergyReceiverMK2;
import api.hbm.energymk2.Nodespace;
import api.hbm.energymk2.Nodespace.PowerNode;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import api.hbm.redstoneoverradio.IRORInteractive;
import api.hbm.redstoneoverradio.IRORValueProvider;
import api.hbm.tile.IInfoProviderEC;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityBatterySocket extends TileEntityMachineBase implements IEnergyConductorMK2, IEnergyProviderMK2, IEnergyReceiverMK2, IControlReceiver, IGUIProvider {
public class TileEntityBatterySocket extends TileEntityBatteryBase implements IRORValueProvider, IRORInteractive, IInfoProviderEC {
public long[] log = new long[20];
public long delta = 0;
public byte lastRedstone = 0;
public long prevPowerState = 0;
public static final int mode_input = 0;
public static final int mode_buffer = 1;
public static final int mode_output = 2;
public static final int mode_none = 3;
public short redLow = 0;
public short redHigh = 2;
public ConnectionPriority priority = ConnectionPriority.LOW;
public int renderPack = -1;
protected PowerNode node;
public TileEntityBatterySocket() {
super(1);
@ -56,36 +36,12 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
@Override
public void updateEntity() {
long prevPower = this.getPower();
super.updateEntity();
if(!worldObj.isRemote) {
if(priority == null || priority.ordinal() == 0 || priority.ordinal() == 4) {
priority = ConnectionPriority.LOW;
}
long prevPower = this.getPower();
if(this.node == null || this.node.expired) {
this.node = (PowerNode) UniNodespace.getNode(worldObj, xCoord, yCoord, zCoord, Nodespace.THE_POWER_PROVIDER);
if(this.node == null || this.node.expired) {
this.node = this.createNode();
UniNodespace.createNode(worldObj, this.node);
}
}
if(this.node != null && this.node.hasValidNet()) switch(this.getRelevantMode(false)) {
case mode_input: this.node.net.removeProvider(this); this.node.net.addReceiver(this); break;
case mode_output: this.node.net.addProvider(this); this.node.net.removeReceiver(this); break;
case mode_buffer: this.node.net.addProvider(this); this.node.net.addReceiver(this); break;
case mode_none: this.node.net.removeProvider(this); this.node.net.removeReceiver(this); break;
}
byte comp = this.getComparatorPower();
if(comp != this.lastRedstone) this.markDirty();
this.lastRedstone = comp;
long avg = (this.getPower() + prevPower) / 2;
this.delta = avg - this.log[0];
@ -94,31 +50,6 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
}
this.log[19] = avg;
prevPowerState = this.getPower();
this.networkPackNT(100);
}
}
@Override
public PowerNode createNode() {
return new PowerNode(this.getPortPos()).setConnections(this.getConPos());
}
public byte getComparatorPower() {
double frac = (double) this.getPower() / (double) this.getMaxPower() * 15D;
return (byte) (MathHelper.clamp_int((int) frac + 1, 0, 15)); //to combat eventual rounding errors with the FEnSU's stupid maxPower
}
@Override
public void invalidate() {
super.invalidate();
if(!worldObj.isRemote) {
if(this.node != null) {
UniNodespace.destroyNode(worldObj, xCoord, yCoord, zCoord, Nodespace.THE_POWER_PROVIDER);
}
}
}
@ -130,43 +61,15 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
if(slots[0] != null && slots[0].getItem() == ModItems.battery_pack) {
renderPack = slots[0].getItemDamage();
}
buf.writeInt(renderPack);
buf.writeLong(delta);
buf.writeShort(redLow);
buf.writeShort(redHigh);
buf.writeByte(priority.ordinal());
}
@Override
public void deserialize(ByteBuf buf) {
super.deserialize(buf);
renderPack = buf.readInt();
delta = buf.readLong();
redLow = buf.readShort();
redHigh = buf.readShort();
priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, buf.readByte());
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
this.redLow = nbt.getShort("redLow");
this.redHigh = nbt.getShort("redHigh");
this.lastRedstone = nbt.getByte("lastRedstone");
this.priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, nbt.getByte("priority"));
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setShort("redLow", redLow);
nbt.setShort("redHigh", redHigh);
nbt.setByte("lastRedstone", lastRedstone);
nbt.setByte("priority", (byte) this.priority.ordinal());
}
@Override
@ -178,11 +81,6 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
return false;
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack) {
return stack.getItem() instanceof IBatteryItem;
}
@Override public int[] getAccessibleSlotsFromSide(int side) { return new int[] {0}; }
@Override
@ -203,9 +101,6 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
return ((IBatteryItem) slots[0].getItem()).getMaxCharge(slots[0]);
}
@Override public boolean allowDirectProvision() { return false; }
@Override public ConnectionPriority getPriority() { return this.priority; }
@Override public long getProviderSpeed() {
if(slots[0] == null || !(slots[0].getItem() instanceof IBatteryItem)) return 0;
int mode = this.getRelevantMode(true);
@ -217,7 +112,8 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
int mode = this.getRelevantMode(true);
return mode == mode_input || mode == mode_buffer ? ((IBatteryItem) slots[0].getItem()).getChargeRate(slots[0]) : 0;
}
@Override
public BlockPos[] getPortPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
@ -229,6 +125,7 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
};
}
@Override
public DirPos[] getConPos() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
@ -247,38 +144,8 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
};
}
private short modeCache = 0;
public short getRelevantMode(boolean useCache) {
if(useCache) return this.modeCache;
boolean powered = false;
for(BlockPos pos : getPortPos()) if(worldObj.isBlockIndirectlyGettingPowered(pos.getX(), pos.getY(), pos.getZ())) { powered = true; break; }
this.modeCache = powered ? this.redHigh : this.redLow;
return this.modeCache;
}
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerBatterySocket(player.inventory, this); }
@Override public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIBatterySocket(player.inventory, this); }
@Override public boolean hasPermission(EntityPlayer player) { return this.isUseableByPlayer(player); }
@Override
public void receiveControl(NBTTagCompound data) {
if(data.hasKey("low")) {
this.redLow++;
if(this.redLow > 3) this.redLow = 0;
}
if(data.hasKey("high")) {
this.redHigh++;
if(this.redHigh > 3) this.redHigh = 0;
}
if(data.hasKey("priority")) {
int ordinal = this.priority.ordinal();
ordinal++;
if(ordinal > ConnectionPriority.HIGH.ordinal()) ordinal = ConnectionPriority.LOW.ordinal();
this.priority = EnumUtil.grabEnumSafely(ConnectionPriority.class, ordinal);
}
}
AxisAlignedBB bb = null;
@ -298,10 +165,76 @@ public class TileEntityBatterySocket extends TileEntityMachineBase implements IE
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
public String[] getFunctionInfo() {
return new String[] {
PREFIX_VALUE + "fill",
PREFIX_VALUE + "fillpercent",
PREFIX_VALUE + "delta",
PREFIX_FUNCTION + "setmode" + NAME_SEPARATOR + "mode",
PREFIX_FUNCTION + "setmode" + NAME_SEPARATOR + "mode" + PARAM_SEPARATOR + "fallback",
PREFIX_FUNCTION + "setredmode" + NAME_SEPARATOR + "mode",
PREFIX_FUNCTION + "setredmode" + NAME_SEPARATOR + "mode" + PARAM_SEPARATOR + "fallback",
PREFIX_FUNCTION + "setpriority" + NAME_SEPARATOR + "priority",
};
}
@Override
public String provideRORValue(String name) {
if((PREFIX_VALUE + "fill").equals(name)) return "" + this.getPower();
if((PREFIX_VALUE + "fillpercent").equals(name)) return "" + this.getPower() * 100 / (Math.min(this.getMaxPower(), 1));
if((PREFIX_VALUE + "delta").equals(name)) return "" + delta;
return null;
}
@Override
public String runRORFunction(String name, String[] params) {
if((PREFIX_FUNCTION + "setmode").equals(name) && params.length > 0) {
int mode = IRORInteractive.parseInt(params[0], 0, 3);
if(mode != this.redLow) {
this.redLow = (short) mode;
this.markChanged();
return null;
} else if(params.length > 1) {
int altmode = IRORInteractive.parseInt(params[1], 0, 3);
this.redLow = (short) altmode;
this.markChanged();
return null;
}
return null;
}
if((PREFIX_FUNCTION + "setredmode").equals(name) && params.length > 0) {
int mode = IRORInteractive.parseInt(params[0], 0, 3);
if(mode != this.redHigh) {
this.redHigh = (short) mode;
this.markChanged();
return null;
} else if(params.length > 1) {
int altmode = IRORInteractive.parseInt(params[1], 0, 3);
this.redHigh = (short) altmode;
this.markChanged();
return null;
}
return null;
}
if((PREFIX_FUNCTION + "setpriority").equals(name) && params.length > 0) {
int priority = IRORInteractive.parseInt(params[0], 0, 2) + 1;
ConnectionPriority p = EnumUtil.grabEnumSafely(ConnectionPriority.class, priority);
this.priority = p;
this.markChanged();
return null;
}
return null;
}
@Override
public void provideExtraInfo(NBTTagCompound data) {
data.setLong(CompatEnergyControl.L_DIFF_HE, (log[0] - log[19]) / 20L);
}
}

View File

@ -3,7 +3,6 @@ package com.hbm.tileentity.machine.storage;
import com.hbm.inventory.container.ContainerMassStorage;
import com.hbm.inventory.gui.GUIMassStorage;
import com.hbm.items.ModItems;
import com.hbm.tileentity.IBufPacketReceiver;
import com.hbm.tileentity.IControlReceiverFilter;
import com.hbm.util.BufferUtil;
@ -21,7 +20,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPacketReceiver, IControlReceiverFilter, IRORValueProvider, IRORInteractive {
public class TileEntityMassStorage extends TileEntityCrateBase implements IControlReceiverFilter, IRORValueProvider, IRORInteractive {
private int stack = 0;
public boolean output = false;
@ -92,7 +91,7 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
}
}
networkPackNT(15);
networkPackNT(32); // TE render distance
}
}
@ -129,7 +128,7 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
}
// Note: the following three methods are used for AE2 integration, and aren't meant to be called in any other context by default
public int getTotalStockpile() {
ItemStack type = getType();
if(type == null) return 0;
@ -174,7 +173,7 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
}
amount -= depositStockpile;
}
int inputAvail = 0;
ItemStack inStack = slots[0];
if(inStack != null && ItemStackUtil.areStacksCompatible(type, inStack)) {
@ -197,7 +196,7 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
}
amount -= depositInput;
}
int outputAvail = 0;
ItemStack outStack = slots[2];
if(outStack != null && ItemStackUtil.areStacksCompatible(type, outStack)) {
@ -224,7 +223,7 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
if(actually) {
this.markDirty();
}
return amount;
}
@ -295,6 +294,11 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
nbt.setByte("redstone", (byte) redstone);
}
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 1024.0D; // only render mass storage info 32 blocks away, for performance
}
@Override
public void nextMode(int i) {
@ -389,12 +393,12 @@ public class TileEntityMassStorage extends TileEntityCrateBase implements IBufPa
@Override
public String runRORFunction(String name, String[] params) {
if((PREFIX_FUNCTION + "toggleoutput").equals(name)) {
this.output = !this.output;
this.markDirty();
}
return null;
}
}

View File

@ -0,0 +1,157 @@
package com.hbm.tileentity.network;
import api.hbm.redstoneoverradio.IRORInteractive;
import api.hbm.redstoneoverradio.IRORValueProvider;
import com.hbm.handler.CompatHandler;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.uninos.UniNodespace;
import cpw.mods.fml.common.Optional;
import io.netty.buffer.ByteBuf;
import li.cil.oc.api.machine.Arguments;
import li.cil.oc.api.machine.Callback;
import li.cil.oc.api.machine.Context;
import li.cil.oc.api.network.SimpleComponent;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
public class TileEntityFluidCounterValve extends TileEntityPipeBaseNT implements SimpleComponent, CompatHandler.OCComponent, IRORValueProvider, IRORInteractive {
private long counter;
@Override
public void updateEntity() {
super.updateEntity();
if(!worldObj.isRemote) {
if(node != null && node.net != null && getType() != Fluids.NONE) {
counter += node.net.fluidTracker;
}
networkPackNT(25);
}
}
@Override
public boolean shouldCreateNode() {
return this.getBlockMetadata() == 1;
}
public void updateState() {
this.blockMetadata = -1; // delete cache
if(this.getBlockMetadata() == 0 && this.node != null) {
UniNodespace.destroyNode(worldObj, xCoord, yCoord, zCoord, this.getType().getNetworkProvider());
this.node = null;
}
}
@Override
public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) {
return oldBlock != newBlock;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
counter = nbt.getLong("counter");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setLong("counter", counter);
}
@Override
public void serialize(ByteBuf buf) {
buf.writeLong(counter);
}
@Override
public void deserialize(ByteBuf buf) {
this.counter = Math.max(buf.readLong(), 0);
}
private void setState(int state) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, state, 2);
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:block.reactorStart", 1.0F, 1.0F);
updateState();
}
public long getCounter() {
return counter;
}
@Optional.Method(modid = "OpenComputers")
public String getComponentName() {
return "ntm_fluid_counter_valve";
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getFluid(Context context, Arguments args) {
return new Object[] {getType().getName()};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getCounter(Context context, Arguments args) {
return new Object[] {counter};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] resetCounter(Context context, Arguments args) {
counter = 0;
markDirty();
return new Object[] {};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getState(Context context, Arguments args) {
return new Object[] {getBlockMetadata() == 1 ? 1 : 0};
}
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] setState(Context context, Arguments args) {
final int state = args.checkInteger(0);
if(state != 0 && state != 1) {
throw new IllegalArgumentException();
}
setState(state);
return new Object[] {};
}
@Override
public String provideRORValue(String name) {
if((PREFIX_VALUE + "value").equals(name))
return String.valueOf(counter);
if((PREFIX_VALUE + "state").equals(name))
return String.valueOf(getBlockMetadata() == 1 ? 1 : 0);
return null;
}
@Override
public String[] getFunctionInfo() {
return new String[] {
PREFIX_VALUE + "value",
PREFIX_VALUE + "state",
PREFIX_FUNCTION + "reset",
PREFIX_FUNCTION + "setState" + NAME_SEPARATOR + "state",
};
}
@Override
public String runRORFunction(String name, String[] params) {
if(name.equals(PREFIX_FUNCTION + "reset")) {
counter = 0;
markDirty();
} else if(name.equals(PREFIX_FUNCTION + "setState")) {
setState(IRORInteractive.parseInt(params[0], 0, 1));
}
return null;
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.uninos;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
@ -23,7 +24,7 @@ import net.minecraft.world.World;
*/
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 GenNode getNode(World world, int x, int y, int z, INetworkProvider type) {
@ -73,7 +74,7 @@ public class UniNodespace {
}
updateNetworks();
resetReapTimer();
updateReapTimer();
}
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
else reapTimer--;
}
/** Goes over each connection point of the given node, tries to find neighbor nodes and to join networks with them */

View File

@ -10,8 +10,9 @@ public class CompatFluidRegistry {
/** Registers a fluid with a custom ID. */
public static FluidType registerFluid(String name, int id, int color, int p, int f, int r, EnumSymbol symbol, ResourceLocation texture) {
FluidType type = new FluidType(name, id, color, p, f, r, symbol, texture);
Fluids.metaOrder.add(type);
FluidType type = Fluids.fluidMigration.get(name);
if(type == null) type = new FluidType(name, id, color, p, f, r, symbol, texture);
else type.setupForeign(name, id, color, p, f, r, symbol, texture);
return type;
}
}

View File

@ -194,6 +194,17 @@ public class Tuple {
public Z getZ() {
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> {

View File

@ -17,6 +17,7 @@ import com.hbm.blocks.generic.BlockWandTandem.TileEntityWandTandem;
import com.hbm.config.GeneralConfig;
import com.hbm.config.StructureConfig;
import com.hbm.handler.ThreeInts;
import com.hbm.interfaces.Untested;
import com.hbm.main.MainRegistry;
import com.hbm.util.Tuple.Pair;
import com.hbm.util.Tuple.Quartet;
@ -79,6 +80,12 @@ public class NBTStructure {
private Map<String, List<JigsawConnection>> toTopConnections;
private Map<String, List<JigsawConnection>> toBottomConnections;
private Map<String, List<JigsawConnection>> toHorizontalConnections;
// incredibly shitty system for translating legacy block definitions to new ones
@Untested // i can't find a god damn factory
private static Map<String, String> substitutions = new HashMap() {{
put("hbm:tile.ore_coal_oil", "coal_ore");
}};
public NBTStructure(ResourceLocation resource) {
// Can't use regular resource loading, servers don't know how!
@ -321,6 +328,10 @@ public class NBTStructure {
String blockName = p.getString("Name");
NBTTagCompound prop = p.getCompoundTag("Properties");
/// BOB PATCH ///
if(substitutions.containsKey(blockName)) blockName = substitutions.get(blockName);
/// BOB PATCH ///
int meta = 0;
try {

View File

@ -322,6 +322,7 @@ container.autocrafter=Automatische Werkbank
container.barrel=Fass
container.bat9000=Big-Ass Tank 9000
container.battery=Energiespeicher
container.batteryREDD=FEnSU
container.batterySocket=Batteriesockel
container.bombMulti=Mehrzweckbombe
container.casingBag=Hülsentasche
@ -756,6 +757,7 @@ hbm.key.dash=Schub
hbm.key.gunPrimary=Primärfeuer
hbm.key.gunSecondary=Sekundärfeuer
hbm.key.gunTertitary=Zielvisier
hbm.key.qmaw=Schnellhandbuch öffnen
hbm.key.toggleBack=Jetpack umschalten
hbm.key.toggleHUD=HUD umschalten
hbm.key.toggleMagnet=Magnet umschalten
@ -4061,13 +4063,13 @@ tile.c4.name=C4
tile.cable_detector.name=Redstone-Stromschalter
tile.cable_diode.name=Rote Kupferdiode
tile.cable_switch.name=Stromschalter
tile.capacitor_bus.name=Kondensator-Bus
tile.capacitor_bus.name=Kondensator-Bus (LEGACY)
tile.capacitor_bus.desc=Output für Kondensatoren$Kann in einer geraden Linie aneinandergereit werden
tile.capacitor_copper.name=Kupferkondensator
tile.capacitor_gold.name=Goldkondensator
tile.capacitor_niobium.name=Niobkondensator
tile.capacitor_schrabidate.name=Schrabidatkondensator
tile.capacitor_tantalium.name=Tantalkondensator
tile.capacitor_copper.name=Alter Kondensator
tile.capacitor_gold.name=Goldkondensator (LEGACY)
tile.capacitor_niobium.name=Niobkondensator (LEGACY)
tile.capacitor_schrabidate.name=Schrabidatkondensator (LEGACY)
tile.capacitor_tantalium.name=Tantalkondensator (LEGACY)
tile.capacitor.desc=Input: Oben$Output: Unten, über Kondensator-Bus
tile.charge_c4.name=Abrissladung
tile.charge_dynamite.name=Zeitbombe
@ -4336,6 +4338,8 @@ tile.fusion_hatch.name=Fusionsreaktorzugriffsluke
tile.fusion_heater.name=Plasmaerhitzer-Komponente
tile.fusion_klystron.name=Klystron
tile.fusion_klystron.desc=Energiequelle für einen Fusionsreaktor.$Benötigt Kühlung mittles Druckluft.
tile.fusion_klystron_creative.name=Kreativ-Klystron
tile.fusion_klystron_creative.desc=Erzeugt unendlich viel Klystron-Energie.
tile.fusion_mhdt.name=MHD-Turbine
tile.fusion_mhdt.desc=Wandelt Plasmaenergie in verwendbare$elektrische Energie um. Effizienter als ein$konventioneller Boiler.$Benötigt Kühlung!
tile.fusion_motor.name=Magnetmotorstück
@ -4474,9 +4478,11 @@ tile.machine_autosaw.name=Automatische Kreissäge
tile.machine_autosaw.desc=Schneidet Pflanzen nieder, pflanzt Bäume nach$Akzeptiert:$-Holzöl$-Ethanol$-Fischöl$-Schweröl
tile.machine_autosaw.suspended=Angehalten
tile.machine_bat9000.name=Big-Ass Tank 9000
tile.machine_battery.name=Energiespeicherblock
tile.machine_battery_potato.name=Kartoffelbatterieblock
tile.machine_battery.name=Energiespeicherblock (LEGACY)
tile.machine_battery_potato.name=Kartoffelbatterieblock (LEGACY)
tile.machine_battery_redd.name=FEnSU
tile.machine_battery_socket.name=Batteriesockel
tile.machine_battery_socket.desc=Erlaubt es, Batterien direkt mit$dem Stromnetz zu verbinden.$Verhält sich wie ein Kabel, alle$Verbindungen sind im selben Netzwek.
tile.machine_boiler.name=Boiler
tile.machine_boiler.desc=Großer Boiler zum Verdampfen von Wasser oder$Erhitzen von Öl. Benötigt externe Hitzequelle.$Wärmestransferrate: ΔT*0.01 TU/t
tile.machine_boiler_electric_off.name=Elektrischer Ölwärmer
@ -4518,7 +4524,7 @@ tile.machine_difurnace_off.name=Hochofen
tile.machine_difurnace_on.name=Hochofen
tile.machine_difurnace_rtg_off.name=Atomarer Hochofen
tile.machine_difurnace_rtg_on.name=Atomarer Hochofen
tile.machine_dineutronium_battery.name=Spark Energiespeicherblock
tile.machine_dineutronium_battery.name=Spark Energiespeicherblock (LEGACY)
tile.machine_drain.name=Ausgussrohr
tile.machine_drill.name=Automatischer Minenbohrer
tile.machine_electric_furnace_off.name=Elektrischer Ofen
@ -4528,7 +4534,7 @@ tile.machine_epress.name=Hydraulische Presse
tile.machine_exposure_chamber.name=Bestrahlungskammer
tile.machine_excavator.name=Großer Minenbohrer
tile.machine_fel.name=FEL
tile.machine_fensu.name=FEnSU
tile.machine_fensu.name=FEnSU (LEGACY)
tile.machine_flare.name=Abfackelturm
tile.machine_fluidtank.name=Tank
tile.machine_forcefield.name=Kraftfeldgenerator
@ -4548,7 +4554,7 @@ tile.machine_intake.name=Lufteinlass
tile.machine_keyforge.name=Schlossertisch
tile.machine_large_turbine.name=Industrielle Dampfturbine
tile.machine_large_turbine.desc=Effizienz: 100%%
tile.machine_lithium_battery.name=Li-Ion-Energiespeicherblock
tile.machine_lithium_battery.name=Li-Ion-Energiespeicherblock (LEGACY)
tile.machine_microwave.name=Mikrowelle
tile.machine_mining_laser.name=Bergbaulaser
tile.machine_minirtg.name=Radioisotopenzelle
@ -4588,7 +4594,7 @@ tile.machine_rtg_yellow.name=Australium Supergenerator
tile.machine_satlinker.name=Satelliten-ID-Manager
tile.machine_sawmill.name=Stirling-Sägemühle
tile.machine_sawmill.desc=Benötigt externe Hitzequelle.$Wärmestransferrate: T*0.1 TU/t$Minimalaufnahme: 100 TU/t, Maximalaufnahme: 300 TU/t
tile.machine_schrabidium_battery.name=Schrabidium-Energiespeicherblock
tile.machine_schrabidium_battery.name=Schrabidium-Energiespeicherblock (LEGACY)
tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät (LEGACY)
tile.machine_selenium.name=Hochleistungs-Sternmotor
tile.machine_shredder.name=Brecher

View File

@ -727,6 +727,7 @@ container.autocrafter=Automatic Crafting Table
container.barrel=Barrel
container.bat9000=Big-Ass Tank 9000
container.battery=Energy Storage
container.batteryREDD=FEnSU
container.batterySocket=Battery Socket
container.bombMulti=Multi Purpose Bomb
container.casingBag=Bullet Casing Bag
@ -1493,6 +1494,7 @@ hbm.key.dash=Dash
hbm.key.gunPrimary=Primary Fire
hbm.key.gunSecondary=Secondary Fire
hbm.key.gunTertitary=Gun Sights
hbm.key.qmaw=Open Quick Manual
hbm.key.toggleBack=Toggle Jetpack
hbm.key.toggleHUD=Toggle HUD
hbm.key.toggleMagnet=Toggle Magnet
@ -5277,13 +5279,13 @@ tile.c4.name=C-4
tile.cable_detector.name=Redstone Power Switch
tile.cable_diode.name=Red Copper Diode
tile.cable_switch.name=Power Switch
tile.capacitor_bus.name=Capacitor Bus
tile.capacitor_bus.name=Capacitor Bus (LEGACY)
tile.capacitor_bus.desc=Output block for capacitors$Can be chained up in a straight line
tile.capacitor_copper.name=Copper Capacitor
tile.capacitor_gold.name=Golden Capacitor
tile.capacitor_niobium.name=Niobium Capacitor
tile.capacitor_schrabidate.name=Schrabidate Capacitor
tile.capacitor_tantalium.name=Tantalum Capacitor
tile.capacitor_copper.name=Old Capacitor
tile.capacitor_gold.name=Golden Capacitor (LEGACY)
tile.capacitor_niobium.name=Niobium Capacitor (LEGACY)
tile.capacitor_schrabidate.name=Schrabidate Capacitor (LEGACY)
tile.capacitor_tantalium.name=Tantalum Capacitor (LEGACY)
tile.capacitor.desc=Input: Top$Output: Bottom, via Capacitor Bus
tile.charge_c4.name=Demolition Charge
tile.charge_dynamite.name=Time Bomb
@ -5547,6 +5549,8 @@ tile.fluid_duct_neo.name=Universal Fluid Duct
tile.fluid_duct_paintable.name=Paintable Coated Universal Fluid Duct
tile.fluid_duct_solid.name=Coated Universal Fluid Duct (Deprecated)
tile.fluid_pump.name=Flow Control Pump
tile.fluid_counter_valve.name=Fluid Valve with Counter
tile.fluid_counter_valve.desc=Beware of loops in your fluid network...
tile.fluid_switch.name=Redstone Fluid Valve
tile.fluid_valve.name=Fluid Valve
tile.foam_layer.name=Foam layer
@ -5589,6 +5593,8 @@ tile.fusion_hatch.name=Duct Deco Block
tile.fusion_heater.name=Plasma Heater Component
tile.fusion_klystron.name=Klystron
tile.fusion_klystron.desc=Power source for fusion reactors.$Requires cooling via compressed air.
tile.fusion_klystron_creative.name=Creative Klystron
tile.fusion_klystron_creative.desc=Provides infinite klystron energy.
tile.fusion_mhdt.name=MHD Turbine
tile.fusion_mhdt.desc=Turns plasma energy into usable$electricity directly. More efficient$than a conventional boiler.$Requires cooling!
tile.fusion_motor.name=Magnet Motor Piece
@ -5735,9 +5741,11 @@ tile.machine_autosaw.name=Automatic Buzz Saw
tile.machine_autosaw.desc=Cuts down nearby plants, re-plants trees$Accepts:$-Wood oil$-Ethanol$-Fish oil$-Heavy oil
tile.machine_autosaw.suspended=Suspended
tile.machine_bat9000.name=Big-Ass Tank 9000
tile.machine_battery.name=Energy Storage Block
tile.machine_battery_potato.name=Potato Battery Block
tile.machine_battery.name=Energy Storage Block (LEGACY)
tile.machine_battery_potato.name=Potato Battery Block (LEGACY)
tile.machine_battery_redd.name=FEnSU
tile.machine_battery_socket.name=Battery Socket
tile.machine_battery_socket.desc=Allows battery items to be connected$to the power grid directly.$Acts as a cable, all ports are connected$to the same netowrk.
tile.machine_boiler.name=Boiler
tile.machine_boiler.desc=Large boiler that can boil water or heat up oil.$Requires external heat source.$Heat transfer rate: ΔT*0.01 TU/t
tile.machine_boiler_electric_off.name=Electric Oil Heater
@ -5780,7 +5788,7 @@ tile.machine_difurnace_off.name=Blast Furnace
tile.machine_difurnace_on.name=Blast Furnace
tile.machine_difurnace_rtg_off.name=Nuclear Blast Furnace
tile.machine_difurnace_rtg_on.name=Nuclear Blast Furnace
tile.machine_dineutronium_battery.name=Spark Energy Storage Block
tile.machine_dineutronium_battery.name=Spark Energy Storage Block (LEGACY)
tile.machine_drain.name=Drainage Pipe
tile.machine_drill.name=Automatic Mining Drill
tile.machine_electric_furnace_off.name=Electric Furnace
@ -5790,7 +5798,7 @@ tile.machine_epress.name=Electric Press
tile.machine_excavator.name=Large Mining Drill
tile.machine_exposure_chamber.name=Exposure Chamber
tile.machine_fel.name=FEL
tile.machine_fensu.name=FEnSU
tile.machine_fensu.name=FEnSU (LEGACY)
tile.machine_flare.name=Flare Stack
tile.machine_fluidtank.name=Tank
tile.machine_forcefield.name=Forcefield Emitter
@ -5813,7 +5821,7 @@ tile.machine_large_turbine.name=Industrial Steam Turbine
tile.machine_large_turbine.desc=Efficiency: 100%%
tile.machine_liquefactor.name=Industrial Liquefaction Machine
tile.machine_liquefactor.desc=Powerful universal machine to turn items into fluids.$Comes with versatile catalytic components, heating elements$and a built-in hydrator for petrochemical liquefaction.
tile.machine_lithium_battery.name=Li-Ion Energy Storage Block
tile.machine_lithium_battery.name=Li-Ion Energy Storage Block (LEGACY)
tile.machine_microwave.name=Microwave
tile.machine_mining_laser.name=Mining Laser
tile.machine_minirtg.name=Radio Isotope Cell
@ -5853,7 +5861,7 @@ tile.machine_rtg_yellow.name=Australium Superfuel Reactor
tile.machine_satlinker.name=Satellite ID Manager
tile.machine_sawmill.name=Stirling Sawmill
tile.machine_sawmill.desc=Requires external heat source.$Heat transfer rate: T*0.1 TU/t$Min intake: 100 TU/t, Max intake: 300 TU/t
tile.machine_schrabidium_battery.name=Schrabidium Energy Storage Block
tile.machine_schrabidium_battery.name=Schrabidium Energy Storage Block (LEGACY)
tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device (LEGACY)
tile.machine_selenium.name=Radial Performance Engine
tile.machine_shredder.name=Shredder

View File

@ -724,6 +724,8 @@ container.autocrafter=Автоматический верстак
container.barrel=Бочка
container.bat9000=Охереть-большая цистерна 9000
container.battery=Энергохранилище
container.batteryREDD=ЭМЭХ
container.batterySocket=Аккумуляторный массив
container.bombMulti=Многоцелевая бомба
container.casingBag=Сумка для гильз
container.catalyticReformer=Каталитический реформер
@ -1489,6 +1491,7 @@ hbm.key.dash=Рывок
hbm.key.gunPrimary=Основной огонь
hbm.key.gunSecondary=Альтернативный огонь
hbm.key.gunTertitary=Переключить прицел
hbm.key.qmaw=Открыть краткое руководство
hbm.key.toggleMagnet=Вкл/выкл магнит
hbm.key.toggleBack=Включить ранец
hbm.key.toggleHUD=Включить HUD
@ -2229,6 +2232,18 @@ item.battery_lithium.name=Литий-ионный аккумулятор
item.battery_lithium_cell.name=Литий-ионная энергоячейка
item.battery_lithium_cell_3.name=Строенная литий-ионная энергоячейка
item.battery_lithium_cell_6.name=Сшестерённая литий-ионная энергоячейка
item.battery_pack.battery_lead.name=Свинцово-серная батарея
item.battery_pack.battery_lithium.name=Литий-ионная батарея
item.battery_pack.battery_quantum.name=Квантовая батарея
item.battery_pack.battery_redstone.name=Краснокаменная батарея
item.battery_pack.battery_schrabidium.name=Шрабидиевая батарея
item.battery_pack.battery_sodium.name=Натриево-железная батарея
item.battery_pack.capacitor_bismuth.name=Висмутовый конденсатор
item.battery_pack.capacitor_copper.name=Медный конденсатор
item.battery_pack.capacitor_gold.name=Золотой конденсатор
item.battery_pack.capacitor_niobium.name=Ниобиевый конденсатор
item.battery_pack.capacitor_spark.name=Спарк-конденсатор
item.battery_pack.capacitor_tantalum.name=Танталовый конденсатор
item.battery_potato.name=Картофельная батарейка
item.battery_potatos.name=КартошкОС
item.battery_red_cell.name=Энергоячейка из красной пыли
@ -5534,13 +5549,13 @@ tile.c4.name=C-4
tile.cable_detector.name=Редстоун-рубильник
tile.cable_diode.name=Диод из красной меди
tile.cable_switch.name=Рубильник
tile.capacitor_bus.name=Шина конденсатора
tile.capacitor_bus.name=Шина конденсатора (LEGACY)
tile.capacitor_bus.desc=Выходной блок для конденсаторов$Может быть подключен по прямой линии
tile.capacitor_copper.name=Медный конденсатор
tile.capacitor_gold.name=Золотой конденсатор
tile.capacitor_niobium.name=Ниобиевый конденсатор
tile.capacitor_schrabidate.name=Шрабидатовый конденсатор
tile.capacitor_tantalium.name=Танталовый конденсатор
tile.capacitor_copper.name=Старый конденсатор
tile.capacitor_gold.name=Золотой конденсатор (LEGACY)
tile.capacitor_niobium.name=Ниобиевый конденсатор (LEGACY)
tile.capacitor_schrabidate.name=Шрабидатовый конденсатор (LEGACY)
tile.capacitor_tantalium.name=Танталовый конденсатор (LEGACY)
tile.capacitor.desc=Вход: Сверху$Выход: Снизу через шину
tile.charge_c4.name=Подрывной заряд
tile.charge_dynamite.name=Бомба с таймером
@ -5804,6 +5819,8 @@ tile.fluid_duct_neo.name=Универсальная жидкостная тру
tile.fluid_duct_paintable.name=Окрашиваемая универсальная жидкостная труба
tile.fluid_duct_solid.name=Покрытая универсальная жидкостная труба (Устаревшее)
tile.fluid_pump.name=Помпа контроля потока
tile.fluid_counter_valve.name=Жидкостный клапан со счётчиком
tile.fluid_counter_valve.desc=Остерегайтесь замкнутых контуров в вашей жидкостной системе...
tile.fluid_switch.name=Редстоун-Жидкостный клапан
tile.fluid_valve.name=Жидкостный клапан
tile.foam_layer.name=Слой пены
@ -5992,8 +6009,10 @@ tile.machine_autosaw.name=Автоматическая пила
tile.machine_autosaw.desc=Срубает ближайшие растения, пересаживает деревья$Принимает:$-Древесное масло$-Этанол$-Рыбное масло$-Тяжёлую нефть
tile.machine_autosaw.suspended=Приостановлена
tile.machine_bat9000.name=Охереть-большая цистерна 9000
tile.machine_battery.name=Энергохранилище
tile.machine_battery_potato.name=Картофельная батарея
tile.machine_battery.name=Энергохранилище (LEGACY)
tile.machine_battery_potato.name=Картофельная батарея (LEGACY)
tile.machine_battery_redd.name=ЭМЭХ
tile.machine_battery_socket.name=Аккумуляторный массив
tile.machine_boiler.name=Бойлер
tile.machine_boiler.desc=Большой бойлер для кипячения воды или нагрева нефти.$Требует внешний источник тепла.$Скорость передачи тепла: ΔT*0.01 TU/t
tile.machine_boiler_electric_off.name=Электрический нагреватель нефти
@ -6036,7 +6055,7 @@ tile.machine_difurnace_off.name=Доменная печь
tile.machine_difurnace_on.name=Доменная печь
tile.machine_difurnace_rtg_off.name=Ядерная доменная печь
tile.machine_difurnace_rtg_on.name=Ядерная доменная печь
tile.machine_dineutronium_battery.name=Спарк-энергохранилище
tile.machine_dineutronium_battery.name=Спарк-энергохранилище (LEGACY)
tile.machine_drain.name=Сливная труба
tile.machine_drill.name=Автоматический горный бур
tile.machine_electric_furnace_off.name=Электрическая печь
@ -6046,7 +6065,7 @@ tile.machine_epress.name=Электрический пресс
tile.machine_excavator.name=Большой горный бур
tile.machine_exposure_chamber.name=Камера облучения частицами
tile.machine_fel.name=Лазер на свободных электронах (FEL)
tile.machine_fensu.name=ЭМЭХ
tile.machine_fensu.name=ЭМЭХ (LEGACY)
tile.machine_flare.name=Газовая башня
tile.machine_fluidtank.name=Цистерна
tile.machine_forcefield.name=Излучатель силового поля
@ -6069,7 +6088,7 @@ tile.machine_large_turbine.name=Промышленная паровая турб
tile.machine_large_turbine.desc=Эффективность: 100%%
tile.machine_liquefactor.name=Промышленный разжижитель
tile.machine_liquefactor.desc=Мощная машина для превращения предметов в жидкости.$Поставляется с универсальными каталитическими компонентами, нагревательными элементами$и встроенным гидратором для нефтехимического сжижения.
tile.machine_lithium_battery.name=Литий-ионное энергохранилище
tile.machine_lithium_battery.name=Литий-ионное энергохранилище (LEGACY)
tile.machine_microwave.name=Микроволновка
tile.machine_mining_laser.name=Шахтёрский лазер
tile.machine_minirtg.name=Радиоизотопная ячейка
@ -6109,7 +6128,7 @@ tile.machine_rtg_yellow.name=Австралиевый супертопливны
tile.machine_satlinker.name=Менеджер ID спутников
tile.machine_sawmill.name=Лесопилка на генераторе Стирлинга
tile.machine_sawmill.desc=Требует внешний источник тепла.$Скорость теплопередачи: T*0.1 TU/t$Мин. потребление: 100 TU/t, Макс. потребление intake: 300 TU/t
tile.machine_schrabidium_battery.name=Шрабидиевое энергохранилище
tile.machine_schrabidium_battery.name=Шрабидиевое энергохранилище (LEGACY)
tile.machine_schrabidium_transmutator.name=Шрабидиевый трансмутатор (LEGACY)
tile.machine_selenium.name=Радиальный двигатель
tile.machine_shredder.name=Измельчитель
@ -6294,6 +6313,7 @@ tile.pink_log.name=Розовое дерево
tile.pink_planks.name=Розовые доски
tile.pink_slab.name=Плита из розового дерева
tile.pink_stairs.name=Ступеньки из розового дерева
tile.pipe_anchor.name=Трубный якорь
tile.piston_inserter.name=Вставщик
tile.piston_inserter.desc=Может принимать один предмет$Если подан сигнал редстоуна, то вставит предмет в просверлённый графит$Все предметы в просверлённом графите в цепочке будут сдвинуты на один блок$Требуется один блок воздуха между графитом
tile.plant_dead.name=Мёртвое растение
@ -6804,4 +6824,11 @@ desc.gui.upgrade.speed= * §4Скорость§r: Стакается до 3-х

View File

@ -290,7 +290,7 @@ book.starter.page15=最终你可以制造你的第一个§o真正§r的能源
book.starter.title16=结论
book.starter.page16=如果你已经走到了这一步,你已经走在重建文明大道上了. 你已经成功地用核能, 石油化工等重新制造了世界末日前的那些先进机器. 我不知道你将如何利用这些新发现的科技, 但我个人希望你利用这些优势是为了自己和他人的利益 - 或者至少是为了自卫. 再见!
book.starter.title18=关于作者
book.starter.page18=v?r只是一个被困在“传声头像”的§o《一生一次》§r中的 灰色虚空中太久的人. 有一次, 他发现了一扇工作室的门, 但令他沮丧的是, 他发现那是一个纸板剪出来的
book.starter.page18=vær只是一个被困在“传声头像”的§o《一生一次》§r中的 灰色虚空中太久的人. 有一次, 他发现了一扇工作室的门, 但令他沮丧的是, 他发现那是一个纸板剪出来的
book_lore.author=%s 著
book_lore.test.name=测试
book_lore.test.author=那个家伙
@ -1692,7 +1692,7 @@ item.ammo_standard.p22_sp.name=.22LR子弹(普通弹)
item.ammo_standard.p9_ap.name=9mm子弹(穿甲弹)
item.ammo_standard.p9_fmj.name=9mm子弹(全金属被甲弹)
item.ammo_standard.p9_jhp.name=9mm子弹(被甲空尖弹)
item.ammo_standard.p9_sp.name=.9mm子弹(普通弹)
item.ammo_standard.p9_sp.name=9mm子弹(普通弹)
item.ammo_standard.r556_ap.name=5.56mm子弹(穿甲弹)
item.ammo_standard.r556_fmj.name=5.56mm子弹(全金属被甲弹)
item.ammo_standard.r556_jhp.name=5.56mm子弹(被甲空尖弹)
@ -3301,8 +3301,6 @@ item.nugget_silicon.name=硅粒
item.nugget_solinium.name=Sa327粒
item.nugget_sr90.name=锶-90粒
item.nugget_tantalium.name=钽粒
item.nugget_tantalium.desc=“钽”
item.nugget_tantalium.desc.P11=英文既可拼作“Tantalum”也可拼作“Tantalium”。
item.nugget_technetium.name=锝-99粒
item.nugget_th232.name=钍232粒
item.nugget_thorium_fuel.name=钍燃料粒
@ -4737,13 +4735,13 @@ tile.c4.name=C-4
tile.cable_detector.name=红石电源开关
tile.cable_diode.name=紫铜二极管
tile.cable_switch.name=电源开关
tile.capacitor_bus.name=电容总线
tile.capacitor_bus.name=电容总线(遗留)
tile.capacitor_bus.desc=电容器的输出方块$可以连成一条直线
tile.capacitor_copper.name=铜电容
tile.capacitor_gold.name=金电容
tile.capacitor_niobium.name=铌电容
tile.capacitor_schrabidate.name=Sa酸铁电容
tile.capacitor_tantalium.name=钽电容
tile.capacitor_copper.name=铜电容
tile.capacitor_gold.name=金电容(遗留)
tile.capacitor_niobium.name=铌电容(遗留)
tile.capacitor_schrabidate.name=Sa酸铁电容(遗留)
tile.capacitor_tantalium.name=钽电容器(遗留)
tile.capacitor.desc=输入:顶部$输出:底部,通过电容总线
tile.charge_c4.name=炸药包
tile.charge_dynamite.name=定时炸弹
@ -5154,8 +5152,8 @@ tile.machine_autocrafter.name=自动工作台
tile.machine_autosaw.name=自动嗡嗡锯
tile.machine_autosaw.desc=砍伐附近的植物,重新种植树木$接受:$-木油$-乙醇$-鱼油$-重油
tile.machine_bat9000.name=巨尻-9000 储罐
tile.machine_battery.name=蓄电池
tile.machine_battery_potato.name=马铃薯电池组
tile.machine_battery.name=蓄电池(遗留)
tile.machine_battery_potato.name=马铃薯电池组(遗留)
tile.machine_boiler.name=大型锅炉
tile.machine_boiler.desc=可以烧水或加热油的大型锅炉$需要外部热源$传热速率ΔT*0.01 TU/T
tile.machine_boiler_electric_off.name=电锅炉
@ -5194,7 +5192,7 @@ tile.machine_difurnace_off.name=高炉
tile.machine_difurnace_on.name=高炉
tile.machine_difurnace_rtg_off.name=核高炉
tile.machine_difurnace_rtg_on.name=核高炉
tile.machine_dineutronium_battery.name=Spark蓄电池
tile.machine_dineutronium_battery.name=Spark蓄电池(遗留)
tile.machine_drain.name=排液管
tile.machine_drill.name=自动采矿钻机
tile.machine_electric_furnace_off.name=电炉
@ -5204,7 +5202,7 @@ tile.machine_epress.name=电动锻压机
tile.machine_excavator.name=大型采矿钻机
tile.machine_exposure_chamber.name=辐照舱
tile.machine_fel.name=FEL自由电子激光器
tile.machine_fensu.name=FEnSU飞轮储能系统
tile.machine_fensu.name=FEnSU飞轮储能系统(遗留)
tile.machine_flare.name=高架火炬
tile.machine_fluidtank.name=储罐
tile.machine_forcefield.name=力场发生器
@ -5226,7 +5224,7 @@ tile.machine_large_turbine.name=工业汽轮机
tile.machine_large_turbine.desc=效率: 100%%
tile.machine_liquefactor.name=工业液化机
tile.machine_liquefactor.desc=强大的通用机器,可将物品转化为液体$配有多功能催化组件、加热元件和用于石化液化的内置水合器。
tile.machine_lithium_battery.name=锂蓄电池
tile.machine_lithium_battery.name=锂蓄电池(遗留)
tile.machine_microwave.name=微波炉
tile.machine_mining_laser.name=采矿激光
tile.machine_minirtg.name=放射性同位素电池
@ -5263,7 +5261,7 @@ tile.machine_rtg_yellow.name=奥斯超级燃料反应堆
tile.machine_satlinker.name=卫星ID管理器
tile.machine_sawmill.name=斯特林锯木机
tile.machine_sawmill.desc=需要外部热源$传热速率T*0.1 TU/T$最小进气量100 TU/T最大进气量300 TU/T
tile.machine_schrabidium_battery.name=Sa326蓄电池
tile.machine_schrabidium_battery.name=Sa326蓄电池(遗留)
tile.machine_schrabidium_transmutator.name=Sa326嬗变装置 (遗留)
tile.machine_selenium.name=星型发动机
tile.machine_shredder.name=粉碎机
@ -6383,10 +6381,29 @@ tile.fusion_torus.desc=聚变反应堆主要部件。$需要调速管输入能
tile.struct_torus_core.name=聚变反应堆容器核心组件
turret.arty.artillery_rocket=§e火炮模式$最低射程: 250m$最大射程: 5,000m
turret.arty.manual_rocket=§e手动模式$射程: 5,000m
container.annihilator=歼灭者
container.annihilator=焚毁炉
container.machinePrecAss=精密装配机
item.item_expensive.plastic.name=塑料板
tile.machine_annihilator.name=歼灭者
tile.machine_annihilator.name=焚毁炉
tile.machine_precass.name=精密装配机
tile.wand_structure.load.name=结构加载方块
tile.wand_structure.save.name=结构保存方块
container.batterySocket=电池座
item.battery_pack.battery_lead.name=铅酸电池
item.battery_pack.battery_lithium.name=锂离子电池
item.battery_pack.battery_quantum.name=量子电池
item.battery_pack.battery_redstone.name=红石电池
item.battery_pack.battery_schrabidium.name=Sa326电池
item.battery_pack.battery_sodium.name=钠铁电池
item.battery_pack.capacitor_bismuth.name=铋电容
item.battery_pack.capacitor_copper.name=铜电容
item.battery_pack.capacitor_gold.name=金电容
item.battery_pack.capacitor_niobium.name=铌电容
item.battery_pack.capacitor_spark.name=Spark电容
item.battery_pack.capacitor_tantalum.name=钽电容
tile.machine_battery_socket.name=电池座
container.batteryREDD=FEnSU
hbm.key.qmaw=打开QMAW
tile.fluid_counter_valve.name=带计数器的流体阀门
tile.fluid_counter_valve.desc=注意流体网络中的回流
tile.machine_battery_redd.name=FEnSU

View File

@ -1,535 +0,0 @@
# Blender v2.76 (sub 0) OBJ File: 'bale.blend'
# www.blender.org
o Cylinder
v 0.000000 1.000000 -0.500000
v 0.000000 1.000000 0.750000
v 0.250000 0.933013 -0.500000
v 0.250000 0.933013 0.750000
v 0.433013 0.750000 -0.500000
v 0.433013 0.750000 0.750000
v 0.500000 0.500000 -0.500000
v 0.500000 0.500000 0.750000
v 0.433013 0.250000 -0.500000
v 0.433013 0.250000 0.750000
v 0.250000 0.066987 -0.500000
v 0.250000 0.066987 0.750000
v 0.000000 -0.000000 -0.500000
v 0.000000 0.000000 0.750000
v -0.250000 0.066987 -0.500000
v -0.250000 0.066987 0.750000
v -0.433013 0.250000 -0.500000
v -0.433013 0.250000 0.750000
v -0.500000 0.500000 -0.500000
v -0.500000 0.500000 0.750000
v -0.433013 0.750000 -0.500000
v -0.433013 0.750000 0.750000
v -0.250000 0.933012 -0.500000
v -0.250000 0.933013 0.750000
v 0.187500 0.824760 1.000000
v 0.000000 0.875000 1.000000
v 0.324760 0.687500 1.000000
v 0.375000 0.500000 1.000000
v 0.324760 0.312500 1.000000
v 0.187500 0.175241 1.000000
v 0.000000 0.125000 1.000000
v -0.187500 0.175241 1.000000
v -0.324759 0.312500 1.000000
v -0.375000 0.500000 1.000000
v -0.324760 0.687500 1.000000
v -0.187500 0.824759 1.000000
v 0.000000 0.500000 1.150000
v 0.000000 0.825000 -1.150000
v 0.162500 0.781458 -1.150000
v 0.281458 0.662500 -1.150000
v 0.325000 0.500000 -1.150000
v 0.281458 0.337500 -1.150000
v 0.162500 0.218542 -1.150000
v 0.000000 0.175000 -1.150000
v -0.162500 0.218542 -1.150000
v -0.281458 0.337500 -1.150000
v -0.325000 0.500000 -1.150000
v -0.281458 0.662500 -1.150000
v -0.162500 0.781458 -1.150000
v -0.500000 0.075000 -0.950000
v 0.500000 0.075000 -0.950000
v -0.500000 0.925000 -0.950000
v 0.500000 0.925000 -0.950000
v -0.425000 0.000000 -0.950000
v 0.425000 0.000000 -0.950000
v -0.425000 1.000000 -0.950000
v 0.425000 1.000000 -0.950000
v -0.425000 0.925000 -0.950000
v 0.425000 0.925000 -0.950000
v -0.425000 0.075000 -0.950000
v 0.425000 0.075000 -0.950000
v -0.500000 0.925000 -1.200000
v -0.500000 0.075000 -1.200000
v 0.425000 0.925000 -1.200000
v 0.425000 0.075000 -1.200000
v 0.500000 0.075000 -1.200000
v 0.500000 0.925000 -1.200000
v -0.425000 0.925000 -1.200000
v -0.425000 0.075000 -1.200000
v -0.425000 -0.000000 -1.200000
v 0.425000 -0.000000 -1.200000
v 0.425000 1.000000 -1.200000
v -0.425000 1.000000 -1.200000
v -0.459619 0.075736 -1.000000
v 0.424264 0.959619 -1.000000
v -0.459619 0.075736 -1.150000
v 0.424264 0.959619 -1.150000
v -0.424264 0.040381 -1.000000
v 0.459619 0.924264 -1.000000
v -0.424264 0.040381 -1.150000
v 0.459619 0.924264 -1.150000
v 0.000000 0.825000 -1.200000
v 0.162500 0.781458 -1.200000
v 0.281458 0.662500 -1.200000
v 0.325000 0.500000 -1.200000
v 0.281458 0.337500 -1.200000
v 0.162500 0.218542 -1.200000
v 0.000000 0.175000 -1.200000
v -0.162500 0.218542 -1.200000
v -0.281458 0.337500 -1.200000
v -0.325000 0.500000 -1.200000
v -0.281458 0.662500 -1.200000
v -0.162500 0.781458 -1.200000
v -0.424264 0.959619 -1.000000
v 0.459619 0.075736 -1.000000
v -0.424264 0.959619 -1.150000
v 0.459619 0.075736 -1.150000
v -0.459619 0.924264 -1.000000
v 0.424264 0.040381 -1.000000
v -0.459619 0.924264 -1.150000
v 0.424264 0.040381 -1.150000
vt 0.788698 0.361775
vt 0.510343 0.361775
vt 0.510343 0.304140
vt 0.510343 0.246505
vt 0.788698 0.246505
vt 0.510343 0.188870
vt 0.788698 0.188870
vt 0.510343 0.131235
vt 0.510343 0.073600
vt 0.788698 0.073600
vt 0.510343 0.015964
vt 0.788698 0.015964
vt 0.788698 0.707585
vt 0.510343 0.707585
vt 0.510343 0.649950
vt 0.788698 0.649950
vt 0.510343 0.592315
vt 0.510343 0.534680
vt 0.788698 0.534680
vt 0.510343 0.477045
vt 0.788698 0.477045
vt 0.448519 0.124030
vt 0.448519 0.080804
vt 0.510343 0.419410
vt 0.788698 0.419410
vt 0.938258 0.198956
vt 0.938258 0.236419
vt 0.448519 0.181665
vt 0.448519 0.138439
vt 0.448519 0.412206
vt 0.448519 0.354571
vt 0.448519 0.311344
vt 0.448519 0.239300
vt 0.448519 0.196074
vt 0.448519 0.469841
vt 0.448519 0.296935
vt 0.448519 0.253709
vt 0.448519 0.527476
vt 0.448519 0.484250
vt 0.448519 0.585111
vt 0.448519 0.541885
vt 0.448519 0.642746
vt 0.448519 0.599520
vt 0.448519 0.700381
vt 0.448519 0.657155
vt 0.448519 0.066395
vt 0.361215 0.678768
vt 0.361214 0.621133
vt 0.361215 0.563498
vt 0.361215 0.505863
vt 0.361215 0.448228
vt 0.448519 0.426615
vt 0.361215 0.390593
vt 0.448519 0.368979
vt 0.361215 0.332957
vt 0.448519 0.023169
vt 0.361215 0.044782
vt 0.361214 0.102417
vt 0.361215 0.160052
vt 0.361215 0.217687
vt 0.361215 0.275322
vt 0.938258 0.141321
vt 0.949392 0.141321
vt 0.949392 0.178784
vt 0.938258 0.429496
vt 0.938258 0.466959
vt 0.788698 0.304140
vt 0.938258 0.256591
vt 0.938258 0.487131
vt 0.788698 0.592315
vt 0.938258 0.544766
vt 0.938258 0.602401
vt 0.938258 0.639864
vt 0.938258 0.660037
vt 0.938258 0.697499
vt 0.938258 0.026051
vt 0.938258 0.063514
vt 0.938258 0.083686
vt 0.938258 0.121149
vt 0.788698 0.131235
vt 0.938258 0.178784
vt 0.938258 0.371861
vt 0.938258 0.409324
vt 0.938258 0.314226
vt 0.938258 0.351689
vt 0.680346 0.943229
vt 0.680346 0.959931
vt 0.491064 0.959931
vt 0.680346 0.753947
vt 0.491064 0.753947
vt 0.491064 0.737246
vt 0.491064 0.943229
vt 0.474362 0.943229
vt 0.474362 0.753947
vt 0.697047 0.753947
vt 0.680346 0.737246
vt 0.697047 0.943229
vt 0.932691 0.959931
vt 0.743409 0.959931
vt 0.743409 0.943229
vt 0.932691 0.737246
vt 0.932691 0.753947
vt 0.743409 0.753947
vt 0.949392 0.753947
vt 0.949392 0.943229
vt 0.932691 0.943229
vt 0.726707 0.753947
vt 0.743409 0.737246
vt 0.726707 0.943229
vt 0.190552 0.394528
vt 0.190552 0.205246
vt 0.246223 0.205246
vt 0.331554 0.228866
vt 0.275883 0.228866
vt 0.275883 0.205247
vt 0.331554 0.418148
vt 0.275883 0.418148
vt 0.331554 0.631049
vt 0.275883 0.631049
vt 0.275883 0.441767
vt 0.190551 0.015964
vt 0.246223 0.015964
vt 0.331554 0.867570
vt 0.275883 0.867570
vt 0.275883 0.843951
vt 0.190552 0.583811
vt 0.246223 0.583811
vt 0.246223 0.773093
vt 0.331554 0.654669
vt 0.275883 0.654669
vt 0.331554 0.205247
vt 0.275883 0.015964
vt 0.331554 0.843951
vt 0.331554 0.441767
vt 0.246223 0.394528
vt 0.053199 0.941767
vt 0.331554 0.941767
vt 0.331554 0.975170
vt 0.053199 0.930633
vt 0.331554 0.930633
vt 0.053198 0.897230
vt 0.331554 0.897230
vt 0.053199 0.975170
vt 0.331554 0.986304
vt 0.127488 0.015964
vt 0.127488 0.294321
vt 0.116354 0.294321
vt 0.116354 0.015964
vt 0.082952 0.294321
vt 0.039809 0.445063
vt 0.142160 0.342712
vt 0.160891 0.412619
vt 0.949392 0.429496
vt 0.949392 0.466959
vt 0.949392 0.314226
vt 0.949392 0.351689
vt 0.949392 0.602401
vt 0.949392 0.639864
vt 0.949392 0.083686
vt 0.949392 0.121149
vt 0.949392 0.371861
vt 0.949392 0.409324
vt 0.949392 0.256591
vt 0.949392 0.294054
vt 0.949392 0.544766
vt 0.949392 0.582229
vt 0.949392 0.026051
vt 0.949392 0.198956
vt 0.949392 0.236419
vt 0.949392 0.487131
vt 0.949392 0.524594
vt 0.949392 0.660037
vt 0.949392 0.697499
vt 0.160891 0.015964
vt 0.160891 0.294321
vt 0.082951 0.015964
vt 0.071817 0.294321
vt 0.938258 0.294054
vt 0.938258 0.524594
vt 0.938258 0.582229
vt 0.190551 0.773093
vt 0.331554 0.015964
vt 0.053199 0.986304
vt 0.142160 0.445063
vt 0.109716 0.463794
vt 0.072253 0.463794
vt 0.021078 0.412619
vt 0.021078 0.375156
vt 0.039809 0.342712
vt 0.072253 0.323981
vt 0.109716 0.323981
vt 0.160891 0.375156
vt 0.949392 0.063513
vt 0.071817 0.015964
vn 0.258800 0.965900 0.000000
vn 0.707100 0.707100 0.000000
vn 0.965900 0.258800 0.000000
vn 0.965900 -0.258800 0.000000
vn 0.707100 -0.707100 0.000000
vn 0.258800 -0.965900 0.000000
vn -0.258800 -0.965900 0.000000
vn -0.707100 -0.707100 0.000000
vn -0.965900 -0.258800 0.000000
vn -0.965900 0.258800 -0.000000
vn 0.636700 -0.636700 0.434900
vn -0.258800 0.965900 -0.000000
vn -0.707100 0.707100 -0.000000
vn 0.934800 0.250500 -0.251700
vn 0.869800 -0.233100 0.434900
vn -0.233100 0.869800 0.434900
vn 0.233100 0.869800 0.434900
vn 0.869800 0.233100 0.434900
vn -0.636700 0.636700 0.434900
vn 0.636700 0.636700 0.434900
vn -0.869800 0.233100 0.434900
vn -0.869800 -0.233100 0.434900
vn -0.636700 -0.636700 0.434900
vn -0.233100 -0.869800 0.434900
vn 0.233100 -0.869800 0.434900
vn -0.099000 -0.369600 0.923900
vn -0.270500 -0.270500 0.923900
vn -0.369600 -0.099000 0.923900
vn -0.369600 0.099000 0.923900
vn -0.270500 0.270500 0.923900
vn -0.099000 0.369600 0.923900
vn 0.099000 0.369600 0.923900
vn 0.099000 -0.369600 0.923900
vn 0.270500 -0.270500 0.923900
vn 0.369600 -0.099000 0.923900
vn 0.369600 0.099000 0.923900
vn 0.270500 0.270500 0.923900
vn -0.684300 0.684300 -0.251700
vn 0.684300 0.684300 -0.251700
vn -0.934800 0.250500 -0.251700
vn -0.934800 -0.250500 -0.251700
vn -0.684300 -0.684300 -0.251700
vn -0.250500 -0.934800 -0.251700
vn 0.250500 -0.934800 -0.251700
vn 0.684300 -0.684300 -0.251700
vn 0.934800 -0.250500 -0.251700
vn -0.250500 0.934800 -0.251700
vn 0.250500 0.934800 -0.251700
vn 0.000000 0.000000 1.000000
vn 0.000000 -0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 -1.000000 0.000000
s off
f 1/1/1 2/2/1 4/3/1
f 4/3/2 6/4/2 5/5/2
f 5/5/3 6/4/3 8/6/3
f 7/7/4 8/6/4 10/8/4
f 10/8/5 12/9/5 11/10/5
f 12/9/6 14/11/6 13/12/6
f 13/13/7 14/14/7 16/15/7
f 15/16/8 16/15/8 18/17/8
f 18/17/9 20/18/9 19/19/9
f 20/18/10 22/20/10 21/21/10
f 10/8/11 29/22/11 30/23/11
f 24/24/12 2/2/12 1/1/12
f 22/20/13 24/24/13 23/25/13
f 7/7/14 41/26/14 40/27/14
f 8/6/15 28/28/15 29/29/15
f 2/2/16 24/24/16 36/30/16
f 2/2/17 26/31/17 25/32/17
f 6/4/18 27/33/18 28/34/18
f 24/24/19 22/20/19 35/35/19
f 4/3/20 25/36/20 27/37/20
f 20/18/21 34/38/21 35/39/21
f 18/17/22 33/40/22 34/41/22
f 16/15/23 32/42/23 33/43/23
f 14/14/24 31/44/24 32/45/24
f 14/11/25 12/9/25 30/46/25
f 31/44/26 37/47/26 32/45/26
f 32/42/27 37/48/27 33/43/27
f 33/40/28 37/49/28 34/41/28
f 34/38/29 37/50/29 35/39/29
f 35/35/30 37/51/30 36/52/30
f 36/30/31 37/53/31 26/54/31
f 26/31/32 37/55/32 25/32/32
f 31/56/33 30/46/33 37/57/33
f 29/22/34 37/58/34 30/23/34
f 28/28/35 37/59/35 29/29/35
f 27/33/36 37/60/36 28/34/36
f 25/36/37 37/61/37 27/37/37
f 42/62/4 86/63/4 85/64/4
f 23/25/38 49/65/38 48/66/38
f 3/67/39 5/5/39 40/68/39
f 19/19/40 21/21/40 48/69/40
f 17/70/41 19/19/41 47/71/41
f 17/70/42 46/72/42 45/73/42
f 15/16/43 45/74/43 44/75/43
f 13/12/44 44/76/44 43/77/44
f 11/10/45 43/78/45 42/79/45
f 9/80/46 42/62/46 41/81/46
f 1/1/47 38/82/47 49/83/47
f 3/67/48 39/84/48 38/85/48
f 61/86/49 51/87/49 53/88/49
f 60/89/49 58/90/49 52/91/49
f 59/92/49 57/93/49 56/94/49
f 53/88/49 57/93/49 59/92/49
f 56/94/49 52/91/49 58/90/49
f 54/95/49 60/89/49 50/96/49
f 51/87/49 61/86/49 55/97/49
f 60/89/49 54/95/49 55/97/49
f 67/98/50 66/99/50 65/100/50
f 62/101/50 68/102/50 69/103/50
f 73/104/50 72/105/50 64/106/50
f 67/98/50 64/106/50 72/105/50
f 73/104/50 68/102/50 62/101/50
f 70/107/50 63/108/50 69/103/50
f 66/99/50 71/109/50 65/100/50
f 71/109/50 70/107/50 69/103/50
f 58/110/51 60/111/51 69/112/51
f 50/113/8 63/114/8 70/115/8
f 52/116/52 62/117/52 63/114/52
f 57/118/53 72/119/53 73/120/53
f 61/121/53 65/122/53 69/112/53
f 55/123/5 71/124/5 66/125/5
f 59/126/52 64/127/52 65/128/52
f 53/129/2 67/130/2 72/119/2
f 54/131/54 70/115/54 71/132/54
f 53/129/51 51/133/51 66/125/51
f 56/134/13 73/120/13 62/117/13
f 58/110/54 68/135/54 64/127/54
f 77/136/13 76/137/13 74/138/13
f 81/139/50 80/140/50 76/137/50
f 79/141/5 78/142/5 80/140/5
f 75/143/49 74/138/49 78/144/49
f 101/145/50 100/146/50 96/147/50
f 97/148/2 96/147/2 94/149/2
f 85/150/50 91/151/50 93/152/50
f 49/65/13 93/153/13 92/154/13
f 39/84/1 83/155/1 82/156/1
f 46/72/8 90/157/8 89/158/8
f 43/78/5 87/159/5 86/160/5
f 38/82/12 82/161/12 93/162/12
f 40/68/2 84/163/2 83/164/2
f 47/71/9 91/165/9 90/166/9
f 43/77/6 44/76/6 88/167/6
f 41/26/3 85/168/3 84/169/3
f 48/69/10 92/170/10 91/171/10
f 45/74/7 89/172/7 88/173/7
f 99/174/8 98/175/8 100/146/8
f 95/176/49 94/149/49 98/177/49
f 3/67/1 1/1/1 4/3/1
f 3/67/2 4/3/2 5/5/2
f 7/7/3 5/5/3 8/6/3
f 9/80/4 7/7/4 10/8/4
f 9/80/5 10/8/5 11/10/5
f 11/10/6 12/9/6 13/12/6
f 15/16/7 13/13/7 16/15/7
f 17/70/8 15/16/8 18/17/8
f 17/70/9 18/17/9 19/19/9
f 19/19/10 20/18/10 21/21/10
f 12/9/11 10/8/11 30/23/11
f 23/25/12 24/24/12 1/1/12
f 21/21/13 22/20/13 23/25/13
f 5/5/14 7/7/14 40/27/14
f 10/8/15 8/6/15 29/29/15
f 26/54/16 2/2/16 36/30/16
f 4/3/17 2/2/17 25/32/17
f 8/6/18 6/4/18 28/34/18
f 36/52/19 24/24/19 35/35/19
f 6/4/20 4/3/20 27/37/20
f 22/20/21 20/18/21 35/39/21
f 20/18/22 18/17/22 34/41/22
f 18/17/23 16/15/23 33/43/23
f 16/15/24 14/14/24 32/45/24
f 31/56/25 14/11/25 30/46/25
f 41/81/4 42/62/4 85/64/4
f 21/21/38 23/25/38 48/66/38
f 39/178/39 3/67/39 40/68/39
f 47/179/40 19/19/40 48/69/40
f 46/180/41 17/70/41 47/71/41
f 15/16/42 17/70/42 45/73/42
f 13/13/43 15/16/43 44/75/43
f 11/10/44 13/12/44 43/77/44
f 9/80/45 11/10/45 42/79/45
f 7/7/46 9/80/46 41/81/46
f 23/25/47 1/1/47 49/83/47
f 1/1/48 3/67/48 38/85/48
f 59/92/49 61/86/49 53/88/49
f 50/96/49 60/89/49 52/91/49
f 58/90/49 59/92/49 56/94/49
f 61/86/49 60/89/49 55/97/49
f 64/106/50 67/98/50 65/100/50
f 63/108/50 62/101/50 69/103/50
f 68/102/50 73/104/50 64/106/50
f 65/100/50 71/109/50 69/103/50
f 68/135/51 58/110/51 69/112/51
f 54/131/8 50/113/8 70/115/8
f 50/113/52 52/116/52 63/114/52
f 56/134/53 57/118/53 73/120/53
f 60/111/53 61/121/53 69/112/53
f 51/133/5 55/123/5 66/125/5
f 61/181/52 59/126/52 65/128/52
f 57/118/2 53/129/2 72/119/2
f 55/182/54 54/131/54 71/132/54
f 67/130/51 53/129/51 66/125/51
f 52/116/13 56/134/13 62/117/13
f 59/126/54 58/110/54 64/127/54
f 75/143/13 77/136/13 74/138/13
f 77/136/50 81/139/50 76/137/50
f 81/139/5 79/141/5 80/140/5
f 79/183/49 75/143/49 78/144/49
f 97/148/50 101/145/50 96/147/50
f 95/176/2 97/148/2 94/149/2
f 93/152/50 82/184/50 85/150/50
f 83/185/50 84/186/50 85/150/50
f 85/150/50 86/187/50 87/188/50
f 87/188/50 88/189/50 89/190/50
f 89/190/50 90/191/50 91/151/50
f 91/151/50 92/192/50 93/152/50
f 82/184/50 83/185/50 85/150/50
f 85/150/50 87/188/50 89/190/50
f 89/190/50 91/151/50 85/150/50
f 48/66/13 49/65/13 92/154/13
f 38/85/1 39/84/1 82/156/1
f 45/73/8 46/72/8 89/158/8
f 42/79/5 43/78/5 86/160/5
f 49/83/12 38/82/12 93/162/12
f 39/178/2 40/68/2 83/164/2
f 46/180/9 47/71/9 90/166/9
f 87/193/6 43/77/6 88/167/6
f 40/27/3 41/26/3 84/169/3
f 47/179/10 48/69/10 91/171/10
f 44/75/7 45/74/7 88/173/7
f 101/145/8 99/174/8 100/146/8
f 99/194/49 95/176/49 98/177/49

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,7 @@
"block.largeTurbineRunning": {"category": "block", "sounds": [{"name": "block/largeTurbine", "stream": false}]},
"block.damage": {"category": "block", "sounds": ["block/dam1", "block/dam2", "block/dam3", "block/dam4"]},
"block.electricHum": {"category": "block", "sounds": [{"name": "block/electricHum", "stream": false}]},
"block.fensuHum": {"category": "block", "sounds": [{"name": "block/fensuHum", "stream": false}]},
"block.boiler": {"category": "block", "sounds": [{"name": "block/boiler", "stream": false}]},
"block.hornNearSingle": {"category": "block", "sounds": [{"name": "block/hornNearSingle", "stream": false}]},
"block.hornNearDual": {"category": "block", "sounds": [{"name": "block/hornNearDual", "stream": false}]},

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB