From 9ad76d3bccb202d4db8a9078212574e8a0e2c2b8 Mon Sep 17 00:00:00 2001 From: 70000hp <105080577+70000hp@users.noreply.github.com> Date: Sat, 2 Dec 2023 09:24:46 -0500 Subject: [PATCH 1/6] core strand caster stuffs --- .../blocks/machine/MachineStrandCaster.java | 189 +++++++++++++++++ .../container/ContainerStrandCaster.java | 74 +++++++ .../hbm/inventory/gui/GUIStrandCaster.java | 102 +++++++++ .../hbm/tileentity/TileEntityProxyCombo.java | 6 +- .../machine/TileEntityFoundryCastingBase.java | 3 +- .../TileEntityMachineStrandCaster.java | 195 ++++++++++++++++++ .../gui/processing/gui_strand_caster.png | Bin 0 -> 16344 bytes 7 files changed, 567 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java create mode 100644 src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java create mode 100644 src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java create mode 100644 src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java create mode 100644 src/main/resources/assets/hbm/textures/gui/processing/gui_strand_caster.png diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java new file mode 100644 index 000000000..7d45b7911 --- /dev/null +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -0,0 +1,189 @@ +package com.hbm.blocks.machine; + +import api.hbm.block.ICrucibleAcceptor; +import api.hbm.block.IToolable; +import com.hbm.blocks.BlockDummyable; +import com.hbm.blocks.ILookOverlay; +import com.hbm.handler.MultiblockHandlerXR; +import com.hbm.inventory.material.Mats; +import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemMold; +import com.hbm.items.machine.ItemScraps; +import com.hbm.tileentity.TileEntityProxyCombo; +import com.hbm.tileentity.machine.TileEntityCrucible; +import com.hbm.tileentity.machine.TileEntityFoundryCastingBase; +import com.hbm.tileentity.machine.TileEntityMachineStrandCaster; +import com.hbm.util.I18nUtil; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemTool; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcceptor, ILookOverlay { + + public MachineStrandCaster() { + super(Material.iron); + } + //reminder, if the machine is a solid brick, get dimensions will already handle it without the need to use fillSapce + //the order is up, down, forward, backward, left, right + //x is for left(-)/right(+), z is for forward(+)/backward(-), y you already know + @Override + public int[] getDimensions() {return new int[]{0, 0, 6, 0, 1, 0};} + + @Override + public int getOffset() { + return 0; + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + + if(meta >= 12) return new TileEntityMachineStrandCaster(); + if(meta >= 6) return new TileEntityProxyCombo(true, false, true).moltenMetal(); + return null; + } + + @Override + public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) { + super.fillSpace(world, x, y, z, dir, o); + + x += dir.offsetX * o; + z += dir.offsetZ * o; + + MultiblockHandlerXR.fillSpace(world, x, y, z, new int[]{1, 0, 1, 0, 1, 0}, this, dir); + + this.makeExtra(world, x - dir.offsetX, y, z); + this.makeExtra(world, x, y, z + dir.offsetX * 5); + this.makeExtra(world, x- dir.offsetX, y, z + dir.offsetX * 5); + } + + @Override + public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { + + TileEntity poured = world.getTileEntity(x, y, z); + if(!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo)poured).moltenMetal)) return false; + + int[] pos = this.findCore(world, x, y, z); + if(pos == null) return false; + TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]); + if(!(tile instanceof TileEntityMachineStrandCaster)) return false; + TileEntityMachineStrandCaster caster = (TileEntityMachineStrandCaster) tile; + + return caster.canAcceptPartialPour(world, x, y, z, dX, dY, dZ, side, stack); + } + + @Override + public Mats.MaterialStack pour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { + + TileEntity poured = world.getTileEntity(x, y, z); + if(!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo)poured).moltenMetal)) return stack; + + int[] pos = this.findCore(world, x, y, z); + if(pos == null) return stack; + TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]); + if(!(tile instanceof TileEntityMachineStrandCaster)) return stack; + TileEntityMachineStrandCaster caster = (TileEntityMachineStrandCaster) tile; + + return caster.pour(world, x, y, z, dX, dY, dZ, side, stack); + } + + @Override + public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { + return false; + } + + @Override + public Mats.MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { + return null; + } + ///entirety of foundry base code here, because dual inheritance is evil apparently + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) { + return true; + } + + TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + + //insert mold + if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.mold && cast.slots[0] == null) { + cast.slots[0] = player.getHeldItem().copy(); + cast.slots[0].stackSize = 1; + player.getHeldItem().stackSize--; + world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F); + cast.markDirty(); + world.markBlockForUpdate(x, y, z); + return true; + + } + + if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && player.getHeldItem().getItem().getToolClasses(player.getHeldItem()).contains("shovel")) { + if(cast.amount > 0) { + ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); + if(!player.inventory.addItemStackToInventory(scrap)) { + EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); + world.spawnEntityInWorld(item); + } else { + player.inventoryContainer.detectAndSendChanges(); + } + cast.amount = 0; + cast.type = null; + cast.markDirty(); + world.markBlockForUpdate(x, y, z); + } + return true; + } + + return this.standardOpenBehavior(world, x, y, z, player, 0); + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block b, int i) { + + TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + if(cast.amount > 0) { + ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); + EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); + world.spawnEntityInWorld(item); + cast.amount = 0; //just for safety + } + + for(ItemStack stack : cast.slots) { + if(stack != null) { + EntityItem drop = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, stack.copy()); + world.spawnEntityInWorld(drop); + } + } + + super.breakBlock(world, x, y, z, b, i); + } + + public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) { + TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + List text = new ArrayList(); + + if(cast.slots[0] == null) { + text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast")); + } else if(cast.slots[0].getItem() == ModItems.mold){ + ItemMold.Mold mold = ((ItemMold) cast.slots[0].getItem()).getMold(cast.slots[0]); + text.add(EnumChatFormatting.BLUE + mold.getTitle()); + } + + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text); + } +} + diff --git a/src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java b/src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java new file mode 100644 index 000000000..f87f592d0 --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java @@ -0,0 +1,74 @@ +package com.hbm.inventory.container; + +import com.hbm.inventory.SlotNonRetarded; +import com.hbm.tileentity.machine.TileEntityMachineStrandCaster; +import com.hbm.util.InventoryUtil; +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 ContainerStrandCaster extends Container { + + protected TileEntityMachineStrandCaster caster; + + public ContainerStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster caster) { + this.caster = caster; + + //the wretched mold + this.addSlotToContainer(new SlotNonRetarded(this.caster, 0, 57, 62)); + + //input + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 2; j++) { + this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 3 + 1, 125 + j * 18, 26 + i * 18)); + } + } + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 132 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 190)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + ItemStack stack = null; + Slot slot = (Slot) this.inventorySlots.get(index); + + if(slot != null && slot.getHasStack()) { + ItemStack originalStack = slot.getStack(); + stack = originalStack.copy(); + + if(index <= 6) { + if(!this.mergeItemStack(originalStack, 10, this.inventorySlots.size(), true)) { + return null; + } + + slot.onSlotChange(originalStack, stack); + + } else if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 10, false)) { + return null; + } + + if(originalStack.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } + } + + return stack; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return caster.isUseableByPlayer(player); + } +} diff --git a/src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java b/src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java new file mode 100644 index 000000000..9d31e4b1f --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java @@ -0,0 +1,102 @@ +package com.hbm.inventory.gui; + +import com.hbm.inventory.container.ContainerStrandCaster; +import com.hbm.inventory.material.Mats; +import com.hbm.inventory.material.Mats.MaterialStack; +import com.hbm.inventory.material.NTMMaterial; +import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityMachineStrandCaster; +import com.hbm.util.I18nUtil; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; + +import java.awt.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +public class GUIStrandCaster extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png"); + private TileEntityMachineStrandCaster caster; + + public GUIStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) { + super(new ContainerStrandCaster(invPlayer, tedf)); + caster = tedf; + + this.xSize = 176; + this.ySize = 214; + } + + @Override + public void drawScreen(int x, int y, float interp) { + super.drawScreen(x, y, interp); + + drawStackInfo(x, y, 16, 17); + + caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 38, 16, 24); + caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 89, 16, 24); + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName()); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24); + caster.steam.renderTank(guiLeft + 82, guiTop + 89, this.zLevel, 16, 24); + + if (caster.amount != 0) { + + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + + int targetHeight = (caster.amount) * 79 / caster.getCapacity(); + int offset = caster.type.smeltable == SmeltingBehavior.ADDITIVE ? 34 : 0; //additives use a differnt texture + + int hex = caster.type.moltenColor; + //hex = 0xC18336; + Color color = new Color(hex); + GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F); + drawTexturedModalRect(guiLeft + 17, guiTop + 92 - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight); + GL11.glEnable(GL11.GL_BLEND); + GL11.glColor4f(1F, 1F, 1F, 0.3F); + drawTexturedModalRect(guiLeft + 17, guiTop + 92 - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight); + GL11.glDisable(GL11.GL_BLEND); + } + + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glColor3f(255, 255, 255); + } + + + + protected void drawStackInfo(int mouseX, int mouseY, int x, int y) { + + List list = new ArrayList(); + + if(caster.type == null) list.add(EnumChatFormatting.RED + "Empty"); + else list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey(caster.type.getUnlocalizedName()) + ": " + Mats.formatAmount(caster.amount, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))); + + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + x, guiTop + y, 36, 81, mouseX, mouseY, list); + } + + + + +} diff --git a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java index eb4a603e0..593a33505 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java +++ b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java @@ -23,6 +23,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy boolean power; boolean fluid; boolean heat; + public boolean moltenMetal; public TileEntityProxyCombo() { } @@ -41,7 +42,10 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy this.power = true; return this; } - + public TileEntityProxyCombo moltenMetal() { + this.moltenMetal = true; + return this; + } public TileEntityProxyCombo fluid() { this.fluid = true; return this; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java index bf2e63a95..fd3916492 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java @@ -22,7 +22,8 @@ public abstract class TileEntityFoundryCastingBase extends TileEntityFoundryBase public ItemStack slots[] = new ItemStack[2]; public int cooloff = 100; - + + @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java new file mode 100644 index 000000000..cf09975e3 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -0,0 +1,195 @@ +package com.hbm.tileentity.machine; + +import api.hbm.block.ICrucibleAcceptor; +import api.hbm.fluid.IFluidStandardTransceiver; +import com.hbm.blocks.BlockDummyable; +import com.hbm.inventory.container.ContainerAssemfac; +import com.hbm.inventory.container.ContainerStrandCaster; +import com.hbm.inventory.fluid.Fluids; +import com.hbm.inventory.fluid.tank.FluidTank; +import com.hbm.inventory.gui.GUIAssemfac; +import com.hbm.inventory.gui.GUIStrandCaster; +import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemMold; +import com.hbm.packet.NBTPacket; +import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.tileentity.INBTPacketReceiver; +import com.hbm.util.fauxpointtwelve.DirPos; +import cpw.mods.fml.common.network.NetworkRegistry; +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.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +//god thank you bob for this base class +public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor,ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver { + public FluidTank water; + public FluidTank steam; + + public ItemStack[] slots = new ItemStack[6]; + + public TileEntityMachineStrandCaster() { + + water = new FluidTank(Fluids.WATER, 64_000); + steam = new FluidTank(Fluids.SPENTSTEAM, 64_000); + } + int cooldown = 10; + @Override + public void updateEntity() { + super.updateEntity(); + + if(!worldObj.isRemote) { + + if(this.amount > this.getCapacity()) { + this.amount = this.getCapacity(); + } + + if(this.amount == 0) { + this.type = null; + } + + if(worldObj.getTotalWorldTime() % 20 == 0) { + this.updateConnections(); + } + + for(DirPos pos : getConPos()) { + this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + } + + ItemMold.Mold mold = this.getInstalledMold(); + + if(mold != null && this.amount >= this.getCapacity() && slots[1] == null && water.getFill() >= getWaterRequired() ) { + cooldown--; + + if(cooldown <= 0) { + this.amount -= mold.getCost(); + + ItemStack out = mold.getOutput(type); + + for(int i = 1; i < 7; i++) { + if(slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) { + continue; + } + + if(slots[i] == null) { + slots[i] = out.copy(); + } else { + slots[i].stackSize += out.stackSize; + } + } + } + + water.setFill(water.getFill() - getWaterRequired()); + steam.setFill(steam.getFill() + getWaterRequired()); + + cooldown = 20; + } + NBTTagCompound data = new NBTTagCompound(); + + water.writeToNBT(data, "w"); + steam.writeToNBT(data, "s"); + + this.networkPack(data, 150); + + } else { + cooldown = 20; + } + } + + + public DirPos[] getConPos() { + + ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); + ForgeDirection rot = dir.getRotation(ForgeDirection.UP); + + return new DirPos[] { + new DirPos(xCoord - dir.offsetX, yCoord, zCoord, rot), + new DirPos(xCoord, yCoord, zCoord + dir.offsetX, rot), + new DirPos(xCoord, yCoord, zCoord + dir.offsetX * 5, rot.getOpposite()), + new DirPos(xCoord- dir.offsetX, yCoord, zCoord + dir.offsetX * 5, rot.getOpposite()), + }; + } + @Override + public int getMoldSize() { + return getInstalledMold().size; + } + + @Override + public int getCapacity() { + ItemMold.Mold mold = this.getInstalledMold(); + return mold == null ? 0 : mold.getCost() * 10; + } + private int getWaterRequired() { + return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 10; + } + private void updateConnections() { + for(DirPos pos : getConPos()) { + this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + } + } + + @Override + public FluidTank[] getSendingTanks() { + return new FluidTank[] { steam }; + } + + @Override + public FluidTank[] getReceivingTanks() { + return new FluidTank[] { water }; + } + + @Override + public FluidTank[] getAllTanks() { + return new FluidTank[] { water, steam }; + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerStrandCaster(player.inventory, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIStrandCaster(player.inventory, this); + } + public void networkPack(NBTTagCompound nbt, int range) { + + if(!worldObj.isRemote) + PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(nbt, xCoord, yCoord, zCoord), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range)); + } + @Override + public void networkUnpack(NBTTagCompound nbt) { + water.readFromNBT(nbt, "w"); + steam.readFromNBT(nbt, "s"); + } + @Override + public boolean isItemValidForSlot(int i, ItemStack stack) { + + if(i == 0) { + return stack.getItem() == ModItems.mold; + } + + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } + + @Override + public int[] getAccessibleSlotsFromSide(int meta) { + return new int[] { 1, 2, 3, 4, 5, 6}; + } + +} diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_strand_caster.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_strand_caster.png new file mode 100644 index 0000000000000000000000000000000000000000..9f3253374240386f1091cfcace39043063e5c338 GIT binary patch literal 16344 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 Date: Sun, 24 Dec 2023 14:14:35 -0500 Subject: [PATCH 2/6] caster o' strands, part deux --- src/main/java/com/hbm/blocks/ModBlocks.java | 3 + .../blocks/machine/MachineStrandCaster.java | 118 +- ...java => ContainerMachineStrandCaster.java} | 15 +- ...aster.java => GUIMachineStrandCaster.java} | 32 +- src/main/java/com/hbm/main/ClientProxy.java | 1 + .../java/com/hbm/main/ResourceManager.java | 10 +- .../render/tileentity/RenderStrandCaster.java | 63 + .../hbm/tileentity/TileEntityProxyCombo.java | 37 +- .../java/com/hbm/tileentity/TileMappings.java | 1 + .../machine/TileEntityFoundryBasin.java | 11 +- .../machine/TileEntityFoundryCastingBase.java | 9 +- .../machine/TileEntityFoundryMold.java | 11 +- .../TileEntityMachineStrandCaster.java | 210 ++- src/main/resources/assets/hbm/lang/en_US.lang | 2 + .../hbm/models/machines/strand_caster.obj | 1214 +++++++++++++++++ 15 files changed, 1602 insertions(+), 135 deletions(-) rename src/main/java/com/hbm/inventory/container/{ContainerStrandCaster.java => ContainerMachineStrandCaster.java} (81%) rename src/main/java/com/hbm/inventory/gui/{GUIStrandCaster.java => GUIMachineStrandCaster.java} (77%) create mode 100644 src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java create mode 100644 src/main/resources/assets/hbm/models/machines/strand_caster.obj diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 7c656c712..3261a803d 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -694,6 +694,7 @@ public class ModBlocks { public static Block foundry_channel; public static Block foundry_tank; public static Block foundry_outlet; + public static Block machine_strand_caster; public static Block foundry_slagtap; public static Block slag; @@ -1854,6 +1855,7 @@ public class ModBlocks { machine_stirling_steel = new MachineStirling().setBlockName("machine_stirling_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_stirling_creative = new MachineStirling().setBlockName("machine_stirling_creative").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_sawmill = new MachineSawmill().setBlockName("machine_sawmill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + machine_strand_caster = new MachineStrandCaster().setBlockName("machine_strand_caster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire"); machine_crucible = new MachineCrucible().setBlockName("machine_crucible").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire"); machine_boiler = new MachineHeatBoiler().setBlockName("machine_boiler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper"); machine_industrial_boiler = new MachineHeatBoilerIndustrial().setBlockName("machine_industrial_boiler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); @@ -3152,6 +3154,7 @@ public class ModBlocks { register(machine_stirling_creative); register(machine_sawmill); register(machine_crucible); + register(machine_strand_caster); register(machine_boiler); register(machine_industrial_boiler); register(foundry_mold); diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index 7d45b7911..f515325ee 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -63,11 +63,15 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce x += dir.offsetX * o; z += dir.offsetZ * o; - MultiblockHandlerXR.fillSpace(world, x, y, z, new int[]{1, 0, 1, 0, 1, 0}, this, dir); + ForgeDirection rot = dir.getRotation(ForgeDirection.UP); + + //up,down;forward,backward;left,right + MultiblockHandlerXR.fillSpace(world, x, y, z, new int[]{2, 0, 1, 0, 1, 0}, this, dir); + + this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ); + this.makeExtra(world, x - dir.offsetX * 5, y, z - dir.offsetZ * 5); + this.makeExtra(world, x + rot.offsetX - dir.offsetX * 5, y, z + rot.offsetZ - dir.offsetZ * 5); - this.makeExtra(world, x - dir.offsetX, y, z); - this.makeExtra(world, x, y, z + dir.offsetX * 5); - this.makeExtra(world, x- dir.offsetX, y, z + dir.offsetX * 5); } @Override @@ -109,7 +113,6 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce public Mats.MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { return null; } - ///entirety of foundry base code here, because dual inheritance is evil apparently @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { @@ -117,73 +120,82 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce return true; } - TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); - - //insert mold - if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.mold && cast.slots[0] == null) { - cast.slots[0] = player.getHeldItem().copy(); - cast.slots[0].stackSize = 1; - player.getHeldItem().stackSize--; - world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F); - cast.markDirty(); - world.markBlockForUpdate(x, y, z); - return true; - - } - - if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && player.getHeldItem().getItem().getToolClasses(player.getHeldItem()).contains("shovel")) { - if(cast.amount > 0) { - ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); - if(!player.inventory.addItemStackToInventory(scrap)) { - EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); - world.spawnEntityInWorld(item); - } else { - player.inventoryContainer.detectAndSendChanges(); - } - cast.amount = 0; - cast.type = null; + int[] coords = findCore(world, x, y, z); + TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) world.getTileEntity(coords[0], coords[1], coords[2]); + if(cast != null) { + //insert mold + if (player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.mold && cast.slots[0] == null) { + cast.slots[0] = player.getHeldItem().copy(); + cast.slots[0].stackSize = 1; + player.getHeldItem().stackSize--; + world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F); cast.markDirty(); world.markBlockForUpdate(x, y, z); - } - return true; - } + return true; + } + + if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && player.getHeldItem().getItem().getToolClasses(player.getHeldItem()).contains("shovel")) { + if (cast.amount > 0) { + ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); + if (!player.inventory.addItemStackToInventory(scrap)) { + EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); + world.spawnEntityInWorld(item); + } else { + player.inventoryContainer.detectAndSendChanges(); + } + cast.amount = 0; + cast.type = null; + cast.markDirty(); + world.markBlockForUpdate(x, y, z); + } + return true; + } + } return this.standardOpenBehavior(world, x, y, z, player, 0); } @Override public void breakBlock(World world, int x, int y, int z, Block b, int i) { - TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); - if(cast.amount > 0) { - ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); - EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); - world.spawnEntityInWorld(item); - cast.amount = 0; //just for safety - } + TileEntity te = world.getTileEntity(x, y, z); + if(te instanceof TileEntityMachineStrandCaster) { + TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) te; - for(ItemStack stack : cast.slots) { - if(stack != null) { - EntityItem drop = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, stack.copy()); - world.spawnEntityInWorld(drop); + if (cast.amount > 0) { + ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(cast.type, cast.amount)); + EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, scrap); + world.spawnEntityInWorld(item); + cast.amount = 0; //just for safety } } - super.breakBlock(world, x, y, z, b, i); } public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) { - TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + int[] coords = findCore(world, x, y, z); + if(coords == null) return; + + TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) world.getTileEntity(coords[0], coords[1], coords[2]); + List text = new ArrayList(); - - if(cast.slots[0] == null) { - text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast")); - } else if(cast.slots[0].getItem() == ModItems.mold){ - ItemMold.Mold mold = ((ItemMold) cast.slots[0].getItem()).getMold(cast.slots[0]); - text.add(EnumChatFormatting.BLUE + mold.getTitle()); + if(cast != null) { + if (cast.slots[0] == null) { + text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast")); + } else if (cast.slots[0].getItem() == ModItems.mold) { + ItemMold.Mold mold = ((ItemMold) cast.slots[0].getItem()).getMold(cast.slots[0]); + text.add(EnumChatFormatting.BLUE + mold.getTitle()); + } } - ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text); } + @Override + protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { + x += dir.offsetX * o; + z += dir.offsetZ * o; + + if(!MultiblockHandlerXR.checkSpace(world, x, y , z, getDimensions(), x, y, z, dir)) return false; + return MultiblockHandlerXR.checkSpace(world, x, y, z, new int[]{2, 0, 1, 0, 1, 0}, x, y, z, dir); + } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java similarity index 81% rename from src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java rename to src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java index f87f592d0..1742c470c 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerStrandCaster.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java @@ -9,22 +9,23 @@ import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class ContainerStrandCaster extends Container { +public class ContainerMachineStrandCaster extends Container { protected TileEntityMachineStrandCaster caster; - public ContainerStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster caster) { + public ContainerMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster caster) { this.caster = caster; //the wretched mold this.addSlotToContainer(new SlotNonRetarded(this.caster, 0, 57, 62)); - //input + //output for(int i = 0; i < 3; i++) { for(int j = 0; j < 2; j++) { - this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 3 + 1, 125 + j * 18, 26 + i * 18)); + this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 2 + 1, 125 + j * 18, 26 + i * 18)); } } + for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { @@ -47,18 +48,18 @@ public class ContainerStrandCaster extends Container { stack = originalStack.copy(); if(index <= 6) { - if(!this.mergeItemStack(originalStack, 10, this.inventorySlots.size(), true)) { + if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 7, this.inventorySlots.size(), true)) { return null; } slot.onSlotChange(originalStack, stack); - } else if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 10, false)) { + } else if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 7, false)) { return null; } if(originalStack.stackSize == 0) { - slot.putStack((ItemStack) null); + slot.putStack(null); } else { slot.onSlotChanged(); } diff --git a/src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java b/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java similarity index 77% rename from src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java rename to src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java index 9d31e4b1f..16a151207 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIStrandCaster.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java @@ -1,9 +1,7 @@ package com.hbm.inventory.gui; -import com.hbm.inventory.container.ContainerStrandCaster; +import com.hbm.inventory.container.ContainerMachineStrandCaster; import com.hbm.inventory.material.Mats; -import com.hbm.inventory.material.Mats.MaterialStack; -import com.hbm.inventory.material.NTMMaterial; import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior; import com.hbm.lib.RefStrings; import com.hbm.tileentity.machine.TileEntityMachineStrandCaster; @@ -20,15 +18,14 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; import java.util.List; -import java.util.Locale; -public class GUIStrandCaster extends GuiInfoContainer { +public class GUIMachineStrandCaster extends GuiInfoContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png"); private TileEntityMachineStrandCaster caster; - public GUIStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) { - super(new ContainerStrandCaster(invPlayer, tedf)); + public GUIMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) { + super(new ContainerMachineStrandCaster(invPlayer, tedf)); caster = tedf; this.xSize = 176; @@ -41,47 +38,48 @@ public class GUIStrandCaster extends GuiInfoContainer { drawStackInfo(x, y, 16, 17); - caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 38, 16, 24); - caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 89, 16, 24); + caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 14, 16, 24); + caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 64, 16, 24); } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 0xffffff); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24); - caster.steam.renderTank(guiLeft + 82, guiTop + 89, this.zLevel, 16, 24); - if (caster.amount != 0) { GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); int targetHeight = (caster.amount) * 79 / caster.getCapacity(); - int offset = caster.type.smeltable == SmeltingBehavior.ADDITIVE ? 34 : 0; //additives use a differnt texture int hex = caster.type.moltenColor; //hex = 0xC18336; Color color = new Color(hex); GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F); - drawTexturedModalRect(guiLeft + 17, guiTop + 92 - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight); + drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); GL11.glEnable(GL11.GL_BLEND); GL11.glColor4f(1F, 1F, 1F, 0.3F); - drawTexturedModalRect(guiLeft + 17, guiTop + 92 - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight); + drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); GL11.glDisable(GL11.GL_BLEND); - } + } OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glColor3f(255, 255, 255); + + caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24); + caster.steam.renderTank(guiLeft + 82, guiTop + 90, this.zLevel, 16, 24); + } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index ab715f454..fa932c02a 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -307,6 +307,7 @@ public class ClientProxy extends ServerProxy { //Foundry ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineStrandCaster.class, new RenderStrandCaster()); //AMS ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter()); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 38837f228..349d6da07 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -50,7 +50,10 @@ public class ResourceManager { public static final IModelCustom boiler_burst = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/boiler_burst.obj")); public static final IModelCustom boiler_industrial = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/industrial_boiler.obj")); public static final IModelCustom hephaestus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/hephaestus.obj")); - + + //Caster o' Strands + public static final IModelCustom strand_caster = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/strand_caster.obj")); + //Furnaces public static final IModelCustom furnace_iron = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/furnace_iron.obj")); public static final IModelCustom furnace_steel = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/furnace_steel.obj")); @@ -447,7 +450,10 @@ public class ResourceManager { public static final ResourceLocation boiler_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/boiler.png"); public static final ResourceLocation boiler_industrial_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/industrial_boiler.png"); public static final ResourceLocation hephaestus_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/hephaestus.png"); - + + //Strand Caster + public static final ResourceLocation strand_caster_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/strand_caster.png"); + //Furnaces public static final ResourceLocation furnace_iron_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/furnace_iron.png"); public static final ResourceLocation furnace_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/furnace_steel.png"); diff --git a/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java new file mode 100644 index 000000000..cba933802 --- /dev/null +++ b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java @@ -0,0 +1,63 @@ +package com.hbm.render.tileentity; + +import com.hbm.blocks.BlockDummyable; +import com.hbm.blocks.ModBlocks; +import com.hbm.main.ResourceManager; +import com.hbm.render.item.ItemRenderBase; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.client.IItemRenderer; +import org.lwjgl.opengl.GL11; + +public class RenderStrandCaster extends TileEntitySpecialRenderer implements IItemRendererProvider { + + @Override + public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) { + + GL11.glPushMatrix(); + + GL11.glTranslated(x, y, z); + switch(te.getBlockMetadata() - BlockDummyable.offset) { + case 4: GL11.glRotatef(90, 0F, 1F, 0F); break; + case 3: GL11.glRotatef(180, 0F, 1F, 0F); break; + case 5: GL11.glRotatef(270, 0F, 1F, 0F); break; + case 2: GL11.glRotatef(0, 0F, 1F, 0F); break; + } + + GL11.glRotated(180, 0, 1, 0); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glShadeModel(GL11.GL_SMOOTH); + + bindTexture(ResourceManager.strand_caster_tex); + ResourceManager.strand_caster.renderAll(); + + GL11.glShadeModel(GL11.GL_FLAT); + + GL11.glPopMatrix(); + + } + + @Override + public Item getItemForRenderer() { + return Item.getItemFromBlock(ModBlocks.machine_strand_caster); + } + + @Override + public IItemRenderer getRenderer() { + return new ItemRenderBase( ) { + public void renderInventory() { + GL11.glTranslated(1, 1, 0); + GL11.glScaled(2.5, 2.5, 2.5); + } + public void renderCommon() { + GL11.glScaled(0.5, 0.5, 0.5); + GL11.glShadeModel(GL11.GL_SMOOTH); + bindTexture(ResourceManager.strand_caster_tex); ResourceManager.strand_caster.renderAll(); + GL11.glShadeModel(GL11.GL_FLAT); + } + }; + } + +} diff --git a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java index 593a33505..edf40ace1 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java +++ b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java @@ -1,6 +1,7 @@ package com.hbm.tileentity; +import api.hbm.block.ICrucibleAcceptor; import com.hbm.interfaces.IFluidAcceptor; import com.hbm.interfaces.IFluidContainer; import com.hbm.inventory.fluid.FluidType; @@ -9,14 +10,16 @@ import api.hbm.energy.IEnergyConnector; import api.hbm.energy.IEnergyUser; import api.hbm.fluid.IFluidConnector; import api.hbm.tile.IHeatSource; +import com.hbm.inventory.material.Mats; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergyUser, IFluidAcceptor, ISidedInventory, IFluidConnector, IHeatSource { +public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergyUser, IFluidAcceptor, ISidedInventory, IFluidConnector, IHeatSource, ICrucibleAcceptor { TileEntity tile; boolean inventory; @@ -501,4 +504,36 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy ((IHeatSource)getTile()).useUpHeat(heat); } } + + @Override + public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { + if(this.moltenMetal && getTile() instanceof ICrucibleAcceptor){ + return ((ICrucibleAcceptor)getTile()).canAcceptPartialPour(world, x, y, z, dX, dY, dZ, side, stack); + } + return false; + } + + @Override + public Mats.MaterialStack pour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { + if(this.moltenMetal && getTile() instanceof ICrucibleAcceptor){ + return ((ICrucibleAcceptor)getTile()).pour(world, x, y, z, dX, dY, dZ, side, stack); + } + return null; + } + + @Override + public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { + if(this.moltenMetal && getTile() instanceof ICrucibleAcceptor){ + return ((ICrucibleAcceptor)getTile()).canAcceptPartialFlow(world, x, y, z, side, stack); + } + return false; + } + + @Override + public Mats.MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { + if(this.moltenMetal && getTile() instanceof ICrucibleAcceptor){ + return ((ICrucibleAcceptor)getTile()).flow(world, x, y, z, side, stack); + } + return null; + } } diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index d51bdab4b..807e3e8df 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -297,6 +297,7 @@ public class TileMappings { put(TileEntityFoundryOutlet.class, "tileentity_foundry_outlet"); put(TileEntityFoundrySlagtap.class, "tileentity_foundry_slagtap"); put(TileEntitySlag.class, "tileentity_foundry_slag"); + put(TileEntityMachineStrandCaster.class, "tileentity_strand_caster"); put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter"); put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace"); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java index 145c2159a..9003229c6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java @@ -7,7 +7,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class TileEntityFoundryBasin extends TileEntityFoundryCastingBase implements IRenderFoundry { - + + public TileEntityFoundryBasin() { + super(2); + } + + @Override + public String getName() { + return null; + } + @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java index fd3916492..3267ac602 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java @@ -7,6 +7,7 @@ import com.hbm.items.machine.ItemMold.Mold; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -19,11 +20,15 @@ import net.minecraftforge.common.util.ForgeDirection; * */ public abstract class TileEntityFoundryCastingBase extends TileEntityFoundryBase implements ISidedInventory { - - public ItemStack slots[] = new ItemStack[2]; + public ItemStack[] slots; + public TileEntityFoundryCastingBase(int slotCount) { + slots = new ItemStack[slotCount]; + } public int cooloff = 100; + public abstract String getName(); + @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java index 607b1d13c..146e79b1b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java @@ -3,7 +3,16 @@ package com.hbm.tileentity.machine; import com.hbm.inventory.material.NTMMaterial; public class TileEntityFoundryMold extends TileEntityFoundryCastingBase implements IRenderFoundry { - + + public TileEntityFoundryMold() { + super(2); + } + + @Override + public String getName() { + return null; + } + @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java index cf09975e3..188dd6ab2 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -3,14 +3,15 @@ package com.hbm.tileentity.machine; import api.hbm.block.ICrucibleAcceptor; import api.hbm.fluid.IFluidStandardTransceiver; import com.hbm.blocks.BlockDummyable; -import com.hbm.inventory.container.ContainerAssemfac; -import com.hbm.inventory.container.ContainerStrandCaster; +import com.hbm.inventory.container.ContainerMachineStrandCaster; +import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; -import com.hbm.inventory.gui.GUIAssemfac; -import com.hbm.inventory.gui.GUIStrandCaster; +import com.hbm.inventory.gui.GUIMachineStrandCaster; +import com.hbm.inventory.material.Mats; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMold; +import com.hbm.items.machine.ItemScraps; import com.hbm.packet.NBTPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.IGUIProvider; @@ -20,120 +21,169 @@ import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; //god thank you bob for this base class -public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor,ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver { +public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor,ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver, IInventory { + public FluidTank water; public FluidTank steam; - - public ItemStack[] slots = new ItemStack[6]; + @Override + public String getName() { + return "container.machineStrandCaster"; + } + @Override + public String getInventoryName() { + return getName(); + } public TileEntityMachineStrandCaster() { - + super(7); water = new FluidTank(Fluids.WATER, 64_000); steam = new FluidTank(Fluids.SPENTSTEAM, 64_000); } - int cooldown = 10; + + @Override public void updateEntity() { - super.updateEntity(); - if(!worldObj.isRemote) { + if (!worldObj.isRemote) { - if(this.amount > this.getCapacity()) { - this.amount = this.getCapacity(); + if (this.lastType != this.type || this.lastAmount != this.amount) { + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + this.lastType = this.type; + this.lastAmount = this.amount; } - if(this.amount == 0) { + if (this.amount >= this.getCapacity()) { + if(amount > getCapacity()) { + ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount)); + EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord, zCoord + 0.5, scrap); + worldObj.spawnEntityInWorld(item); + } + this.amount = this.getCapacity(); + + } + + if (this.amount == 0) { this.type = null; } - if(worldObj.getTotalWorldTime() % 20 == 0) { + if (worldObj.getTotalWorldTime() % 20 == 0) { this.updateConnections(); } - for(DirPos pos : getConPos()) { - this.sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); - } ItemMold.Mold mold = this.getInstalledMold(); - if(mold != null && this.amount >= this.getCapacity() && slots[1] == null && water.getFill() >= getWaterRequired() ) { - cooldown--; + if (canProcess()) { - if(cooldown <= 0) { - this.amount -= mold.getCost(); + int itemsCasted = Math.min(amount / mold.getCost(), 9); - ItemStack out = mold.getOutput(type); + for (int j = 0; j < itemsCasted; j++) { + this.amount -= mold.getCost(); - for(int i = 1; i < 7; i++) { - if(slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) { - continue; - } + ItemStack out = mold.getOutput(type); + + for (int i = 1; i < 7; i++) { + if (slots[i] == null){ + slots[i] = out.copy(); + break; + } + + if (slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) { + slots[i].stackSize += out.stackSize; + break; + } - if(slots[i] == null) { - slots[i] = out.copy(); - } else { - slots[i].stackSize += out.stackSize; } } + markChanged(); + + water.setFill(water.getFill() - getWaterRequired() * itemsCasted); + steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted); } + } - water.setFill(water.getFill() - getWaterRequired()); - steam.setFill(steam.getFill() + getWaterRequired()); + NBTTagCompound data = new NBTTagCompound(); - cooldown = 20; - } - NBTTagCompound data = new NBTTagCompound(); + water.writeToNBT(data, "w"); + steam.writeToNBT(data, "s"); - water.writeToNBT(data, "w"); - steam.writeToNBT(data, "s"); + this.networkPack(data, 150); - this.networkPack(data, 150); + } + + public boolean canProcess() { + ItemMold.Mold mold = this.getInstalledMold(); + if(type != null && mold != null && this.amount >= mold.getCost() * 9 && mold.getOutput(type) != null) { + for (int i = 1; i < 7; i++) { + + if (slots[i] == null || slots[i].isItemEqual(mold.getOutput(type)) && slots[i].stackSize + mold.getOutput(type).stackSize <= mold.getOutput(type).getMaxStackSize()) + return water.getFill() >= getWaterRequired() && steam.getFill() < steam.getMaxFill();; - } else { - cooldown = 20; } } - + return false; + } public DirPos[] getConPos() { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); return new DirPos[] { - new DirPos(xCoord - dir.offsetX, yCoord, zCoord, rot), - new DirPos(xCoord, yCoord, zCoord + dir.offsetX, rot), - new DirPos(xCoord, yCoord, zCoord + dir.offsetX * 5, rot.getOpposite()), - new DirPos(xCoord- dir.offsetX, yCoord, zCoord + dir.offsetX * 5, rot.getOpposite()), + new DirPos(xCoord + rot.offsetX * 2, yCoord, zCoord + rot.offsetZ * 2, rot), + new DirPos(xCoord - rot.offsetX, yCoord, zCoord - rot.offsetZ, rot.getOpposite()), + new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX * 5, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ * 5, rot), + new DirPos(xCoord - rot.offsetX - dir.offsetX * 5, yCoord, zCoord - rot.offsetZ + dir.offsetZ * 5, rot.getOpposite()), }; } @Override + public ItemMold.Mold getInstalledMold() { + if(slots[0] == null) return null; + + if(slots[0].getItem() == ModItems.mold) { + return ((ItemMold) slots[0].getItem()).getMold(slots[0]); + } + + return null; + } + @Override public int getMoldSize() { return getInstalledMold().size; } - + @Override + public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { + if(this.type != null && this.type != stack.material) return false; + return this.amount >= this.getCapacity() && getInstalledMold() == null; + } @Override public int getCapacity() { ItemMold.Mold mold = this.getInstalledMold(); - return mold == null ? 0 : mold.getCost() * 10; + return mold == null ? 50000 : mold.getCost() * 50; } private int getWaterRequired() { - return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 10; + return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 50; } + private void updateConnections() { for(DirPos pos : getConPos()) { this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); } + for(DirPos pos : getConPos()) { + sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); + } } @Override @@ -153,14 +203,15 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase @Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { - return new ContainerStrandCaster(player.inventory, this); + return new ContainerMachineStrandCaster(player.inventory, this); } @Override @SideOnly(Side.CLIENT) public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { - return new GUIStrandCaster(player.inventory, this); + return new GUIMachineStrandCaster(player.inventory, this); } + public void networkPack(NBTTagCompound nbt, int range) { if(!worldObj.isRemote) @@ -170,6 +221,20 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase public void networkUnpack(NBTTagCompound nbt) { water.readFromNBT(nbt, "w"); steam.readFromNBT(nbt, "s"); + + } + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + water.writeToNBT(nbt, "w"); + steam.writeToNBT(nbt, "s"); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + water.readFromNBT(nbt, "w"); + steam.readFromNBT(nbt, "s"); } @Override public boolean isItemValidForSlot(int i, ItemStack stack) { @@ -192,4 +257,47 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase return new int[] { 1, 2, 3, 4, 5, 6}; } + public void markChanged() { + this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this); + } + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { + return false; + } else { + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128; + } + } + + + @Override + public boolean canInsertItem(int slot, ItemStack itemStack, int side) { + return this.isItemValidForSlot(slot, itemStack); + } + + @Override + public boolean canExtractItem(int slot, ItemStack itemStack, int side) { + return !this.isItemValidForSlot(slot, itemStack); + } + AxisAlignedBB bb = null; + + @Override + public AxisAlignedBB getRenderBoundingBox() { + + if(bb == null) { + bb = AxisAlignedBB.getBoundingBox( + xCoord - 1, + yCoord, + zCoord - 1, + xCoord + 2, + yCoord + 3, + zCoord + 7 + ); + } + + return bb; + } + + + } diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index f9681a2c0..7e4307b2a 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -720,6 +720,7 @@ container.machineSelenium=Radial Performance Engine container.machineShredder=Shredder container.machineSILEX=SILEX container.machineSolidifier=Solidifier +container.machineStrandCaster=Strand Caster container.machineTurbine=Steam Turbine container.machineTurbofan=Turbofan container.machineWoodBurner=Wood-Burner @@ -5190,6 +5191,7 @@ tile.machine_stirling_creative.desc=Turns heat into energy. Requires external he tile.machine_stirling_steel.name=Heavy Stirling Engine tile.machine_stirling_steel.desc=Turns heat into energy. Requires external heat source.$Uses a much heavier gear to support higher temperatures.$Heat transfer rate: T*0.1 TU/t$Max intake: 1500 TU/t$Efficiency: 50%% tile.machine_storage_drum.name=Nuclear Waste Disposal Drum +tile.machine_strand_caster.name=Strand Caster tile.machine_telelinker.name=Turret Telemetry Linker tile.machine_teleporter.name=Teleporter tile.machine_tower_large.name=Cooling Tower diff --git a/src/main/resources/assets/hbm/models/machines/strand_caster.obj b/src/main/resources/assets/hbm/models/machines/strand_caster.obj new file mode 100644 index 000000000..2a3ac8b78 --- /dev/null +++ b/src/main/resources/assets/hbm/models/machines/strand_caster.obj @@ -0,0 +1,1214 @@ +# Blender v2.79 (sub 0) OBJ File: 'strand_caster.blend' +# www.blender.org +o Plane +v -1.000000 0.000000 1.000000 +v 1.000000 0.000000 1.000000 +v -1.000000 0.000000 -6.000000 +v 1.000000 0.000000 -6.000000 +v -1.000000 0.750000 -6.000000 +v -1.000000 0.750000 1.000000 +v 1.000000 0.750000 1.000000 +v 1.000000 0.750000 -6.000000 +v -1.000000 2.000000 1.000000 +v 1.000000 2.000000 1.000000 +v -1.000000 3.000000 1.000000 +v 1.000000 3.000000 1.000000 +v -1.000000 2.000000 -1.000000 +v 1.000000 2.000000 -1.000000 +v -1.000000 3.000000 -1.000000 +v 1.000000 3.000000 -1.000000 +v -0.875000 3.000000 0.875000 +v 0.875000 3.000000 0.875000 +v -0.875000 3.000000 -0.875000 +v 0.875000 3.000000 -0.875000 +v -0.875000 2.125000 0.875000 +v 0.875000 2.125000 0.875000 +v -0.875000 2.125000 -0.875000 +v 0.875000 2.125000 -0.875000 +v -0.750000 2.000000 0.750000 +v 0.750000 2.000000 0.750000 +v -0.750000 2.000000 -0.750000 +v 0.750000 2.000000 -0.750000 +v -0.750000 0.500000 -1.500000 +v -0.750000 0.500000 0.750000 +v 0.750000 0.500000 0.750000 +v 0.750000 0.500000 -1.500000 +v -0.750000 0.750000 -5.750000 +v -0.750000 0.750000 0.750000 +v 0.750000 0.750000 0.750000 +v 0.750000 0.750000 -5.750000 +v -0.750000 0.500000 -5.750000 +v -0.750000 0.500000 0.750000 +v 0.750000 0.500000 0.750000 +v 0.750000 0.500000 -5.750000 +v -0.500000 0.937500 -1.500000 +v 0.500000 0.937500 -1.500000 +v -0.500000 0.937500 -5.250000 +v 0.500000 0.937500 -5.250000 +v -0.500000 1.062500 -5.250000 +v -0.500000 1.062500 -1.500000 +v 0.500000 1.062500 -1.500000 +v 0.500000 1.062500 -5.250000 +v 0.750000 1.250000 -1.500000 +v -0.750000 1.250000 -1.500000 +v 0.750000 0.812500 -3.125000 +v -0.750000 0.812500 -3.125000 +v -0.750000 0.812500 -2.125000 +v 0.750000 0.812500 -2.125000 +v -0.750000 0.724112 -2.088388 +v 0.750000 0.724112 -2.088388 +v -0.750000 0.687500 -2.000000 +v 0.750000 0.687500 -2.000000 +v -0.750000 0.724112 -1.911612 +v 0.750000 0.724112 -1.911612 +v -0.750000 0.812500 -1.875000 +v 0.750000 0.812500 -1.875000 +v -0.750000 0.900888 -1.911612 +v 0.750000 0.900888 -1.911612 +v -0.750000 0.937500 -2.000000 +v 0.750000 0.937500 -2.000000 +v -0.750000 0.900888 -2.088388 +v 0.750000 0.900888 -2.088388 +v -0.750000 0.724112 -3.088388 +v 0.750000 0.724112 -3.088388 +v -0.750000 0.687500 -3.000000 +v 0.750000 0.687500 -3.000000 +v -0.750000 0.724112 -2.911612 +v 0.750000 0.724112 -2.911612 +v -0.750000 0.812500 -2.875000 +v 0.750000 0.812500 -2.875000 +v -0.750000 0.900888 -2.911612 +v 0.750000 0.900888 -2.911612 +v -0.750000 0.937500 -3.000000 +v 0.750000 0.937500 -3.000000 +v -0.750000 0.900888 -3.088388 +v 0.750000 0.900888 -3.088388 +v 0.750000 0.812500 -4.125000 +v -0.750000 0.812500 -4.125000 +v -0.750000 0.724112 -4.088388 +v 0.750000 0.724112 -4.088388 +v -0.750000 0.687500 -4.000000 +v 0.750000 0.687500 -4.000000 +v -0.750000 0.724112 -3.911612 +v 0.750000 0.724112 -3.911612 +v -0.750000 0.812500 -3.875000 +v 0.750000 0.812500 -3.875000 +v -0.750000 0.900888 -3.911612 +v 0.750000 0.900888 -3.911612 +v -0.750000 0.937500 -4.000000 +v 0.750000 0.937500 -4.000000 +v -0.750000 0.900888 -4.088388 +v 0.750000 0.900888 -4.088388 +v 0.750000 0.812500 -5.125000 +v -0.750000 0.812500 -5.125000 +v -0.750000 0.724112 -5.088388 +v 0.750000 0.724112 -5.088388 +v -0.750000 0.687500 -5.000000 +v 0.750000 0.687500 -5.000000 +v -0.750000 0.724112 -4.911612 +v 0.750000 0.724112 -4.911612 +v -0.750000 0.812500 -4.875000 +v 0.750000 0.812500 -4.875000 +v -0.750000 0.900888 -4.911612 +v 0.750000 0.900888 -4.911612 +v -0.750000 0.937500 -5.000000 +v 0.750000 0.937500 -5.000000 +v -0.750000 0.900888 -5.088388 +v 0.750000 0.900888 -5.088388 +v 0.750000 1.187500 -3.625000 +v -0.750000 1.187500 -3.625000 +v -0.750000 1.187500 -2.625000 +v 0.750000 1.187500 -2.625000 +v -0.750000 1.099112 -2.588388 +v 0.750000 1.099112 -2.588388 +v -0.750000 1.062500 -2.500000 +v 0.750000 1.062500 -2.500000 +v -0.750000 1.099112 -2.411612 +v 0.750000 1.099112 -2.411612 +v -0.750000 1.187500 -2.375000 +v 0.750000 1.187500 -2.375000 +v -0.750000 1.275888 -2.411612 +v 0.750000 1.275888 -2.411612 +v -0.750000 1.312500 -2.500000 +v 0.750000 1.312500 -2.500000 +v -0.750000 1.275888 -2.588388 +v 0.750000 1.275888 -2.588388 +v -0.750000 1.099112 -3.588388 +v 0.750000 1.099112 -3.588388 +v -0.750000 1.062500 -3.500000 +v 0.750000 1.062500 -3.500000 +v -0.750000 1.099112 -3.411612 +v 0.750000 1.099112 -3.411612 +v -0.750000 1.187500 -3.375000 +v 0.750000 1.187500 -3.375000 +v -0.750000 1.275888 -3.411612 +v 0.750000 1.275888 -3.411612 +v -0.750000 1.312500 -3.500000 +v 0.750000 1.312500 -3.500000 +v -0.750000 1.275888 -3.588388 +v 0.750000 1.275888 -3.588388 +v 0.750000 1.187500 -4.625000 +v -0.750000 1.187500 -4.625000 +v -0.750000 1.099112 -4.588388 +v 0.750000 1.099112 -4.588388 +v -0.750000 1.062500 -4.500000 +v 0.750000 1.062500 -4.500000 +v -0.750000 1.099112 -4.411612 +v 0.750000 1.099112 -4.411612 +v -0.750000 1.187500 -4.375000 +v 0.750000 1.187500 -4.375000 +v -0.750000 1.275888 -4.411612 +v 0.750000 1.275888 -4.411612 +v -0.750000 1.312500 -4.500000 +v 0.750000 1.312500 -4.500000 +v -0.750000 1.275888 -4.588388 +v 0.750000 1.275888 -4.588388 +v 0.750000 0.937500 -2.125000 +v 0.875000 0.937500 -2.125000 +v 0.750000 0.937500 -2.375000 +v 0.875000 0.937500 -2.375000 +v 0.750000 1.062500 -2.375000 +v -0.750000 1.312500 -2.125000 +v -0.875000 1.312500 -2.125000 +v 0.875000 1.062500 -2.375000 +v -0.750000 1.062500 -2.375000 +v 0.750000 1.312500 -2.125000 +v 0.875000 1.312500 -2.125000 +v -0.875000 1.062500 -2.375000 +v 0.875000 1.062500 -4.625000 +v 0.750000 1.062500 -4.625000 +v -0.750000 0.937500 -2.375000 +v -0.875000 0.937500 -2.375000 +v -0.750000 0.937500 -2.125000 +v -0.875000 0.937500 -2.125000 +v 0.875000 1.312500 -4.875000 +v 0.750000 1.312500 -4.875000 +v 0.875000 0.937500 -4.625000 +v 0.750000 0.937500 -4.625000 +v 0.875000 0.937500 -4.875000 +v 0.750000 0.937500 -4.875000 +v -0.750000 1.062500 -4.625000 +v -0.875000 1.062500 -4.625000 +v -0.750000 1.312500 -4.875000 +v -0.875000 1.312500 -4.875000 +v -0.750000 0.937500 -4.625000 +v -0.875000 0.937500 -4.625000 +v -0.750000 0.937500 -4.875000 +v -0.875000 0.937500 -4.875000 +v 0.750000 0.937500 -1.625000 +v 0.875000 0.937500 -1.625000 +v -0.750000 0.937500 -1.625000 +v -0.875000 0.937500 -1.625000 +v 0.750000 0.937500 -5.375000 +v 0.875000 0.937500 -5.375000 +v -0.750000 0.937500 -5.375000 +v -0.875000 0.937500 -5.375000 +v 0.750000 0.750000 -1.625000 +v 0.875000 0.750000 -1.625000 +v -0.875000 0.750000 -1.625000 +v -0.750000 0.750000 -1.625000 +v 0.750000 0.750000 -5.375000 +v 0.875000 0.750000 -5.375000 +v -0.875000 0.750000 -5.375000 +v -0.750000 0.750000 -5.375000 +v 0.250000 1.250000 -1.500000 +v 0.161612 1.275888 -1.474112 +v 0.125000 1.338388 -1.411612 +v 0.161612 1.400888 -1.349112 +v 0.250000 1.426777 -1.323223 +v 0.338388 1.400888 -1.349112 +v 0.375000 1.338388 -1.411612 +v 0.338388 1.275888 -1.474112 +v 0.250000 1.426777 -1.573223 +v 0.161612 1.426777 -1.536612 +v 0.125000 1.426777 -1.448223 +v 0.161612 1.426777 -1.359835 +v 0.338388 1.426777 -1.359835 +v 0.375000 1.426777 -1.448223 +v 0.338388 1.426777 -1.536612 +v 0.250000 1.603553 -1.500000 +v 0.161612 1.577665 -1.474112 +v 0.125000 1.515165 -1.411612 +v 0.161612 1.452665 -1.349112 +v 0.338388 1.452665 -1.349112 +v 0.375000 1.515165 -1.411612 +v 0.338388 1.577665 -1.474112 +v -0.161612 1.275888 -1.474112 +v -0.125000 1.338388 -1.411612 +v -0.161612 1.400888 -1.349112 +v -0.250000 1.426777 -1.323223 +v -0.338388 1.400888 -1.349112 +v -0.375000 1.338388 -1.411612 +v -0.338388 1.275888 -1.474112 +v -0.250000 1.250000 -1.500000 +v 0.161612 2.152189 -0.899587 +v 0.250000 2.178077 -0.925476 +v 0.125000 2.089689 -0.837087 +v 0.161612 2.027189 -0.774587 +v 0.375000 2.089689 -0.837087 +v 0.338388 2.027189 -0.774587 +v 0.338388 2.152189 -0.899587 +v 0.250000 2.001301 -0.748699 +v -0.250000 1.426777 -1.573223 +v -0.338388 1.426777 -1.536612 +v -0.375000 1.426777 -1.448223 +v -0.338388 1.426777 -1.359835 +v -0.161612 1.426777 -1.359835 +v -0.125000 1.426777 -1.448223 +v -0.161612 1.426777 -1.536612 +v -0.250000 1.603553 -1.500000 +v -0.338388 1.577665 -1.474112 +v -0.375000 1.515165 -1.411612 +v -0.338388 1.452665 -1.349112 +v -0.161612 1.452665 -1.349112 +v -0.125000 1.515165 -1.411612 +v -0.161612 1.577665 -1.474112 +v -0.338388 2.152189 -0.899587 +v -0.250000 2.178077 -0.925476 +v -0.375000 2.089689 -0.837087 +v -0.338388 2.027189 -0.774587 +v -0.125000 2.089689 -0.837087 +v -0.161612 2.027189 -0.774587 +v -0.161612 2.152189 -0.899587 +v -0.250000 2.001301 -0.748699 +v 0.750000 0.750000 -0.125000 +v 0.750000 2.000000 -0.125000 +v 0.838388 0.750000 -0.088388 +v 0.838388 2.000000 -0.088388 +v 0.875000 0.750000 0.000000 +v 0.875000 2.000000 0.000000 +v 0.838388 0.750000 0.088388 +v 0.838388 2.000000 0.088388 +v 0.750000 0.750000 0.125000 +v 0.750000 2.000000 0.125000 +v 0.750000 0.750000 0.375000 +v 0.750000 2.000000 0.375000 +v 0.838388 0.750000 0.411612 +v 0.838388 2.000000 0.411612 +v 0.875000 0.750000 0.500000 +v 0.875000 2.000000 0.500000 +v 0.838388 0.750000 0.588388 +v 0.838388 2.000000 0.588388 +v 0.750000 0.750000 0.625000 +v 0.750000 2.000000 0.625000 +v 0.750000 0.750000 -0.625000 +v 0.750000 2.000000 -0.625000 +v 0.838388 0.750000 -0.588388 +v 0.838388 2.000000 -0.588388 +v 0.875000 0.750000 -0.500000 +v 0.875000 2.000000 -0.500000 +v 0.838388 0.750000 -0.411612 +v 0.838388 2.000000 -0.411612 +v 0.750000 0.750000 -0.375000 +v 0.750000 2.000000 -0.375000 +v -0.750000 0.750000 -0.125000 +v -0.750000 2.000000 -0.125000 +v -0.750000 0.750000 0.125000 +v -0.750000 2.000000 0.125000 +v -0.838388 0.750000 0.088388 +v -0.838388 2.000000 0.088388 +v -0.875000 0.750000 0.000000 +v -0.875000 2.000000 0.000000 +v -0.838388 0.750000 -0.088388 +v -0.838388 2.000000 -0.088388 +v -0.750000 0.750000 0.375000 +v -0.750000 2.000000 0.375000 +v -0.750000 0.750000 0.625000 +v -0.750000 2.000000 0.625000 +v -0.838388 0.750000 0.588388 +v -0.838388 2.000000 0.588388 +v -0.875000 0.750000 0.500000 +v -0.875000 2.000000 0.500000 +v -0.838388 0.750000 0.411612 +v -0.838388 2.000000 0.411612 +v -0.750000 0.750000 -0.625000 +v -0.750000 2.000000 -0.625000 +v -0.750000 0.750000 -0.375000 +v -0.750000 2.000000 -0.375000 +v -0.838388 0.750000 -0.411612 +v -0.838388 2.000000 -0.411612 +v -0.875000 0.750000 -0.500000 +v -0.875000 2.000000 -0.500000 +v -0.838388 0.750000 -0.588388 +v -0.838388 2.000000 -0.588388 +vt 0.484375 0.100000 +vt 0.046875 0.366667 +vt 0.046875 0.100000 +vt 0.484375 0.733333 +vt 0.468750 0.500000 +vt 0.484375 0.466667 +vt 0.531250 0.366667 +vt 0.484375 0.366667 +vt -0.000000 0.100000 +vt 0.046875 0.466667 +vt 0.484375 -0.000000 +vt 0.656250 0.600000 +vt 0.531250 0.466667 +vt 0.656250 0.466667 +vt 0.656250 0.466667 +vt 0.531250 0.600000 +vt 0.531250 0.466667 +vt 0.531250 0.466667 +vt 0.656250 0.600000 +vt 0.531250 0.600000 +vt 0.531250 0.200000 +vt 0.656250 0.466667 +vt 0.656250 0.600000 +vt 0.531250 0.466667 +vt 0.656250 0.466667 +vt 0.539062 0.616667 +vt 0.531250 0.600000 +vt 0.648438 0.616667 +vt 0.539062 0.733333 +vt 0.539062 0.616667 +vt 0.656250 0.600000 +vt 0.539062 0.616667 +vt 0.539062 0.616667 +vt 0.531250 0.600000 +vt 0.539062 0.733333 +vt 0.648438 0.966667 +vt 0.539062 0.966667 +vt 0.648438 0.616667 +vt 0.539062 0.733333 +vt 0.648438 0.616667 +vt 0.648438 0.616667 +vt 0.539062 0.733333 +vt 0.468750 0.733333 +vt 0.062500 0.766667 +vt 0.062500 0.733333 +vt 0.062500 0.700000 +vt 0.046875 0.733333 +vt 0.531250 -0.000000 +vt 0.671875 -0.000000 +vt 0.671875 0.100000 +vt 0.812500 0.200000 +vt 0.765625 -0.000000 +vt 0.906250 -0.000000 +vt 0.765625 0.100000 +vt 0.906250 0.200000 +vt 1.000000 -0.000000 +vt 1.000000 0.200000 +vt 0.058594 0.500000 +vt 0.468750 0.700000 +vt 0.468750 0.966667 +vt 0.062500 0.966667 +vt 0.062500 1.000000 +vt 0.468750 1.000000 +vt 0.484375 0.966667 +vt 0.468750 0.766667 +vt 0.484375 0.766667 +vt 0.046875 0.766667 +vt 0.046875 0.966667 +vt 0.890625 0.566667 +vt 0.656250 0.700000 +vt 0.656250 0.566667 +vt 0.656250 0.566667 +vt 0.890625 0.700000 +vt 0.656250 0.700000 +vt 0.664062 0.700000 +vt 0.656250 0.566667 +vt 0.664062 0.566667 +vt 0.890625 0.683333 +vt 0.656250 0.700000 +vt 0.656250 0.683333 +vt 0.656250 0.583333 +vt 0.890625 0.566667 +vt 0.890625 0.583333 +vt 0.671875 0.200000 +vt 0.765625 0.200000 +vt 0.695312 0.550000 +vt 0.679688 0.566667 +vt 0.679688 0.516667 +vt 0.875000 0.500000 +vt 0.851562 0.516667 +vt 0.851562 0.500000 +vt 0.687500 0.433333 +vt 0.695312 0.450000 +vt 0.687500 0.450000 +vt 0.695312 0.466667 +vt 0.679688 0.450000 +vt 0.695312 0.450000 +vt 0.835938 0.550000 +vt 0.851562 0.566667 +vt 0.835938 0.566667 +vt 0.679688 0.500000 +vt 0.656250 0.516667 +vt 0.656250 0.500000 +vt 0.695312 0.433333 +vt 0.835938 0.450000 +vt 0.695312 0.450000 +vt 0.835938 0.433333 +vt 0.843750 0.450000 +vt 0.695312 0.466667 +vt 0.679688 0.500000 +vt 0.851562 0.500000 +vt 0.679688 0.450000 +vt 0.695312 0.450000 +vt 0.835938 0.466667 +vt 0.851562 0.450000 +vt 0.695312 0.433333 +vt 0.835938 0.450000 +vt 0.679688 0.516667 +vt 0.835938 0.550000 +vt 0.851562 0.566667 +vt 0.835938 0.566667 +vt 0.656250 0.516667 +vt 0.656250 0.500000 +vt 0.695312 0.550000 +vt 0.679688 0.566667 +vt 0.835938 0.466667 +vt 0.851562 0.450000 +vt 0.835938 0.433333 +vt 0.843750 0.450000 +vt 0.687500 0.433333 +vt 0.687500 0.450000 +vt 0.875000 0.500000 +vt 0.851562 0.516667 +vt 0.902344 0.391667 +vt 0.667969 0.408333 +vt 0.667969 0.391667 +vt 0.902344 0.391667 +vt 0.667969 0.408333 +vt 0.667969 0.391667 +vt 0.902344 0.366667 +vt 0.914062 0.408333 +vt 0.902344 0.408333 +vt 0.656250 0.391667 +vt 0.667969 0.433333 +vt 0.902344 0.408333 +vt 0.667969 0.433333 +vt 0.914062 0.408333 +vt 0.656250 0.391667 +vt 0.902344 0.366667 +vt 0.531250 0.100000 +vt 0.000000 0.366667 +vt 0.046875 -0.000000 +vt 0.656250 0.200000 +vt 0.648438 0.733333 +vt 0.648438 0.733333 +vt 0.648438 0.733333 +vt 0.648438 0.733333 +vt 0.621094 0.200000 +vt 0.531250 0.200000 +vt 0.890625 0.700000 +vt 0.890625 0.566667 +vt 0.656250 0.700000 +vt 0.890625 0.700000 +vt 0.656250 0.566667 +vt 0.695312 0.566667 +vt 0.875000 0.516667 +vt 0.843750 0.433333 +vt 0.835938 0.450000 +vt 0.695312 0.566667 +vt 0.835938 0.450000 +vt 0.843750 0.433333 +vt 0.875000 0.516667 +vt 0.667969 0.366667 +vt 0.914062 0.391667 +vt 0.656250 0.408333 +vt 0.902344 0.433333 +vt 0.902344 0.433333 +vt 0.914062 0.391667 +vt 0.656250 0.408333 +vt 0.667969 0.366667 +vt 0.921875 0.200000 +vt 0.929688 0.400000 +vt 0.921875 0.400000 +vt 0.960938 0.200000 +vt 0.968750 0.400000 +vt 0.960938 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.937500 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.937500 0.400000 +vt 0.929688 0.200000 +vt 0.929688 0.400000 +vt 0.914062 0.200000 +vt 0.921875 0.400000 +vt 0.914062 0.400000 +vt 0.921875 0.200000 +vt 0.921875 0.400000 +vt 0.921875 0.200000 +vt 0.929688 0.400000 +vt 0.914062 0.200000 +vt 0.914062 0.400000 +vt 0.929688 0.200000 +vt 0.937500 0.400000 +vt 0.953125 0.200000 +vt 0.960938 0.400000 +vt 0.953125 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.968750 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.960938 0.200000 +vt 0.945312 0.200000 +vt 0.953125 0.400000 +vt 0.929688 0.200000 +vt 0.945312 0.200000 +vt 0.953125 0.200000 +vt 0.914062 0.200000 +vt 0.914062 0.400000 +vt 0.953125 0.200000 +vt 0.960938 0.400000 +vt 0.953125 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.968750 0.400000 +vt 0.960938 0.200000 +vt 0.945312 0.200000 +vt 0.921875 0.200000 +vt 0.929688 0.400000 +vt 0.921875 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.937500 0.400000 +vt 0.929688 0.200000 +vt 0.914062 0.200000 +vt 0.914062 0.400000 +vt 0.953125 0.200000 +vt 0.960938 0.400000 +vt 0.953125 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.968750 0.400000 +vt 0.960938 0.200000 +vt 0.945312 0.200000 +vt 0.921875 0.200000 +vt 0.929688 0.400000 +vt 0.921875 0.400000 +vt 0.960938 0.200000 +vt 0.968750 0.400000 +vt 0.960938 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.937500 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.937500 0.400000 +vt 0.929688 0.200000 +vt 0.929688 0.400000 +vt 0.914062 0.200000 +vt 0.921875 0.400000 +vt 0.914062 0.400000 +vt 0.921875 0.200000 +vt 0.921875 0.400000 +vt 0.921875 0.200000 +vt 0.929688 0.400000 +vt 0.914062 0.200000 +vt 0.914062 0.400000 +vt 0.929688 0.200000 +vt 0.937500 0.400000 +vt 0.953125 0.200000 +vt 0.960938 0.400000 +vt 0.953125 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.968750 0.400000 +vt 0.937500 0.200000 +vt 0.945312 0.400000 +vt 0.960938 0.200000 +vt 0.945312 0.200000 +vt 0.953125 0.400000 +vt 0.929688 0.200000 +vt 0.945312 0.200000 +vt 0.953125 0.200000 +vt 0.914062 0.200000 +vt 0.914062 0.400000 +vt 0.953125 0.200000 +vt 0.960938 0.400000 +vt 0.953125 0.400000 +vt 0.968750 0.200000 +vt 0.976562 0.400000 +vt 0.968750 0.400000 +vt 0.960938 0.200000 +vt 0.945312 0.200000 +vt 0.695312 0.341667 +vt 0.703125 0.333333 +vt 0.703125 0.350000 +vt 0.710938 0.358333 +vt 0.718750 0.333333 +vt 0.718750 0.358333 +vt 0.726562 0.358333 +vt 0.734375 0.333333 +vt 0.742188 0.341667 +vt 0.734375 0.350000 +vt 0.710938 0.333333 +vt 0.726562 0.333333 +vt 0.726562 0.308333 +vt 0.734375 0.316667 +vt 0.742188 0.333333 +vt 0.703125 0.316667 +vt 0.695312 0.325000 +vt 0.695312 0.333333 +vt 0.710938 0.308333 +vt 0.687500 0.333333 +vt 0.750000 0.333333 +vt 0.742188 0.325000 +vt 0.742188 0.200000 +vt 0.750000 0.308333 +vt 0.742188 0.308333 +vt 0.718750 0.358333 +vt 0.726562 0.333333 +vt 0.726562 0.358333 +vt 0.734375 0.200000 +vt 0.734375 0.308333 +vt 0.695312 0.200000 +vt 0.703125 0.308333 +vt 0.695312 0.308333 +vt 0.718750 0.200000 +vt 0.718750 0.308333 +vt 0.703125 0.200000 +vt 0.695312 0.341667 +vt 0.703125 0.333333 +vt 0.703125 0.350000 +vt 0.687500 0.200000 +vt 0.687500 0.308333 +vt 0.710938 0.333333 +vt 0.710938 0.358333 +vt 0.718750 0.333333 +vt 0.726562 0.308333 +vt 0.703125 0.316667 +vt 0.734375 0.333333 +vt 0.742188 0.341667 +vt 0.734375 0.350000 +vt 0.734375 0.316667 +vt 0.742188 0.333333 +vt 0.710938 0.200000 +vt 0.695312 0.333333 +vt 0.710938 0.308333 +vt 0.687500 0.333333 +vt 0.695312 0.325000 +vt 0.750000 0.333333 +vt 0.742188 0.325000 +vt 0.742188 0.200000 +vt 0.750000 0.308333 +vt 0.742188 0.308333 +vt 0.734375 0.200000 +vt 0.734375 0.308333 +vt 0.695312 0.200000 +vt 0.703125 0.308333 +vt 0.695312 0.308333 +vt 0.718750 0.200000 +vt 0.718750 0.308333 +vt 0.703125 0.200000 +vt 0.687500 0.200000 +vt 0.687500 0.308333 +vt 0.710938 0.200000 +vt 0.687500 0.366667 +vt 0.679688 0.200000 +vt 0.687500 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.679688 0.200000 +vt 0.687500 0.366667 +vt 0.687500 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.679688 0.200000 +vt 0.687500 0.366667 +vt 0.687500 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.687500 0.366667 +vt 0.679688 0.200000 +vt 0.687500 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.687500 0.366667 +vt 0.679688 0.200000 +vt 0.687500 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.687500 0.366667 +vt 0.679688 0.200000 +vt 0.687500 0.200000 +vt 0.679688 0.366667 +vt 0.671875 0.200000 +vt 0.671875 0.366667 +vt 0.664062 0.200000 +vt 0.664062 0.366667 +vt 0.656250 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.976562 0.200000 +vt 0.750000 0.200000 +vt 0.726562 0.200000 +vt 0.750000 0.200000 +vt 0.726562 0.200000 +vt 0.656250 0.366667 +vt 0.656250 0.366667 +vt 0.656250 0.366667 +vt 0.656250 0.366667 +vt 0.656250 0.366667 +vt 0.656250 0.366667 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.7071 -0.7071 +vn -0.0000 -0.7071 0.7071 +vn -0.0000 -0.7071 -0.7071 +vn -0.0000 0.7071 0.7071 +vn -0.7311 0.2611 0.6303 +vn -0.9955 -0.0000 -0.0949 +vn -0.9947 -0.0393 -0.0948 +vn -0.6333 -0.2962 -0.7150 +vn -0.0000 -0.3827 -0.9239 +vn 0.6333 -0.2962 -0.7150 +vn 0.9955 -0.0000 -0.0949 +vn 0.7311 0.2611 0.6303 +vn 0.9947 -0.0393 -0.0948 +vn -0.6630 -0.0000 -0.7486 +vn 0.6630 -0.0000 -0.7486 +vn 0.6794 0.4063 -0.6110 +vn 0.9987 0.0196 -0.0473 +vn 0.7574 -0.0000 0.6530 +vn -0.9987 0.0196 -0.0473 +vn -0.7263 -0.3800 0.5728 +vn -0.7574 -0.0000 0.6530 +vn -0.6794 0.4063 -0.6110 +vn 0.0000 -0.5562 0.8311 +vn 0.7263 -0.3800 0.5728 +vn 0.7071 -0.5000 0.5000 +vn -0.7071 -0.5000 0.5000 +vn 0.0000 0.5628 -0.8266 +vn -0.7071 0.5000 -0.5000 +vn 0.3827 0.0000 -0.9239 +vn 0.7071 0.0000 -0.7071 +vn 0.7071 0.0000 0.7071 +vn 0.3827 0.0000 0.9239 +vn -0.3827 0.0000 0.9239 +vn -0.7071 0.0000 0.7071 +vn -0.7071 0.0000 -0.7071 +vn -0.3827 0.0000 -0.9239 +vn 0.7071 0.5000 -0.5000 +s off +f 3/1/1 2/2/1 1/3/1 +f 5/4/2 36/5/2 8/6/2 +f 3/1/3 8/7/3 4/8/3 +f 2/2/4 6/9/4 1/3/4 +f 4/8/5 7/10/5 2/2/5 +f 1/3/6 5/11/6 3/1/6 +f 12/12/4 9/13/4 10/14/4 +f 13/15/3 16/16/3 14/17/3 +f 10/18/5 16/19/5 12/20/5 +f 9/21/1 14/22/1 10/18/1 +f 11/23/6 13/24/6 9/25/6 +f 11/23/2 19/26/2 15/27/2 +f 17/28/5 23/29/5 19/26/5 +f 16/19/2 18/30/2 12/20/2 +f 15/31/2 20/32/2 16/16/2 +f 12/12/2 17/33/2 11/34/2 +f 22/35/2 23/36/2 21/37/2 +f 19/38/4 24/39/4 20/32/4 +f 20/40/6 22/35/6 18/30/6 +f 18/41/3 21/42/3 17/33/3 +f 36/43/6 39/44/6 35/45/6 +f 7/10/2 34/46/2 6/47/2 +f 31/48/5 32/49/5 49/50/5 +f 27/51/6 29/52/6 30/53/6 +f 49/50/3 29/52/3 50/54/3 +f 25/55/4 31/56/4 26/57/4 +f 8/6/2 35/58/2 7/10/2 +f 6/47/2 33/59/2 5/4/2 +f 39/44/2 37/60/2 38/61/2 +f 34/62/5 37/60/5 33/63/5 +f 33/64/4 40/65/4 36/66/4 +f 35/67/3 38/61/3 34/68/3 +f 43/69/1 42/70/1 41/71/1 +f 47/72/2 45/73/2 46/74/2 +f 43/75/3 48/76/3 44/77/3 +f 44/78/5 47/79/5 42/80/5 +f 41/81/6 45/82/6 43/83/6 +f 28/84/7 50/54/7 27/85/7 +f 167/86/6 163/87/6 172/88/6 +f 193/89/3 190/90/3 189/91/3 +f 165/92/3 170/93/3 166/94/3 +f 170/95/5 164/96/5 166/97/5 +f 188/98/6 194/99/6 192/100/6 +f 173/101/4 163/102/4 164/103/4 +f 174/104/1 187/105/1 171/106/1 +f 188/107/4 191/108/4 187/105/4 +f 171/109/5 189/91/5 168/110/5 +f 181/111/2 172/88/2 173/101/2 +f 171/109/5 179/112/5 177/113/5 +f 187/114/5 193/115/5 189/91/5 +f 167/116/1 175/117/1 170/93/1 +f 189/91/2 169/118/2 168/110/2 +f 176/119/6 186/120/6 184/121/6 +f 170/95/5 181/111/5 173/101/5 +f 172/88/6 176/119/6 167/86/6 +f 168/110/4 180/122/4 179/123/4 +f 169/118/6 188/98/6 174/124/6 +f 174/124/6 180/125/6 169/118/6 +f 175/126/5 185/127/5 181/111/5 +f 176/128/4 183/129/4 175/117/4 +f 178/130/3 171/106/3 177/131/3 +f 185/132/3 182/133/3 181/111/3 +f 201/134/2 198/135/2 197/136/2 +f 200/137/2 195/138/2 196/139/2 +f 197/136/5 210/140/5 201/134/5 +f 200/137/3 207/141/3 199/142/3 +f 195/138/4 204/143/4 196/139/4 +f 199/142/6 203/144/6 195/138/6 +f 202/145/6 205/146/6 198/135/6 +f 201/134/3 209/147/3 202/145/3 +f 198/135/4 206/148/4 197/136/4 +f 196/139/5 208/149/5 200/137/5 +f 3/1/1 4/8/1 2/2/1 +f 5/4/2 33/59/2 36/5/2 +f 3/1/3 5/150/3 8/7/3 +f 2/2/4 7/151/4 6/9/4 +f 4/8/5 8/6/5 7/10/5 +f 1/3/6 6/152/6 5/11/6 +f 12/12/4 11/34/4 9/13/4 +f 13/15/3 15/31/3 16/16/3 +f 10/18/5 14/22/5 16/19/5 +f 9/21/1 13/153/1 14/22/1 +f 11/23/6 15/27/6 13/24/6 +f 11/23/2 17/28/2 19/26/2 +f 17/28/5 21/154/5 23/29/5 +f 16/19/2 20/40/2 18/30/2 +f 15/31/2 19/38/2 20/32/2 +f 12/12/2 18/41/2 17/33/2 +f 22/35/2 24/155/2 23/36/2 +f 19/38/4 23/156/4 24/39/4 +f 20/40/6 24/155/6 22/35/6 +f 18/41/3 22/157/3 21/42/3 +f 36/43/6 40/65/6 39/44/6 +f 7/10/2 35/58/2 34/46/2 +f 49/50/5 28/158/5 31/48/5 +f 28/158/5 26/159/5 31/48/5 +f 30/53/6 25/55/6 27/51/6 +f 27/51/6 50/54/6 29/52/6 +f 49/50/3 32/49/3 29/52/3 +f 25/55/4 30/53/4 31/56/4 +f 8/6/2 36/5/2 35/58/2 +f 6/47/2 34/46/2 33/59/2 +f 39/44/2 40/65/2 37/60/2 +f 34/62/5 38/61/5 37/60/5 +f 33/64/4 37/60/4 40/65/4 +f 35/67/3 39/44/3 38/61/3 +f 43/69/1 44/160/1 42/70/1 +f 47/72/2 48/161/2 45/73/2 +f 43/75/3 45/162/3 48/76/3 +f 44/78/5 48/163/5 47/79/5 +f 41/81/6 46/164/6 45/82/6 +f 28/84/7 49/50/7 50/54/7 +f 167/86/6 165/165/6 163/87/6 +f 193/89/3 194/166/3 190/90/3 +f 165/92/3 167/116/3 170/93/3 +f 170/95/5 173/101/5 164/96/5 +f 188/98/6 190/90/6 194/99/6 +f 173/101/4 172/88/4 163/102/4 +f 174/104/1 188/107/1 187/105/1 +f 188/107/4 192/167/4 191/108/4 +f 171/109/5 187/114/5 189/91/5 +f 181/111/2 182/133/2 172/88/2 +f 171/109/5 168/110/5 179/112/5 +f 187/114/5 191/168/5 193/115/5 +f 167/116/1 176/128/1 175/117/1 +f 189/91/2 190/90/2 169/118/2 +f 176/119/6 182/133/6 186/120/6 +f 170/95/5 175/126/5 181/111/5 +f 172/88/6 182/133/6 176/119/6 +f 168/110/4 169/118/4 180/122/4 +f 169/118/6 190/90/6 188/98/6 +f 174/124/6 178/169/6 180/125/6 +f 175/126/5 183/170/5 185/127/5 +f 176/128/4 184/171/4 183/129/4 +f 178/130/3 174/104/3 171/106/3 +f 185/132/3 186/172/3 182/133/3 +f 201/134/2 202/145/2 198/135/2 +f 200/137/2 199/142/2 195/138/2 +f 197/136/5 206/173/5 210/140/5 +f 200/137/3 208/174/3 207/141/3 +f 195/138/4 203/175/4 204/143/4 +f 199/142/6 207/176/6 203/144/6 +f 202/145/6 209/177/6 205/146/6 +f 201/134/3 210/178/3 209/147/3 +f 198/135/4 205/179/4 206/148/4 +f 196/139/5 204/180/5 208/149/5 +s 1 +f 90/181/8 91/182/4 89/183/8 +f 54/184/3 55/185/9 53/186/3 +f 78/187/10 79/188/2 77/189/10 +f 56/190/9 57/191/1 55/185/9 +f 94/192/10 95/193/2 93/194/10 +f 76/195/4 77/189/10 75/196/4 +f 58/197/1 59/198/8 57/199/1 +f 74/200/8 75/196/4 73/201/8 +f 60/202/8 61/203/4 59/198/8 +f 72/204/1 73/201/8 71/205/1 +f 62/206/4 63/207/10 61/203/4 +f 82/208/7 52/209/3 81/210/7 +f 70/211/9 71/212/1 69/213/9 +f 64/214/10 65/215/2 63/207/10 +f 51/216/3 69/213/9 52/209/3 +f 66/217/2 67/218/7 65/215/2 +f 92/219/4 93/194/10 91/182/4 +f 80/220/2 81/210/7 79/188/2 +f 68/221/7 53/186/3 67/218/7 +f 88/222/1 89/183/8 87/223/1 +f 98/224/7 84/225/3 97/226/7 +f 86/227/9 87/228/1 85/229/9 +f 83/230/3 85/229/9 84/225/3 +f 96/231/2 97/226/7 95/193/2 +f 106/232/8 107/233/4 105/234/8 +f 110/235/10 111/236/2 109/237/10 +f 108/238/4 109/237/10 107/233/4 +f 104/239/1 105/234/8 103/240/1 +f 114/241/7 100/242/3 113/243/7 +f 102/244/9 103/245/1 101/246/9 +f 99/247/3 101/246/9 100/242/3 +f 112/248/2 113/243/7 111/236/2 +f 154/249/8 155/250/4 153/251/8 +f 118/252/3 119/253/9 117/254/3 +f 142/255/10 143/256/2 141/257/10 +f 120/258/9 121/259/1 119/253/9 +f 158/260/10 159/261/2 157/262/10 +f 140/263/4 141/257/10 139/264/4 +f 122/265/1 123/266/8 121/267/1 +f 138/268/8 139/264/4 137/269/8 +f 124/270/8 125/271/4 123/266/8 +f 136/272/1 137/269/8 135/273/1 +f 126/274/4 127/275/10 125/271/4 +f 146/276/7 116/277/3 145/278/7 +f 134/279/9 135/280/1 133/281/9 +f 128/282/10 129/283/2 127/275/10 +f 115/284/3 133/281/9 116/277/3 +f 130/285/2 131/286/7 129/283/2 +f 156/287/4 157/262/10 155/250/4 +f 144/288/2 145/278/7 143/256/2 +f 132/289/7 117/254/3 131/286/7 +f 152/290/1 153/251/8 151/291/1 +f 162/292/7 148/293/3 161/294/7 +f 150/295/9 151/296/1 149/297/9 +f 147/298/3 149/297/9 148/293/3 +f 160/299/2 161/294/7 159/261/2 +f 214/300/11 221/301/12 213/302/13 +f 212/303/14 219/304/3 211/305/15 +f 219/304/3 218/306/16 211/305/15 +f 224/307/17 216/308/18 217/309/19 +f 213/302/13 220/310/20 212/303/14 +f 225/311/21 217/309/19 218/306/16 +f 219/304/3 232/312/22 225/311/21 +f 231/313/23 223/314/24 224/307/17 +f 228/315/25 220/310/20 221/301/12 +f 225/311/21 231/313/23 224/307/17 +f 229/316/26 221/301/12 222/317/27 +f 227/318/28 219/304/3 220/310/20 +f 214/300/11 215/319/29 222/317/27 +f 222/317/27 215/319/29 229/316/26 +f 215/320/29 216/308/18 223/314/24 +f 223/314/24 230/321/30 215/320/29 +f 246/322/31 215/323/29 230/324/30 +f 240/325/15 255/326/21 233/327/16 +f 232/312/22 245/328/5 231/329/23 +f 244/330/32 228/331/25 229/332/26 +f 242/333/7 232/312/22 226/334/33 +f 245/328/5 230/324/30 231/329/23 +f 243/335/6 227/318/28 228/331/25 +f 237/336/11 251/337/12 238/338/13 +f 248/339/8 229/332/26 215/340/29 +f 238/338/13 250/341/20 239/342/14 +f 249/343/3 262/344/22 255/326/21 +f 258/345/25 250/341/20 251/337/12 +f 250/341/20 240/325/15 239/342/14 +f 254/346/17 235/347/18 234/348/19 +f 255/326/21 234/348/19 233/327/16 +f 261/349/23 253/350/24 254/346/17 +f 241/351/34 226/334/33 227/318/28 +f 255/326/21 261/349/23 254/346/17 +f 252/352/27 258/345/25 251/337/12 +f 257/353/28 249/343/3 250/341/20 +f 237/336/11 236/354/29 252/352/27 +f 252/352/27 236/354/29 259/355/26 +f 236/356/29 235/347/18 253/350/24 +f 253/350/24 260/357/30 236/356/29 +f 268/358/31 236/359/29 260/360/30 +f 262/344/22 267/361/5 261/362/23 +f 266/363/32 258/364/25 259/365/26 +f 264/366/7 262/344/22 256/367/33 +f 267/361/5 260/360/30 261/362/23 +f 265/368/6 257/353/28 258/364/25 +f 270/369/8 259/365/26 236/370/29 +f 263/371/34 256/367/33 257/353/28 +f 272/372/35 273/373/36 271/374/35 +f 274/375/36 275/376/5 273/373/36 +f 276/377/5 277/378/37 275/376/5 +f 278/379/37 279/380/38 277/378/37 +f 284/381/36 285/382/5 283/383/36 +f 282/384/35 283/383/36 281/385/35 +f 286/386/5 287/387/37 285/382/5 +f 288/388/37 289/389/38 287/387/37 +f 294/390/36 295/391/5 293/392/36 +f 292/393/35 293/392/36 291/394/35 +f 296/395/5 297/396/37 295/391/5 +f 298/397/37 299/398/38 297/396/37 +f 304/399/39 305/400/40 303/401/39 +f 306/402/40 307/403/6 305/400/40 +f 308/404/6 309/405/41 307/403/6 +f 310/406/41 301/407/42 309/405/41 +f 314/408/39 315/409/40 313/410/39 +f 316/411/40 317/412/6 315/409/40 +f 318/413/6 319/414/41 317/412/6 +f 320/415/41 311/416/42 319/414/41 +f 324/417/39 325/418/40 323/419/39 +f 326/420/40 327/421/6 325/418/40 +f 328/422/6 329/423/41 327/421/6 +f 330/424/41 321/425/42 329/423/41 +f 90/181/8 92/219/4 91/182/4 +f 54/184/3 56/190/9 55/185/9 +f 78/187/10 80/220/2 79/188/2 +f 56/190/9 58/426/1 57/191/1 +f 94/192/10 96/231/2 95/193/2 +f 76/195/4 78/187/10 77/189/10 +f 58/197/1 60/202/8 59/198/8 +f 74/200/8 76/195/4 75/196/4 +f 60/202/8 62/206/4 61/203/4 +f 72/204/1 74/200/8 73/201/8 +f 62/206/4 64/214/10 63/207/10 +f 82/208/7 51/216/3 52/209/3 +f 70/211/9 72/427/1 71/212/1 +f 64/214/10 66/217/2 65/215/2 +f 51/216/3 70/211/9 69/213/9 +f 66/217/2 68/221/7 67/218/7 +f 92/219/4 94/192/10 93/194/10 +f 80/220/2 82/208/7 81/210/7 +f 68/221/7 54/184/3 53/186/3 +f 88/222/1 90/181/8 89/183/8 +f 98/224/7 83/230/3 84/225/3 +f 86/227/9 88/428/1 87/228/1 +f 83/230/3 86/227/9 85/229/9 +f 96/231/2 98/224/7 97/226/7 +f 106/232/8 108/238/4 107/233/4 +f 110/235/10 112/248/2 111/236/2 +f 108/238/4 110/235/10 109/237/10 +f 104/239/1 106/232/8 105/234/8 +f 114/241/7 99/247/3 100/242/3 +f 102/244/9 104/429/1 103/245/1 +f 99/247/3 102/244/9 101/246/9 +f 112/248/2 114/241/7 113/243/7 +f 154/249/8 156/287/4 155/250/4 +f 118/252/3 120/258/9 119/253/9 +f 142/255/10 144/288/2 143/256/2 +f 120/258/9 122/430/1 121/259/1 +f 158/260/10 160/299/2 159/261/2 +f 140/263/4 142/255/10 141/257/10 +f 122/265/1 124/270/8 123/266/8 +f 138/268/8 140/263/4 139/264/4 +f 124/270/8 126/274/4 125/271/4 +f 136/272/1 138/268/8 137/269/8 +f 126/274/4 128/282/10 127/275/10 +f 146/276/7 115/284/3 116/277/3 +f 134/279/9 136/431/1 135/280/1 +f 128/282/10 130/285/2 129/283/2 +f 115/284/3 134/279/9 133/281/9 +f 130/285/2 132/289/7 131/286/7 +f 156/287/4 158/260/10 157/262/10 +f 144/288/2 146/276/7 145/278/7 +f 132/289/7 118/252/3 117/254/3 +f 152/290/1 154/249/8 153/251/8 +f 162/292/7 147/298/3 148/293/3 +f 150/295/9 152/432/1 151/296/1 +f 147/298/3 150/295/9 149/297/9 +f 160/299/2 162/292/7 161/294/7 +f 214/300/11 222/317/27 221/301/12 +f 212/303/14 220/310/20 219/304/3 +f 219/304/3 225/311/21 218/306/16 +f 224/307/17 223/314/24 216/308/18 +f 213/302/13 221/301/12 220/310/20 +f 225/311/21 224/307/17 217/309/19 +f 219/304/3 226/334/33 232/312/22 +f 231/313/23 230/321/30 223/314/24 +f 228/315/25 227/318/28 220/310/20 +f 225/311/21 232/312/22 231/313/23 +f 229/316/26 228/315/25 221/301/12 +f 227/318/28 226/334/33 219/304/3 +f 246/322/31 248/433/8 215/323/29 +f 240/325/15 249/343/3 255/326/21 +f 232/312/22 247/434/43 245/328/5 +f 244/330/32 243/335/6 228/331/25 +f 242/333/7 247/434/43 232/312/22 +f 245/328/5 246/322/31 230/324/30 +f 243/335/6 241/351/34 227/318/28 +f 237/336/11 252/352/27 251/337/12 +f 248/339/8 244/330/32 229/332/26 +f 238/338/13 251/337/12 250/341/20 +f 249/343/3 256/367/33 262/344/22 +f 258/345/25 257/353/28 250/341/20 +f 250/341/20 249/343/3 240/325/15 +f 254/346/17 253/350/24 235/347/18 +f 255/326/21 254/346/17 234/348/19 +f 261/349/23 260/357/30 253/350/24 +f 241/351/34 242/333/7 226/334/33 +f 255/326/21 262/344/22 261/349/23 +f 252/352/27 259/355/26 258/345/25 +f 257/353/28 256/367/33 249/343/3 +f 268/358/31 270/435/8 236/359/29 +f 262/344/22 269/436/43 267/361/5 +f 266/363/32 265/368/6 258/364/25 +f 264/366/7 269/436/43 262/344/22 +f 267/361/5 268/358/31 260/360/30 +f 265/368/6 263/371/34 257/353/28 +f 270/369/8 266/363/32 259/365/26 +f 263/371/34 264/366/7 256/367/33 +f 272/372/35 274/375/36 273/373/36 +f 274/375/36 276/377/5 275/376/5 +f 276/377/5 278/379/37 277/378/37 +f 278/379/37 280/437/38 279/380/38 +f 284/381/36 286/386/5 285/382/5 +f 282/384/35 284/381/36 283/383/36 +f 286/386/5 288/388/37 287/387/37 +f 288/388/37 290/438/38 289/389/38 +f 294/390/36 296/395/5 295/391/5 +f 292/393/35 294/390/36 293/392/36 +f 296/395/5 298/397/37 297/396/37 +f 298/397/37 300/439/38 299/398/38 +f 304/399/39 306/402/40 305/400/40 +f 306/402/40 308/404/6 307/403/6 +f 308/404/6 310/406/41 309/405/41 +f 310/406/41 302/440/42 301/407/42 +f 314/408/39 316/411/40 315/409/40 +f 316/411/40 318/413/6 317/412/6 +f 318/413/6 320/415/41 319/414/41 +f 320/415/41 312/441/42 311/416/42 +f 324/417/39 326/420/40 325/418/40 +f 326/420/40 328/422/6 327/421/6 +f 328/422/6 330/424/41 329/423/41 +f 330/424/41 322/442/42 321/425/42 From b6f1d422e8156cb1bf818ca4c6920963943d234d Mon Sep 17 00:00:00 2001 From: 70000hp <105080577+70000hp@users.noreply.github.com> Date: Thu, 28 Dec 2023 10:53:07 -0500 Subject: [PATCH 3/6] my workspace died again --- .../blocks/machine/MachineStrandCaster.java | 11 +++-- .../render/tileentity/RenderStrandCaster.java | 6 +-- .../hbm/tileentity/TileEntityProxyCombo.java | 2 + .../TileEntityMachineStrandCaster.java | 46 ++++++++++++++----- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index f515325ee..34b5b4384 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -67,11 +67,16 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce //up,down;forward,backward;left,right MultiblockHandlerXR.fillSpace(world, x, y, z, new int[]{2, 0, 1, 0, 1, 0}, this, dir); - - this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ); + //Fluid ports + this.makeExtra(world, x + rot.offsetX - dir.offsetX, y, z + rot.offsetZ - dir.offsetZ); + this.makeExtra(world, x - dir.offsetX, y, z - dir.offsetZ); this.makeExtra(world, x - dir.offsetX * 5, y, z - dir.offsetZ * 5); this.makeExtra(world, x + rot.offsetX - dir.offsetX * 5, y, z + rot.offsetZ - dir.offsetZ * 5); - + //Molten slop ports + this.makeExtra(world, x + rot.offsetX - dir.offsetX, y + 2, z + rot.offsetZ - dir.offsetZ); + this.makeExtra(world, x - dir.offsetX, y + 2, z - dir.offsetZ); + this.makeExtra(world, x + rot.offsetX, y + 2, z + rot.offsetZ); + this.makeExtra(world, x, y + 2, z); } @Override diff --git a/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java index cba933802..f7ec4d092 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java +++ b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java @@ -16,16 +16,16 @@ public class RenderStrandCaster extends TileEntitySpecialRenderer implements IIt public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) { GL11.glPushMatrix(); - - GL11.glTranslated(x, y, z); + GL11.glTranslated(x + 0.5, y, z + 0.5); switch(te.getBlockMetadata() - BlockDummyable.offset) { case 4: GL11.glRotatef(90, 0F, 1F, 0F); break; case 3: GL11.glRotatef(180, 0F, 1F, 0F); break; case 5: GL11.glRotatef(270, 0F, 1F, 0F); break; case 2: GL11.glRotatef(0, 0F, 1F, 0F); break; } - + GL11.glTranslated( 0.5, 0, 0.5); GL11.glRotated(180, 0, 1, 0); + GL11.glEnable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glShadeModel(GL11.GL_SMOOTH); diff --git a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java index edf40ace1..c0957eb69 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java +++ b/src/main/java/com/hbm/tileentity/TileEntityProxyCombo.java @@ -432,6 +432,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy this.inventory = nbt.getBoolean("inv"); this.power = nbt.getBoolean("power"); this.fluid = nbt.getBoolean("fluid"); + this.moltenMetal = nbt.getBoolean("metal"); this.heat = nbt.getBoolean("heat"); } @@ -442,6 +443,7 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy nbt.setBoolean("inv", inventory); nbt.setBoolean("power", power); nbt.setBoolean("fluid", fluid); + nbt.setBoolean("metal", moltenMetal); nbt.setBoolean("heat", heat); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java index 188dd6ab2..f06552fcc 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -4,7 +4,6 @@ import api.hbm.block.ICrucibleAcceptor; import api.hbm.fluid.IFluidStandardTransceiver; import com.hbm.blocks.BlockDummyable; import com.hbm.inventory.container.ContainerMachineStrandCaster; -import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineStrandCaster; @@ -28,7 +27,6 @@ import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -79,10 +77,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase this.type = null; } - if (worldObj.getTotalWorldTime() % 20 == 0) { - this.updateConnections(); - } - + this.updateConnections(); ItemMold.Mold mold = this.getInstalledMold(); @@ -137,18 +132,31 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase return false; } - public DirPos[] getConPos() { + public DirPos[] getFluidConPos() { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); return new DirPos[] { - new DirPos(xCoord + rot.offsetX * 2, yCoord, zCoord + rot.offsetZ * 2, rot), - new DirPos(xCoord - rot.offsetX, yCoord, zCoord - rot.offsetZ, rot.getOpposite()), + new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ, rot), + new DirPos(xCoord - rot.offsetX - dir.offsetX, yCoord, zCoord - rot.offsetZ - dir.offsetZ, rot.getOpposite()), new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX * 5, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ * 5, rot), new DirPos(xCoord - rot.offsetX - dir.offsetX * 5, yCoord, zCoord - rot.offsetZ + dir.offsetZ * 5, rot.getOpposite()), }; } + + public int[][] getMetalPourPos() { + + ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); + ForgeDirection rot = dir.getRotation(ForgeDirection.UP); + + return new int[][] { + new int[]{xCoord + rot.offsetX - dir.offsetX, yCoord + 2, zCoord + rot.offsetZ - dir.offsetZ}, + new int[]{xCoord - dir.offsetX, yCoord + 2, zCoord - dir.offsetZ}, + new int[]{xCoord + rot.offsetX, yCoord + 2, zCoord + rot.offsetZ}, + new int[]{xCoord, yCoord + 2, zCoord}, + }; + } @Override public ItemMold.Mold getInstalledMold() { if(slots[0] == null) return null; @@ -163,10 +171,24 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase public int getMoldSize() { return getInstalledMold().size; } + + @Override + public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { + + if(side != ForgeDirection.UP) return false; + for (int[] pos : getMetalPourPos()) { + if (pos[0]== x && pos[1] == y && pos[2] == z){ + return this.standardCheck(world, x, y, z, side, stack); + } + } + return false; + + } + @Override public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { if(this.type != null && this.type != stack.material) return false; - return this.amount >= this.getCapacity() && getInstalledMold() == null; + return !(this.amount >= this.getCapacity() || getInstalledMold() == null); } @Override public int getCapacity() { @@ -178,10 +200,10 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase } private void updateConnections() { - for(DirPos pos : getConPos()) { + for(DirPos pos : getFluidConPos()) { this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); } - for(DirPos pos : getConPos()) { + for(DirPos pos : getFluidConPos()) { sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); } } From 9340287403688e4b92f1c30cd6ad1f3c72295d68 Mon Sep 17 00:00:00 2001 From: 70000hp <105080577+70000hp@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:56:09 -0500 Subject: [PATCH 4/6] caster is finished, woo! --- .../blocks/machine/MachineStrandCaster.java | 62 +- .../ContainerMachineStrandCaster.java | 104 +- .../inventory/gui/GUIMachineStrandCaster.java | 108 +- .../inventory/recipes/AssemblerRecipes.java | 9 + .../render/tileentity/RenderStrandCaster.java | 72 +- .../machine/TileEntityCrucible.java | 4 +- .../TileEntityMachineStrandCaster.java | 122 +- .../hbm/models/machines/strand_caster.obj | 1200 +++++++---------- 8 files changed, 760 insertions(+), 921 deletions(-) diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index 34b5b4384..ee6dab3a8 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -32,16 +32,19 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcceptor, ILookOverlay { +public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcceptor, ILookOverlay, IToolable { public MachineStrandCaster() { super(Material.iron); } + //reminder, if the machine is a solid brick, get dimensions will already handle it without the need to use fillSapce //the order is up, down, forward, backward, left, right //x is for left(-)/right(+), z is for forward(+)/backward(-), y you already know @Override - public int[] getDimensions() {return new int[]{0, 0, 6, 0, 1, 0};} + public int[] getDimensions() { + return new int[]{0, 0, 6, 0, 1, 0}; + } @Override public int getOffset() { @@ -51,8 +54,8 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce @Override public TileEntity createNewTileEntity(World world, int meta) { - if(meta >= 12) return new TileEntityMachineStrandCaster(); - if(meta >= 6) return new TileEntityProxyCombo(true, false, true).moltenMetal(); + if (meta >= 12) return new TileEntityMachineStrandCaster(); + if (meta >= 6) return new TileEntityProxyCombo(true, false, true).moltenMetal(); return null; } @@ -83,12 +86,12 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { TileEntity poured = world.getTileEntity(x, y, z); - if(!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo)poured).moltenMetal)) return false; + if (!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo) poured).moltenMetal)) return false; int[] pos = this.findCore(world, x, y, z); - if(pos == null) return false; + if (pos == null) return false; TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]); - if(!(tile instanceof TileEntityMachineStrandCaster)) return false; + if (!(tile instanceof TileEntityMachineStrandCaster)) return false; TileEntityMachineStrandCaster caster = (TileEntityMachineStrandCaster) tile; return caster.canAcceptPartialPour(world, x, y, z, dX, dY, dZ, side, stack); @@ -98,12 +101,12 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce public Mats.MaterialStack pour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { TileEntity poured = world.getTileEntity(x, y, z); - if(!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo)poured).moltenMetal)) return stack; + if (!(poured instanceof TileEntityProxyCombo && ((TileEntityProxyCombo) poured).moltenMetal)) return stack; int[] pos = this.findCore(world, x, y, z); - if(pos == null) return stack; + if (pos == null) return stack; TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]); - if(!(tile instanceof TileEntityMachineStrandCaster)) return stack; + if (!(tile instanceof TileEntityMachineStrandCaster)) return stack; TileEntityMachineStrandCaster caster = (TileEntityMachineStrandCaster) tile; return caster.pour(world, x, y, z, dX, dY, dZ, side, stack); @@ -121,13 +124,13 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(world.isRemote) { + if (world.isRemote) { return true; } int[] coords = findCore(world, x, y, z); TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) world.getTileEntity(coords[0], coords[1], coords[2]); - if(cast != null) { + if (cast != null) { //insert mold if (player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.mold && cast.slots[0] == null) { cast.slots[0] = player.getHeldItem().copy(); @@ -164,7 +167,7 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce public void breakBlock(World world, int x, int y, int z, Block b, int i) { TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TileEntityMachineStrandCaster) { + if (te instanceof TileEntityMachineStrandCaster) { TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) te; if (cast.amount > 0) { @@ -179,12 +182,12 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) { int[] coords = findCore(world, x, y, z); - if(coords == null) return; + if (coords == null) return; TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) world.getTileEntity(coords[0], coords[1], coords[2]); List text = new ArrayList(); - if(cast != null) { + if (cast != null) { if (cast.slots[0] == null) { text.add(EnumChatFormatting.RED + I18nUtil.resolveKey("foundry.noCast")); } else if (cast.slots[0].getItem() == ModItems.mold) { @@ -194,13 +197,40 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce } ILookOverlay.printGeneric(event, I18nUtil.resolveKey(this.getUnlocalizedName() + ".name"), 0xFF4000, 0x401000, text); } + @Override protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) { x += dir.offsetX * o; z += dir.offsetZ * o; - if(!MultiblockHandlerXR.checkSpace(world, x, y , z, getDimensions(), x, y, z, dir)) return false; + if (!MultiblockHandlerXR.checkSpace(world, x, y, z, getDimensions(), x, y, z, dir)) return false; return MultiblockHandlerXR.checkSpace(world, x, y, z, new int[]{2, 0, 1, 0, 1, 0}, x, y, z, dir); } + + @Override + public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) { + if (tool != ToolType.SCREWDRIVER) + return false; + + TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + + if (cast.slots[0] == null) + return false; + + if (!player.inventory.addItemStackToInventory(cast.slots[0].copy())) { + EntityItem item = new EntityItem(world, x + 0.5, y + this.maxY, z + 0.5, cast.slots[0].copy()); + world.spawnEntityInWorld(item); + } else { + player.inventoryContainer.detectAndSendChanges(); + } + + cast.markDirty(); + world.markBlockForUpdate(x, y, z); + + cast.slots[0] = null; + cast.markDirty(); + + return true; + } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java index 1742c470c..bc9e89e46 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java @@ -11,65 +11,65 @@ import net.minecraft.item.ItemStack; public class ContainerMachineStrandCaster extends Container { - protected TileEntityMachineStrandCaster caster; + protected TileEntityMachineStrandCaster caster; - public ContainerMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster caster) { - this.caster = caster; - - //the wretched mold - this.addSlotToContainer(new SlotNonRetarded(this.caster, 0, 57, 62)); - - //output - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 2; j++) { - this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 2 + 1, 125 + j * 18, 26 + i * 18)); - } - } + public ContainerMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster caster) { + this.caster = caster; - - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 9; j++) { - this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 132 + i * 18)); - } - } + //the wretched mold + this.addSlotToContainer(new SlotNonRetarded(this.caster, 0, 57, 62)); - for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 190)); - } - } + //output + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 2; j++) { + this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 2 + 1, 125 + j * 18, 26 + i * 18)); + } + } - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int index) { - ItemStack stack = null; - Slot slot = (Slot) this.inventorySlots.get(index); - if(slot != null && slot.getHasStack()) { - ItemStack originalStack = slot.getStack(); - stack = originalStack.copy(); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 132 + i * 18)); + } + } - if(index <= 6) { - if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 7, this.inventorySlots.size(), true)) { - return null; - } - - slot.onSlotChange(originalStack, stack); - - } else if(!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 7, false)) { - return null; - } + for (int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 190)); + } + } - if(originalStack.stackSize == 0) { - slot.putStack(null); - } else { - slot.onSlotChanged(); - } - } + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + ItemStack stack = null; + Slot slot = (Slot) this.inventorySlots.get(index); - return stack; - } + if (slot != null && slot.getHasStack()) { + ItemStack originalStack = slot.getStack(); + stack = originalStack.copy(); - @Override - public boolean canInteractWith(EntityPlayer player) { - return caster.isUseableByPlayer(player); - } + if (index <= 6) { + if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 7, this.inventorySlots.size(), true)) { + return null; + } + + slot.onSlotChange(originalStack, stack); + + } else if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 7, false)) { + return null; + } + + if (originalStack.stackSize == 0) { + slot.putStack(null); + } else { + slot.onSlotChanged(); + } + } + + return stack; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return caster.isUseableByPlayer(player); + } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java b/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java index 16a151207..a2e959621 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineStrandCaster.java @@ -21,80 +21,78 @@ import java.util.List; public class GUIMachineStrandCaster extends GuiInfoContainer { - private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png"); - private TileEntityMachineStrandCaster caster; + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_strand_caster.png"); + private TileEntityMachineStrandCaster caster; - public GUIMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) { - super(new ContainerMachineStrandCaster(invPlayer, tedf)); - caster = tedf; + public GUIMachineStrandCaster(InventoryPlayer invPlayer, TileEntityMachineStrandCaster tedf) { + super(new ContainerMachineStrandCaster(invPlayer, tedf)); + caster = tedf; - this.xSize = 176; - this.ySize = 214; - } + this.xSize = 176; + this.ySize = 214; + } - @Override - public void drawScreen(int x, int y, float interp) { - super.drawScreen(x, y, interp); + @Override + public void drawScreen(int x, int y, float interp) { + super.drawScreen(x, y, interp); - drawStackInfo(x, y, 16, 17); + drawStackInfo(x, y, 16, 17); - caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 14, 16, 24); - caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 64, 16, 24); - } + caster.water.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 14, 16, 24); + caster.steam.renderTankInfo(this, x, y, guiLeft + 82, guiTop + 64, 16, 24); + } - @Override - protected void drawGuiContainerForegroundLayer(int i, int j) { - String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName()); + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.caster.hasCustomInventoryName() ? this.caster.getInventoryName() : I18n.format(this.caster.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff); - this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); - } + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 0xffffff); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - Minecraft.getMinecraft().getTextureManager().bindTexture(texture); - drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - if (caster.amount != 0) { + if (caster.amount != 0) { - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); - int targetHeight = (caster.amount) * 79 / caster.getCapacity(); + int targetHeight = Math.min((caster.amount) * 79 / caster.getCapacity(), 92); - int hex = caster.type.moltenColor; - //hex = 0xC18336; - Color color = new Color(hex); - GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F); - drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); - GL11.glEnable(GL11.GL_BLEND); - GL11.glColor4f(1F, 1F, 1F, 0.3F); - drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); - GL11.glDisable(GL11.GL_BLEND); + int hex = caster.type.moltenColor; + //hex = 0xC18336; + Color color = new Color(hex); + GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F); + drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); + GL11.glEnable(GL11.GL_BLEND); + GL11.glColor4f(1F, 1F, 1F, 0.3F); + drawTexturedModalRect(guiLeft + 17, guiTop + 93 - targetHeight, 176, 89 - targetHeight, 34, targetHeight); + GL11.glDisable(GL11.GL_BLEND); - } - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glColor3f(255, 255, 255); + } + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glColor3f(255, 255, 255); - caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24); - caster.steam.renderTank(guiLeft + 82, guiTop + 90, this.zLevel, 16, 24); + caster.water.renderTank(guiLeft + 82, guiTop + 38, this.zLevel, 16, 24); + caster.steam.renderTank(guiLeft + 82, guiTop + 90, this.zLevel, 16, 24); - } + } - - protected void drawStackInfo(int mouseX, int mouseY, int x, int y) { - - List list = new ArrayList(); - - if(caster.type == null) list.add(EnumChatFormatting.RED + "Empty"); - else list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey(caster.type.getUnlocalizedName()) + ": " + Mats.formatAmount(caster.amount, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))); + protected void drawStackInfo(int mouseX, int mouseY, int x, int y) { - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + x, guiTop + y, 36, 81, mouseX, mouseY, list); - } - + List list = new ArrayList(); + + if (caster.type == null) list.add(EnumChatFormatting.RED + "Empty"); + else + list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey(caster.type.getUnlocalizedName()) + ": " + Mats.formatAmount(caster.amount, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))); + + this.drawCustomInfoStat(mouseX, mouseY, guiLeft + x, guiTop + y, 36, 81, mouseX, mouseY, list); + } - } diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index bb377f685..444f6cf72 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -445,6 +445,15 @@ public class AssemblerRecipes { new ComparableStack(ModItems.wire_red_copper, 24), new ComparableStack(ModItems.circuit_copper, 1) }, 300); + + makeRecipe(new ComparableStack(ModBlocks.machine_strand_caster, 1), new AStack[] { + new ComparableStack(ModItems.ingot_firebrick, 12), + new OreDictStack(STEEL.plateCast(), 6), + new OreDictStack(CU.plateWelded(), 2), + new ComparableStack(ModItems.tank_steel, 2), + new OreDictStack(ANY_CONCRETE.any(), 8) + }, 100); + makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.STEEL.ordinal()), new AStack[] { new OreDictStack(STEEL.plate(), 16), new OreDictStack(CU.plate(), 4), diff --git a/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java index f7ec4d092..6d9579ab0 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java +++ b/src/main/java/com/hbm/render/tileentity/RenderStrandCaster.java @@ -2,18 +2,34 @@ package com.hbm.render.tileentity; 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.TileEntityMachineStrandCaster; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; +import java.awt.*; +import java.nio.DoubleBuffer; + public class RenderStrandCaster extends TileEntitySpecialRenderer implements IItemRendererProvider { + public static final ResourceLocation lava = new ResourceLocation(RefStrings.MODID, "textures/models/machines/lava_gray.png"); + private static DoubleBuffer buf = null; @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) { + TileEntityMachineStrandCaster caster = (TileEntityMachineStrandCaster) te; + + if(buf == null){ + buf = GLAllocation.createDirectByteBuffer(8*4).asDoubleBuffer(); + } GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y, z + 0.5); @@ -31,8 +47,54 @@ public class RenderStrandCaster extends TileEntitySpecialRenderer implements IIt GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.strand_caster_tex); - ResourceManager.strand_caster.renderAll(); - + ResourceManager.strand_caster.renderPart("caster"); + + + if (caster.amount != 0 && caster.getInstalledMold() != null) { + + double level = ((double) caster.amount / (double) caster.getCapacity()) * 0.675D; + double offset = ((double) caster.amount / (double) caster.getInstalledMold().getCost()) * 0.375D; + + int color = caster.type.moltenColor; + + int r = color >> 16 & 0xFF; + int g = color >> 8 & 0xFF; + int b = color & 0xFF; + + GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); + GL11.glDisable(GL11.GL_LIGHTING); + + GL11.glPushMatrix(); + GL11.glColor3f( r/ 255F, g/ 255F, b/ 255F); + GL11.glEnable(GL11.GL_CLIP_PLANE0); + buf.put(new double[] { 0, 0, -1, 0.5} ); + buf.rewind(); + GL11.glClipPlane(GL11.GL_CLIP_PLANE0, buf); + GL11.glTranslated(0,0,-offset + 3.4); + ResourceManager.strand_caster.renderPart("plate"); + GL11.glDisable(GL11.GL_CLIP_PLANE0); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_CULL_FACE); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F); + Tessellator tess = Tessellator.instance; + tess.setNormal(0F, 1F, 0F); + tess.setColorOpaque_F(r / 255F, g / 255F, b / 255F); + bindTexture(lava); + tess.startDrawingQuads(); + tess.addVertexWithUV(-0.9, 2.3 + level, -0.999, 0, 0); + tess.addVertexWithUV(-0.9, 2.3 + level, 0.999, 0, 1); + tess.addVertexWithUV(0.9, 2.3 + level, 0.999, 1, 1); + tess.addVertexWithUV(0.9, 2.3 + level, -0.999, 1, 0); + tess.draw(); + + GL11.glPopMatrix(); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glPopAttrib(); + } + + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); @@ -48,11 +110,11 @@ public class RenderStrandCaster extends TileEntitySpecialRenderer implements IIt public IItemRenderer getRenderer() { return new ItemRenderBase( ) { public void renderInventory() { - GL11.glTranslated(1, 1, 0); - GL11.glScaled(2.5, 2.5, 2.5); + GL11.glTranslated(2, 0, 2); + GL11.glScaled( 2, 2, 2); } public void renderCommon() { - GL11.glScaled(0.5, 0.5, 0.5); + GL11.glScaled(1, 1, 1); GL11.glShadeModel(GL11.GL_SMOOTH); bindTexture(ResourceManager.strand_caster_tex); ResourceManager.strand_caster.renderAll(); GL11.glShadeModel(GL11.GL_FLAT); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityCrucible.java b/src/main/java/com/hbm/tileentity/machine/TileEntityCrucible.java index a6ee9501c..e486b7a60 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityCrucible.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityCrucible.java @@ -158,7 +158,7 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite(); Vec3 impact = Vec3.createVectorHelper(0, 0, 0); - MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord + 0.25D, zCoord + 0.5D + dir.offsetZ * 1.875D, 6, true, this.wasteStack, MaterialShapes.NUGGET.q(2), impact); + MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord + 0.25D, zCoord + 0.5D + dir.offsetZ * 1.875D, 6, true, this.wasteStack, MaterialShapes.NUGGET.q(3), impact); if(didPour != null) { NBTTagCompound data = new NBTTagCompound(); @@ -198,7 +198,7 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro } Vec3 impact = Vec3.createVectorHelper(0, 0, 0); - MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord + 0.25D, zCoord + 0.5D + dir.offsetZ * 1.875D, 6, true, toCast, MaterialShapes.NUGGET.q(2), impact); + MaterialStack didPour = CrucibleUtil.pourFullStack(worldObj, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord + 0.25D, zCoord + 0.5D + dir.offsetZ * 1.875D, 6, true, toCast, MaterialShapes.NUGGET.q(3), impact); if(didPour != null) { NBTTagCompound data = new NBTTagCompound(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java index f06552fcc..dc9e30c83 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -32,14 +32,16 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; //god thank you bob for this base class -public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor,ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver, IInventory { +public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase implements IGUIProvider, ICrucibleAcceptor, ISidedInventory, IFluidStandardTransceiver, INBTPacketReceiver, IInventory { public FluidTank water; public FluidTank steam; + @Override public String getName() { return "container.machineStrandCaster"; } + @Override public String getInventoryName() { return getName(); @@ -64,12 +66,12 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase } if (this.amount >= this.getCapacity()) { - if(amount > getCapacity()) { + if (amount > getCapacity()) { ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount)); EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord, zCoord + 0.5, scrap); worldObj.spawnEntityInWorld(item); } - this.amount = this.getCapacity(); + this.amount = this.getCapacity(); } @@ -83,61 +85,61 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase if (canProcess()) { - int itemsCasted = Math.min(amount / mold.getCost(), 9); + int itemsCasted = Math.min(amount / mold.getCost(), 9); - for (int j = 0; j < itemsCasted; j++) { - this.amount -= mold.getCost(); + for (int j = 0; j < itemsCasted; j++) { + this.amount -= mold.getCost(); - ItemStack out = mold.getOutput(type); - - for (int i = 1; i < 7; i++) { - if (slots[i] == null){ - slots[i] = out.copy(); - break; - } - - if (slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) { - slots[i].stackSize += out.stackSize; - break; - } + ItemStack out = mold.getOutput(type); + for (int i = 1; i < 7; i++) { + if (slots[i] == null) { + slots[i] = out.copy(); + break; } + + if (slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) { + slots[i].stackSize += out.stackSize; + break; + } + } - markChanged(); - - water.setFill(water.getFill() - getWaterRequired() * itemsCasted); - steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted); } + markChanged(); + + water.setFill(water.getFill() - getWaterRequired() * itemsCasted); + steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted); } - - NBTTagCompound data = new NBTTagCompound(); - - water.writeToNBT(data, "w"); - steam.writeToNBT(data, "s"); - - this.networkPack(data, 150); - } + NBTTagCompound data = new NBTTagCompound(); + + water.writeToNBT(data, "w"); + steam.writeToNBT(data, "s"); + + this.networkPack(data, 150); + + } + public boolean canProcess() { ItemMold.Mold mold = this.getInstalledMold(); - if(type != null && mold != null && this.amount >= mold.getCost() * 9 && mold.getOutput(type) != null) { + if (type != null && mold != null && this.amount >= mold.getCost() * 9 && mold.getOutput(type) != null) { for (int i = 1; i < 7; i++) { - - if (slots[i] == null || slots[i].isItemEqual(mold.getOutput(type)) && slots[i].stackSize + mold.getOutput(type).stackSize <= mold.getOutput(type).getMaxStackSize()) - return water.getFill() >= getWaterRequired() && steam.getFill() < steam.getMaxFill();; + if (slots[i] == null || slots[i].isItemEqual(mold.getOutput(type)) && slots[i].stackSize + mold.getOutput(type).stackSize <= mold.getOutput(type).getMaxStackSize()) + return water.getFill() >= getWaterRequired() && steam.getFill() < steam.getMaxFill(); } } return false; } + public DirPos[] getFluidConPos() { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - return new DirPos[] { + return new DirPos[]{ new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ, rot), new DirPos(xCoord - rot.offsetX - dir.offsetX, yCoord, zCoord - rot.offsetZ - dir.offsetZ, rot.getOpposite()), new DirPos(xCoord + rot.offsetX * 2 - dir.offsetX * 5, yCoord, zCoord + rot.offsetZ * 2 - dir.offsetZ * 5, rot), @@ -150,23 +152,25 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - return new int[][] { + return new int[][]{ new int[]{xCoord + rot.offsetX - dir.offsetX, yCoord + 2, zCoord + rot.offsetZ - dir.offsetZ}, new int[]{xCoord - dir.offsetX, yCoord + 2, zCoord - dir.offsetZ}, new int[]{xCoord + rot.offsetX, yCoord + 2, zCoord + rot.offsetZ}, new int[]{xCoord, yCoord + 2, zCoord}, }; } + @Override public ItemMold.Mold getInstalledMold() { - if(slots[0] == null) return null; + if (slots[0] == null) return null; - if(slots[0].getItem() == ModItems.mold) { + if (slots[0].getItem() == ModItems.mold) { return ((ItemMold) slots[0].getItem()).getMold(slots[0]); } return null; } + @Override public int getMoldSize() { return getInstalledMold().size; @@ -175,9 +179,9 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase @Override public boolean canAcceptPartialPour(World world, int x, int y, int z, double dX, double dY, double dZ, ForgeDirection side, Mats.MaterialStack stack) { - if(side != ForgeDirection.UP) return false; + if (side != ForgeDirection.UP) return false; for (int[] pos : getMetalPourPos()) { - if (pos[0]== x && pos[1] == y && pos[2] == z){ + if (pos[0] == x && pos[1] == y && pos[2] == z) { return this.standardCheck(world, x, y, z, side, stack); } } @@ -187,40 +191,42 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase @Override public boolean standardCheck(World world, int x, int y, int z, ForgeDirection side, Mats.MaterialStack stack) { - if(this.type != null && this.type != stack.material) return false; + if (this.type != null && this.type != stack.material) return false; return !(this.amount >= this.getCapacity() || getInstalledMold() == null); } + @Override public int getCapacity() { ItemMold.Mold mold = this.getInstalledMold(); - return mold == null ? 50000 : mold.getCost() * 50; + return mold == null ? 50000 : mold.getCost() * 10; } + private int getWaterRequired() { return getInstalledMold() != null ? 5 * getInstalledMold().getCost() : 50; } private void updateConnections() { - for(DirPos pos : getFluidConPos()) { + for (DirPos pos : getFluidConPos()) { this.trySubscribe(water.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); } - for(DirPos pos : getFluidConPos()) { + for (DirPos pos : getFluidConPos()) { sendFluid(steam, worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); } } @Override public FluidTank[] getSendingTanks() { - return new FluidTank[] { steam }; + return new FluidTank[]{steam}; } @Override public FluidTank[] getReceivingTanks() { - return new FluidTank[] { water }; + return new FluidTank[]{water}; } @Override public FluidTank[] getAllTanks() { - return new FluidTank[] { water, steam }; + return new FluidTank[]{water, steam}; } @Override @@ -235,16 +241,17 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase } public void networkPack(NBTTagCompound nbt, int range) { - - if(!worldObj.isRemote) + if (!worldObj.isRemote) PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(nbt, xCoord, yCoord, zCoord), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range)); } + @Override public void networkUnpack(NBTTagCompound nbt) { water.readFromNBT(nbt, "w"); steam.readFromNBT(nbt, "s"); } + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); @@ -258,10 +265,11 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase water.readFromNBT(nbt, "w"); steam.readFromNBT(nbt, "s"); } + @Override public boolean isItemValidForSlot(int i, ItemStack stack) { - if(i == 0) { + if (i == 0) { return stack.getItem() == ModItems.mold; } @@ -276,15 +284,16 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase @Override public int[] getAccessibleSlotsFromSide(int meta) { - return new int[] { 1, 2, 3, 4, 5, 6}; + return new int[]{1, 2, 3, 4, 5, 6}; } public void markChanged() { this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this); } + @Override public boolean isUseableByPlayer(EntityPlayer player) { - if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { return false; } else { return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 128; @@ -301,25 +310,24 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase public boolean canExtractItem(int slot, ItemStack itemStack, int side) { return !this.isItemValidForSlot(slot, itemStack); } + AxisAlignedBB bb = null; @Override public AxisAlignedBB getRenderBoundingBox() { - if(bb == null) { + if (bb == null) { bb = AxisAlignedBB.getBoundingBox( xCoord - 1, yCoord, zCoord - 1, - xCoord + 2, + xCoord + 6, yCoord + 3, - zCoord + 7 + zCoord + 6 ); } - return bb; } - } diff --git a/src/main/resources/assets/hbm/models/machines/strand_caster.obj b/src/main/resources/assets/hbm/models/machines/strand_caster.obj index 2a3ac8b78..2a009d538 100644 --- a/src/main/resources/assets/hbm/models/machines/strand_caster.obj +++ b/src/main/resources/assets/hbm/models/machines/strand_caster.obj @@ -1,10 +1,11 @@ -# Blender v2.79 (sub 0) OBJ File: 'strand_caster.blend' +# Blender 3.6.1 # www.blender.org -o Plane +mtllib strand_caster.mtl +o caster v -1.000000 0.000000 1.000000 v 1.000000 0.000000 1.000000 -v -1.000000 0.000000 -6.000000 -v 1.000000 0.000000 -6.000000 +v -1.000000 -0.000000 -6.000000 +v 1.000000 -0.000000 -6.000000 v -1.000000 0.750000 -6.000000 v -1.000000 0.750000 1.000000 v 1.000000 0.750000 1.000000 @@ -31,24 +32,14 @@ v -0.750000 2.000000 -0.750000 v 0.750000 2.000000 -0.750000 v -0.750000 0.500000 -1.500000 v -0.750000 0.500000 0.750000 -v 0.750000 0.500000 0.750000 v 0.750000 0.500000 -1.500000 v -0.750000 0.750000 -5.750000 v -0.750000 0.750000 0.750000 v 0.750000 0.750000 0.750000 v 0.750000 0.750000 -5.750000 v -0.750000 0.500000 -5.750000 -v -0.750000 0.500000 0.750000 v 0.750000 0.500000 0.750000 v 0.750000 0.500000 -5.750000 -v -0.500000 0.937500 -1.500000 -v 0.500000 0.937500 -1.500000 -v -0.500000 0.937500 -5.250000 -v 0.500000 0.937500 -5.250000 -v -0.500000 1.062500 -5.250000 -v -0.500000 1.062500 -1.500000 -v 0.500000 1.062500 -1.500000 -v 0.500000 1.062500 -5.250000 v 0.750000 1.250000 -1.500000 v -0.750000 1.250000 -1.500000 v 0.750000 0.812500 -3.125000 @@ -275,8 +266,8 @@ v 0.750000 0.750000 -0.125000 v 0.750000 2.000000 -0.125000 v 0.838388 0.750000 -0.088388 v 0.838388 2.000000 -0.088388 -v 0.875000 0.750000 0.000000 -v 0.875000 2.000000 0.000000 +v 0.875000 0.750000 -0.000000 +v 0.875000 2.000000 -0.000000 v 0.838388 0.750000 0.088388 v 0.838388 2.000000 0.088388 v 0.750000 0.750000 0.125000 @@ -307,8 +298,8 @@ v -0.750000 0.750000 0.125000 v -0.750000 2.000000 0.125000 v -0.838388 0.750000 0.088388 v -0.838388 2.000000 0.088388 -v -0.875000 0.750000 0.000000 -v -0.875000 2.000000 0.000000 +v -0.875000 0.750000 -0.000000 +v -0.875000 2.000000 -0.000000 v -0.838388 0.750000 -0.088388 v -0.838388 2.000000 -0.088388 v -0.750000 0.750000 0.375000 @@ -331,6 +322,49 @@ v -0.875000 0.750000 -0.500000 v -0.875000 2.000000 -0.500000 v -0.838388 0.750000 -0.588388 v -0.838388 2.000000 -0.588388 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 0.7071 -0.7071 +vn -0.0000 -0.7071 0.7071 +vn -0.0000 -0.7071 -0.7071 +vn -0.0000 0.7071 0.7071 +vn -0.7311 0.2611 0.6303 +vn -0.9955 -0.0000 -0.0949 +vn -0.9947 -0.0393 -0.0948 +vn -0.6333 -0.2962 -0.7150 +vn -0.0000 -0.3827 -0.9239 +vn 0.6333 -0.2962 -0.7150 +vn 0.9955 -0.0000 -0.0949 +vn 0.7311 0.2611 0.6303 +vn 0.9947 -0.0393 -0.0948 +vn -0.6630 -0.0000 -0.7486 +vn 0.6630 -0.0000 -0.7486 +vn 0.6794 0.4063 -0.6110 +vn 0.9987 0.0196 -0.0473 +vn 0.7574 -0.0000 0.6530 +vn -0.9987 0.0196 -0.0473 +vn -0.7263 -0.3800 0.5728 +vn -0.7574 -0.0000 0.6530 +vn -0.6794 0.4063 -0.6110 +vn -0.0000 -0.5562 0.8311 +vn 0.7263 -0.3800 0.5728 +vn 0.7071 -0.5000 0.5000 +vn -0.7071 -0.5000 0.5000 +vn -0.0000 0.5628 -0.8266 +vn -0.7071 0.5000 -0.5000 +vn 0.3827 -0.0000 -0.9239 +vn 0.7071 -0.0000 -0.7071 +vn 0.7071 -0.0000 0.7071 +vn 0.3827 -0.0000 0.9239 +vn -0.3827 -0.0000 0.9239 +vn -0.7071 -0.0000 0.7071 +vn -0.7071 -0.0000 -0.7071 +vn -0.3827 -0.0000 -0.9239 +vn 0.7071 0.5000 -0.5000 vt 0.484375 0.100000 vt 0.046875 0.366667 vt 0.046875 0.100000 @@ -345,34 +379,13 @@ vt 0.484375 -0.000000 vt 0.656250 0.600000 vt 0.531250 0.466667 vt 0.656250 0.466667 -vt 0.656250 0.466667 -vt 0.531250 0.600000 -vt 0.531250 0.466667 -vt 0.531250 0.466667 -vt 0.656250 0.600000 vt 0.531250 0.600000 vt 0.531250 0.200000 -vt 0.656250 0.466667 -vt 0.656250 0.600000 -vt 0.531250 0.466667 -vt 0.656250 0.466667 vt 0.539062 0.616667 -vt 0.531250 0.600000 vt 0.648438 0.616667 vt 0.539062 0.733333 -vt 0.539062 0.616667 -vt 0.656250 0.600000 -vt 0.539062 0.616667 -vt 0.539062 0.616667 -vt 0.531250 0.600000 -vt 0.539062 0.733333 vt 0.648438 0.966667 vt 0.539062 0.966667 -vt 0.648438 0.616667 -vt 0.539062 0.733333 -vt 0.648438 0.616667 -vt 0.648438 0.616667 -vt 0.539062 0.733333 vt 0.468750 0.733333 vt 0.062500 0.766667 vt 0.062500 0.733333 @@ -399,21 +412,6 @@ vt 0.468750 0.766667 vt 0.484375 0.766667 vt 0.046875 0.766667 vt 0.046875 0.966667 -vt 0.890625 0.566667 -vt 0.656250 0.700000 -vt 0.656250 0.566667 -vt 0.656250 0.566667 -vt 0.890625 0.700000 -vt 0.656250 0.700000 -vt 0.664062 0.700000 -vt 0.656250 0.566667 -vt 0.664062 0.566667 -vt 0.890625 0.683333 -vt 0.656250 0.700000 -vt 0.656250 0.683333 -vt 0.656250 0.583333 -vt 0.890625 0.566667 -vt 0.890625 0.583333 vt 0.671875 0.200000 vt 0.765625 0.200000 vt 0.695312 0.550000 @@ -427,7 +425,6 @@ vt 0.695312 0.450000 vt 0.687500 0.450000 vt 0.695312 0.466667 vt 0.679688 0.450000 -vt 0.695312 0.450000 vt 0.835938 0.550000 vt 0.851562 0.566667 vt 0.835938 0.566667 @@ -436,37 +433,10 @@ vt 0.656250 0.516667 vt 0.656250 0.500000 vt 0.695312 0.433333 vt 0.835938 0.450000 -vt 0.695312 0.450000 vt 0.835938 0.433333 vt 0.843750 0.450000 -vt 0.695312 0.466667 -vt 0.679688 0.500000 -vt 0.851562 0.500000 -vt 0.679688 0.450000 -vt 0.695312 0.450000 vt 0.835938 0.466667 vt 0.851562 0.450000 -vt 0.695312 0.433333 -vt 0.835938 0.450000 -vt 0.679688 0.516667 -vt 0.835938 0.550000 -vt 0.851562 0.566667 -vt 0.835938 0.566667 -vt 0.656250 0.516667 -vt 0.656250 0.500000 -vt 0.695312 0.550000 -vt 0.679688 0.566667 -vt 0.835938 0.466667 -vt 0.851562 0.450000 -vt 0.835938 0.433333 -vt 0.843750 0.450000 -vt 0.687500 0.433333 -vt 0.687500 0.450000 -vt 0.875000 0.500000 -vt 0.851562 0.516667 -vt 0.902344 0.391667 -vt 0.667969 0.408333 -vt 0.667969 0.391667 vt 0.902344 0.391667 vt 0.667969 0.408333 vt 0.667969 0.391667 @@ -475,42 +445,19 @@ vt 0.914062 0.408333 vt 0.902344 0.408333 vt 0.656250 0.391667 vt 0.667969 0.433333 -vt 0.902344 0.408333 -vt 0.667969 0.433333 -vt 0.914062 0.408333 -vt 0.656250 0.391667 -vt 0.902344 0.366667 vt 0.531250 0.100000 vt 0.000000 0.366667 vt 0.046875 -0.000000 vt 0.656250 0.200000 vt 0.648438 0.733333 -vt 0.648438 0.733333 -vt 0.648438 0.733333 -vt 0.648438 0.733333 vt 0.621094 0.200000 -vt 0.531250 0.200000 -vt 0.890625 0.700000 -vt 0.890625 0.566667 -vt 0.656250 0.700000 -vt 0.890625 0.700000 -vt 0.656250 0.566667 vt 0.695312 0.566667 vt 0.875000 0.516667 vt 0.843750 0.433333 -vt 0.835938 0.450000 -vt 0.695312 0.566667 -vt 0.835938 0.450000 -vt 0.843750 0.433333 -vt 0.875000 0.516667 vt 0.667969 0.366667 vt 0.914062 0.391667 vt 0.656250 0.408333 vt 0.902344 0.433333 -vt 0.902344 0.433333 -vt 0.914062 0.391667 -vt 0.656250 0.408333 -vt 0.667969 0.366667 vt 0.921875 0.200000 vt 0.929688 0.400000 vt 0.921875 0.400000 @@ -522,113 +469,11 @@ vt 0.945312 0.400000 vt 0.937500 0.400000 vt 0.968750 0.200000 vt 0.976562 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.937500 0.400000 -vt 0.929688 0.200000 -vt 0.929688 0.400000 -vt 0.914062 0.200000 -vt 0.921875 0.400000 -vt 0.914062 0.400000 -vt 0.921875 0.200000 -vt 0.921875 0.400000 -vt 0.921875 0.200000 -vt 0.929688 0.400000 -vt 0.914062 0.200000 -vt 0.914062 0.400000 -vt 0.929688 0.200000 -vt 0.937500 0.400000 -vt 0.953125 0.200000 -vt 0.960938 0.400000 -vt 0.953125 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.968750 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.960938 0.200000 -vt 0.945312 0.200000 -vt 0.953125 0.400000 -vt 0.929688 0.200000 -vt 0.945312 0.200000 -vt 0.953125 0.200000 -vt 0.914062 0.200000 -vt 0.914062 0.400000 -vt 0.953125 0.200000 -vt 0.960938 0.400000 -vt 0.953125 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.968750 0.400000 -vt 0.960938 0.200000 -vt 0.945312 0.200000 -vt 0.921875 0.200000 -vt 0.929688 0.400000 -vt 0.921875 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.937500 0.400000 vt 0.929688 0.200000 vt 0.914062 0.200000 vt 0.914062 0.400000 vt 0.953125 0.200000 -vt 0.960938 0.400000 vt 0.953125 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.968750 0.400000 -vt 0.960938 0.200000 -vt 0.945312 0.200000 -vt 0.921875 0.200000 -vt 0.929688 0.400000 -vt 0.921875 0.400000 -vt 0.960938 0.200000 -vt 0.968750 0.400000 -vt 0.960938 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.937500 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.937500 0.400000 -vt 0.929688 0.200000 -vt 0.929688 0.400000 -vt 0.914062 0.200000 -vt 0.921875 0.400000 -vt 0.914062 0.400000 -vt 0.921875 0.200000 -vt 0.921875 0.400000 -vt 0.921875 0.200000 -vt 0.929688 0.400000 -vt 0.914062 0.200000 -vt 0.914062 0.400000 -vt 0.929688 0.200000 -vt 0.937500 0.400000 -vt 0.953125 0.200000 -vt 0.960938 0.400000 -vt 0.953125 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.968750 0.400000 -vt 0.937500 0.200000 -vt 0.945312 0.400000 -vt 0.960938 0.200000 -vt 0.945312 0.200000 -vt 0.953125 0.400000 -vt 0.929688 0.200000 -vt 0.945312 0.200000 -vt 0.953125 0.200000 -vt 0.914062 0.200000 -vt 0.914062 0.400000 -vt 0.953125 0.200000 -vt 0.960938 0.400000 -vt 0.953125 0.400000 -vt 0.968750 0.200000 -vt 0.976562 0.400000 -vt 0.968750 0.400000 -vt 0.960938 0.200000 vt 0.945312 0.200000 vt 0.695312 0.341667 vt 0.703125 0.333333 @@ -655,42 +500,6 @@ vt 0.742188 0.325000 vt 0.742188 0.200000 vt 0.750000 0.308333 vt 0.742188 0.308333 -vt 0.718750 0.358333 -vt 0.726562 0.333333 -vt 0.726562 0.358333 -vt 0.734375 0.200000 -vt 0.734375 0.308333 -vt 0.695312 0.200000 -vt 0.703125 0.308333 -vt 0.695312 0.308333 -vt 0.718750 0.200000 -vt 0.718750 0.308333 -vt 0.703125 0.200000 -vt 0.695312 0.341667 -vt 0.703125 0.333333 -vt 0.703125 0.350000 -vt 0.687500 0.200000 -vt 0.687500 0.308333 -vt 0.710938 0.333333 -vt 0.710938 0.358333 -vt 0.718750 0.333333 -vt 0.726562 0.308333 -vt 0.703125 0.316667 -vt 0.734375 0.333333 -vt 0.742188 0.341667 -vt 0.734375 0.350000 -vt 0.734375 0.316667 -vt 0.742188 0.333333 -vt 0.710938 0.200000 -vt 0.695312 0.333333 -vt 0.710938 0.308333 -vt 0.687500 0.333333 -vt 0.695312 0.325000 -vt 0.750000 0.333333 -vt 0.742188 0.325000 -vt 0.742188 0.200000 -vt 0.750000 0.308333 -vt 0.742188 0.308333 vt 0.734375 0.200000 vt 0.734375 0.308333 vt 0.695312 0.200000 @@ -704,511 +513,434 @@ vt 0.687500 0.308333 vt 0.710938 0.200000 vt 0.687500 0.366667 vt 0.679688 0.200000 -vt 0.687500 0.200000 vt 0.679688 0.366667 -vt 0.671875 0.200000 vt 0.671875 0.366667 vt 0.664062 0.200000 vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.679688 0.366667 -vt 0.671875 0.200000 -vt 0.679688 0.200000 -vt 0.687500 0.366667 -vt 0.687500 0.200000 -vt 0.671875 0.366667 -vt 0.664062 0.200000 -vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.679688 0.366667 -vt 0.671875 0.200000 -vt 0.679688 0.200000 -vt 0.687500 0.366667 -vt 0.687500 0.200000 -vt 0.671875 0.366667 -vt 0.664062 0.200000 -vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.687500 0.366667 -vt 0.679688 0.200000 -vt 0.687500 0.200000 -vt 0.679688 0.366667 -vt 0.671875 0.200000 -vt 0.671875 0.366667 -vt 0.664062 0.200000 -vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.687500 0.366667 -vt 0.679688 0.200000 -vt 0.687500 0.200000 -vt 0.679688 0.366667 -vt 0.671875 0.200000 -vt 0.671875 0.366667 -vt 0.664062 0.200000 -vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.687500 0.366667 -vt 0.679688 0.200000 -vt 0.687500 0.200000 -vt 0.679688 0.366667 -vt 0.671875 0.200000 -vt 0.671875 0.366667 -vt 0.664062 0.200000 -vt 0.664062 0.366667 -vt 0.656250 0.200000 -vt 0.976562 0.200000 -vt 0.976562 0.200000 -vt 0.976562 0.200000 -vt 0.976562 0.200000 -vt 0.976562 0.200000 -vt 0.976562 0.200000 vt 0.976562 0.200000 vt 0.750000 0.200000 vt 0.726562 0.200000 -vt 0.750000 0.200000 -vt 0.726562 0.200000 vt 0.656250 0.366667 -vt 0.656250 0.366667 -vt 0.656250 0.366667 -vt 0.656250 0.366667 -vt 0.656250 0.366667 -vt 0.656250 0.366667 -vn 0.0000 -1.0000 0.0000 -vn 0.0000 1.0000 0.0000 -vn 0.0000 0.0000 -1.0000 -vn 0.0000 0.0000 1.0000 -vn 1.0000 0.0000 0.0000 -vn -1.0000 0.0000 0.0000 -vn 0.0000 0.7071 -0.7071 -vn -0.0000 -0.7071 0.7071 -vn -0.0000 -0.7071 -0.7071 -vn -0.0000 0.7071 0.7071 -vn -0.7311 0.2611 0.6303 -vn -0.9955 -0.0000 -0.0949 -vn -0.9947 -0.0393 -0.0948 -vn -0.6333 -0.2962 -0.7150 -vn -0.0000 -0.3827 -0.9239 -vn 0.6333 -0.2962 -0.7150 -vn 0.9955 -0.0000 -0.0949 -vn 0.7311 0.2611 0.6303 -vn 0.9947 -0.0393 -0.0948 -vn -0.6630 -0.0000 -0.7486 -vn 0.6630 -0.0000 -0.7486 -vn 0.6794 0.4063 -0.6110 -vn 0.9987 0.0196 -0.0473 -vn 0.7574 -0.0000 0.6530 -vn -0.9987 0.0196 -0.0473 -vn -0.7263 -0.3800 0.5728 -vn -0.7574 -0.0000 0.6530 -vn -0.6794 0.4063 -0.6110 -vn 0.0000 -0.5562 0.8311 -vn 0.7263 -0.3800 0.5728 -vn 0.7071 -0.5000 0.5000 -vn -0.7071 -0.5000 0.5000 -vn 0.0000 0.5628 -0.8266 -vn -0.7071 0.5000 -0.5000 -vn 0.3827 0.0000 -0.9239 -vn 0.7071 0.0000 -0.7071 -vn 0.7071 0.0000 0.7071 -vn 0.3827 0.0000 0.9239 -vn -0.3827 0.0000 0.9239 -vn -0.7071 0.0000 0.7071 -vn -0.7071 0.0000 -0.7071 -vn -0.3827 0.0000 -0.9239 -vn 0.7071 0.5000 -0.5000 -s off +s 0 +usemtl f 3/1/1 2/2/1 1/3/1 -f 5/4/2 36/5/2 8/6/2 +f 5/4/2 35/5/2 8/6/2 f 3/1/3 8/7/3 4/8/3 f 2/2/4 6/9/4 1/3/4 f 4/8/5 7/10/5 2/2/5 f 1/3/6 5/11/6 3/1/6 f 12/12/4 9/13/4 10/14/4 -f 13/15/3 16/16/3 14/17/3 -f 10/18/5 16/19/5 12/20/5 -f 9/21/1 14/22/1 10/18/1 -f 11/23/6 13/24/6 9/25/6 -f 11/23/2 19/26/2 15/27/2 -f 17/28/5 23/29/5 19/26/5 -f 16/19/2 18/30/2 12/20/2 -f 15/31/2 20/32/2 16/16/2 -f 12/12/2 17/33/2 11/34/2 -f 22/35/2 23/36/2 21/37/2 -f 19/38/4 24/39/4 20/32/4 -f 20/40/6 22/35/6 18/30/6 -f 18/41/3 21/42/3 17/33/3 -f 36/43/6 39/44/6 35/45/6 -f 7/10/2 34/46/2 6/47/2 -f 31/48/5 32/49/5 49/50/5 -f 27/51/6 29/52/6 30/53/6 -f 49/50/3 29/52/3 50/54/3 -f 25/55/4 31/56/4 26/57/4 -f 8/6/2 35/58/2 7/10/2 -f 6/47/2 33/59/2 5/4/2 -f 39/44/2 37/60/2 38/61/2 -f 34/62/5 37/60/5 33/63/5 -f 33/64/4 40/65/4 36/66/4 -f 35/67/3 38/61/3 34/68/3 -f 43/69/1 42/70/1 41/71/1 -f 47/72/2 45/73/2 46/74/2 -f 43/75/3 48/76/3 44/77/3 -f 44/78/5 47/79/5 42/80/5 -f 41/81/6 45/82/6 43/83/6 -f 28/84/7 50/54/7 27/85/7 -f 167/86/6 163/87/6 172/88/6 -f 193/89/3 190/90/3 189/91/3 -f 165/92/3 170/93/3 166/94/3 -f 170/95/5 164/96/5 166/97/5 -f 188/98/6 194/99/6 192/100/6 -f 173/101/4 163/102/4 164/103/4 -f 174/104/1 187/105/1 171/106/1 -f 188/107/4 191/108/4 187/105/4 -f 171/109/5 189/91/5 168/110/5 -f 181/111/2 172/88/2 173/101/2 -f 171/109/5 179/112/5 177/113/5 -f 187/114/5 193/115/5 189/91/5 -f 167/116/1 175/117/1 170/93/1 -f 189/91/2 169/118/2 168/110/2 -f 176/119/6 186/120/6 184/121/6 -f 170/95/5 181/111/5 173/101/5 -f 172/88/6 176/119/6 167/86/6 -f 168/110/4 180/122/4 179/123/4 -f 169/118/6 188/98/6 174/124/6 -f 174/124/6 180/125/6 169/118/6 -f 175/126/5 185/127/5 181/111/5 -f 176/128/4 183/129/4 175/117/4 -f 178/130/3 171/106/3 177/131/3 -f 185/132/3 182/133/3 181/111/3 -f 201/134/2 198/135/2 197/136/2 -f 200/137/2 195/138/2 196/139/2 -f 197/136/5 210/140/5 201/134/5 -f 200/137/3 207/141/3 199/142/3 -f 195/138/4 204/143/4 196/139/4 -f 199/142/6 203/144/6 195/138/6 -f 202/145/6 205/146/6 198/135/6 -f 201/134/3 209/147/3 202/145/3 -f 198/135/4 206/148/4 197/136/4 -f 196/139/5 208/149/5 200/137/5 +f 13/14/3 16/15/3 14/13/3 +f 10/13/5 16/12/5 12/15/5 +f 9/16/1 14/14/1 10/13/1 +f 11/12/6 13/13/6 9/14/6 +f 11/12/2 19/17/2 15/15/2 +f 17/18/5 23/19/5 19/17/5 +f 16/12/2 18/17/2 12/15/2 +f 15/12/2 20/17/2 16/15/2 +f 12/12/2 17/17/2 11/15/2 +f 22/19/2 23/20/2 21/21/2 +f 19/18/4 24/19/4 20/17/4 +f 20/18/6 22/19/6 18/17/6 +f 18/18/3 21/19/3 17/17/3 +f 35/22/6 37/23/6 34/24/6 +f 7/10/2 33/25/2 6/26/2 +f 37/27/5 31/28/5 39/29/5 +f 27/30/6 29/31/6 30/32/6 +f 39/29/3 29/31/3 40/33/3 +f 25/34/4 37/35/4 26/36/4 +f 8/6/2 34/37/2 7/10/2 +f 6/26/2 32/38/2 5/4/2 +f 37/23/2 36/39/2 30/40/2 +f 33/41/5 36/39/5 32/42/5 +f 32/43/4 38/44/4 35/45/4 +f 34/46/3 30/40/3 33/47/3 +f 28/48/7 40/33/7 27/49/7 +f 157/50/6 153/51/6 162/52/6 +f 183/53/3 180/54/3 179/55/3 +f 155/56/3 160/57/3 156/58/3 +f 160/59/5 154/60/5 156/57/5 +f 178/61/6 184/62/6 182/63/6 +f 163/64/4 153/65/4 154/66/4 +f 164/67/1 177/68/1 161/57/1 +f 178/69/4 181/70/4 177/68/4 +f 161/59/5 179/55/5 158/64/5 +f 171/55/2 162/52/2 163/64/2 +f 161/59/5 169/60/5 167/57/5 +f 177/71/5 183/72/5 179/55/5 +f 157/67/1 165/68/1 160/57/1 +f 179/55/2 159/52/2 158/64/2 +f 166/61/6 176/62/6 174/63/6 +f 160/59/5 171/55/5 163/64/5 +f 162/52/6 166/61/6 157/50/6 +f 158/64/4 170/65/4 169/66/4 +f 159/52/6 178/61/6 164/50/6 +f 164/50/6 170/51/6 159/52/6 +f 165/71/5 175/72/5 171/55/5 +f 166/69/4 173/70/4 165/68/4 +f 168/56/3 161/57/3 167/58/3 +f 175/53/3 172/54/3 171/55/3 +f 191/73/2 188/74/2 187/75/2 +f 190/73/2 185/74/2 186/75/2 +f 187/75/5 200/76/5 191/73/5 +f 190/73/3 197/77/3 189/78/3 +f 185/74/4 194/79/4 186/75/4 +f 189/78/6 193/80/6 185/74/6 +f 192/78/6 195/80/6 188/74/6 +f 191/73/3 199/77/3 192/78/3 +f 188/74/4 196/79/4 187/75/4 +f 186/75/5 198/76/5 190/73/5 f 3/1/1 4/8/1 2/2/1 -f 5/4/2 33/59/2 36/5/2 -f 3/1/3 5/150/3 8/7/3 -f 2/2/4 7/151/4 6/9/4 +f 5/4/2 32/38/2 35/5/2 +f 3/1/3 5/81/3 8/7/3 +f 2/2/4 7/82/4 6/9/4 f 4/8/5 8/6/5 7/10/5 -f 1/3/6 6/152/6 5/11/6 -f 12/12/4 11/34/4 9/13/4 -f 13/15/3 15/31/3 16/16/3 -f 10/18/5 14/22/5 16/19/5 -f 9/21/1 13/153/1 14/22/1 -f 11/23/6 15/27/6 13/24/6 -f 11/23/2 17/28/2 19/26/2 -f 17/28/5 21/154/5 23/29/5 -f 16/19/2 20/40/2 18/30/2 -f 15/31/2 19/38/2 20/32/2 -f 12/12/2 18/41/2 17/33/2 -f 22/35/2 24/155/2 23/36/2 -f 19/38/4 23/156/4 24/39/4 -f 20/40/6 24/155/6 22/35/6 -f 18/41/3 22/157/3 21/42/3 -f 36/43/6 40/65/6 39/44/6 -f 7/10/2 35/58/2 34/46/2 -f 49/50/5 28/158/5 31/48/5 -f 28/158/5 26/159/5 31/48/5 -f 30/53/6 25/55/6 27/51/6 -f 27/51/6 50/54/6 29/52/6 -f 49/50/3 32/49/3 29/52/3 -f 25/55/4 30/53/4 31/56/4 -f 8/6/2 36/5/2 35/58/2 -f 6/47/2 34/46/2 33/59/2 -f 39/44/2 40/65/2 37/60/2 -f 34/62/5 38/61/5 37/60/5 -f 33/64/4 37/60/4 40/65/4 -f 35/67/3 39/44/3 38/61/3 -f 43/69/1 44/160/1 42/70/1 -f 47/72/2 48/161/2 45/73/2 -f 43/75/3 45/162/3 48/76/3 -f 44/78/5 48/163/5 47/79/5 -f 41/81/6 46/164/6 45/82/6 -f 28/84/7 49/50/7 50/54/7 -f 167/86/6 165/165/6 163/87/6 -f 193/89/3 194/166/3 190/90/3 -f 165/92/3 167/116/3 170/93/3 -f 170/95/5 173/101/5 164/96/5 -f 188/98/6 190/90/6 194/99/6 -f 173/101/4 172/88/4 163/102/4 -f 174/104/1 188/107/1 187/105/1 -f 188/107/4 192/167/4 191/108/4 -f 171/109/5 187/114/5 189/91/5 -f 181/111/2 182/133/2 172/88/2 -f 171/109/5 168/110/5 179/112/5 -f 187/114/5 191/168/5 193/115/5 -f 167/116/1 176/128/1 175/117/1 -f 189/91/2 190/90/2 169/118/2 -f 176/119/6 182/133/6 186/120/6 -f 170/95/5 175/126/5 181/111/5 -f 172/88/6 182/133/6 176/119/6 -f 168/110/4 169/118/4 180/122/4 -f 169/118/6 190/90/6 188/98/6 -f 174/124/6 178/169/6 180/125/6 -f 175/126/5 183/170/5 185/127/5 -f 176/128/4 184/171/4 183/129/4 -f 178/130/3 174/104/3 171/106/3 -f 185/132/3 186/172/3 182/133/3 -f 201/134/2 202/145/2 198/135/2 -f 200/137/2 199/142/2 195/138/2 -f 197/136/5 206/173/5 210/140/5 -f 200/137/3 208/174/3 207/141/3 -f 195/138/4 203/175/4 204/143/4 -f 199/142/6 207/176/6 203/144/6 -f 202/145/6 209/177/6 205/146/6 -f 201/134/3 210/178/3 209/147/3 -f 198/135/4 205/179/4 206/148/4 -f 196/139/5 204/180/5 208/149/5 +f 1/3/6 6/83/6 5/11/6 +f 12/12/4 11/15/4 9/13/4 +f 13/14/3 15/12/3 16/15/3 +f 10/13/5 14/14/5 16/12/5 +f 9/16/1 13/84/1 14/14/1 +f 11/12/6 15/15/6 13/13/6 +f 11/12/2 17/18/2 19/17/2 +f 17/18/5 21/85/5 23/19/5 +f 16/12/2 20/18/2 18/17/2 +f 15/12/2 19/18/2 20/17/2 +f 12/12/2 18/18/2 17/17/2 +f 22/19/2 24/85/2 23/20/2 +f 19/18/4 23/85/4 24/19/4 +f 20/18/6 24/85/6 22/19/6 +f 18/18/3 22/85/3 21/19/3 +f 35/22/6 38/44/6 37/23/6 +f 7/10/2 34/37/2 33/25/2 +f 39/29/5 28/86/5 37/27/5 +f 28/86/5 26/16/5 37/27/5 +f 30/32/6 25/34/6 27/30/6 +f 27/30/6 40/33/6 29/31/6 +f 39/29/3 31/28/3 29/31/3 +f 25/34/4 30/32/4 37/35/4 +f 8/6/2 35/5/2 34/37/2 +f 6/26/2 33/25/2 32/38/2 +f 37/23/2 38/44/2 36/39/2 +f 33/41/5 30/40/5 36/39/5 +f 32/43/4 36/39/4 38/44/4 +f 34/46/3 37/23/3 30/40/3 +f 28/48/7 39/29/7 40/33/7 +f 157/50/6 155/87/6 153/51/6 +f 183/53/3 184/88/3 180/54/3 +f 155/56/3 157/67/3 160/57/3 +f 160/59/5 163/64/5 154/60/5 +f 178/61/6 180/54/6 184/62/6 +f 163/64/4 162/52/4 153/65/4 +f 164/67/1 178/69/1 177/68/1 +f 178/69/4 182/89/4 181/70/4 +f 161/59/5 177/71/5 179/55/5 +f 171/55/2 172/54/2 162/52/2 +f 161/59/5 158/64/5 169/60/5 +f 177/71/5 181/68/5 183/72/5 +f 157/67/1 166/69/1 165/68/1 +f 179/55/2 180/54/2 159/52/2 +f 166/61/6 172/54/6 176/62/6 +f 160/59/5 165/71/5 171/55/5 +f 162/52/6 172/54/6 166/61/6 +f 158/64/4 159/52/4 170/65/4 +f 159/52/6 180/54/6 178/61/6 +f 164/50/6 168/87/6 170/51/6 +f 165/71/5 173/68/5 175/72/5 +f 166/69/4 174/89/4 173/70/4 +f 168/56/3 164/67/3 161/57/3 +f 175/53/3 176/88/3 172/54/3 +f 191/73/2 192/78/2 188/74/2 +f 190/73/2 189/78/2 185/74/2 +f 187/75/5 196/90/5 200/76/5 +f 190/73/3 198/91/3 197/77/3 +f 185/74/4 193/92/4 194/79/4 +f 189/78/6 197/93/6 193/80/6 +f 192/78/6 199/93/6 195/80/6 +f 191/73/3 200/91/3 199/77/3 +f 188/74/4 195/92/4 196/79/4 +f 186/75/5 194/90/5 198/76/5 s 1 -f 90/181/8 91/182/4 89/183/8 -f 54/184/3 55/185/9 53/186/3 -f 78/187/10 79/188/2 77/189/10 -f 56/190/9 57/191/1 55/185/9 -f 94/192/10 95/193/2 93/194/10 -f 76/195/4 77/189/10 75/196/4 -f 58/197/1 59/198/8 57/199/1 -f 74/200/8 75/196/4 73/201/8 -f 60/202/8 61/203/4 59/198/8 -f 72/204/1 73/201/8 71/205/1 -f 62/206/4 63/207/10 61/203/4 -f 82/208/7 52/209/3 81/210/7 -f 70/211/9 71/212/1 69/213/9 -f 64/214/10 65/215/2 63/207/10 -f 51/216/3 69/213/9 52/209/3 -f 66/217/2 67/218/7 65/215/2 -f 92/219/4 93/194/10 91/182/4 -f 80/220/2 81/210/7 79/188/2 -f 68/221/7 53/186/3 67/218/7 -f 88/222/1 89/183/8 87/223/1 -f 98/224/7 84/225/3 97/226/7 -f 86/227/9 87/228/1 85/229/9 -f 83/230/3 85/229/9 84/225/3 -f 96/231/2 97/226/7 95/193/2 -f 106/232/8 107/233/4 105/234/8 -f 110/235/10 111/236/2 109/237/10 -f 108/238/4 109/237/10 107/233/4 -f 104/239/1 105/234/8 103/240/1 -f 114/241/7 100/242/3 113/243/7 -f 102/244/9 103/245/1 101/246/9 -f 99/247/3 101/246/9 100/242/3 -f 112/248/2 113/243/7 111/236/2 -f 154/249/8 155/250/4 153/251/8 -f 118/252/3 119/253/9 117/254/3 -f 142/255/10 143/256/2 141/257/10 -f 120/258/9 121/259/1 119/253/9 -f 158/260/10 159/261/2 157/262/10 -f 140/263/4 141/257/10 139/264/4 -f 122/265/1 123/266/8 121/267/1 -f 138/268/8 139/264/4 137/269/8 -f 124/270/8 125/271/4 123/266/8 -f 136/272/1 137/269/8 135/273/1 -f 126/274/4 127/275/10 125/271/4 -f 146/276/7 116/277/3 145/278/7 -f 134/279/9 135/280/1 133/281/9 -f 128/282/10 129/283/2 127/275/10 -f 115/284/3 133/281/9 116/277/3 -f 130/285/2 131/286/7 129/283/2 -f 156/287/4 157/262/10 155/250/4 -f 144/288/2 145/278/7 143/256/2 -f 132/289/7 117/254/3 131/286/7 -f 152/290/1 153/251/8 151/291/1 -f 162/292/7 148/293/3 161/294/7 -f 150/295/9 151/296/1 149/297/9 -f 147/298/3 149/297/9 148/293/3 -f 160/299/2 161/294/7 159/261/2 -f 214/300/11 221/301/12 213/302/13 -f 212/303/14 219/304/3 211/305/15 -f 219/304/3 218/306/16 211/305/15 -f 224/307/17 216/308/18 217/309/19 -f 213/302/13 220/310/20 212/303/14 -f 225/311/21 217/309/19 218/306/16 -f 219/304/3 232/312/22 225/311/21 -f 231/313/23 223/314/24 224/307/17 -f 228/315/25 220/310/20 221/301/12 -f 225/311/21 231/313/23 224/307/17 -f 229/316/26 221/301/12 222/317/27 -f 227/318/28 219/304/3 220/310/20 -f 214/300/11 215/319/29 222/317/27 -f 222/317/27 215/319/29 229/316/26 -f 215/320/29 216/308/18 223/314/24 -f 223/314/24 230/321/30 215/320/29 -f 246/322/31 215/323/29 230/324/30 -f 240/325/15 255/326/21 233/327/16 -f 232/312/22 245/328/5 231/329/23 -f 244/330/32 228/331/25 229/332/26 -f 242/333/7 232/312/22 226/334/33 -f 245/328/5 230/324/30 231/329/23 -f 243/335/6 227/318/28 228/331/25 -f 237/336/11 251/337/12 238/338/13 -f 248/339/8 229/332/26 215/340/29 -f 238/338/13 250/341/20 239/342/14 -f 249/343/3 262/344/22 255/326/21 -f 258/345/25 250/341/20 251/337/12 -f 250/341/20 240/325/15 239/342/14 -f 254/346/17 235/347/18 234/348/19 -f 255/326/21 234/348/19 233/327/16 -f 261/349/23 253/350/24 254/346/17 -f 241/351/34 226/334/33 227/318/28 -f 255/326/21 261/349/23 254/346/17 -f 252/352/27 258/345/25 251/337/12 -f 257/353/28 249/343/3 250/341/20 -f 237/336/11 236/354/29 252/352/27 -f 252/352/27 236/354/29 259/355/26 -f 236/356/29 235/347/18 253/350/24 -f 253/350/24 260/357/30 236/356/29 -f 268/358/31 236/359/29 260/360/30 -f 262/344/22 267/361/5 261/362/23 -f 266/363/32 258/364/25 259/365/26 -f 264/366/7 262/344/22 256/367/33 -f 267/361/5 260/360/30 261/362/23 -f 265/368/6 257/353/28 258/364/25 -f 270/369/8 259/365/26 236/370/29 -f 263/371/34 256/367/33 257/353/28 -f 272/372/35 273/373/36 271/374/35 -f 274/375/36 275/376/5 273/373/36 -f 276/377/5 277/378/37 275/376/5 -f 278/379/37 279/380/38 277/378/37 -f 284/381/36 285/382/5 283/383/36 -f 282/384/35 283/383/36 281/385/35 -f 286/386/5 287/387/37 285/382/5 -f 288/388/37 289/389/38 287/387/37 -f 294/390/36 295/391/5 293/392/36 -f 292/393/35 293/392/36 291/394/35 -f 296/395/5 297/396/37 295/391/5 -f 298/397/37 299/398/38 297/396/37 -f 304/399/39 305/400/40 303/401/39 -f 306/402/40 307/403/6 305/400/40 -f 308/404/6 309/405/41 307/403/6 -f 310/406/41 301/407/42 309/405/41 -f 314/408/39 315/409/40 313/410/39 -f 316/411/40 317/412/6 315/409/40 -f 318/413/6 319/414/41 317/412/6 -f 320/415/41 311/416/42 319/414/41 -f 324/417/39 325/418/40 323/419/39 -f 326/420/40 327/421/6 325/418/40 -f 328/422/6 329/423/41 327/421/6 -f 330/424/41 321/425/42 329/423/41 -f 90/181/8 92/219/4 91/182/4 -f 54/184/3 56/190/9 55/185/9 -f 78/187/10 80/220/2 79/188/2 -f 56/190/9 58/426/1 57/191/1 -f 94/192/10 96/231/2 95/193/2 -f 76/195/4 78/187/10 77/189/10 -f 58/197/1 60/202/8 59/198/8 -f 74/200/8 76/195/4 75/196/4 -f 60/202/8 62/206/4 61/203/4 -f 72/204/1 74/200/8 73/201/8 -f 62/206/4 64/214/10 63/207/10 -f 82/208/7 51/216/3 52/209/3 -f 70/211/9 72/427/1 71/212/1 -f 64/214/10 66/217/2 65/215/2 -f 51/216/3 70/211/9 69/213/9 -f 66/217/2 68/221/7 67/218/7 -f 92/219/4 94/192/10 93/194/10 -f 80/220/2 82/208/7 81/210/7 -f 68/221/7 54/184/3 53/186/3 -f 88/222/1 90/181/8 89/183/8 -f 98/224/7 83/230/3 84/225/3 -f 86/227/9 88/428/1 87/228/1 -f 83/230/3 86/227/9 85/229/9 -f 96/231/2 98/224/7 97/226/7 -f 106/232/8 108/238/4 107/233/4 -f 110/235/10 112/248/2 111/236/2 -f 108/238/4 110/235/10 109/237/10 -f 104/239/1 106/232/8 105/234/8 -f 114/241/7 99/247/3 100/242/3 -f 102/244/9 104/429/1 103/245/1 -f 99/247/3 102/244/9 101/246/9 -f 112/248/2 114/241/7 113/243/7 -f 154/249/8 156/287/4 155/250/4 -f 118/252/3 120/258/9 119/253/9 -f 142/255/10 144/288/2 143/256/2 -f 120/258/9 122/430/1 121/259/1 -f 158/260/10 160/299/2 159/261/2 -f 140/263/4 142/255/10 141/257/10 -f 122/265/1 124/270/8 123/266/8 -f 138/268/8 140/263/4 139/264/4 -f 124/270/8 126/274/4 125/271/4 -f 136/272/1 138/268/8 137/269/8 -f 126/274/4 128/282/10 127/275/10 -f 146/276/7 115/284/3 116/277/3 -f 134/279/9 136/431/1 135/280/1 -f 128/282/10 130/285/2 129/283/2 -f 115/284/3 134/279/9 133/281/9 -f 130/285/2 132/289/7 131/286/7 -f 156/287/4 158/260/10 157/262/10 -f 144/288/2 146/276/7 145/278/7 -f 132/289/7 118/252/3 117/254/3 -f 152/290/1 154/249/8 153/251/8 -f 162/292/7 147/298/3 148/293/3 -f 150/295/9 152/432/1 151/296/1 -f 147/298/3 150/295/9 149/297/9 -f 160/299/2 162/292/7 161/294/7 -f 214/300/11 222/317/27 221/301/12 -f 212/303/14 220/310/20 219/304/3 -f 219/304/3 225/311/21 218/306/16 -f 224/307/17 223/314/24 216/308/18 -f 213/302/13 221/301/12 220/310/20 -f 225/311/21 224/307/17 217/309/19 -f 219/304/3 226/334/33 232/312/22 -f 231/313/23 230/321/30 223/314/24 -f 228/315/25 227/318/28 220/310/20 -f 225/311/21 232/312/22 231/313/23 -f 229/316/26 228/315/25 221/301/12 -f 227/318/28 226/334/33 219/304/3 -f 246/322/31 248/433/8 215/323/29 -f 240/325/15 249/343/3 255/326/21 -f 232/312/22 247/434/43 245/328/5 -f 244/330/32 243/335/6 228/331/25 -f 242/333/7 247/434/43 232/312/22 -f 245/328/5 246/322/31 230/324/30 -f 243/335/6 241/351/34 227/318/28 -f 237/336/11 252/352/27 251/337/12 -f 248/339/8 244/330/32 229/332/26 -f 238/338/13 251/337/12 250/341/20 -f 249/343/3 256/367/33 262/344/22 -f 258/345/25 257/353/28 250/341/20 -f 250/341/20 249/343/3 240/325/15 -f 254/346/17 253/350/24 235/347/18 -f 255/326/21 254/346/17 234/348/19 -f 261/349/23 260/357/30 253/350/24 -f 241/351/34 242/333/7 226/334/33 -f 255/326/21 262/344/22 261/349/23 -f 252/352/27 259/355/26 258/345/25 -f 257/353/28 256/367/33 249/343/3 -f 268/358/31 270/435/8 236/359/29 -f 262/344/22 269/436/43 267/361/5 -f 266/363/32 265/368/6 258/364/25 -f 264/366/7 269/436/43 262/344/22 -f 267/361/5 268/358/31 260/360/30 -f 265/368/6 263/371/34 257/353/28 -f 270/369/8 266/363/32 259/365/26 -f 263/371/34 264/366/7 256/367/33 -f 272/372/35 274/375/36 273/373/36 -f 274/375/36 276/377/5 275/376/5 -f 276/377/5 278/379/37 277/378/37 -f 278/379/37 280/437/38 279/380/38 -f 284/381/36 286/386/5 285/382/5 -f 282/384/35 284/381/36 283/383/36 -f 286/386/5 288/388/37 287/387/37 -f 288/388/37 290/438/38 289/389/38 -f 294/390/36 296/395/5 295/391/5 -f 292/393/35 294/390/36 293/392/36 -f 296/395/5 298/397/37 297/396/37 -f 298/397/37 300/439/38 299/398/38 -f 304/399/39 306/402/40 305/400/40 -f 306/402/40 308/404/6 307/403/6 -f 308/404/6 310/406/41 309/405/41 -f 310/406/41 302/440/42 301/407/42 -f 314/408/39 316/411/40 315/409/40 -f 316/411/40 318/413/6 317/412/6 -f 318/413/6 320/415/41 319/414/41 -f 320/415/41 312/441/42 311/416/42 -f 324/417/39 326/420/40 325/418/40 -f 326/420/40 328/422/6 327/421/6 -f 328/422/6 330/424/41 329/423/41 -f 330/424/41 322/442/42 321/425/42 +f 80/94/8 81/95/4 79/96/8 +f 44/97/3 45/98/9 43/99/3 +f 68/100/10 69/101/2 67/102/10 +f 46/103/9 47/104/1 45/98/9 +f 84/100/10 85/101/2 83/102/10 +f 66/105/4 67/102/10 65/95/4 +f 48/106/1 49/96/8 47/107/1 +f 64/94/8 65/95/4 63/96/8 +f 50/94/8 51/95/4 49/96/8 +f 62/106/1 63/96/8 61/107/1 +f 52/105/4 53/102/10 51/95/4 +f 72/108/7 42/99/3 71/109/7 +f 60/103/9 61/104/1 59/98/9 +f 54/100/10 55/101/2 53/102/10 +f 41/97/3 59/98/9 42/99/3 +f 56/110/2 57/109/7 55/101/2 +f 82/105/4 83/102/10 81/95/4 +f 70/110/2 71/109/7 69/101/2 +f 58/108/7 43/99/3 57/109/7 +f 78/106/1 79/96/8 77/107/1 +f 88/108/7 74/99/3 87/109/7 +f 76/103/9 77/104/1 75/98/9 +f 73/97/3 75/98/9 74/99/3 +f 86/110/2 87/109/7 85/101/2 +f 96/94/8 97/95/4 95/96/8 +f 100/100/10 101/101/2 99/102/10 +f 98/105/4 99/102/10 97/95/4 +f 94/106/1 95/96/8 93/107/1 +f 104/108/7 90/99/3 103/109/7 +f 92/103/9 93/104/1 91/98/9 +f 89/97/3 91/98/9 90/99/3 +f 102/110/2 103/109/7 101/101/2 +f 144/94/8 145/95/4 143/96/8 +f 108/97/3 109/98/9 107/99/3 +f 132/100/10 133/101/2 131/102/10 +f 110/103/9 111/104/1 109/98/9 +f 148/100/10 149/101/2 147/102/10 +f 130/105/4 131/102/10 129/95/4 +f 112/106/1 113/96/8 111/107/1 +f 128/94/8 129/95/4 127/96/8 +f 114/94/8 115/95/4 113/96/8 +f 126/106/1 127/96/8 125/107/1 +f 116/105/4 117/102/10 115/95/4 +f 136/108/7 106/99/3 135/109/7 +f 124/103/9 125/104/1 123/98/9 +f 118/100/10 119/101/2 117/102/10 +f 105/97/3 123/98/9 106/99/3 +f 120/110/2 121/109/7 119/101/2 +f 146/105/4 147/102/10 145/95/4 +f 134/110/2 135/109/7 133/101/2 +f 122/108/7 107/99/3 121/109/7 +f 142/106/1 143/96/8 141/107/1 +f 152/108/7 138/99/3 151/109/7 +f 140/103/9 141/104/1 139/98/9 +f 137/97/3 139/98/9 138/99/3 +f 150/110/2 151/109/7 149/101/2 +f 204/111/11 211/112/12 203/113/13 +f 202/114/14 209/115/3 201/116/15 +f 209/115/3 208/117/16 201/116/15 +f 214/118/17 206/119/18 207/120/19 +f 203/113/13 210/121/20 202/114/14 +f 215/122/21 207/120/19 208/117/16 +f 209/115/3 222/123/22 215/122/21 +f 221/124/23 213/125/24 214/118/17 +f 218/126/25 210/121/20 211/112/12 +f 215/122/21 221/124/23 214/118/17 +f 219/127/26 211/112/12 212/128/27 +f 217/129/28 209/115/3 210/121/20 +f 204/111/11 205/130/29 212/128/27 +f 212/128/27 205/130/29 219/127/26 +f 205/131/29 206/119/18 213/125/24 +f 213/125/24 220/132/30 205/131/29 +f 236/133/31 205/134/29 220/135/30 +f 230/116/15 245/122/21 223/117/16 +f 222/123/22 235/136/5 221/137/23 +f 234/138/32 218/139/25 219/140/26 +f 232/141/7 222/123/22 216/142/33 +f 235/136/5 220/135/30 221/137/23 +f 233/143/6 217/129/28 218/139/25 +f 227/111/11 241/112/12 228/113/13 +f 238/144/8 219/140/26 205/145/29 +f 228/113/13 240/121/20 229/114/14 +f 239/115/3 252/123/22 245/122/21 +f 248/126/25 240/121/20 241/112/12 +f 240/121/20 230/116/15 229/114/14 +f 244/118/17 225/119/18 224/120/19 +f 245/122/21 224/120/19 223/117/16 +f 251/124/23 243/125/24 244/118/17 +f 231/146/34 216/142/33 217/129/28 +f 245/122/21 251/124/23 244/118/17 +f 242/128/27 248/126/25 241/112/12 +f 247/129/28 239/115/3 240/121/20 +f 227/111/11 226/130/29 242/128/27 +f 242/128/27 226/130/29 249/127/26 +f 226/131/29 225/119/18 243/125/24 +f 243/125/24 250/132/30 226/131/29 +f 258/133/31 226/134/29 250/135/30 +f 252/123/22 257/136/5 251/137/23 +f 256/138/32 248/139/25 249/140/26 +f 254/141/7 252/123/22 246/142/33 +f 257/136/5 250/135/30 251/137/23 +f 255/143/6 247/129/28 248/139/25 +f 260/144/8 249/140/26 226/145/29 +f 253/146/34 246/142/33 247/129/28 +f 262/147/35 263/148/36 261/144/35 +f 264/149/36 265/48/5 263/148/36 +f 266/150/5 267/151/37 265/48/5 +f 268/152/37 269/84/38 267/151/37 +f 274/149/36 275/48/5 273/148/36 +f 272/147/35 273/148/36 271/144/35 +f 276/150/5 277/151/37 275/48/5 +f 278/152/37 279/84/38 277/151/37 +f 284/149/36 285/48/5 283/148/36 +f 282/147/35 283/148/36 281/144/35 +f 286/150/5 287/151/37 285/48/5 +f 288/152/37 289/84/38 287/151/37 +f 294/147/39 295/148/40 293/144/39 +f 296/149/40 297/48/6 295/148/40 +f 298/150/6 299/151/41 297/48/6 +f 300/152/41 291/84/42 299/151/41 +f 304/147/39 305/148/40 303/144/39 +f 306/149/40 307/48/6 305/148/40 +f 308/150/6 309/151/41 307/48/6 +f 310/152/41 301/84/42 309/151/41 +f 314/147/39 315/148/40 313/144/39 +f 316/149/40 317/48/6 315/148/40 +f 318/150/6 319/151/41 317/48/6 +f 320/152/41 311/84/42 319/151/41 +f 80/94/8 82/105/4 81/95/4 +f 44/97/3 46/103/9 45/98/9 +f 68/100/10 70/110/2 69/101/2 +f 46/103/9 48/153/1 47/104/1 +f 84/100/10 86/110/2 85/101/2 +f 66/105/4 68/100/10 67/102/10 +f 48/106/1 50/94/8 49/96/8 +f 64/94/8 66/105/4 65/95/4 +f 50/94/8 52/105/4 51/95/4 +f 62/106/1 64/94/8 63/96/8 +f 52/105/4 54/100/10 53/102/10 +f 72/108/7 41/97/3 42/99/3 +f 60/103/9 62/153/1 61/104/1 +f 54/100/10 56/110/2 55/101/2 +f 41/97/3 60/103/9 59/98/9 +f 56/110/2 58/108/7 57/109/7 +f 82/105/4 84/100/10 83/102/10 +f 70/110/2 72/108/7 71/109/7 +f 58/108/7 44/97/3 43/99/3 +f 78/106/1 80/94/8 79/96/8 +f 88/108/7 73/97/3 74/99/3 +f 76/103/9 78/153/1 77/104/1 +f 73/97/3 76/103/9 75/98/9 +f 86/110/2 88/108/7 87/109/7 +f 96/94/8 98/105/4 97/95/4 +f 100/100/10 102/110/2 101/101/2 +f 98/105/4 100/100/10 99/102/10 +f 94/106/1 96/94/8 95/96/8 +f 104/108/7 89/97/3 90/99/3 +f 92/103/9 94/153/1 93/104/1 +f 89/97/3 92/103/9 91/98/9 +f 102/110/2 104/108/7 103/109/7 +f 144/94/8 146/105/4 145/95/4 +f 108/97/3 110/103/9 109/98/9 +f 132/100/10 134/110/2 133/101/2 +f 110/103/9 112/153/1 111/104/1 +f 148/100/10 150/110/2 149/101/2 +f 130/105/4 132/100/10 131/102/10 +f 112/106/1 114/94/8 113/96/8 +f 128/94/8 130/105/4 129/95/4 +f 114/94/8 116/105/4 115/95/4 +f 126/106/1 128/94/8 127/96/8 +f 116/105/4 118/100/10 117/102/10 +f 136/108/7 105/97/3 106/99/3 +f 124/103/9 126/153/1 125/104/1 +f 118/100/10 120/110/2 119/101/2 +f 105/97/3 124/103/9 123/98/9 +f 120/110/2 122/108/7 121/109/7 +f 146/105/4 148/100/10 147/102/10 +f 134/110/2 136/108/7 135/109/7 +f 122/108/7 108/97/3 107/99/3 +f 142/106/1 144/94/8 143/96/8 +f 152/108/7 137/97/3 138/99/3 +f 140/103/9 142/153/1 141/104/1 +f 137/97/3 140/103/9 139/98/9 +f 150/110/2 152/108/7 151/109/7 +f 204/111/11 212/128/27 211/112/12 +f 202/114/14 210/121/20 209/115/3 +f 209/115/3 215/122/21 208/117/16 +f 214/118/17 213/125/24 206/119/18 +f 203/113/13 211/112/12 210/121/20 +f 215/122/21 214/118/17 207/120/19 +f 209/115/3 216/142/33 222/123/22 +f 221/124/23 220/132/30 213/125/24 +f 218/126/25 217/129/28 210/121/20 +f 215/122/21 222/123/22 221/124/23 +f 219/127/26 218/126/25 211/112/12 +f 217/129/28 216/142/33 209/115/3 +f 236/133/31 238/154/8 205/134/29 +f 230/116/15 239/115/3 245/122/21 +f 222/123/22 237/155/43 235/136/5 +f 234/138/32 233/143/6 218/139/25 +f 232/141/7 237/155/43 222/123/22 +f 235/136/5 236/133/31 220/135/30 +f 233/143/6 231/146/34 217/129/28 +f 227/111/11 242/128/27 241/112/12 +f 238/144/8 234/138/32 219/140/26 +f 228/113/13 241/112/12 240/121/20 +f 239/115/3 246/142/33 252/123/22 +f 248/126/25 247/129/28 240/121/20 +f 240/121/20 239/115/3 230/116/15 +f 244/118/17 243/125/24 225/119/18 +f 245/122/21 244/118/17 224/120/19 +f 251/124/23 250/132/30 243/125/24 +f 231/146/34 232/141/7 216/142/33 +f 245/122/21 252/123/22 251/124/23 +f 242/128/27 249/127/26 248/126/25 +f 247/129/28 246/142/33 239/115/3 +f 258/133/31 260/154/8 226/134/29 +f 252/123/22 259/155/43 257/136/5 +f 256/138/32 255/143/6 248/139/25 +f 254/141/7 259/155/43 252/123/22 +f 257/136/5 258/133/31 250/135/30 +f 255/143/6 253/146/34 247/129/28 +f 260/144/8 256/138/32 249/140/26 +f 253/146/34 254/141/7 246/142/33 +f 262/147/35 264/149/36 263/148/36 +f 264/149/36 266/150/5 265/48/5 +f 266/150/5 268/152/37 267/151/37 +f 268/152/37 270/156/38 269/84/38 +f 274/149/36 276/150/5 275/48/5 +f 272/147/35 274/149/36 273/148/36 +f 276/150/5 278/152/37 277/151/37 +f 278/152/37 280/156/38 279/84/38 +f 284/149/36 286/150/5 285/48/5 +f 282/147/35 284/149/36 283/148/36 +f 286/150/5 288/152/37 287/151/37 +f 288/152/37 290/156/38 289/84/38 +f 294/147/39 296/149/40 295/148/40 +f 296/149/40 298/150/6 297/48/6 +f 298/150/6 300/152/41 299/151/41 +f 300/152/41 292/156/42 291/84/42 +f 304/147/39 306/149/40 305/148/40 +f 306/149/40 308/150/6 307/48/6 +f 308/150/6 310/152/41 309/151/41 +f 310/152/41 302/156/42 301/84/42 +f 314/147/39 316/149/40 315/148/40 +f 316/149/40 318/150/6 317/48/6 +f 318/150/6 320/152/41 319/151/41 +f 320/152/41 312/156/42 311/84/42 +o plate +v -0.500000 0.937500 -1.500000 +v 0.500000 0.937500 -1.500000 +v -0.500000 0.937500 -5.250000 +v 0.500000 0.937500 -5.250000 +v -0.500000 1.062500 -5.250000 +v -0.500000 1.062500 -1.500000 +v 0.500000 1.062500 -1.500000 +v 0.500000 1.062500 -5.250000 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vt 0.890625 0.566667 +vt 0.656250 0.700000 +vt 0.656250 0.566667 +vt 0.890625 0.700000 +vt 0.664062 0.700000 +vt 0.664062 0.566667 +vt 0.890625 0.683333 +vt 0.656250 0.683333 +vt 0.656250 0.583333 +vt 0.890625 0.583333 +s 0 +usemtl +f 323/157/44 322/158/44 321/159/44 +f 327/159/45 325/160/45 326/158/45 +f 323/161/46 328/159/46 324/162/46 +f 324/163/47 327/158/47 322/164/47 +f 321/165/48 325/157/48 323/166/48 +f 323/157/44 324/160/44 322/158/44 +f 327/159/45 328/157/45 325/160/45 +f 323/161/46 325/158/46 328/159/46 +f 324/163/47 328/160/47 327/158/47 +f 321/165/48 326/159/48 325/157/48 From 102f26c8d319cc161189c3539e6ed66ee3a7cd7a Mon Sep 17 00:00:00 2001 From: 70000hp <105080577+70000hp@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:31:57 -0500 Subject: [PATCH 5/6] sweet baby ray's honey mustard fixed boundingbox problems and a crash --- .../java/com/hbm/blocks/machine/MachineStrandCaster.java | 4 ++-- .../tileentity/machine/TileEntityMachineStrandCaster.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index ee6dab3a8..9f4a7f745 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -53,7 +53,6 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce @Override public TileEntity createNewTileEntity(World world, int meta) { - if (meta >= 12) return new TileEntityMachineStrandCaster(); if (meta >= 6) return new TileEntityProxyCombo(true, false, true).moltenMetal(); return null; @@ -212,7 +211,8 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce if (tool != ToolType.SCREWDRIVER) return false; - TileEntityFoundryCastingBase cast = (TileEntityFoundryCastingBase) world.getTileEntity(x, y, z); + int[] coords = findCore(world, x, y, z); + TileEntityMachineStrandCaster cast = (TileEntityMachineStrandCaster) world.getTileEntity(coords[0], coords[1], coords[2]); if (cast.slots[0] == null) return false; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java index dc9e30c83..b7044b33f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -318,12 +318,12 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase if (bb == null) { bb = AxisAlignedBB.getBoundingBox( - xCoord - 1, + xCoord - 7, yCoord, - zCoord - 1, - xCoord + 6, + zCoord - 7, + xCoord + 7, yCoord + 3, - zCoord + 6 + zCoord + 7 ); } return bb; From ea0447dfaa317d4f8e8adccf58f77609cc3fed2f Mon Sep 17 00:00:00 2001 From: 70000hp <105080577+70000hp@users.noreply.github.com> Date: Wed, 10 Jan 2024 18:13:46 -0500 Subject: [PATCH 6/6] coca cola, dont forget the ice! fixed various strand caster problems --- .../java/com/hbm/blocks/machine/MachineStrandCaster.java | 4 ---- .../inventory/container/ContainerMachineStrandCaster.java | 5 +++-- src/main/java/com/hbm/main/ResourceManager.java | 2 +- .../com/hbm/tileentity/machine/TileEntityFoundryBasin.java | 5 ----- .../hbm/tileentity/machine/TileEntityFoundryCastingBase.java | 3 --- .../com/hbm/tileentity/machine/TileEntityFoundryMold.java | 5 ----- .../tileentity/machine/TileEntityMachineStrandCaster.java | 4 ++-- 7 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java index 9f4a7f745..9b2c6ced5 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStrandCaster.java @@ -137,7 +137,6 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce player.getHeldItem().stackSize--; world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F); cast.markDirty(); - world.markBlockForUpdate(x, y, z); return true; } @@ -154,7 +153,6 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce cast.amount = 0; cast.type = null; cast.markDirty(); - world.markBlockForUpdate(x, y, z); } return true; } @@ -225,10 +223,8 @@ public class MachineStrandCaster extends BlockDummyable implements ICrucibleAcce } cast.markDirty(); - world.markBlockForUpdate(x, y, z); cast.slots[0] = null; - cast.markDirty(); return true; } diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java index bc9e89e46..6c503f6ce 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineStrandCaster.java @@ -1,5 +1,6 @@ package com.hbm.inventory.container; +import com.hbm.inventory.SlotCraftingOutput; import com.hbm.inventory.SlotNonRetarded; import com.hbm.tileentity.machine.TileEntityMachineStrandCaster; import com.hbm.util.InventoryUtil; @@ -22,7 +23,7 @@ public class ContainerMachineStrandCaster extends Container { //output for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { - this.addSlotToContainer(new SlotNonRetarded(this.caster, j + i * 2 + 1, 125 + j * 18, 26 + i * 18)); + this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, this.caster, j + i * 2 + 1, 125 + j * 18, 26 + i * 18)); } } @@ -54,7 +55,7 @@ public class ContainerMachineStrandCaster extends Container { slot.onSlotChange(originalStack, stack); - } else if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 0, 7, false)) { + } else if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 1, 2, false)) { return null; } diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index e846749c5..7ea56b820 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -52,7 +52,7 @@ public class ResourceManager { public static final IModelCustom hephaestus = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/hephaestus.obj")); //Caster o' Strands - public static final IModelCustom strand_caster = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/strand_caster.obj")); + public static final IModelCustom strand_caster = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/strand_caster.obj")); //Furnaces public static final IModelCustom furnace_iron = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/furnace_iron.obj")); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java index 9003229c6..6c65fb4c2 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryBasin.java @@ -12,11 +12,6 @@ public class TileEntityFoundryBasin extends TileEntityFoundryCastingBase impleme super(2); } - @Override - public String getName() { - return null; - } - @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java index 3267ac602..da2a8d8a5 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryCastingBase.java @@ -26,9 +26,6 @@ public abstract class TileEntityFoundryCastingBase extends TileEntityFoundryBase } public int cooloff = 100; - - public abstract String getName(); - @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java index 146e79b1b..f2e476a3e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFoundryMold.java @@ -8,11 +8,6 @@ public class TileEntityFoundryMold extends TileEntityFoundryCastingBase implemen super(2); } - @Override - public String getName() { - return null; - } - @Override public void updateEntity() { super.updateEntity(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java index b7044b33f..62f04d8e4 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineStrandCaster.java @@ -37,7 +37,6 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase public FluidTank water; public FluidTank steam; - @Override public String getName() { return "container.machineStrandCaster"; } @@ -66,9 +65,10 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase } if (this.amount >= this.getCapacity()) { + //In case of overfill problems, spit out the excess as scrap if (amount > getCapacity()) { ItemStack scrap = ItemScraps.create(new Mats.MaterialStack(type, amount)); - EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord, zCoord + 0.5, scrap); + EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 2, zCoord + 0.5, scrap); worldObj.spawnEntityInWorld(item); } this.amount = this.getCapacity();