diff --git a/README.md b/README.md index 85bc0819a..2c0194598 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,19 @@ -# Hbm-s-Nuclear-Tech-GIT +# HBM's Nuclear Tech Mod for Minecraft 1.7.10 -https://minecraft.curseforge.com/projects/hbms-nuclear-tech-mod?gameCategorySlug=mc-mods&projectID=235439 +[NTM on Modrinth](https://modrinth.com/mod/ntm) -For a 1.12 fork, check this link: https://github.com/Drillgon200/Hbm-s-Nuclear-Tech-GIT/releases +[NTM on CurseForge](https://minecraft.curseforge.com/projects/hbms-nuclear-tech-mod?gameCategorySlug=mc-mods&projectID=235439) + +**This is for 1.7.10!** For 1.12, check out these projects: + +* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases +* NTM Alcater Edition: https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases + +For 1.18, try Martin's remake: https://github.com/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases + +## Downloading pre-compiled versions from GitHub + +Simply navigate to "Releases" on the right side of the page, download links for the compiled JAR as well as the corresponding source code are under the "Assets" category below the changelog. Make sure to review all changelogs when updating! ## Building from source @@ -81,4 +92,4 @@ If you want to make some changes to the mod, follow this guide: 10. Code! # License -This software is licensed under the GNU Public License version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license. You win this round, Stallman. The full license can be found in the `LICENSE` file. +This software is licensed under the GNU Lesser General Public License version 3. In short: This software is free, you may run the software freely, create modified versions, distribute this software and distribute modified versions, as long as the modified software too has a free software license (with an exception for linking to this software, as stated by the "Lesser" part of the LGPL, where this may not be required). You win this round, Stallman. The full license can be found in the `LICENSE` and `LICENSE.LESSER` files. diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 051c16ea5..d60eb3234 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -244,6 +244,7 @@ public class ModBlocks { public static Block block_red_phosphorus; public static Block block_fallout; public static Block block_foam; + public static Block block_coke; public static Block block_graphite; public static Block block_graphite_drilled; public static Block block_graphite_fuel; @@ -1028,6 +1029,7 @@ public class ModBlocks { public static Block machine_chemplant; public static final int guiID_machine_chemplant = 49; public static Block machine_chemfac; + public static Block machine_mixer; public static Block machine_fluidtank; public static Block machine_bat9000; @@ -1516,6 +1518,7 @@ public class ModBlocks { block_red_phosphorus = new BlockHazardFalling().makeBeaconable().setStepSound(Block.soundTypeSand).setBlockName("block_red_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_phosphorus"); block_fallout = new BlockHazardFalling().setStepSound(Block.soundTypeGravel).setBlockName("block_fallout").setCreativeTab(MainRegistry.blockTab).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":ash"); block_foam = new BlockGeneric(Material.craftedSnow).setBlockName("block_foam").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSnow).setHardness(0.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":foam"); + block_coke = new BlockCoke().setBlockName("block_coke").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F); block_graphite = new BlockGraphite(Material.iron, 30, 5).setBlockName("block_graphite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F); block_graphite_drilled = new BlockGraphiteDrilled().setBlockName("block_graphite_drilled"); block_graphite_fuel = new BlockGraphiteFuel().setBlockName("block_graphite_fuel"); @@ -2231,6 +2234,7 @@ public class ModBlocks { machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chemplant"); machine_chemfac = new MachineChemfac(Material.iron).setBlockName("machine_chemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + machine_mixer = new MachineMixer(Material.iron).setBlockName("machine_mixer").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank"); machine_bat9000 = new MachineBigAssTank9000(Material.iron).setBlockName("machine_bat9000").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_orbus = new MachineOrbus(Material.iron).setBlockName("machine_orbus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); @@ -2603,6 +2607,7 @@ public class ModBlocks { GameRegistry.registerBlock(block_fallout, block_fallout.getUnlocalizedName()); GameRegistry.registerBlock(block_foam, block_foam.getUnlocalizedName()); GameRegistry.registerBlock(block_graphite, block_graphite.getUnlocalizedName()); + register(block_coke); GameRegistry.registerBlock(block_graphite_drilled, block_graphite_drilled.getUnlocalizedName()); GameRegistry.registerBlock(block_graphite_fuel, block_graphite_fuel.getUnlocalizedName()); GameRegistry.registerBlock(block_graphite_rod, block_graphite_rod.getUnlocalizedName()); @@ -3227,6 +3232,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName()); GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName()); GameRegistry.registerBlock(machine_chemfac, machine_chemfac.getUnlocalizedName()); + register(machine_mixer); register(machine_fluidtank); register(machine_bat9000); register(machine_orbus); diff --git a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java index e3f53b449..2766da2ce 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockVolcano.java @@ -118,10 +118,10 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB if(this.shouldGrow()) { worldObj.setBlock(xCoord, yCoord + 1, zCoord, this.getBlockType(), this.getBlockMetadata(), 3); - worldObj.setBlock(xCoord, yCoord + 1, zCoord, ModBlocks.volcanic_lava_block); + worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block); return; } else if(this.isExtinguishing()) { - worldObj.setBlock(xCoord, yCoord + 1, zCoord, ModBlocks.volcanic_lava_block); + worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block); return; } } diff --git a/src/main/java/com/hbm/blocks/generic/BlockCoke.java b/src/main/java/com/hbm/blocks/generic/BlockCoke.java new file mode 100644 index 000000000..012f1dfea --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockCoke.java @@ -0,0 +1,25 @@ +package com.hbm.blocks.generic; + +import com.hbm.blocks.BlockEnumMulti; +import com.hbm.items.ItemEnums; + +import net.minecraft.block.material.Material; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockCoke extends BlockEnumMulti { + + public BlockCoke() { + super(Material.iron, ItemEnums.EnumCokeType.class, true, true); + } + + @Override + public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) { + return 5; + } + + @Override + public int getFireSpreadSpeed(IBlockAccess world, int x, int y, int z, ForgeDirection face) { + return 10; + } +} diff --git a/src/main/java/com/hbm/blocks/generic/BlockFlammable.java b/src/main/java/com/hbm/blocks/generic/BlockFlammable.java index 28198efc4..9a43b0bf1 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockFlammable.java +++ b/src/main/java/com/hbm/blocks/generic/BlockFlammable.java @@ -2,7 +2,6 @@ package com.hbm.blocks.generic; import com.hbm.blocks.BlockBase; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/com/hbm/blocks/machine/MachineMixer.java b/src/main/java/com/hbm/blocks/machine/MachineMixer.java new file mode 100644 index 000000000..9d8e24d79 --- /dev/null +++ b/src/main/java/com/hbm/blocks/machine/MachineMixer.java @@ -0,0 +1,40 @@ +package com.hbm.blocks.machine; + +import com.hbm.blocks.BlockDummyable; +import com.hbm.tileentity.machine.TileEntityMachineMixer; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MachineMixer extends BlockDummyable { + + public MachineMixer(Material mat) { + super(mat); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + + if(meta >= 12) + return new TileEntityMachineMixer(); + + return null; + } + + @Override + public int[] getDimensions() { + return new int[] {2, 0, 0, 0, 0, 0}; + } + + @Override + public int getOffset() { + return 0; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + return this.standardOpenBehavior(world, x, y, z, player, 0); + } +} diff --git a/src/main/java/com/hbm/blocks/machine/pile/BlockGraphite.java b/src/main/java/com/hbm/blocks/machine/pile/BlockGraphite.java index 77e771209..45ceb6d10 100644 --- a/src/main/java/com/hbm/blocks/machine/pile/BlockGraphite.java +++ b/src/main/java/com/hbm/blocks/machine/pile/BlockGraphite.java @@ -10,9 +10,7 @@ import api.hbm.block.IToolable; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; 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.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/com/hbm/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index 84af77106..6e5023235 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -1,6 +1,7 @@ package com.hbm.crafting; import com.hbm.blocks.ModBlocks; +import com.hbm.items.ItemEnums.EnumCokeType; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial; import com.hbm.items.special.ItemWasteLong; @@ -49,6 +50,10 @@ public class MineralRecipes { add1To9Pair(ModBlocks.block_polymer, ModItems.ingot_polymer); add1To9Pair(ModBlocks.block_bakelite, ModItems.ingot_bakelite); add1To9Pair(ModBlocks.block_rubber, ModItems.ingot_rubber); + + for(int i = 0; i < EnumCokeType.values().length; i++) { + add1To9PairSameMeta(Item.getItemFromBlock(ModBlocks.block_coke), ModItems.coke, i); + } addMineralSet(ModItems.nugget_bismuth, ModItems.ingot_bismuth, ModBlocks.block_bismuth); addMineralSet(ModItems.nugget_tantalium, ModItems.ingot_tantalium, ModBlocks.block_tantalium); diff --git a/src/main/java/com/hbm/handler/FuelHandler.java b/src/main/java/com/hbm/handler/FuelHandler.java index d435ee678..af8f911e7 100644 --- a/src/main/java/com/hbm/handler/FuelHandler.java +++ b/src/main/java/com/hbm/handler/FuelHandler.java @@ -35,7 +35,8 @@ public class FuelHandler implements IFuelHandler { if(fuel.getItem() == ModItems.powder_fire) return 6400; if(fuel.getItem() == ModItems.lignite) return 1200; if(fuel.getItem() == ModItems.powder_lignite) return 1200; - if(fuel.getItem() == ModItems.coke) return 3200; + if(fuel.getItem() == ModItems.coke) return single * 16; + if(fuel.getItem() == Item.getItemFromBlock(ModBlocks.block_coke)) return single * 160; if(fuel.getItem() == ModItems.book_guide) return single; if(fuel.getItem() == ModItems.coal_infernal) return 4800; if(fuel.getItem() == ModItems.crystal_coal) return 6400; diff --git a/src/main/java/com/hbm/handler/nei/MixerHandler.java b/src/main/java/com/hbm/handler/nei/MixerHandler.java new file mode 100644 index 000000000..7050d9d9f --- /dev/null +++ b/src/main/java/com/hbm/handler/nei/MixerHandler.java @@ -0,0 +1,16 @@ +package com.hbm.handler.nei; + +import com.hbm.blocks.ModBlocks; +import com.hbm.inventory.recipes.MixerRecipes; + +public class MixerHandler extends NEIUniversalHandler { + + public MixerHandler() { + super("Mixer", ModBlocks.machine_mixer, MixerRecipes.getRecipes()); + } + + @Override + public String getKey() { + return "ntmMixer"; + } +} diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index d80e66143..e5c5185f0 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -359,9 +359,9 @@ public class OreDictManager { KNO .dust(niter) .block(block_niter) .ore(ore_niter); F .dust(fluorite) .block(block_fluorite) .ore(ore_fluorite, basalt_fluorite); LIGNITE .gem(lignite) .dust(powder_lignite) .ore(ore_lignite); - COALCOKE .gem(fromOne(coke, EnumCokeType.COAL)); - PETCOKE .gem(fromOne(coke, EnumCokeType.PETROLEUM)); - LIGCOKE .gem(fromOne(coke, EnumCokeType.LIGNITE)); + COALCOKE .gem(fromOne(coke, EnumCokeType.COAL)) .block(fromOne(block_coke, EnumCokeType.COAL)); + PETCOKE .gem(fromOne(coke, EnumCokeType.PETROLEUM)) .block(fromOne(block_coke, EnumCokeType.PETROLEUM)); + LIGCOKE .gem(fromOne(coke, EnumCokeType.LIGNITE)) .block(fromOne(block_coke, EnumCokeType.LIGNITE)); CINNABAR .crystal(cinnebar) .gem(cinnebar) .ore(ore_cinnebar, ore_depth_cinnebar); BORAX .dust(powder_borax) .ore(ore_depth_borax); VOLCANIC .gem(gem_volcanic) .ore(basalt_gem); @@ -426,7 +426,7 @@ public class OreDictManager { ANY_HIGHEXPLOSIVE .ingot(ball_tnt); ANY_CONCRETE .any(concrete, concrete_smooth, concrete_asbestos, ducrete, ducrete_smooth); for(int i = 0; i < 16; i++) { ANY_CONCRETE.any(new ItemStack(ModBlocks.concrete_colored, 1, i)); } - ANY_COKE .gem(fromAll(coke, EnumCokeType.class)); + ANY_COKE .gem(fromAll(coke, EnumCokeType.class)).block(fromAll(block_coke, EnumCokeType.class)); ANY_BISMOID .ingot(ingot_bismuth, ingot_arsenic).nugget(nugget_bismuth, nugget_arsenic).block(block_bismuth); OreDictionary.registerOre(KEY_OIL_TAR, fromOne(oil_tar, EnumTarType.CRUDE)); @@ -624,6 +624,15 @@ public class OreDictManager { } return stacks; } + public static Object[] fromAll(Block block, Class en) { + Enum[] vals = en.getEnumConstants(); + Object[] stacks = new Object[vals.length]; + + for(int i = 0; i < vals.length; i++) { + stacks[i] = new ItemStack(block, 1, vals[i].ordinal()); + } + return stacks; + } public DictFrame any(Object... thing) { return makeObject(ANY, thing); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineExcavator.java b/src/main/java/com/hbm/inventory/container/ContainerMachineExcavator.java index 83c78e224..47b365f8e 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineExcavator.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineExcavator.java @@ -18,15 +18,16 @@ public class ContainerMachineExcavator extends Container { public ContainerMachineExcavator(InventoryPlayer invPlayer, TileEntityMachineExcavator tile) { this.excavator = tile; - //Battery + //Battery: 0 this.addSlotToContainer(new Slot(tile, 0, 220, 72)); - //Fluid ID + //Fluid ID: 1 this.addSlotToContainer(new Slot(tile, 1, 202, 72)); - //Upgrades + //Upgrades: 2-4 for(int i = 0; i < 3; i++) { this.addSlotToContainer(new Slot(tile, 2 + i, 136 + i * 18, 75)); } + //Buffer: 5-13 for(int i = 0; i < 3; i++) { for(int j = 0; j < 3; j++) { this.addSlotToContainer(new SlotMachineOutput(tile, 5 + j + i * 3, 136 + j * 18, 5 + i * 18)); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMixer.java b/src/main/java/com/hbm/inventory/container/ContainerMixer.java new file mode 100644 index 000000000..28c17961f --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerMixer.java @@ -0,0 +1,80 @@ +package com.hbm.inventory.container; + +import com.hbm.items.machine.IItemFluidIdentifier; +import com.hbm.items.machine.ItemMachineUpgrade; +import com.hbm.tileentity.machine.TileEntityMachineMixer; + +import api.hbm.energy.IBatteryItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerMixer extends Container { + + private TileEntityMachineMixer mixer; + + public ContainerMixer(InventoryPlayer player, TileEntityMachineMixer mixer) { + this.mixer = mixer; + + //Battery + this.addSlotToContainer(new Slot(mixer, 0, 23, 77)); + //Item Input + this.addSlotToContainer(new Slot(mixer, 1, 43, 77)); + //Fluid ID + this.addSlotToContainer(new Slot(mixer, 2, 117, 77)); + //Upgrades + this.addSlotToContainer(new Slot(mixer, 3, 137, 24)); + this.addSlotToContainer(new Slot(mixer, 4, 137, 42)); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) { + ItemStack var3 = null; + Slot var4 = (Slot) this.inventorySlots.get(par2); + + if(var4 != null && var4.getHasStack()) { + ItemStack var5 = var4.getStack(); + var3 = var5.copy(); + + if(par2 <= 4) { + if(!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true)) { + return null; + } + } else { + + if(var3.getItem() instanceof IBatteryItem) { + if(!this.mergeItemStack(var5, 0, 1, false)) { + return null; + } + } else if(var3.getItem() instanceof IItemFluidIdentifier) { + if(!this.mergeItemStack(var5, 2, 3, false)) { + return null; + } + } else if(var3.getItem() instanceof ItemMachineUpgrade) { + if(!this.mergeItemStack(var5, 3, 4, false)) { + return null; + } + } else { + if(!this.mergeItemStack(var5, 1, 2, false)) { + return null; + } + } + } + + if(var5.stackSize == 0) { + var4.putStack((ItemStack) null); + } else { + var4.onSlotChanged(); + } + } + + return var3; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return mixer.isUseableByPlayer(player); + } +} diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineExcavator.java b/src/main/java/com/hbm/inventory/gui/GUIMachineExcavator.java index 971f18f43..61244f87a 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineExcavator.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineExcavator.java @@ -69,9 +69,20 @@ public class GUIMachineExcavator extends GuiInfoContainer { drawTexturedModalRect(guiLeft, guiTop, 0, 0, 242, 96); drawTexturedModalRect(guiLeft + 33, guiTop + 104, 33, 104, 176, 100); + int i = (int) (drill.getPower() * 52 / drill.getMaxPower()); + drawTexturedModalRect(guiLeft + 220, guiTop + 70 - i, 229, 156 - i, 16, i); + + if(drill.getPower() > drill.getPowerConsumption()) { + drawTexturedModalRect(guiLeft + 224, guiTop + 4, 239, 156, 9, 12); + } + + if(drill.getInstalledDrill() == null && System.currentTimeMillis() % 1000 < 500) { + drawTexturedModalRect(guiLeft + 171, guiTop + 74, 209, 154, 18, 18); + } + if(drill.enableDrill) { drawTexturedModalRect(guiLeft + 6, guiTop + 42, 209, 114, 20, 40); - if(drill.getInstalledDrill() != null) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 209, 104, 10, 10); + if(drill.getInstalledDrill() != null && drill.getPower() >= drill.getPowerConsumption()) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 209, 104, 10, 10); else if(System.currentTimeMillis() % 1000 < 500) drawTexturedModalRect(guiLeft + 11, guiTop + 5, 219, 104, 10, 10); } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMixer.java b/src/main/java/com/hbm/inventory/gui/GUIMixer.java new file mode 100644 index 000000000..6213b2e74 --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIMixer.java @@ -0,0 +1,59 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerMixer; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityMachineMixer; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIMixer extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_mixer.png"); + private TileEntityMachineMixer mixer; + + public GUIMixer(InventoryPlayer player, TileEntityMachineMixer mixer) { + super(new ContainerMixer(player, mixer)); + this.mixer = mixer; + + this.xSize = 176; + this.ySize = 204; + } + + @Override + public void drawScreen(int x, int y, float interp) { + super.drawScreen(x, y, interp); + + this.drawElectricityInfo(this, x, y, guiLeft + 23, guiTop + 23, 16, 52, mixer.getPower(), mixer.getMaxPower()); + + mixer.tanks[0].renderTankInfo(this, x, y, guiLeft + 43, guiTop + 23, 7, 52); + mixer.tanks[1].renderTankInfo(this, x, y, guiLeft + 52, guiTop + 23, 7, 52); + mixer.tanks[2].renderTankInfo(this, x, y, guiLeft + 117, guiTop + 23, 16, 52); + } + + @Override + protected void drawGuiContainerForegroundLayer( int i, int j) { + + String name = this.mixer.hasCustomInventoryName() ? this.mixer.getInventoryName() : I18n.format(this.mixer.getInventoryName()); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + int i = (int) (mixer.getPower() * 53 / mixer.getMaxPower()); + drawTexturedModalRect(guiLeft + 23, guiTop + 75 - i, 176, 52 - i, 16, i); + + mixer.tanks[0].renderTank(guiLeft + 43, guiTop + 75, this.zLevel, 7, 52); + mixer.tanks[1].renderTank(guiLeft + 52, guiTop + 75, this.zLevel, 7, 52); + mixer.tanks[2].renderTank(guiLeft + 117, guiTop + 75, this.zLevel, 16, 52); + } +} diff --git a/src/main/java/com/hbm/inventory/recipes/MixerRecipes.java b/src/main/java/com/hbm/inventory/recipes/MixerRecipes.java new file mode 100644 index 000000000..f2dab2691 --- /dev/null +++ b/src/main/java/com/hbm/inventory/recipes/MixerRecipes.java @@ -0,0 +1,80 @@ +package com.hbm.inventory.recipes; + +import static com.hbm.inventory.OreDictManager.KNO; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import com.hbm.inventory.FluidStack; +import com.hbm.inventory.OreDictManager; +import com.hbm.inventory.RecipesCommon.AStack; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.inventory.RecipesCommon.OreDictStack; +import com.hbm.inventory.fluid.FluidType; +import com.hbm.inventory.fluid.Fluids; +import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemFluidIcon; + +public class MixerRecipes { + + public static HashMap recipes = new HashMap(); + + public static void register() { + recipes.put(Fluids.COOLANT, new MixerRecipe(2_000, 50).setStack1(new FluidStack(Fluids.WATER, 1_800)).setSolid(new OreDictStack(KNO.dust()))); + recipes.put(Fluids.CRYOGEL, new MixerRecipe(2_000, 50).setStack1(new FluidStack(Fluids.COOLANT, 1_800)).setSolid(new ComparableStack(ModItems.powder_ice))); + recipes.put(Fluids.NITAN, new MixerRecipe(1_000, 50).setStack1(new FluidStack(Fluids.KEROSENE, 600)).setStack2(new FluidStack(Fluids.MERCURY, 200)).setSolid(new ComparableStack(ModItems.powder_nitan_mix))); + recipes.put(Fluids.FRACKSOL, new MixerRecipe(1_000, 20).setStack1(new FluidStack(Fluids.WATER, 1_000)).setStack2(new FluidStack(Fluids.PETROLEUM, 100)).setSolid(new OreDictStack(OreDictManager.S.dust()))); + recipes.put(Fluids.ENDERJUICE, new MixerRecipe(100, 100).setStack1(new FluidStack(Fluids.XPJUICE, 500)).setSolid(new OreDictStack(OreDictManager.DIAMOND.dust()))); + + recipes.put(Fluids.LUBRICANT, new MixerRecipe(1_000, 20).setStack1(new FluidStack(Fluids.HEATINGOIL, 500)).setStack2(new FluidStack(Fluids.UNSATURATEDS, 500))); + recipes.put(Fluids.PETROIL, new MixerRecipe(1_000, 30).setStack1(new FluidStack(Fluids.RECLAIMED, 800)).setStack2(new FluidStack(Fluids.LUBRICANT, 200))); + + recipes.put(Fluids.PETROIL_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.PETROIL, 800)).setSolid(new ComparableStack(ModItems.antiknock))); + recipes.put(Fluids.GASOLINE_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.GASOLINE, 800)).setSolid(new ComparableStack(ModItems.antiknock))); + recipes.put(Fluids.COALGAS_LEADED, new MixerRecipe(1_000, 40).setStack1(new FluidStack(Fluids.COALGAS, 800)).setSolid(new ComparableStack(ModItems.antiknock))); + } + + public static MixerRecipe getOutput(FluidType type) { + return recipes.get(type); + } + + public static HashMap getRecipes() { + + HashMap recipes = new HashMap(); + + for(Entry entry : MixerRecipes.recipes.entrySet()) { + + FluidType type = entry.getKey(); + MixerRecipe recipe = entry.getValue(); + FluidStack output = new FluidStack(type, recipe.output); + + List objects = new ArrayList(); + if(recipe.input1 != null) objects.add(ItemFluidIcon.make(recipe.input1)); + if(recipe.input2 != null) objects.add(ItemFluidIcon.make(recipe.input2)); + if(recipe.solidInput != null) objects.add(recipe.solidInput); + + recipes.put(objects.toArray(), ItemFluidIcon.make(output)); + } + + return recipes; + } + + public static class MixerRecipe { + public FluidStack input1; + public FluidStack input2; + public AStack solidInput; + public int processTime; + public int output; + + protected MixerRecipe(int output, int processTime) { + this.output = output; + this.processTime = processTime; + } + + protected MixerRecipe setStack1(FluidStack stack) { input1 = stack; return this; } + protected MixerRecipe setStack2(FluidStack stack) { input2 = stack; return this; } + protected MixerRecipe setSolid(AStack stack) { solidInput = stack; return this; } + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemDrillbit.java b/src/main/java/com/hbm/items/machine/ItemDrillbit.java index ce7ab09e9..d281c0b1e 100644 --- a/src/main/java/com/hbm/items/machine/ItemDrillbit.java +++ b/src/main/java/com/hbm/items/machine/ItemDrillbit.java @@ -43,26 +43,29 @@ public class ItemDrillbit extends ItemEnumMulti { list.add(EnumChatFormatting.YELLOW + "Speed: " + ((int) (type.speed * 100)) + "%"); list.add(EnumChatFormatting.YELLOW + "Tier: " + type.tier); + if(type.fortune > 0) list.add(EnumChatFormatting.LIGHT_PURPLE + "Fortune " + type.fortune); if(type.vein) list.add(EnumChatFormatting.GREEN + "Vein miner"); if(type.silk) list.add(EnumChatFormatting.GREEN + "Silk touch"); } public static enum EnumDrillType { - STEEL (1.0D, 1, false, false), - STEEL_DIAMOND (1.0D, 1, false, true), - HSS (1.5D, 2, true, false), - HSS_DIAMOND (1.5D, 2, true, true), - DESH (2.5D, 3, true, true), - DESH_DIAMOND (2.5D, 3, true, true); + STEEL (1.0D, 1, 0, false, false), + STEEL_DIAMOND (1.0D, 1, 2, false, true), + HSS (1.5D, 2, 0, true, false), + HSS_DIAMOND (1.5D, 2, 3, true, true), + DESH (2.5D, 3, 1, true, true), + DESH_DIAMOND (2.5D, 3, 4, true, true); public double speed; public int tier; + public int fortune; public boolean vein; public boolean silk; - private EnumDrillType(double speed, int tier, boolean vein, boolean silk) { + private EnumDrillType(double speed, int tier, int fortune, boolean vein, boolean silk) { this.speed = speed; this.tier = tier; + this.fortune = fortune; this.vein = vein; this.silk = silk; } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 1aeae437c..8d205dfd3 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -264,6 +264,7 @@ public class ClientProxy extends ServerProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamEngine.class, new RenderSteamEngine()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCombustionEngine.class, new RenderCombustionEngine()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineExcavator.class, new RenderExcavator()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMixer.class, new RenderMixer()); //Foundry ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry()); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 49c84031f..e54a82927 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -785,6 +785,7 @@ public class MainRegistry { RadiolysisRecipes.registerRadiolysis(); GasCentrifugeRecipes.register(); CombinationRecipes.register(); + MixerRecipes.register(); //the good stuff SerializableRecipe.registerAllHandlers(); diff --git a/src/main/java/com/hbm/main/NEIConfig.java b/src/main/java/com/hbm/main/NEIConfig.java index 8a9450bd4..21614d1fd 100644 --- a/src/main/java/com/hbm/main/NEIConfig.java +++ b/src/main/java/com/hbm/main/NEIConfig.java @@ -64,6 +64,7 @@ public class NEIConfig implements IConfigureNEI { registerHandler(new BoilingHandler()); registerHandler(new CombinationHandler()); registerHandler(new SawmillHandler()); + registerHandler(new MixerHandler()); registerHandler(new ChunkyHandler()); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 1f6aa2c91..c09cd9599 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -150,6 +150,9 @@ public class ResourceManager { public static final IModelCustom chemplant_fluidcap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/chemplant_new_fluidcap.hmf")); public static final IModelCustom chemfac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chemfac.obj")); + //Mixer + public static final IModelCustom mixer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/mixer.obj")); + //F6 TANKS public static final IModelCustom tank = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/tank.obj")); @@ -486,10 +489,13 @@ public class ResourceManager { public static final ResourceLocation chemplant_piston_tex = new ResourceLocation(RefStrings.MODID, "textures/models/chemplant_piston_new.png"); public static final ResourceLocation chemplant_fluid_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lavabase_small.png"); public static final ResourceLocation chemfac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chemfac.png"); - - //F6 TANKS - public static final ResourceLocation uf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/UF6Tank.png"); - public static final ResourceLocation puf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/PUF6Tank.png"); + + //Mixer + public static final ResourceLocation mixer_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/mixer.png"); + + //F6 TANKS + public static final ResourceLocation uf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/UF6Tank.png"); + public static final ResourceLocation puf6_tex = new ResourceLocation(RefStrings.MODID, "textures/models/PUF6Tank.png"); //Centrifuge public static final ResourceLocation centrifuge_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/centrifuge.png"); diff --git a/src/main/java/com/hbm/render/tileentity/RenderExcavator.java b/src/main/java/com/hbm/render/tileentity/RenderExcavator.java index b09a50660..1623c8747 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderExcavator.java +++ b/src/main/java/com/hbm/render/tileentity/RenderExcavator.java @@ -4,16 +4,22 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; +import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; import com.hbm.render.item.ItemRenderBase; import com.hbm.tileentity.machine.TileEntityMachineExcavator; +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.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class RenderExcavator extends TileEntitySpecialRenderer implements IItemRendererProvider { + + public static final ResourceLocation cobble = new ResourceLocation(RefStrings.MODID, "textures/models/machines/cobblestone.png"); + public static final ResourceLocation gravel = new ResourceLocation(RefStrings.MODID, "textures/models/machines/gravel.png"); @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) { @@ -36,9 +42,23 @@ public class RenderExcavator extends TileEntitySpecialRenderer implements IItemR GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.mining_drill_tex); ResourceManager.mining_drill.renderPart("Main"); - ResourceManager.mining_drill.renderPart("Crusher1"); - ResourceManager.mining_drill.renderPart("Crusher2"); + float crusher = drill.prevCrusherRotation + (drill.crusherRotation - drill.prevCrusherRotation) * interp; + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 2.0F, 2.8125F); + GL11.glRotatef(-crusher, 1, 0, 0); + GL11.glTranslatef(0.0F, -2.0F, -2.8125F); + ResourceManager.mining_drill.renderPart("Crusher1"); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + GL11.glTranslatef(0.0F, 2.0F, 2.1875F); + GL11.glRotatef(crusher, 1, 0, 0); + GL11.glTranslatef(0.0F, -2.0F, -2.1875F); + ResourceManager.mining_drill.renderPart("Crusher2"); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); GL11.glRotatef(drill.prevDrillRotation + (drill.drillRotation - drill.prevDrillRotation) * interp, 0F, -1F, 0F); float ext = drill.prevDrillExtension + (drill.drillExtension - drill.prevDrillExtension) * interp; GL11.glTranslatef(0.0F, -ext, 0.0F); @@ -49,9 +69,77 @@ public class RenderExcavator extends TileEntitySpecialRenderer implements IItemR GL11.glTranslated(0.0D, 2.0D, 0.0D); ext -= 2; } + GL11.glPopMatrix(); GL11.glShadeModel(GL11.GL_FLAT); + if(drill.chuteTimer > 0) { + bindTexture(cobble); + double widthX = 0.125; + double widthZ = 0.125; + double speed = 250D; + double dropU = -System.currentTimeMillis() % speed / speed; + double dropL = dropU + 4; + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + tess.setNormal(0F, 0F, 1F); + tess.addVertexWithUV(widthX, 3, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(-widthX, 3, 2.5 + widthZ, 1, dropU); + tess.addVertexWithUV(-widthX, 2, 2.5 + widthZ, 1, dropL); + tess.addVertexWithUV(widthX, 2, 2.5 + widthZ, 0, dropL); + + tess.setNormal(0F, 0F, -1F); + tess.addVertexWithUV(-widthX, 3, 2.5 - widthZ, 1, dropU); + tess.addVertexWithUV(widthX, 3, 2.5 - widthZ, 0, dropU); + tess.addVertexWithUV(widthX, 2, 2.5 - widthZ, 0, dropL); + tess.addVertexWithUV(-widthX, 2, 2.5 - widthZ, 1, dropL); + + tess.setNormal(-1F, 0F, 0F); + tess.addVertexWithUV(-widthX, 3, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(-widthX, 3, 2.5 - widthZ, 1, dropU); + tess.addVertexWithUV(-widthX, 2, 2.5 - widthZ, 1, dropL); + tess.addVertexWithUV(-widthX, 2, 2.5 + widthZ, 0, dropL); + + tess.setNormal(1F, 0F, 0F); + tess.addVertexWithUV(widthX, 3, 2.5 - widthZ, 1, dropU); + tess.addVertexWithUV(widthX, 3, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(widthX, 2, 2.5 + widthZ, 0, dropL); + tess.addVertexWithUV(widthX, 2, 2.5 - widthZ, 1, dropL); + tess.draw(); + + boolean smoosh = drill.enableCrusher; + widthX = smoosh ? 0.5 : 0.25; + widthZ = 0.0625; + double uU = smoosh ? 4 : 2; + double uL = 0.5; + bindTexture(smoosh ? gravel : cobble); + tess.startDrawingQuads(); + tess.setNormal(0F, 0F, 1F); + tess.addVertexWithUV(widthX, 2, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(-widthX, 2, 2.5 + widthZ, uU, dropU); + tess.addVertexWithUV(-widthX, 1, 2.5 + widthZ, uU, dropL); + tess.addVertexWithUV(widthX, 1, 2.5 + widthZ, 0, dropL); + + tess.setNormal(0F, 0F, -1F); + tess.addVertexWithUV(-widthX, 2, 2.5 - widthZ, uU, dropU); + tess.addVertexWithUV(widthX, 2, 2.5 - widthZ, 0, dropU); + tess.addVertexWithUV(widthX, 1, 2.5 - widthZ, 0, dropL); + tess.addVertexWithUV(-widthX, 1, 2.5 - widthZ, uU, dropL); + + tess.setNormal(-1F, 0F, 0F); + tess.addVertexWithUV(-widthX, 2, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(-widthX, 2, 2.5 - widthZ, uL, dropU); + tess.addVertexWithUV(-widthX, 1, 2.5 - widthZ, uL, dropL); + tess.addVertexWithUV(-widthX, 1, 2.5 + widthZ, 0, dropL); + + tess.setNormal(1F, 0F, 0F); + tess.addVertexWithUV(widthX, 2, 2.5 - widthZ, uL, dropU); + tess.addVertexWithUV(widthX, 2, 2.5 + widthZ, 0, dropU); + tess.addVertexWithUV(widthX, 1, 2.5 + widthZ, 0, dropL); + tess.addVertexWithUV(widthX, 1, 2.5 - widthZ, uL, dropL); + tess.draw(); + } + GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/render/tileentity/RenderMixer.java b/src/main/java/com/hbm/render/tileentity/RenderMixer.java new file mode 100644 index 000000000..08484d154 --- /dev/null +++ b/src/main/java/com/hbm/render/tileentity/RenderMixer.java @@ -0,0 +1,41 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.main.ResourceManager; +import com.hbm.tileentity.machine.TileEntityMachineMixer; + +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; + +public class RenderMixer extends TileEntitySpecialRenderer { + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) { + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5D, y, z + 0.5D); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + + GL11.glShadeModel(GL11.GL_SMOOTH); + bindTexture(ResourceManager.mixer_tex); + ResourceManager.mixer.renderPart("Main"); + + TileEntityMachineMixer mixer = (TileEntityMachineMixer) tile; + + GL11.glPushMatrix(); + GL11.glRotatef(mixer.prevRotation + (mixer.rotation - mixer.prevRotation) * interp, 0, 1, 0); + ResourceManager.mixer.renderPart("Mixer"); + GL11.glPopMatrix(); + + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glColor3f(1F, 1F, 1F); + ResourceManager.mixer.renderPart("Fluid"); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glShadeModel(GL11.GL_FLAT); + + GL11.glEnable(GL11.GL_CULL_FACE); + + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 6dd24be2b..60a03f0bd 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -273,6 +273,7 @@ public class TileMappings { put(TileEntityMachineLiquefactor.class, "tileentity_liquefactor"); put(TileEntityMachineSolidifier.class, "tileentity_solidifier"); put(TileEntityElectrolyser.class, "tileentity_electrolyser"); + put(TileEntityMachineMixer.class, "tileentity_mixer"); put(TileEntitySteamEngine.class, "tileentity_steam_engine"); put(TileEntityMachineTurbine.class, "tileentity_turbine"); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java index 463373f66..68817b1c2 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineExcavator.java @@ -1,5 +1,7 @@ package com.hbm.tileentity.machine; +import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Random; @@ -8,12 +10,16 @@ import com.hbm.blocks.ModBlocks; import com.hbm.blocks.network.CraneInserter; import com.hbm.entity.item.EntityMovingItem; import com.hbm.interfaces.IControlReceiver; +import com.hbm.inventory.UpgradeManager; import com.hbm.inventory.container.ContainerMachineExcavator; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineExcavator; +import com.hbm.inventory.recipes.ShredderRecipes; +import com.hbm.items.ModItems; import com.hbm.items.machine.ItemDrillbit; import com.hbm.items.machine.ItemDrillbit.EnumDrillType; +import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType; import com.hbm.lib.Library; import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; @@ -24,6 +30,7 @@ import com.hbm.util.fauxpointtwelve.BlockPos; import api.hbm.conveyor.IConveyorBelt; import api.hbm.energy.IEnergyUser; import api.hbm.fluid.IFluidStandardReceiver; +import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; @@ -62,6 +69,13 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements public float prevDrillRotation = 0F; public float drillExtension = 0F; public float prevDrillExtension = 0F; + public float crusherRotation = 0F; + public float prevCrusherRotation = 0F; + public int chuteTimer = 0; + + public double speed = 1.0D; + public final long baseConsumption = 10_000L; + public long consumption = baseConsumption; public FluidTank tank; @@ -78,17 +92,41 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements @Override public void updateEntity() { + //needs to happen on client too for GUI rendering + UpgradeManager.eval(slots, 2, 3); + int speedLevel = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3); + int powerLevel = Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3); + + consumption = baseConsumption * (1 + speedLevel); + consumption /= (1 + powerLevel); + if(!worldObj.isRemote) { + if(worldObj.getTotalWorldTime() % 20 == 0) { + tryEjectBuffer(); + } + + if(chuteTimer > 0) chuteTimer--; + this.power = Library.chargeTEFromItems(slots, 0, this.getPower(), this.getMaxPower()); this.operational = false; + int radiusLevel = Math.min(UpgradeManager.getLevel(UpgradeType.EFFECT), 3); - if(this.enableDrill && this.getInstalledDrill() != null && this.power >= this.getPowerConsumption()) { + EnumDrillType type = this.getInstalledDrill(); + if(this.enableDrill && type != null && this.power >= this.getPowerConsumption()) { operational = true; + this.power -= this.getPowerConsumption(); - if(targetDepth < this.yCoord - 4 && tryDrill(5)) { + this.speed = type.speed; + this.speed *= (1 + speedLevel / 2D); + + if(targetDepth < this.yCoord - 4 && tryDrill(1 + radiusLevel * 2)) { targetDepth++; + + if(targetDepth >= this.yCoord - 4) { + this.enableDrill = false; + } } } else { this.targetDepth = 0; @@ -102,6 +140,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements data.setBoolean("s", enableSilkTouch); data.setBoolean("o", operational); data.setInteger("t", targetDepth); + data.setInteger("g", chuteTimer); data.setLong("p", power); this.networkPack(data, 150); @@ -120,16 +159,27 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements this.drillExtension -= sig * speed; } } - + this.prevDrillRotation = this.drillRotation; + this.prevCrusherRotation = this.crusherRotation; - if(this.operational) + if(this.operational) { this.drillRotation += 15F; + + if(this.enableCrusher) { + this.crusherRotation += 15F; + } + } if(this.drillRotation >= 360F) { this.drillRotation -= 360F; this.prevDrillRotation -= 360F; } + + if(this.crusherRotation >= 360F) { + this.crusherRotation -= 360F; + this.prevCrusherRotation -= 360F; + } } } @@ -141,6 +191,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements this.enableSilkTouch = nbt.getBoolean("s"); this.operational = nbt.getBoolean("o"); this.targetDepth = nbt.getInteger("t"); + this.chuteTimer = nbt.getInteger("g"); this.power = nbt.getLong("p"); } @@ -181,7 +232,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements if(!ignoreAll) { ticksWorked++; - int ticksToWork = (int) Math.ceil(combinedHardness); + int ticksToWork = (int) Math.ceil(combinedHardness / this.speed); if(ticksWorked >= ticksToWork) { breakBlocks(ring); @@ -236,7 +287,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements maxX = x; maxY = y; maxZ = z; - breakRecursively(x, y, z, 10); + breakRecursively(x, y, z, 15); recursionBrake.clear(); /* move all excavated items to the last drillable position which is also within collection range */ @@ -289,7 +340,47 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements } protected void breakSingleBlock(Block b, int x ,int y, int z) { - b.dropBlockAsItem(worldObj, x, y, z, worldObj.getBlockMetadata(x, y, z), 0 /* fortune */); + + List items = b.getDrops(worldObj, x, y, z, worldObj.getBlockMetadata(x, y, z), this.getFortuneLevel()); + + if(this.canSilkTouch()) { + + try { + Method createStackedBlock = ReflectionHelper.findMethod(Block.class, b, new String[] {"createStackedBlock", "func_149644_j"}, int.class); + ItemStack result = (ItemStack) createStackedBlock.invoke(b, worldObj.getBlockMetadata(x, y, z)); + + if(result != null) { + items.clear(); + items.add(result.copy()); + } + } catch(Exception ex) { } + } + + if(this.enableCrusher) { + + List list = new ArrayList(); + + for(ItemStack stack : items) { + ItemStack crushed = ShredderRecipes.getShredderResult(stack).copy(); + + if(crushed.getItem() == ModItems.scrap || crushed.getItem() == ModItems.dust) { + list.add(stack); + } else { + crushed.stackSize *= stack.stackSize; + list.add(crushed); + } + } + + items = list; + } + + if(b == ModBlocks.barricade) + items.clear(); + + for(ItemStack item : items) { + worldObj.spawnEntityInWorld(new EntityItem(worldObj, x + 0.5, y + 0.5, z + 0.5, item)); + } + worldObj.func_147480_a(x, y, z, false); } @@ -318,6 +409,47 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements } } + protected void tryEjectBuffer() { + + ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10); + + int x = xCoord + dir.offsetX * 4; + int y = yCoord - 3; + int z = zCoord + dir.offsetZ * 4; + + List items = new ArrayList(); + + for(int i = 5; i < 14; i++) { + ItemStack stack = slots[i]; + + if(stack != null) { + items.add(stack.copy()); + } + } + + TileEntity tile = worldObj.getTileEntity(x, y, z); + if(tile instanceof IInventory) { + supplyContainer((IInventory) tile, items, dir.getOpposite()); + } + + Block b = worldObj.getBlock(x, y, z); + if(b instanceof IConveyorBelt) { + supplyConveyor((IConveyorBelt) b, items, x, y, z); + } + + items.removeIf(i -> i == null || i.stackSize <= 0); + + for(int i = 5; i < 14; i++) { + int index = i - 5; + + if(items.size() > index) { + slots[i] = items.get(index).copy(); + } else { + slots[i] = null; + } + } + } + /** pulls up an AABB around the drillbit and tries to either conveyor output or buffer collected items */ protected void tryCollect(int radius) { int yLevel = getY(); @@ -330,19 +462,63 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements int y = yCoord - 3; int z = zCoord + dir.offsetZ * 4; + List stacks = new ArrayList(); + items.forEach(i -> stacks.add(i.getEntityItem())); + + /* try to insert into a valid coontainer */ TileEntity tile = worldObj.getTileEntity(x, y, z); if(tile instanceof IInventory) { - supplyContainer((IInventory) tile, items, dir.getOpposite()); + supplyContainer((IInventory) tile, stacks, dir.getOpposite()); } + /* try to place on conveyor belt */ Block b = worldObj.getBlock(x, y, z); if(b instanceof IConveyorBelt) { - supplyConveyor((IConveyorBelt) b, items, x, y, z); + supplyConveyor((IConveyorBelt) b, stacks, x, y, z); + } + + items.removeIf(i -> i.isDead || i.getEntityItem().stackSize <= 0); + + /* collect remaining items in internal buffer */ + outer: + for(EntityItem item : items) { + + ItemStack stack = item.getEntityItem(); + + /* adding items to existing stacks */ + for(int i = 5; i < 14; i++) { + + if(slots[i] != null && slots[i].stackSize < slots[i].getMaxStackSize() && stack.isItemEqual(slots[i]) && ItemStack.areItemStackTagsEqual(stack, slots[i])) { + int toAdd = Math.min(slots[i].getMaxStackSize() - slots[i].stackSize, stack.stackSize); + slots[i].stackSize += toAdd; + stack.stackSize -= toAdd; + + chuteTimer = 40; + + if(stack.stackSize <= 0) { + item.setDead(); + continue outer; + } + } + } + + /* add leftovers to empty slots */ + for(int i = 5; i < 14; i++) { + + if(slots[i] == null) { + + chuteTimer = 40; + + slots[i] = stack.copy(); + item.setDead(); + break; + } + } } } /** places all items into a connected container, if possible */ - protected void supplyContainer(IInventory inv, List items, ForgeDirection dir) { + protected void supplyContainer(IInventory inv, List items, ForgeDirection dir) { int side = dir.ordinal(); int[] access = null; @@ -352,40 +528,46 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements access = CraneInserter.masquerade(sided, dir.ordinal()); } - for(EntityItem item : items) { + for(ItemStack item : items) { - if(item.isDead) continue; + if(item.stackSize <= 0) continue; - ItemStack stack = CraneInserter.addToInventory(inv, access, item.getEntityItem(), side); - - if(stack == null || stack.stackSize == 0) { - item.setDead(); - } + CraneInserter.addToInventory(inv, access, item, side); + chuteTimer = 40; } } /** moves all items onto a connected conveyor belt */ - protected void supplyConveyor(IConveyorBelt belt, List items, int x, int y, int z) { + protected void supplyConveyor(IConveyorBelt belt, List items, int x, int y, int z) { Random rand = worldObj.rand; - for(EntityItem item : items) { + for(ItemStack item : items) { - if(item.isDead) continue; + if(item.stackSize <= 0) continue; Vec3 base = Vec3.createVectorHelper(x + rand.nextDouble(), y + 0.5, z + rand.nextDouble()); Vec3 vec = belt.getClosestSnappingPosition(worldObj, x, y, z, base); EntityMovingItem moving = new EntityMovingItem(worldObj); moving.setPosition(base.xCoord, vec.yCoord, base.zCoord); - moving.setItemStack(item.getEntityItem().copy()); + moving.setItemStack(item.copy()); worldObj.spawnEntityInWorld(moving); - item.setDead(); + item.stackSize = 0; + + chuteTimer = 40; } } - public int getPowerConsumption() { - return 10_000; + public long getPowerConsumption() { + return consumption; + } + + public int getFortuneLevel() { + EnumDrillType type = getInstalledDrill(); + + if(type != null) return type.fortune; + return 0; } public boolean shouldIgnoreBlock(Block block, int x, int y, int z) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineMixer.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineMixer.java new file mode 100644 index 000000000..abef70c10 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineMixer.java @@ -0,0 +1,236 @@ +package com.hbm.tileentity.machine; + +import com.hbm.inventory.container.ContainerMixer; +import com.hbm.inventory.fluid.Fluids; +import com.hbm.inventory.fluid.tank.FluidTank; +import com.hbm.inventory.gui.GUIMixer; +import com.hbm.inventory.recipes.MixerRecipes; +import com.hbm.inventory.recipes.MixerRecipes.MixerRecipe; +import com.hbm.lib.Library; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.tileentity.INBTPacketReceiver; +import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.util.fauxpointtwelve.DirPos; + +import api.hbm.energy.IEnergyUser; +import api.hbm.fluid.IFluidStandardTransceiver; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.GuiScreen; +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; + +public class TileEntityMachineMixer extends TileEntityMachineBase implements INBTPacketReceiver, IGUIProvider, IEnergyUser, IFluidStandardTransceiver { + + public long power; + public static final long maxPower = 100_000; + public int progress; + public int processTime; + + public float rotation; + public float prevRotation; + public boolean wasOn = false; + + public FluidTank[] tanks; + + public TileEntityMachineMixer() { + super(5); + this.tanks = new FluidTank[3]; + this.tanks[0] = new FluidTank(Fluids.NONE, 16_000); + this.tanks[1] = new FluidTank(Fluids.NONE, 16_000); + this.tanks[2] = new FluidTank(Fluids.NONE, 16_000); + } + + @Override + public String getName() { + return "container.machineMixer"; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + tanks[2].setType(2, slots); + + for(DirPos pos : getConPos()) { + this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + if(tanks[0].getTankType() != Fluids.NONE) this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + if(tanks[1].getTankType() != Fluids.NONE) this.trySubscribe(tanks[1].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + } + + this.wasOn = this.canProcess(); + + if(this.wasOn) { + this.progress++; + + if(this.progress >= this.processTime) { + this.process(); + this.progress = 0; + } + + } else { + this.progress = 0; + } + + for(DirPos pos : getConPos()) { + if(tanks[2].getFill() > 0) this.sendFluid(tanks[2].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + } + + NBTTagCompound data = new NBTTagCompound(); + data.setLong("power", power); + data.setInteger("processTime", processTime); + data.setInteger("progress", progress); + data.setBoolean("wasOn", wasOn); + for(int i = 0; i < 3; i++) { + tanks[i].writeToNBT(data, i + ""); + } + this.networkPack(data, 50); + + } else { + + this.prevRotation = this.rotation; + + if(this.wasOn) { + this.rotation += 20F; + } + } + } + + @Override + public void networkUnpack(NBTTagCompound nbt) { + this.power = nbt.getLong("powe"); + this.processTime = nbt.getInteger("processTime"); + this.progress = nbt.getInteger("progress"); + this.wasOn = nbt.getBoolean("wasOn"); + for(int i = 0; i < 3; i++) { + tanks[i].readFromNBT(nbt, i + ""); + } + } + + public boolean canProcess() { + + MixerRecipe recipe = MixerRecipes.getOutput(tanks[2].getTankType()); + + if(recipe == null) return false; + + if(recipe.input1 != null) { + + if(recipe.input1.type != tanks[0].getTankType()) { + tanks[0].setTankType(recipe.input1.type); + } + + if(tanks[0].getFill() < recipe.input1.fill) return false; + } + + if(recipe.input2 != null) { + + if(recipe.input2.type != tanks[1].getTankType()) { + tanks[1].setTankType(recipe.input2.type); + } + + if(tanks[1].getFill() < recipe.input2.fill) return false; + } + + /* simplest check would usually go first, but fluid checks also do the setup and we want that to happen even without power */ + if(this.power < getConsumption()) return false; + + if(recipe.output + tanks[2].getFill() > tanks[2].getMaxFill()) return false; + + if(recipe.solidInput != null) { + + if(slots[1] == null) return false; + + if(!recipe.solidInput.matchesRecipe(slots[1], true) || recipe.solidInput.stacksize > slots[1].stackSize) return false; + } + + this.processTime = recipe.processTime; + return true; + } + + protected void process() { + + MixerRecipe recipe = MixerRecipes.getOutput(tanks[2].getTankType()); + + if(recipe.input1 != null) tanks[0].setFill(tanks[0].getFill() - recipe.input1.fill); + if(recipe.input2 != null) tanks[1].setFill(tanks[1].getFill() - recipe.input2.fill); + if(recipe.solidInput != null) this.decrStackSize(1, recipe.solidInput.stacksize); + tanks[2].setFill(tanks[2].getFill() + recipe.output); + } + + public int getConsumption() { + return 50; + } + + protected DirPos[] getConPos() { + return new DirPos[] { + new DirPos(xCoord, yCoord - 1, zCoord, Library.NEG_Y), + new DirPos(xCoord + 1, yCoord, zCoord, Library.POS_X), + new DirPos(xCoord - 1, yCoord, zCoord, Library.POS_X), + new DirPos(xCoord, yCoord, zCoord + 1, Library.POS_Z), + new DirPos(xCoord, yCoord, zCoord - 1, Library.POS_Z), + }; + } + + @Override + public long getPower() { + return power; + } + + @Override + public void setPower(long power) { + this.power = power; + } + + @Override + public long getMaxPower() { + return maxPower; + } + + @Override + public FluidTank[] getAllTanks() { + return tanks; + } + + @Override + public FluidTank[] getSendingTanks() { + return new FluidTank[] {tanks[2]}; + } + + @Override + public FluidTank[] getReceivingTanks() { + return new FluidTank[] {tanks[0], tanks[1]}; + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerMixer(player.inventory, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIMixer(player.inventory, this); + } + + AxisAlignedBB aabb; + + @Override + public AxisAlignedBB getRenderBoundingBox() { + + if(aabb != null) + return aabb; + + aabb = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 3, zCoord + 1); + return aabb; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } +} diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java index a86bd60df..a6c516f7f 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKBase.java @@ -22,6 +22,7 @@ import com.hbm.tileentity.INBTPacketReceiver; import com.hbm.tileentity.IOverpressurable; import com.hbm.tileentity.TileEntityLoadedBase; import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType; +import com.hbm.util.Compat; import com.hbm.util.I18nUtil; import api.hbm.fluid.IFluidConductor; @@ -167,7 +168,7 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase implements heatCache[index] = null; if(heatCache[index] == null) { - TileEntity te = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); + TileEntity te = Compat.getTileStandard(worldObj, xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); if(te instanceof TileEntityRBMKBase) { TileEntityRBMKBase base = (TileEntityRBMKBase) te; @@ -535,7 +536,7 @@ public abstract class TileEntityRBMKBase extends TileEntityLoadedBase implements private void getFF(int x, int y, int z) { - TileEntity te = worldObj.getTileEntity(x, y, z); + TileEntity te = Compat.getTileStandard(worldObj, x, y, z); if(te instanceof TileEntityRBMKBase) { diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKInlet.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKInlet.java index aa0935e94..ddd96c7de 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKInlet.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKInlet.java @@ -26,12 +26,12 @@ public class TileEntityRBMKInlet extends TileEntityLoadedBase implements IFluidA if(!worldObj.isRemote) { + this.subscribeToAllAround(water.getTankType(), this); + for(int i = 2; i < 6; i++) { ForgeDirection dir = ForgeDirection.getOrientation(i); Block b = worldObj.getBlock(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); - this.trySubscribe(water.getTankType(), worldObj, xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ, dir); - if(b instanceof RBMKBase) { int[] pos = ((RBMKBase)b).findCore(worldObj, xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ); diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKRod.java b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKRod.java index 953a7564f..4997dc3a5 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKRod.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/TileEntityRBMKRod.java @@ -8,6 +8,7 @@ import com.hbm.handler.radiation.ChunkRadiationManager; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemRBMKRod; import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType; +import com.hbm.util.Compat; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -152,7 +153,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM protected double runInteraction(int x, int y, int z, double flux) { - TileEntity te = worldObj.getTileEntity(x, y, z); + TileEntity te = Compat.getTileStandard(worldObj, x, y, z); if(te instanceof TileEntityRBMKBase) { TileEntityRBMKBase base = (TileEntityRBMKBase) te; diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java b/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java index 2d0232d60..1d3624297 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityCraneExtractor.java @@ -183,6 +183,11 @@ public class TileEntityCraneExtractor extends TileEntityMachineBase implements I this.matcher.nextMode(worldObj, slots[i], i); } + @Override + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + return new int[] { 9, 10, 11, 12, 13, 14, 15, 16, 17 }; + } + @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { return i > 8 && i < 18; diff --git a/src/main/java/com/hbm/util/ArmorRegistry.java b/src/main/java/com/hbm/util/ArmorRegistry.java index 5dd71a79c..06e69f8a9 100644 --- a/src/main/java/com/hbm/util/ArmorRegistry.java +++ b/src/main/java/com/hbm/util/ArmorRegistry.java @@ -9,7 +9,6 @@ import com.hbm.handler.ArmorModHandler; import api.hbm.item.IGasMask; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/hbm/util/Compat.java b/src/main/java/com/hbm/util/Compat.java index 75b761ad4..ef36e6998 100644 --- a/src/main/java/com/hbm/util/Compat.java +++ b/src/main/java/com/hbm/util/Compat.java @@ -21,6 +21,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public class Compat { @@ -194,4 +196,12 @@ public class Compat { } MainRegistry.logger.info("#######################################################"); } + + /** A standard implementation of safely grabbing a tile entity without loading chunks, might have more fluff added to it later on. */ + public static TileEntity getTileStandard(World world, int x, int y, int z) { + + if(!world.getChunkProvider().chunkExists(x >> 4, z >> 4)) return null; + + return world.getTileEntity(x, y, z); + } } diff --git a/src/main/java/com/hbm/util/InventoryUtil.java b/src/main/java/com/hbm/util/InventoryUtil.java index 33ad1422a..4db264b7a 100644 --- a/src/main/java/com/hbm/util/InventoryUtil.java +++ b/src/main/java/com/hbm/util/InventoryUtil.java @@ -394,6 +394,26 @@ public class InventoryUtil { return stacks; } + /* in emergency situations with mixed types where AStacks coexist with NBT dependent ItemStacks, such as for fluid icons */ + if(o instanceof Object[]) { + Object[] ingredients = (Object[]) o; + ItemStack[][] stacks = new ItemStack[ingredients.length][0]; + + for(int i = 0; i < ingredients.length; i++) { + Object ingredient = ingredients[i]; + + if(ingredient instanceof AStack) { + stacks[i] = ((AStack) ingredient).extractForNEI().toArray(new ItemStack[0]); + } + if(ingredient instanceof ItemStack) { + stacks[i] = new ItemStack[1]; + stacks[i][0] = ((ItemStack) ingredient).copy(); + } + } + + return stacks; + } + return new ItemStack[0][0]; } diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 072065e57..f8e0af9ff 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -3223,6 +3223,9 @@ tile.block_cap_sparkle.name=S~Cola Kronkorkenblock tile.block_cap_star.name=Sunset Sarsaparilla Kronkorkenblock tile.block_cap_sunset.name=Sunset Sarsaparilla Sternkronkorkenblock tile.block_cobalt.name=Kobaltblock +tile.block_coke.coal.name=Kohlekoksblock +tile.block_coke.lignite.name=Braunkohlekoksblock +tile.block_coke.petroleum.name=Petroleumkoksblock tile.block_coltan.name=Coltanblock tile.block_combine_steel.name=CMB-Stahlblock tile.block_copper.name=Kupferblock diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 2b8bd9212..6aaa2fa72 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -3794,6 +3794,9 @@ tile.block_cap_sparkle.name=Block of S~Cola Bottle Caps tile.block_cap_star.name=Block of Sunset Sarsaparilla Star Caps tile.block_cap_sunset.name=Block of Sunset Sarsaparilla Bottle Caps tile.block_cobalt.name=Block of Cobalt +tile.block_coke.coal.name=Block of Coal Coke +tile.block_coke.lignite.name=Block of Lignite Coke +tile.block_coke.petroleum.name=Block of Petroleum Coke tile.block_coltan.name=Block of Coltan tile.block_combine_steel.name=Block of CMB Steel tile.block_copper.name=Block of Copper diff --git a/src/main/resources/assets/hbm/models/machines/mixer.obj b/src/main/resources/assets/hbm/models/machines/mixer.obj new file mode 100644 index 000000000..b36f2b118 --- /dev/null +++ b/src/main/resources/assets/hbm/models/machines/mixer.obj @@ -0,0 +1,1454 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +o Main +v -0.156250 3.000000 -0.377221 +v 0.156250 2.500000 -0.377221 +v -0.156250 2.500000 -0.377221 +v 0.156250 3.000000 -0.377221 +v 0.377221 2.500000 -0.156250 +v 0.377221 3.000000 -0.156250 +v 0.377221 2.500000 0.156250 +v 0.377221 3.000000 0.156250 +v 0.156250 2.500000 0.377221 +v 0.156250 3.000000 0.377221 +v -0.156250 2.500000 0.377221 +v -0.156250 3.000000 0.377221 +v -0.377221 2.500000 0.156250 +v -0.377221 3.000000 0.156250 +v -0.377221 2.500000 -0.156250 +v -0.377221 3.000000 -0.156250 +v -0.187500 0.687500 0.500000 +v -0.187500 0.312500 0.437500 +v -0.187500 0.312500 0.500000 +v -0.187500 0.687500 0.437500 +v 0.187500 0.687500 0.437500 +v 0.000000 0.500000 0.125000 +v 0.187500 0.312500 0.500000 +v 0.187500 0.312500 0.437500 +v 0.187500 0.687500 0.500000 +v -0.500000 0.687500 -0.187500 +v -0.437500 0.312500 -0.187500 +v -0.500000 0.312500 -0.187500 +v -0.437500 0.687500 -0.187500 +v -0.437500 0.687500 0.187500 +v -0.125000 0.500000 0.000000 +v -0.500000 0.312500 0.187500 +v -0.437500 0.312500 0.187500 +v -0.500000 0.687500 0.187500 +v 0.187500 0.687500 -0.500000 +v 0.187500 0.312500 -0.437500 +v 0.187500 0.312500 -0.500000 +v 0.187500 0.687500 -0.437500 +v -0.187500 0.687500 -0.437500 +v 0.000000 0.500000 -0.125000 +v -0.187500 0.312500 -0.500000 +v -0.187500 0.312500 -0.437500 +v -0.187500 0.687500 -0.500000 +v 0.500000 0.687500 0.187500 +v 0.437500 0.312500 0.187500 +v 0.500000 0.312500 0.187500 +v 0.437500 0.687500 0.187500 +v 0.437500 0.687500 -0.187500 +v 0.125000 0.500000 0.000000 +v 0.500000 0.312500 -0.187500 +v 0.437500 0.312500 -0.187500 +v 0.500000 0.687500 -0.187500 +v 0.062500 1.075517 0.453905 +v -0.062500 0.987129 0.365517 +v -0.062500 1.075517 0.453905 +v -0.276765 1.075517 0.365154 +v -0.302653 0.987129 0.214265 +v -0.365153 1.075517 0.276765 +v -0.453905 1.075517 -0.062500 +v -0.365517 0.987129 0.062500 +v -0.365517 0.987129 -0.062500 +v -0.365154 1.075517 -0.276765 +v -0.214265 0.987129 -0.302653 +v -0.276765 1.075517 -0.365153 +v 0.062500 1.075517 -0.453905 +v -0.062500 0.987129 -0.365517 +v 0.062500 0.987129 -0.365517 +v 0.276765 1.075518 -0.365154 +v 0.302653 0.987129 -0.214265 +v 0.365153 1.075518 -0.276765 +v 0.453905 1.075518 0.062500 +v 0.365516 0.987129 -0.062500 +v 0.365516 0.987129 0.062500 +v 0.365153 1.075518 0.276765 +v 0.214265 0.987129 0.302653 +v 0.276765 1.075518 0.365153 +v -0.191298 1.136516 0.461833 +v -0.415650 1.086527 0.172168 +v -0.461833 1.136516 0.191298 +v 0.191298 1.136516 0.461833 +v -0.172168 1.086527 0.415650 +v 0.355806 2.656250 -0.400000 +v 0.400000 0.218750 -0.444194 +v 0.355806 0.218750 -0.400000 +v 0.400000 2.656250 -0.444194 +v 0.444194 0.218750 -0.400000 +v 0.444194 2.656250 -0.400000 +v 0.400000 0.218750 -0.355806 +v 0.400000 2.656250 -0.355806 +v 0.223223 2.656250 -0.267417 +v 0.400000 2.718750 -0.355806 +v 0.355806 2.718750 -0.400000 +v 0.267417 2.656250 -0.223223 +v 0.223223 2.718750 -0.267417 +v 0.267417 2.718750 -0.223223 +v 0.400000 2.656250 0.355806 +v 0.444194 0.218750 0.400000 +v 0.400000 0.218750 0.355806 +v 0.444194 2.656250 0.400000 +v 0.400000 0.218750 0.444194 +v 0.399999 2.656250 0.444194 +v 0.355806 0.218750 0.400000 +v 0.355805 2.656250 0.400000 +v 0.267417 2.656250 0.223223 +v 0.355805 2.718750 0.400000 +v 0.400000 2.718750 0.355806 +v 0.223223 2.718750 0.267418 +v 0.223223 2.656250 0.267418 +v 0.267417 2.718750 0.223223 +v -0.187500 0.500000 -0.452665 +v 0.187500 0.250000 -0.452665 +v -0.187500 0.250000 -0.452665 +v 0.187500 0.500000 -0.452665 +v 0.452665 0.250000 -0.187500 +v 0.452665 0.500000 -0.187500 +v 0.452665 0.250000 0.187500 +v 0.452665 0.500000 0.187500 +v 0.187500 0.250000 0.452665 +v 0.187500 0.500000 0.452665 +v -0.187500 0.250000 0.452665 +v -0.187500 0.500000 0.452665 +v -0.452665 0.250000 0.187500 +v 0.156250 0.625000 0.377221 +v -0.452665 0.500000 0.187500 +v -0.452665 0.250000 -0.187500 +v -0.452665 0.500000 -0.187500 +v -0.156250 0.625000 -0.377221 +v 0.156250 1.000000 -0.377221 +v 0.156250 0.625000 -0.377221 +v -0.377221 0.625000 -0.156250 +v 0.377221 0.625000 -0.156250 +v -0.156250 0.625000 0.377221 +v 0.377221 0.625000 0.156250 +v -0.377221 0.625000 0.156250 +v -0.156250 1.000000 0.377221 +v 0.156250 1.000000 0.377221 +v 0.377221 1.000000 -0.156250 +v -0.156250 1.000000 -0.377221 +v -0.377221 1.000000 0.156250 +v -0.377221 1.000000 -0.156250 +v 0.377221 1.000000 0.156250 +v -0.500000 0.250000 0.500000 +v -0.500000 0.187500 -0.500000 +v -0.500000 0.187500 0.500000 +v -0.500000 0.250000 -0.500000 +v 0.500000 0.187500 -0.500000 +v 0.500000 0.250000 -0.500000 +v 0.500000 0.187500 0.500000 +v 0.500000 0.250000 0.500000 +v 0.500000 0.000000 -0.500000 +v -0.500000 -0.000000 0.500000 +v -0.500000 0.000000 -0.500000 +v -0.500000 0.062500 0.500000 +v 0.437500 0.062500 0.437500 +v -0.437500 0.062500 0.437500 +v -0.500000 0.062500 -0.500000 +v -0.437500 0.062500 -0.437500 +v -0.437500 0.187500 0.437500 +v 0.500000 0.062500 0.500000 +v 0.437500 0.062500 -0.437500 +v 0.500000 0.062500 -0.500000 +v 0.500000 -0.000000 0.500000 +v 0.437500 0.187500 0.437500 +v 0.437500 0.187500 -0.437500 +v -0.437500 0.187500 -0.437500 +v -0.210427 2.414505 -0.508016 +v 0.191297 2.464493 -0.461833 +v 0.210427 2.414505 -0.508016 +v 0.062500 2.511245 -0.365517 +v -0.062500 2.422857 -0.453905 +v 0.062500 2.422857 -0.453905 +v 0.302653 2.511245 -0.214265 +v 0.276765 2.422857 -0.365154 +v 0.365153 2.422857 -0.276765 +v 0.365517 2.511245 0.062500 +v 0.453905 2.422857 -0.062500 +v 0.453905 2.422857 0.062500 +v 0.214265 2.511245 0.302653 +v 0.365154 2.422857 0.276765 +v 0.276765 2.422857 0.365153 +v -0.062500 2.422857 0.453905 +v 0.062500 2.511245 0.365517 +v 0.062500 2.422857 0.453905 +v -0.365153 2.422857 0.276765 +v -0.214265 2.511245 0.302653 +v -0.276765 2.422857 0.365154 +v -0.453905 2.422857 -0.062500 +v -0.365516 2.511245 0.062500 +v -0.453905 2.422857 0.062500 +v -0.276765 2.422857 -0.365153 +v -0.302653 2.511245 -0.214265 +v -0.365153 2.422857 -0.276765 +v 0.062500 0.987129 0.365517 +v -0.214265 0.987129 0.302654 +v -0.453905 1.075517 0.062500 +v -0.302654 0.987129 -0.214265 +v -0.062500 1.075517 -0.453905 +v 0.214265 0.987129 -0.302653 +v 0.453905 1.075518 -0.062500 +v 0.302653 0.987129 0.214265 +v 0.172168 1.086527 0.415650 +v -0.191298 2.464493 -0.461833 +v -0.062500 2.511245 -0.365517 +v 0.214265 2.511245 -0.302654 +v 0.365517 2.511245 -0.062500 +v 0.302654 2.511245 0.214265 +v -0.062500 2.511245 0.365517 +v -0.302653 2.511245 0.214265 +v -0.365516 2.511245 -0.062500 +v -0.214265 2.511245 -0.302653 +v 0.210427 1.086527 -0.508016 +v 0.461833 1.136516 -0.191298 +v 0.508016 1.086527 -0.210427 +v 0.191297 1.136516 -0.461833 +v 0.415650 1.086527 -0.172168 +v 0.172168 1.086527 -0.415650 +v 0.461833 1.036539 -0.191298 +v 0.191297 1.036539 -0.461833 +v -0.210427 1.086527 -0.508016 +v -0.191298 1.136516 -0.461833 +v -0.172168 1.086527 -0.415650 +v -0.191298 1.036539 -0.461833 +v -0.508016 1.086527 -0.210427 +v -0.461833 1.136516 -0.191297 +v -0.415650 1.086527 -0.172168 +v -0.461833 1.036539 -0.191297 +v -0.508016 1.086527 0.210427 +v -0.461833 1.036539 0.191298 +v -0.191298 1.036539 0.461833 +v 0.210427 1.086527 0.508016 +v -0.210427 1.086527 0.508016 +v 0.508016 1.086527 0.210428 +v 0.461833 1.136516 0.191298 +v 0.415650 1.086527 0.172168 +v 0.191298 1.036539 0.461833 +v 0.461833 1.036539 0.191298 +v 0.000000 2.500000 -0.326641 +v 0.230970 1.000000 -0.230970 +v 0.000000 1.000000 -0.326641 +v 0.230970 2.500000 -0.230970 +v 0.326641 1.000000 0.000000 +v 0.326641 2.500000 0.000000 +v 0.230970 1.000000 0.230970 +v 0.230970 2.500000 0.230970 +v 0.000000 1.000000 0.326641 +v 0.000000 2.500000 0.326641 +v -0.230970 1.000000 0.230970 +v -0.230970 2.500000 0.230970 +v -0.326641 1.000000 0.000000 +v -0.326641 2.500000 0.000000 +v -0.230970 1.000000 -0.230970 +v -0.230970 2.500000 -0.230970 +v 0.461833 2.464493 -0.191298 +v 0.508016 2.414505 -0.210427 +v 0.172168 2.414505 -0.415650 +v 0.415650 2.414505 -0.172168 +v 0.461833 2.364516 -0.191298 +v -0.172168 2.414505 -0.415650 +v 0.191297 2.364516 -0.461833 +v -0.191298 2.364516 -0.461833 +v -0.508016 2.414505 -0.210427 +v -0.461833 2.464493 -0.191297 +v -0.415650 2.414505 -0.172168 +v -0.461833 2.364516 -0.191297 +v -0.508016 2.414505 0.210427 +v -0.415650 2.414505 0.172168 +v -0.461833 2.364516 0.191298 +v -0.210427 2.414505 0.508016 +v -0.461833 2.464493 0.191298 +v -0.191298 2.464493 0.461833 +v -0.172168 2.414505 0.415650 +v -0.191298 2.364516 0.461833 +v 0.191298 2.464493 0.461833 +v 0.172168 2.414505 0.415650 +v 0.191298 2.364516 0.461833 +v 0.508016 2.414505 0.210428 +v 0.210427 2.414505 0.508016 +v 0.461833 2.464493 0.191298 +v 0.415650 2.414505 0.172168 +v 0.461833 2.364516 0.191298 +v -0.355806 2.656250 0.400000 +v -0.400000 0.218750 0.444194 +v -0.355806 0.218750 0.400000 +v -0.400000 2.656250 0.444194 +v -0.444194 0.218750 0.400000 +v -0.444194 2.656250 0.400000 +v -0.400000 0.218750 0.355806 +v -0.400000 2.656250 0.355806 +v -0.223223 2.656250 0.267417 +v -0.400000 2.718750 0.355806 +v -0.355806 2.718750 0.400000 +v -0.267417 2.656250 0.223223 +v -0.223223 2.718750 0.267417 +v -0.267417 2.718750 0.223223 +v -0.400000 2.656250 -0.355806 +v -0.444194 0.218750 -0.400000 +v -0.400000 0.218750 -0.355806 +v -0.444194 2.656250 -0.400000 +v -0.400000 0.218750 -0.444194 +v -0.399999 2.656250 -0.444194 +v -0.355806 0.218750 -0.400000 +v -0.355805 2.656250 -0.400000 +v -0.267417 2.656250 -0.223223 +v -0.355805 2.718750 -0.400000 +v -0.400000 2.718750 -0.355806 +v -0.223223 2.718750 -0.267418 +v -0.223223 2.656250 -0.267418 +v -0.267417 2.718750 -0.223223 +vt 0.740741 0.236364 +vt 0.666667 0.327273 +vt 0.666667 0.236364 +vt 0.740741 0.327273 +vt 0.666667 0.418182 +vt 0.740741 0.418182 +vt 0.666667 0.509091 +vt 0.740741 0.509091 +vt 0.666667 0.600000 +vt 0.740741 0.600000 +vt 0.666667 0.690909 +vt 0.740741 0.690909 +vt 0.666667 0.781818 +vt 0.777778 1.000000 +vt 0.740741 0.818182 +vt 0.870370 0.927273 +vt 0.740741 0.781818 +vt 0.666667 0.872727 +vt 0.740741 0.145455 +vt 0.666667 0.145455 +vt 0.962963 1.000000 +vt 0.870370 0.818182 +vt 0.907407 0.745455 +vt 0.157407 0.872727 +vt 0.148148 0.763636 +vt 0.157407 0.763636 +vt 0.148148 0.636364 +vt 0.148148 0.527273 +vt 0.194444 0.581818 +vt 0.222222 0.872727 +vt 0.212963 0.763636 +vt 0.222222 0.763636 +vt 0.212963 0.872727 +vt 0.212963 0.745455 +vt 0.157407 0.745455 +vt 0.157407 0.890909 +vt 0.212963 0.890909 +vt 0.148148 0.527273 +vt 0.148148 0.418182 +vt 0.194444 0.472727 +vt 0.148148 0.745455 +vt 0.148148 0.636364 +vt 0.194444 0.690909 +vt 0.157407 0.872727 +vt 0.148148 0.763636 +vt 0.157407 0.763636 +vt 0.148148 0.636364 +vt 0.148148 0.527273 +vt 0.194444 0.581818 +vt 0.222222 0.872727 +vt 0.212963 0.763636 +vt 0.222222 0.763636 +vt 0.212963 0.872727 +vt 0.212963 0.745455 +vt 0.157407 0.745455 +vt 0.212963 0.890909 +vt 0.148148 0.527273 +vt 0.148148 0.418182 +vt 0.194444 0.472727 +vt 0.148148 0.745455 +vt 0.148148 0.636364 +vt 0.194444 0.690909 +vt 0.157407 0.872727 +vt 0.148148 0.763636 +vt 0.157407 0.763636 +vt 0.148148 0.636364 +vt 0.148148 0.527273 +vt 0.194444 0.581818 +vt 0.222222 0.872727 +vt 0.212963 0.763636 +vt 0.222222 0.763636 +vt 0.212963 0.872727 +vt 0.157407 0.745455 +vt 0.157407 0.890909 +vt 0.212963 0.890909 +vt 0.148148 0.527273 +vt 0.148148 0.418182 +vt 0.194444 0.472727 +vt 0.148148 0.745455 +vt 0.148148 0.636364 +vt 0.194444 0.690909 +vt 0.157407 0.872727 +vt 0.148148 0.763636 +vt 0.157407 0.763636 +vt 0.148148 0.636364 +vt 0.148148 0.527273 +vt 0.194444 0.581818 +vt 0.222222 0.872727 +vt 0.212963 0.763636 +vt 0.222222 0.763636 +vt 0.212963 0.872727 +vt 0.157407 0.745455 +vt 0.157407 0.890909 +vt 0.212963 0.890909 +vt 0.148148 0.527273 +vt 0.148148 0.418182 +vt 0.194444 0.472727 +vt 0.148148 0.745455 +vt 0.148148 0.636364 +vt 0.194444 0.690909 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.222222 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.890909 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.222222 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.890909 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.222222 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.890909 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.037037 0.054545 +vt 0.398148 0.036364 +vt 0.398148 0.054545 +vt 0.037037 0.036364 +vt 0.398148 0.018182 +vt 0.037037 0.018182 +vt 0.398148 -0.000000 +vt 0.037037 0.072727 +vt 0.398148 0.072727 +vt 0.027778 0.072727 +vt 0.000000 0.054545 +vt 0.027778 0.054545 +vt 0.027778 0.018182 +vt 0.032371 0.009804 +vt 0.032371 0.044742 +vt 0.027778 0.036364 +vt 0.000000 0.000000 +vt 0.027778 0.000000 +vt 0.000000 0.036364 +vt 0.000000 0.018182 +vt 0.037037 0.054545 +vt 0.398148 0.036364 +vt 0.398148 0.054545 +vt 0.037037 0.036364 +vt 0.398148 0.018182 +vt 0.037037 0.018182 +vt 0.398148 -0.000000 +vt 0.037037 0.072727 +vt 0.398148 0.072727 +vt 0.027778 0.072727 +vt 0.000000 0.054545 +vt 0.027778 0.054545 +vt 0.027778 0.018182 +vt 0.032371 0.009804 +vt 0.032371 0.044742 +vt 0.027778 0.036364 +vt 0.027778 0.000000 +vt 0.000000 0.018182 +vt 0.000000 0.000000 +vt 0.000000 0.036364 +vt 0.351852 0.927273 +vt 0.407407 1.000000 +vt 0.351852 1.000000 +vt 0.407407 0.927273 +vt 0.462963 1.000000 +vt 0.462963 0.927273 +vt 0.518519 1.000000 +vt 0.518519 0.927273 +vt 0.574074 1.000000 +vt 0.574074 0.927273 +vt 0.629630 1.000000 +vt 0.629630 0.927273 +vt 0.685185 1.000000 +vt 0.569408 0.872727 +vt 0.685185 0.927273 +vt 0.740741 1.000000 +vt 0.296296 0.927273 +vt 0.296296 1.000000 +vt 0.620370 0.763636 +vt 0.574074 0.872727 +vt 0.574074 0.763636 +vt 0.736075 0.872727 +vt 0.740741 0.927273 +vt 0.458297 0.872727 +vt 0.624963 0.872727 +vt 0.347186 0.872727 +vt 0.402741 0.872727 +vt 0.513852 0.872727 +vt 0.680519 0.872727 +vt 0.333333 0.509091 +vt 0.388889 0.509091 +vt 0.425926 0.690909 +vt 0.666667 0.763636 +vt 0.620370 0.872727 +vt 0.388889 0.763636 +vt 0.342593 0.872727 +vt 0.342593 0.763636 +vt 0.481481 0.763636 +vt 0.435185 0.872727 +vt 0.435185 0.763636 +vt 0.527778 0.872727 +vt 0.527778 0.763636 +vt 0.296296 0.872727 +vt 0.296296 0.763636 +vt 0.388889 0.872727 +vt 0.481481 0.872727 +vt 0.296296 1.000000 +vt 0.148148 0.981818 +vt 0.296296 0.981818 +vt 0.296296 1.000000 +vt 0.148148 0.981818 +vt 0.296296 0.981818 +vt 0.296296 1.000000 +vt 0.148148 0.981818 +vt 0.296296 0.981818 +vt 0.296296 1.000000 +vt 0.148148 0.981818 +vt 0.296296 0.981818 +vt 0.000000 1.000000 +vt 0.148148 0.709091 +vt 0.148148 1.000000 +vt 0.148148 0.709091 +vt 0.000000 0.418182 +vt 0.148148 0.418182 +vt 0.148148 0.909091 +vt 0.287037 0.927273 +vt 0.157407 0.927273 +vt 0.148148 0.909091 +vt 0.287037 0.927273 +vt 0.157407 0.927273 +vt 0.157407 0.963636 +vt 0.148148 0.909091 +vt 0.287037 0.927273 +vt 0.157407 0.927273 +vt 0.296296 0.909091 +vt 0.148148 0.890909 +vt 0.296296 0.890909 +vt 0.296296 0.909091 +vt 0.148148 0.890909 +vt 0.296296 0.890909 +vt 0.296296 0.909091 +vt 0.148148 0.890909 +vt 0.296296 0.890909 +vt 0.296296 0.909091 +vt 0.148148 0.890909 +vt 0.296296 0.890909 +vt 0.148148 0.909091 +vt 0.287037 0.927273 +vt 0.157407 0.927273 +vt 0.287037 0.963636 +vt 0.157407 0.963636 +vt 0.287037 0.963636 +vt 0.287037 0.963636 +vt 0.287037 0.963636 +vt 0.157407 0.963636 +vt 0.157407 0.963636 +vt 0.222222 0.381818 +vt 0.148148 0.363636 +vt 0.148148 0.381818 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.222222 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.222222 0.854545 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.833333 0.745455 +vt 0.870370 0.818182 +vt 0.833333 1.000000 +vt 0.740741 0.927273 +vt 0.777778 0.745455 +vt 0.740741 0.872727 +vt 0.962963 0.745455 +vt 1.000000 0.818182 +vt 1.000000 0.927273 +vt 0.907407 1.000000 +vt 0.870370 0.927273 +vt 0.148148 0.872727 +vt 0.148148 0.872727 +vt 0.157407 0.890909 +vt 0.148148 0.872727 +vt 0.212963 0.745455 +vt 0.148148 0.872727 +vt 0.212963 0.745455 +vt 0.240741 0.890909 +vt 0.240741 0.890909 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.240741 0.854545 +vt 0.240741 0.890909 +vt 0.037037 0.000000 +vt 0.000000 0.072727 +vt 0.037037 0.000000 +vt 0.000000 0.072727 +vt 0.523112 0.872727 +vt 0.689778 0.872727 +vt 0.412001 0.872727 +vt 0.578667 0.872727 +vt 0.300889 0.872727 +vt 0.356445 0.872727 +vt 0.467556 0.872727 +vt 0.634223 0.872727 +vt 0.388889 0.763636 +vt 0.333333 0.763636 +vt 0.296296 0.690909 +vt 0.296296 0.581818 +vt 0.425926 0.581818 +vt 0.666667 0.872727 +vt 0.148148 1.000000 +vt 0.148148 1.000000 +vt 0.148148 1.000000 +vt 0.148148 1.000000 +vt 0.000000 0.709091 +vt 0.000000 0.709091 +vt 0.222222 0.363636 +vt 0.240741 0.890909 +vt 0.240741 0.890909 +vt 0.240741 0.890909 +vt 0.240741 0.890909 +vt 0.222222 0.890909 +vt 0.222222 0.890909 +vt 0.222222 0.890909 +vt 0.222222 0.890909 +vt 0.037037 0.054545 +vt 0.398148 0.036364 +vt 0.398148 0.054545 +vt 0.037037 0.036364 +vt 0.398148 0.018182 +vt 0.037037 0.018182 +vt 0.398148 -0.000000 +vt 0.037037 0.072727 +vt 0.398148 0.072727 +vt 0.027778 0.072727 +vt 0.000000 0.054545 +vt 0.027778 0.054545 +vt 0.027778 0.018182 +vt 0.032371 0.009804 +vt 0.032371 0.044742 +vt 0.027778 0.036364 +vt 0.000000 0.000000 +vt 0.027778 0.000000 +vt 0.000000 0.036364 +vt 0.000000 0.018182 +vt 0.037037 0.054545 +vt 0.398148 0.036364 +vt 0.398148 0.054545 +vt 0.037037 0.036364 +vt 0.398148 0.018182 +vt 0.037037 0.018182 +vt 0.398148 -0.000000 +vt 0.037037 0.072727 +vt 0.398148 0.072727 +vt 0.027778 0.072727 +vt 0.000000 0.054545 +vt 0.027778 0.054545 +vt 0.027778 0.018182 +vt 0.032371 0.009804 +vt 0.032371 0.044742 +vt 0.027778 0.036364 +vt 0.027778 0.000000 +vt 0.000000 0.018182 +vt 0.000000 0.000000 +vt 0.000000 0.036364 +vt 0.037037 0.000000 +vt 0.000000 0.072727 +vt 0.037037 0.000000 +vt 0.000000 0.072727 +vt 0.148148 0.400000 +vt 0.083333 0.418182 +vt 0.074074 0.400000 +vt 0.222222 0.400000 +vt 0.157407 0.418182 +vt 0.138889 0.418182 +vt 0.212963 0.418182 +vt 0.148148 0.381818 +vt 0.222222 0.400000 +vt 0.222222 0.381818 +vt 0.148148 0.400000 +vt 0.212963 0.418182 +vt 0.157407 0.345455 +vt 0.222222 0.363636 +vt 0.212963 0.345455 +vt 0.148148 0.363636 +vt 0.074074 0.381818 +vt 0.074074 0.400000 +vt 0.138889 0.418182 +vt 0.083333 0.345455 +vt 0.138889 0.345455 +vt 0.074074 0.363636 +vt 0.000000 0.381818 +vt 0.000000 0.400000 +vt 0.064815 0.418182 +vt 0.009259 0.345455 +vt 0.064815 0.345455 +vt 0.000000 0.363636 +vt 0.074074 0.381818 +vt 0.009259 0.418182 +vt 0.064815 0.345455 +vt 0.074074 0.363636 +vt 0.138889 0.345455 +vt 0.083333 0.345455 +vt 0.148148 0.363636 +vt 0.222222 0.381818 +vt 0.148148 0.381818 +vt 0.212963 0.345455 +vt 0.157407 0.345455 +vt 0.296296 0.381818 +vt 0.296296 0.400000 +vt 0.231481 0.418182 +vt 0.287037 0.345455 +vt 0.222222 0.363636 +vt 0.231481 0.345455 +vt 0.296296 0.363636 +vt 0.287037 0.418182 +vt 0.231481 0.345455 +vt 0.518518 0.509091 +vt 0.481481 0.072727 +vt 0.518518 0.072727 +vt 0.481481 0.509091 +vt 0.444444 0.072727 +vt 0.444444 0.509091 +vt 0.407407 0.072727 +vt 0.407407 0.509091 +vt 0.370370 0.072727 +vt 0.370370 0.509091 +vt 0.333333 0.072727 +vt 0.333333 0.509091 +vt 0.296296 0.072727 +vt 0.592593 0.509091 +vt 0.555556 0.072727 +vt 0.592593 0.072727 +vt 0.555556 0.509091 +vt 0.074074 0.363636 +vt 0.074074 0.381818 +vt 0.138889 0.345455 +vt 0.083333 0.345455 +vt 0.138889 0.418182 +vt 0.074074 0.400000 +vt 0.083333 0.418182 +vt 0.157407 0.345455 +vt 0.212963 0.418182 +vt 0.148148 0.400000 +vt 0.157407 0.418182 +vt 0.222222 0.400000 +vt 0.296296 0.381818 +vt 0.296296 0.363636 +vt 0.231481 0.345455 +vt 0.287037 0.418182 +vt 0.231481 0.418182 +vt 0.296296 0.400000 +vt 0.222222 0.381818 +vt 0.231481 0.345455 +vt 0.287037 0.345455 +vt 0.231481 0.418182 +vt 0.222222 0.400000 +vt 0.148148 0.381818 +vt 0.222222 0.363636 +vt 0.148148 0.363636 +vt 0.212963 0.345455 +vt 0.157407 0.418182 +vt 0.212963 0.418182 +vt 0.148148 0.400000 +vt 0.074074 0.363636 +vt 0.138889 0.345455 +vt 0.083333 0.418182 +vt 0.138889 0.418182 +vt 0.074074 0.400000 +vt 0.000000 0.381818 +vt 0.074074 0.381818 +vt -0.000000 0.363636 +vt 0.064815 0.345455 +vt 0.009259 0.418182 +vt 0.064815 0.418182 +vt 0.000000 0.400000 +vt 0.009259 0.345455 +vt 0.157407 0.418182 +vt 0.083333 0.418182 +vt 0.064815 0.418182 +vt 0.231481 0.418182 +vt 0.296296 0.509091 +vt 0.212963 0.345455 +vt 0.157407 0.345455 +vt 0.083333 0.345455 +vt 0.064815 0.345455 +vt 0.064815 0.418182 +vn 0.0000 0.0000 -1.0000 +vn 0.7071 0.0000 -0.7071 +vn 1.0000 0.0000 0.0000 +vn 0.7071 -0.0000 0.7071 +vn 0.0000 0.0000 1.0000 +vn -0.7071 0.0000 0.7071 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn -0.7071 0.0000 -0.7071 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.8575 -0.5145 +vn -0.8575 0.0000 -0.5145 +vn 0.8575 0.0000 -0.5145 +vn 0.5145 0.8575 0.0000 +vn 0.5145 0.0000 -0.8575 +vn 0.5145 -0.0000 0.8575 +vn 0.0000 0.8575 0.5145 +vn 0.8575 -0.0000 0.5145 +vn -0.8575 -0.0000 0.5145 +vn -0.5145 0.8575 0.0000 +vn -0.5145 -0.0000 0.8575 +vn -0.5145 0.0000 -0.8575 +vn 0.0000 0.7071 -0.7071 +vn 0.5000 0.7071 -0.5000 +vn 0.7071 0.7071 0.0000 +vn 0.5000 0.7071 0.5000 +vn 0.0000 0.7071 0.7071 +vn -0.5000 0.7071 0.5000 +vn -0.7071 0.7071 0.0000 +vn -0.5000 0.7071 -0.5000 +vn 0.6054 0.5167 0.6054 +vn -0.8561 0.5167 0.0000 +vn 0.6054 0.5167 -0.6054 +vn 0.0000 0.5167 0.8561 +vn -0.6054 0.5167 -0.6054 +vn 0.0000 0.5167 -0.8561 +vn 0.8561 0.5167 0.0000 +vn -0.6054 0.5167 0.6054 +vn 0.0000 0.6786 -0.7345 +vn -0.2911 0.9479 -0.1290 +vn 0.8594 -0.1872 -0.4757 +vn 0.0588 0.9916 0.1149 +vn 0.2279 0.9710 0.0718 +vn 0.3421 0.4484 -0.8258 +vn -0.5767 0.1695 -0.7992 +vn 0.3827 -0.0000 -0.9239 +vn 0.1588 0.9851 -0.0658 +vn 0.9239 -0.0000 -0.3827 +vn 0.0658 0.9851 -0.1588 +vn -0.9239 -0.0000 0.3827 +vn -0.3827 -0.0000 0.9239 +vn 0.1588 -0.9851 -0.0658 +vn 0.0658 -0.9851 -0.1588 +vn -0.3827 -0.0000 -0.9239 +vn -0.0658 0.9851 -0.1588 +vn 0.3827 -0.0000 0.9239 +vn -0.0658 -0.9851 -0.1588 +vn -0.9239 -0.0000 -0.3827 +vn -0.1588 0.9851 -0.0658 +vn 0.9239 -0.0000 0.3827 +vn -0.1588 -0.9851 -0.0658 +vn -0.1588 -0.9851 0.0658 +vn -0.0658 -0.9851 0.1588 +vn 0.1588 0.9851 0.0658 +vn 0.0658 -0.9851 0.1588 +vn 0.1588 -0.9851 0.0658 +vn -0.0657 0.9851 -0.1588 +vn 0.0657 0.9851 -0.1588 +vn -0.1588 0.9851 0.0658 +vn -0.0658 0.9851 0.1588 +vn 0.0658 0.9851 0.1588 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/2 5/5/2 2/2/2 +f 6/6/3 7/7/3 5/5/3 +f 8/8/4 9/9/4 7/7/4 +f 10/10/5 11/11/5 9/9/5 +f 12/12/6 13/13/6 11/11/6 +f 14/14/7 10/15/7 1/16/7 +f 14/17/8 15/18/8 13/13/8 +f 16/19/9 3/3/9 15/20/9 +f 7/21/10 13/22/10 15/23/10 +f 17/24/8 18/25/8 19/26/8 +f 20/27/11 21/28/11 22/29/11 +f 21/30/3 23/31/3 24/32/3 +f 25/33/5 19/26/5 23/31/5 +f 24/34/10 19/26/10 18/35/10 +f 20/36/7 25/33/7 21/37/7 +f 18/38/12 20/39/12 22/40/12 +f 21/41/13 24/42/13 22/43/13 +f 26/44/1 27/45/1 28/46/1 +f 29/47/14 30/48/14 31/49/14 +f 30/50/5 32/51/5 33/52/5 +f 34/53/8 28/46/8 32/51/8 +f 33/54/10 28/46/10 27/55/10 +f 30/56/7 26/44/7 34/53/7 +f 27/57/15 29/58/15 31/59/15 +f 30/60/16 33/61/16 31/62/16 +f 35/63/3 36/64/3 37/65/3 +f 38/66/17 39/67/17 40/68/17 +f 39/69/8 41/70/8 42/71/8 +f 43/72/1 37/65/1 41/70/1 +f 36/73/10 41/70/10 37/65/10 +f 38/74/7 43/72/7 39/75/7 +f 36/76/18 38/77/18 40/78/18 +f 39/79/19 42/80/19 40/81/19 +f 44/82/5 45/83/5 46/84/5 +f 47/85/20 48/86/20 49/87/20 +f 48/88/1 50/89/1 51/90/1 +f 52/91/3 46/84/3 50/89/3 +f 45/92/10 50/89/10 46/84/10 +f 47/93/7 52/91/7 48/94/7 +f 45/95/21 47/96/21 49/97/21 +f 48/98/22 51/99/22 49/100/22 +f 53/101/23 54/102/23 55/103/23 +f 56/104/24 57/105/24 58/106/24 +f 59/107/25 60/108/25 61/109/25 +f 62/110/26 63/111/26 64/112/26 +f 65/113/27 66/114/27 67/115/27 +f 68/116/28 69/117/28 70/118/28 +f 71/119/29 72/120/29 73/121/29 +f 74/122/30 75/123/30 76/124/30 +f 82/125/9 83/126/9 84/127/9 +f 85/128/2 86/129/2 83/126/2 +f 87/130/4 88/131/4 86/129/4 +f 89/132/6 84/127/6 88/133/6 +f 89/134/10 90/135/10 82/136/10 +f 85/128/24 91/137/24 87/130/24 +f 89/138/4 87/130/4 91/137/4 +f 85/128/9 82/139/9 92/140/9 +f 91/137/4 93/141/4 89/142/4 +f 92/140/9 90/135/9 94/143/9 +f 92/140/7 95/144/7 91/137/7 +f 96/145/2 97/146/2 98/147/2 +f 99/148/4 100/149/4 97/146/4 +f 101/150/6 102/151/6 100/149/6 +f 103/152/9 98/147/9 102/153/9 +f 103/154/10 104/155/10 96/156/10 +f 99/148/26 105/157/26 101/150/26 +f 103/158/6 101/150/6 105/157/6 +f 99/148/2 96/159/2 106/160/2 +f 103/161/6 107/162/6 108/163/6 +f 96/156/2 109/164/2 106/160/2 +f 106/160/7 107/162/7 105/157/7 +f 110/165/1 111/166/1 112/167/1 +f 113/168/2 114/169/2 111/166/2 +f 115/170/3 116/171/3 114/169/3 +f 117/172/4 118/173/4 116/171/4 +f 119/174/5 120/175/5 118/173/5 +f 121/176/6 122/177/6 120/175/6 +f 117/172/31 123/178/31 119/174/31 +f 124/179/8 125/180/8 122/177/8 +f 126/181/9 112/167/9 125/182/9 +f 127/183/1 128/184/1 129/185/1 +f 124/179/32 130/186/32 126/187/32 +f 113/168/33 131/188/33 115/170/33 +f 119/174/34 132/189/34 121/176/34 +f 126/181/35 127/190/35 110/165/35 +f 110/165/36 129/191/36 113/168/36 +f 115/170/37 133/192/37 117/172/37 +f 121/176/38 134/193/38 124/179/38 +f 135/194/7 136/195/7 137/196/7 +f 130/197/9 138/198/9 127/183/9 +f 132/199/6 139/200/6 134/201/6 +f 133/202/4 136/203/4 123/204/4 +f 129/185/2 137/205/2 131/206/2 +f 134/201/8 140/207/8 130/208/8 +f 132/199/5 136/203/5 135/209/5 +f 131/206/3 141/210/3 133/202/3 +f 142/211/8 143/212/8 144/213/8 +f 145/214/1 146/215/1 143/216/1 +f 147/217/3 148/218/3 146/219/3 +f 149/220/5 144/221/5 148/222/5 +f 150/223/10 151/224/10 152/225/10 +f 145/226/7 149/227/7 147/228/7 +f 153/229/7 154/230/7 155/231/7 +f 156/232/7 155/233/7 157/234/7 +f 154/230/5 158/235/5 155/231/5 +f 159/236/7 160/237/7 154/238/7 +f 153/239/8 152/240/8 151/241/8 +f 156/242/1 150/243/1 152/244/1 +f 161/245/3 162/246/3 150/247/3 +f 159/248/5 151/249/5 162/250/5 +f 161/251/7 157/252/7 160/253/7 +f 143/212/10 158/254/10 144/213/10 +f 160/237/3 163/255/3 154/238/3 +f 148/218/10 164/256/10 146/219/10 +f 146/215/10 165/257/10 143/216/10 +f 144/221/10 163/258/10 148/222/10 +f 155/233/8 165/259/8 157/234/8 +f 157/252/1 164/260/1 160/253/1 +f 166/261/39 167/262/39 168/263/39 +f 169/264/23 171/265/23 170/266/23 +f 172/267/24 174/268/24 173/269/24 +f 175/270/25 177/271/25 176/272/25 +f 178/273/26 180/274/26 179/275/26 +f 181/276/27 183/277/27 182/278/27 +f 184/279/28 186/280/28 185/281/28 +f 187/282/29 189/283/29 188/284/29 +f 190/285/30 192/286/30 191/287/30 +f 1/1/1 4/4/1 2/2/1 +f 4/4/2 6/6/2 5/5/2 +f 6/6/3 8/8/3 7/7/3 +f 8/8/4 10/10/4 9/9/4 +f 10/10/5 12/12/5 11/11/5 +f 12/12/6 14/17/6 13/13/6 +f 6/288/7 4/289/7 1/16/7 +f 1/16/7 16/290/7 14/14/7 +f 14/14/7 12/291/7 10/15/7 +f 10/15/7 8/292/7 6/288/7 +f 6/288/7 1/16/7 10/15/7 +f 14/17/8 16/293/8 15/18/8 +f 16/19/9 1/1/9 3/3/9 +f 15/23/10 3/294/10 7/21/10 +f 2/295/10 5/296/10 7/21/10 +f 7/21/10 9/297/10 11/298/10 +f 11/298/10 13/22/10 7/21/10 +f 3/294/10 2/295/10 7/21/10 +f 17/24/8 20/299/8 18/25/8 +f 21/30/3 25/33/3 23/31/3 +f 25/33/5 17/24/5 19/26/5 +f 24/34/10 23/31/10 19/26/10 +f 20/36/7 17/24/7 25/33/7 +f 26/44/1 29/300/1 27/45/1 +f 30/50/5 34/53/5 32/51/5 +f 34/53/8 26/44/8 28/46/8 +f 33/54/10 32/51/10 28/46/10 +f 30/56/7 29/301/7 26/44/7 +f 35/63/3 38/302/3 36/64/3 +f 39/69/8 43/72/8 41/70/8 +f 43/72/1 35/63/1 37/65/1 +f 36/73/10 42/303/10 41/70/10 +f 38/74/7 35/63/7 43/72/7 +f 44/82/5 47/304/5 45/83/5 +f 48/88/1 52/91/1 50/89/1 +f 52/91/3 44/82/3 46/84/3 +f 45/92/10 51/305/10 50/89/10 +f 47/93/7 44/82/7 52/91/7 +f 53/101/23 193/306/23 54/102/23 +f 56/104/24 194/307/24 57/105/24 +f 59/107/25 195/308/25 60/108/25 +f 62/110/26 196/309/26 63/111/26 +f 65/113/27 197/310/27 66/114/27 +f 68/116/28 198/311/28 69/117/28 +f 71/119/29 199/312/29 72/120/29 +f 74/122/30 200/313/30 75/123/30 +f 82/125/9 85/128/9 83/126/9 +f 85/128/2 87/130/2 86/129/2 +f 87/130/4 89/314/4 88/131/4 +f 89/132/6 82/125/6 84/127/6 +f 89/134/10 93/315/10 90/135/10 +f 85/128/24 92/140/24 91/137/24 +f 91/137/4 95/144/4 93/141/4 +f 92/140/9 82/136/9 90/135/9 +f 92/140/7 94/143/7 95/144/7 +f 96/145/2 99/148/2 97/146/2 +f 99/148/4 101/150/4 100/149/4 +f 101/150/6 103/316/6 102/151/6 +f 103/152/9 96/145/9 98/147/9 +f 103/154/10 108/317/10 104/155/10 +f 99/148/26 106/160/26 105/157/26 +f 103/161/6 105/157/6 107/162/6 +f 96/156/2 104/155/2 109/164/2 +f 106/160/7 109/164/7 107/162/7 +f 110/165/1 113/168/1 111/166/1 +f 113/168/2 115/170/2 114/169/2 +f 115/170/3 117/172/3 116/171/3 +f 117/172/4 119/174/4 118/173/4 +f 119/174/5 121/176/5 120/175/5 +f 121/176/6 124/179/6 122/177/6 +f 117/172/31 133/318/31 123/178/31 +f 124/179/8 126/187/8 125/180/8 +f 126/181/9 110/165/9 112/167/9 +f 127/183/1 138/198/1 128/184/1 +f 124/179/32 134/319/32 130/186/32 +f 113/168/33 129/320/33 131/188/33 +f 119/174/34 123/321/34 132/189/34 +f 126/181/35 130/322/35 127/190/35 +f 110/165/36 127/323/36 129/191/36 +f 115/170/37 131/324/37 133/192/37 +f 121/176/38 132/325/38 134/193/38 +f 137/196/7 128/326/7 138/327/7 +f 138/327/7 140/328/7 139/329/7 +f 139/329/7 135/194/7 137/196/7 +f 136/195/7 141/330/7 137/196/7 +f 137/196/7 138/327/7 139/329/7 +f 130/197/9 140/331/9 138/198/9 +f 132/199/6 135/209/6 139/200/6 +f 133/202/4 141/210/4 136/203/4 +f 129/185/2 128/184/2 137/205/2 +f 134/201/8 139/200/8 140/207/8 +f 132/199/5 123/204/5 136/203/5 +f 131/206/3 137/205/3 141/210/3 +f 142/211/8 145/332/8 143/212/8 +f 145/214/1 147/333/1 146/215/1 +f 147/217/3 149/334/3 148/218/3 +f 149/220/5 142/335/5 144/221/5 +f 150/223/10 162/336/10 151/224/10 +f 145/226/7 142/337/7 149/227/7 +f 153/229/7 159/248/7 154/230/7 +f 156/232/7 153/239/7 155/233/7 +f 154/230/5 163/258/5 158/235/5 +f 159/236/7 161/245/7 160/237/7 +f 153/239/8 156/232/8 152/240/8 +f 156/242/1 161/251/1 150/243/1 +f 161/245/3 159/236/3 162/246/3 +f 159/248/5 153/229/5 151/249/5 +f 161/251/7 156/242/7 157/252/7 +f 143/212/10 165/259/10 158/254/10 +f 160/237/3 164/256/3 163/255/3 +f 148/218/10 163/255/10 164/256/10 +f 146/215/10 164/260/10 165/257/10 +f 144/221/10 158/235/10 163/258/10 +f 155/233/8 158/254/8 165/259/8 +f 157/252/1 165/257/1 164/260/1 +f 166/261/39 202/338/39 167/262/39 +f 169/264/23 170/266/23 203/339/23 +f 172/267/24 173/269/24 204/340/24 +f 175/270/25 176/272/25 205/341/25 +f 178/273/26 179/275/26 206/342/26 +f 181/276/27 182/278/27 207/343/27 +f 184/279/28 185/281/28 208/344/28 +f 187/282/29 188/284/29 209/345/29 +f 190/285/30 191/287/30 210/346/30 +f 281/347/4 282/348/4 283/349/4 +f 284/350/6 285/351/6 282/348/6 +f 286/352/9 287/353/9 285/351/9 +f 288/354/2 283/349/2 287/355/2 +f 288/356/10 289/357/10 281/358/10 +f 284/350/28 290/359/28 286/352/28 +f 288/360/9 286/352/9 290/359/9 +f 284/350/4 281/361/4 291/362/4 +f 290/359/9 292/363/9 288/364/9 +f 291/362/4 289/357/4 293/365/4 +f 291/362/7 294/366/7 290/359/7 +f 295/367/6 296/368/6 297/369/6 +f 298/370/9 299/371/9 296/368/9 +f 300/372/2 301/373/2 299/371/2 +f 302/374/4 297/369/4 301/375/4 +f 302/376/10 303/377/10 295/378/10 +f 298/370/30 304/379/30 300/372/30 +f 302/380/2 300/372/2 304/379/2 +f 298/370/6 295/381/6 305/382/6 +f 302/383/2 306/384/2 307/385/2 +f 295/378/6 308/386/6 305/382/6 +f 305/382/7 306/384/7 304/379/7 +f 281/347/4 284/350/4 282/348/4 +f 284/350/6 286/352/6 285/351/6 +f 286/352/9 288/387/9 287/353/9 +f 288/354/2 281/347/2 283/349/2 +f 288/356/10 292/388/10 289/357/10 +f 284/350/28 291/362/28 290/359/28 +f 290/359/9 294/366/9 292/363/9 +f 291/362/4 281/358/4 289/357/4 +f 291/362/7 293/365/7 294/366/7 +f 295/367/6 298/370/6 296/368/6 +f 298/370/9 300/372/9 299/371/9 +f 300/372/2 302/389/2 301/373/2 +f 302/374/4 295/367/4 297/369/4 +f 302/376/10 307/390/10 303/377/10 +f 298/370/30 305/382/30 304/379/30 +f 302/383/2 304/379/2 306/384/2 +f 295/378/6 303/377/6 308/386/6 +f 305/382/7 308/386/7 306/384/7 +s 1 +f 77/391/40 78/392/41 79/393/42 +f 80/394/43 81/395/44 77/391/40 +f 77/391/40 81/396/44 78/392/41 +f 80/394/43 201/397/45 81/395/44 +f 211/398/46 212/399/47 213/400/48 +f 214/401/49 215/402/50 212/399/47 +f 216/403/51 217/404/52 215/405/50 +f 218/406/53 213/400/48 217/404/52 +f 219/407/54 214/401/49 211/398/46 +f 220/408/55 216/409/51 214/401/49 +f 221/410/56 218/406/53 216/411/51 +f 222/412/57 211/398/46 218/406/53 +f 223/413/58 220/408/55 219/407/54 +f 224/414/59 221/415/56 220/408/55 +f 225/416/60 222/412/57 221/417/56 +f 226/418/61 219/407/54 222/412/57 +f 227/419/50 224/414/59 223/413/58 +f 79/393/42 225/420/60 224/414/59 +f 78/421/41 226/418/61 225/416/60 +f 228/422/62 223/413/58 226/418/61 +f 227/419/50 77/391/40 79/393/42 +f 81/423/44 228/422/62 78/424/41 +f 229/425/63 227/419/50 228/422/62 +f 230/426/56 77/391/40 231/427/51 +f 201/428/45 229/425/63 81/429/44 +f 229/425/63 230/426/56 231/427/51 +f 232/430/60 80/394/43 230/426/56 +f 233/431/64 201/432/45 80/394/43 +f 234/433/58 235/434/65 201/435/45 +f 236/436/66 230/426/56 235/434/65 +f 213/400/48 233/431/64 232/430/60 +f 212/399/47 234/437/58 233/431/64 +f 215/438/50 236/436/66 234/433/58 +f 217/404/52 232/430/60 236/436/66 +f 237/439/1 238/440/2 239/441/1 +f 240/442/2 241/443/3 238/440/2 +f 242/444/3 243/445/4 241/443/3 +f 244/446/4 245/447/5 243/445/4 +f 246/448/5 247/449/6 245/447/5 +f 248/450/6 249/451/8 247/449/6 +f 250/452/8 251/453/9 249/454/8 +f 252/455/9 239/441/1 251/453/9 +f 168/263/46 253/456/47 254/457/48 +f 253/456/47 255/458/51 256/459/50 +f 255/460/51 257/461/52 256/462/50 +f 257/461/52 168/263/46 254/457/48 +f 202/338/67 255/463/51 167/262/68 +f 258/464/56 259/465/53 255/466/51 +f 260/467/57 168/263/46 259/465/53 +f 261/468/58 202/338/67 166/261/54 +f 262/469/59 258/470/56 202/338/67 +f 263/471/60 260/467/57 258/472/56 +f 264/473/61 166/261/54 260/467/57 +f 265/474/50 262/469/59 261/468/58 +f 262/469/59 266/475/48 263/476/60 +f 266/477/48 264/473/61 263/471/60 +f 267/478/62 261/468/58 264/473/61 +f 268/479/51 269/480/69 265/474/50 +f 270/481/70 266/482/48 269/480/69 +f 271/483/46 267/478/62 266/484/48 +f 272/485/63 265/474/50 267/478/62 +f 268/479/51 273/486/71 270/481/70 +f 273/486/71 271/487/46 270/481/70 +f 274/488/54 272/485/63 271/489/46 +f 275/490/65 268/479/51 272/485/63 +f 276/491/60 273/486/71 277/492/56 +f 278/493/64 274/494/54 273/486/71 +f 279/495/58 275/490/65 274/496/54 +f 280/497/66 277/492/56 275/490/65 +f 254/457/48 278/493/64 276/491/60 +f 253/456/47 279/498/58 278/493/64 +f 279/495/58 257/461/52 280/497/66 +f 257/461/52 276/491/60 280/497/66 +f 211/398/46 214/401/49 212/399/47 +f 214/401/49 216/499/51 215/402/50 +f 216/403/51 218/406/53 217/404/52 +f 218/406/53 211/398/46 213/400/48 +f 219/407/54 220/408/55 214/401/49 +f 220/408/55 221/500/56 216/409/51 +f 221/410/56 222/412/57 218/406/53 +f 222/412/57 219/407/54 211/398/46 +f 223/413/58 224/414/59 220/408/55 +f 224/414/59 225/420/60 221/415/56 +f 225/416/60 226/418/61 222/412/57 +f 226/418/61 223/413/58 219/407/54 +f 227/419/50 79/393/42 224/414/59 +f 79/393/42 78/501/41 225/420/60 +f 78/421/41 228/422/62 226/418/61 +f 228/422/62 227/419/50 223/413/58 +f 227/419/50 231/427/51 77/391/40 +f 81/423/44 229/425/63 228/422/62 +f 229/425/63 231/427/51 227/419/50 +f 230/426/56 80/394/43 77/391/40 +f 201/428/45 235/434/65 229/425/63 +f 229/425/63 235/434/65 230/426/56 +f 232/430/60 233/431/64 80/394/43 +f 233/431/64 234/437/58 201/432/45 +f 234/433/58 236/436/66 235/434/65 +f 236/436/66 232/430/60 230/426/56 +f 213/400/48 212/399/47 233/431/64 +f 212/399/47 215/502/50 234/437/58 +f 215/438/50 217/404/52 236/436/66 +f 217/404/52 213/400/48 232/430/60 +f 237/439/1 240/442/2 238/440/2 +f 240/442/2 242/444/3 241/443/3 +f 242/444/3 244/446/4 243/445/4 +f 244/446/4 246/448/5 245/447/5 +f 246/448/5 248/450/6 247/449/6 +f 248/450/6 250/503/8 249/451/8 +f 250/452/8 252/455/9 251/453/9 +f 252/455/9 237/439/1 239/441/1 +f 168/263/46 167/262/68 253/456/47 +f 253/456/47 167/262/68 255/458/51 +f 255/460/51 259/465/53 257/461/52 +f 257/461/52 259/465/53 168/263/46 +f 202/338/67 258/504/56 255/463/51 +f 258/464/56 260/467/57 259/465/53 +f 260/467/57 166/261/54 168/263/46 +f 261/468/58 262/469/59 202/338/67 +f 262/469/59 263/476/60 258/470/56 +f 263/471/60 264/473/61 260/467/57 +f 264/473/61 261/468/58 166/261/54 +f 265/474/50 269/480/69 262/469/59 +f 262/469/59 269/480/69 266/475/48 +f 266/477/48 267/478/62 264/473/61 +f 267/478/62 265/474/50 261/468/58 +f 268/479/51 270/481/70 269/480/69 +f 270/481/70 271/505/46 266/482/48 +f 271/483/46 272/485/63 267/478/62 +f 272/485/63 268/479/51 265/474/50 +f 268/479/51 277/492/56 273/486/71 +f 273/486/71 274/506/54 271/487/46 +f 274/488/54 275/490/65 272/485/63 +f 275/490/65 277/492/56 268/479/51 +f 276/491/60 278/493/64 273/486/71 +f 278/493/64 279/498/58 274/494/54 +f 279/495/58 280/497/66 275/490/65 +f 280/497/66 276/491/60 277/492/56 +f 254/457/48 253/456/47 278/493/64 +f 253/456/47 256/507/50 279/498/58 +f 279/495/58 256/508/50 257/461/52 +f 257/461/52 254/457/48 276/491/60 +o Mixer +v 0.281250 1.001012 0.000000 +v -0.281250 2.499874 0.000000 +v -0.281250 1.001012 0.000000 +v 0.000000 1.001012 0.281250 +v 0.000000 2.499874 -0.281250 +v 0.000000 1.001012 -0.281250 +v 0.281250 2.499874 0.000000 +v 0.000000 2.499874 0.281250 +vt 0.824074 0.309091 +vt 0.740741 0.745455 +vt 0.740741 0.309091 +vt 0.824074 0.309091 +vt 0.740741 0.745455 +vt 0.740741 0.309091 +vt 0.824074 0.745455 +vt 0.824074 0.745455 +vn 0.0000 -0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +s off +f 309/509/72 310/510/72 311/511/72 +f 312/512/73 313/513/73 314/514/73 +f 309/509/72 315/515/72 310/510/72 +f 312/512/73 316/516/73 313/513/73 +o Fluid +v 0.000000 2.500000 -0.301419 +v 0.212905 1.000000 -0.213135 +v 0.000000 1.000000 -0.301419 +v 0.212905 2.500000 -0.213135 +v 0.301094 1.000000 0.000000 +v 0.301094 2.500000 0.000000 +v 0.212905 1.000000 0.213135 +v 0.212905 2.500000 0.213135 +v 0.000000 1.000000 0.301419 +v 0.000000 2.500000 0.301419 +v -0.212906 1.000000 0.213135 +v -0.212906 2.500000 0.213135 +v -0.301094 1.000000 0.000000 +v -0.301094 2.500000 0.000000 +v -0.212906 1.000000 -0.213135 +v -0.212906 2.500000 -0.213135 +v 0.000000 2.500000 -0.301419 +v 0.212905 2.500000 -0.213135 +v 0.301094 2.500000 0.000000 +v 0.212905 2.500000 0.213135 +v 0.000000 2.500000 0.301419 +v -0.212906 2.500000 0.213135 +v -0.301094 2.500000 0.000000 +v -0.212906 2.500000 -0.213135 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.000000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.7074 0.0000 -0.7068 +vn 1.0000 0.0000 0.0000 +vn 0.7074 -0.0000 0.7068 +vn 0.0000 -0.0000 1.0000 +vn -0.7074 -0.0000 0.7068 +vn -1.0000 -0.0000 0.0000 +vn -0.7074 0.0000 -0.7068 +s off +f 339/517/74 337/518/74 333/519/74 +f 335/520/74 334/521/74 333/519/74 +f 333/522/74 340/523/74 339/524/74 +f 339/517/74 338/525/74 337/526/74 +f 337/527/74 336/528/74 335/529/74 +f 335/520/74 333/530/74 337/526/74 +s 1 +f 317/531/75 318/532/76 319/533/75 +f 320/534/76 321/535/77 318/536/76 +f 322/537/77 323/538/78 321/539/77 +f 324/540/78 325/541/79 323/542/78 +f 326/543/79 327/544/80 325/545/79 +f 328/546/80 329/547/81 327/548/80 +f 330/549/81 331/550/82 329/551/81 +f 332/552/82 319/553/75 331/554/82 +f 317/531/75 320/555/76 318/536/76 +f 320/534/76 322/556/77 321/539/77 +f 322/537/77 324/557/78 323/542/78 +f 324/540/78 326/558/79 325/545/79 +f 326/543/79 328/559/80 327/548/80 +f 328/546/80 330/560/81 329/551/81 +f 330/549/81 332/561/82 331/554/82 +f 332/552/82 317/562/75 319/533/75 diff --git a/src/main/resources/assets/hbm/textures/blocks/block_coke.coal.png b/src/main/resources/assets/hbm/textures/blocks/block_coke.coal.png new file mode 100644 index 000000000..e8796d8c4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/block_coke.coal.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/block_coke.lignite.png b/src/main/resources/assets/hbm/textures/blocks/block_coke.lignite.png new file mode 100644 index 000000000..0977b1ca3 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/block_coke.lignite.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/block_coke.petroleum.png b/src/main/resources/assets/hbm/textures/blocks/block_coke.petroleum.png new file mode 100644 index 000000000..eedbdbe38 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/block_coke.petroleum.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_mining_drill.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_mining_drill.png index 5b0e8764a..784cb025b 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/machine/gui_mining_drill.png and b/src/main/resources/assets/hbm/textures/gui/machine/gui_mining_drill.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_mixer.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_mixer.png new file mode 100644 index 000000000..65143bb3a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/processing/gui_mixer.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/cobblestone.png b/src/main/resources/assets/hbm/textures/models/machines/cobblestone.png new file mode 100755 index 000000000..da3498c5c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/cobblestone.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/gravel.png b/src/main/resources/assets/hbm/textures/models/machines/gravel.png new file mode 100755 index 000000000..388e5c55e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/gravel.png differ