From ee34c5990887ef89659df57a8a29bc27a646abe8 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 18 Sep 2023 21:37:01 +0200 Subject: [PATCH] =?UTF-8?q?pain=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hbm/blocks/network/DroneCrate.java | 78 +++++++++++++++- .../java/com/hbm/tileentity/TileMappings.java | 1 + .../machine/TileEntityMachineAssembler.java | 9 +- .../TileEntityMachineAssemblerBase.java | 61 ++++++------ .../machine/TileEntityMachineAssemfac.java | 29 +++--- .../machine/TileEntityMachineChemfac.java | 29 +++--- .../machine/TileEntityMachineChemplant.java | 33 ++++--- .../TileEntityMachineChemplantBase.java | 57 +++++++----- .../network/TileEntityDroneCrate.java | 88 ++++++++++++++++++ .../network/TileEntityDroneWaypoint.java | 2 +- .../hbm/textures/models/machines/drone.png | Bin 2662 -> 2748 bytes 11 files changed, 286 insertions(+), 101 deletions(-) create mode 100644 src/main/java/com/hbm/tileentity/network/TileEntityDroneCrate.java diff --git a/src/main/java/com/hbm/blocks/network/DroneCrate.java b/src/main/java/com/hbm/blocks/network/DroneCrate.java index 440e3e5c5..02180bfbd 100644 --- a/src/main/java/com/hbm/blocks/network/DroneCrate.java +++ b/src/main/java/com/hbm/blocks/network/DroneCrate.java @@ -1,17 +1,33 @@ package com.hbm.blocks.network; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import com.hbm.blocks.ILookOverlay; +import com.hbm.blocks.ITooltipProvider; import com.hbm.lib.RefStrings; +import com.hbm.tileentity.network.TileEntityDroneCrate; +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.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; -public class DroneCrate extends BlockContainer { +public class DroneCrate extends BlockContainer implements ILookOverlay, ITooltipProvider { + + private static Random rand = new Random(); @SideOnly(Side.CLIENT) private IIcon iconTop; @SideOnly(Side.CLIENT) private IIcon iconBottom; @@ -22,7 +38,7 @@ public class DroneCrate extends BlockContainer { @Override public TileEntity createNewTileEntity(World world, int meta) { - return null; + return new TileEntityDroneCrate(); } @Override @@ -38,4 +54,62 @@ public class DroneCrate extends BlockContainer { public IIcon getIcon(int side, int metadata) { return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon); } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + TileEntityDroneCrate tileentityfurnace = (TileEntityDroneCrate) world.getTileEntity(x, y, z); + + if(tileentityfurnace != null) { + for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) { + ItemStack itemstack = tileentityfurnace.getStackInSlot(i1); + + if(itemstack != null) { + float f = this.rand.nextFloat() * 0.8F + 0.1F; + float f1 = this.rand.nextFloat() * 0.8F + 0.1F; + float f2 = this.rand.nextFloat() * 0.8F + 0.1F; + + while(itemstack.stackSize > 0) { + int j1 = this.rand.nextInt(21) + 10; + + if(j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + + if(itemstack.hasTagCompound()) { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } + + float f3 = 0.05F; + entityitem.motionX = (float) this.rand.nextGaussian() * f3; + entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) this.rand.nextGaussian() * f3; + world.spawnEntityInWorld(entityitem); + } + } + } + + world.func_147453_f(x, y, z, block); + } + + super.breakBlock(world, x, y, z, block, meta); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + addStandardInfo(stack, player, list, ext); + } + + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + TileEntityDroneCrate tile = (TileEntityDroneCrate) world.getTileEntity(x, y, z); + List text = new ArrayList(); + + if(tile.nextY != -1) { + text.add("Next waypoint: " + tile.nextX + " / " + tile.nextY + " / " + tile.nextZ); + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); + } + } } diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 993af256b..40b91f1a4 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -393,6 +393,7 @@ public class TileMappings { put(TileEntityRadioTelex.class, "tileentity_rtty_telex"); put(TileEntityDroneWaypoint.class, "tileentity_drone_waypoint"); + put(TileEntityDroneCrate.class, "tileentity_drone_crate"); } private static void put(Class clazz, String... names) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java index 452a614e9..3c0893c5f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java @@ -25,7 +25,6 @@ import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -211,16 +210,16 @@ public class TileEntityMachineAssembler extends TileEntityMachineAssemblerBase { } @Override - public ChunkCoordinates[] getInputPositions() { + public DirPos[] getInputPositions() { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - return new ChunkCoordinates[] {new ChunkCoordinates(xCoord - dir.offsetX * 3 + rot.offsetX, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ)}; + return new DirPos[] {new DirPos(xCoord - dir.offsetX * 3 + rot.offsetX, yCoord, zCoord - dir.offsetZ * 3 + rot.offsetZ, dir.getOpposite())}; } @Override - public ChunkCoordinates[] getOutputPositions() { + public DirPos[] getOutputPositions() { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); - return new ChunkCoordinates[] {new ChunkCoordinates(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2)}; + return new DirPos[] {new DirPos(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, dir)}; } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblerBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblerBase.java index 5a4bdcbbd..b4bcd8648 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblerBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblerBase.java @@ -11,13 +11,13 @@ import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; import com.hbm.tileentity.machine.storage.TileEntityCrateTemplate; import com.hbm.util.InventoryUtil; +import com.hbm.util.fauxpointtwelve.DirPos; import api.hbm.energy.IEnergyUser; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBase implements IEnergyUser, IGUIProvider { @@ -145,27 +145,29 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa int template = getTemplateIndex(index); - ChunkCoordinates[] positions = getInputPositions(); + DirPos[] positions = getInputPositions(); int[] indices = getSlotIndicesFromIndex(index); - for(ChunkCoordinates coord : positions) { + for(DirPos coord : positions) { - TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ); + TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ()); if(te instanceof IInventory) { IInventory inv = (IInventory) te; ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null; boolean templateCrate = te instanceof TileEntityCrateTemplate; if(templateCrate && slots[template] == null) { - for(int i = 0; i < inv.getSizeInventory(); i++) { - ItemStack stack = inv.getStackInSlot(i); + for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) { + int slot = access != null ? access[i] : i; + ItemStack stack = inv.getStackInSlot(slot); - if(stack != null && stack.getItem() == ModItems.assembly_template && (sided == null || sided.canExtractItem(i, stack, 0))) { + if(stack != null && stack.getItem() == ModItems.assembly_template && (sided == null || sided.canExtractItem(slot, stack, 0))) { slots[template] = stack.copy(); - sided.setInventorySlotContents(i, null); + sided.setInventorySlotContents(slot, null); this.needsTemplateSwitch[index] = false; break; } @@ -186,16 +188,17 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa boolean found = false; - for(int i = 0; i < inv.getSizeInventory(); i++) { - - ItemStack stack = inv.getStackInSlot(i); - if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(i, stack, 0))) { + for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) { + + int slot = access != null ? access[i] : i; + ItemStack stack = inv.getStackInSlot(slot); + if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) { found = true; for(int j = indices[0]; j <= indices[1]; j++) { if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) { - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); slots[j].stackSize++; continue outer; } @@ -206,7 +209,7 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa if(slots[j] == null) { slots[j] = stack.copy(); slots[j].stackSize = 1; - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); continue outer; } } @@ -224,16 +227,18 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa private void unloadItems(int index) { - ChunkCoordinates[] positions = getOutputPositions(); + DirPos[] positions = getOutputPositions(); int[] indices = getSlotIndicesFromIndex(index); - for(ChunkCoordinates coord : positions) { + for(DirPos coord : positions) { - TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ); + TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ()); if(te instanceof IInventory) { IInventory inv = (IInventory) te; + ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null; int i = indices[2]; ItemStack out = slots[i]; @@ -246,12 +251,14 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa if(out != null) { - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!(sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out))) continue; - ItemStack target = inv.getStackInSlot(j); + ItemStack target = inv.getStackInSlot(slot); if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) { this.decrStackSize(i, 1); @@ -260,15 +267,17 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa } } - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!inv.isItemValidForSlot(slot, out)) continue; - if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) { + if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out))) { ItemStack copy = out.copy(); copy.stackSize = 1; - inv.setInventorySlotContents(j, copy); + inv.setInventorySlotContents(slot, copy); this.decrStackSize(i, 1); return; } @@ -296,7 +305,7 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa * @return A size 3 int array containing min input, max input and output indices in that order. */ public abstract int[] getSlotIndicesFromIndex(int index); - public abstract ChunkCoordinates[] getInputPositions(); - public abstract ChunkCoordinates[] getOutputPositions(); + public abstract DirPos[] getInputPositions(); + public abstract DirPos[] getOutputPositions(); public abstract int getPowerSlot(); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemfac.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemfac.java index a7f8b6f1e..407c74ad6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemfac.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemfac.java @@ -21,7 +21,6 @@ import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -351,11 +350,11 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im return new int[] { 5 + index * 14, 16 + index * 14, 18 + index * 14}; } - ChunkCoordinates[] inpos; - ChunkCoordinates[] outpos; + DirPos[] inpos; + DirPos[] outpos; @Override - public ChunkCoordinates[] getInputPositions() { + public DirPos[] getInputPositions() { if(inpos != null) return inpos; @@ -363,18 +362,18 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - inpos = new ChunkCoordinates[] { - new ChunkCoordinates(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1), - new ChunkCoordinates(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2), - new ChunkCoordinates(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4), - new ChunkCoordinates(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5) + inpos = new DirPos[] { + new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1, dir), + new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2, dir.getOpposite()), + new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()), + new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5, rot) }; return inpos; } @Override - public ChunkCoordinates[] getOutputPositions() { + public DirPos[] getOutputPositions() { if(outpos != null) return outpos; @@ -382,11 +381,11 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - outpos = new ChunkCoordinates[] { - new ChunkCoordinates(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2), - new ChunkCoordinates(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1), - new ChunkCoordinates(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4), - new ChunkCoordinates(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5) + outpos = new DirPos[] { + new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2, dir), + new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1, dir.getOpposite()), + new DirPos(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4, rot.getOpposite()), + new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5, rot) }; return outpos; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemfac.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemfac.java index 539ea2f42..3f7413677 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemfac.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemfac.java @@ -23,7 +23,6 @@ import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -234,11 +233,11 @@ public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase { return new int[] {5 + index * 9, 8 + index * 9, 9 + index * 9, 12 + index * 9}; } - ChunkCoordinates[] inpos; - ChunkCoordinates[] outpos; + DirPos[] inpos; + DirPos[] outpos; @Override - public ChunkCoordinates[] getInputPositions() { + public DirPos[] getInputPositions() { if(inpos != null) return inpos; @@ -246,18 +245,18 @@ public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - inpos = new ChunkCoordinates[] { - new ChunkCoordinates(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1), - new ChunkCoordinates(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2), - new ChunkCoordinates(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4), - new ChunkCoordinates(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5) + inpos = new DirPos[] { + new DirPos(xCoord + dir.offsetX * 4 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 4 - rot.offsetZ * 1, dir), + new DirPos(xCoord - dir.offsetX * 5 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 5 + rot.offsetZ * 2, dir.getOpposite()), + new DirPos(xCoord - dir.offsetX * 2 - rot.offsetX * 4, yCoord, zCoord - dir.offsetZ * 2 - rot.offsetZ * 4, rot.getOpposite()), + new DirPos(xCoord + dir.offsetX * 1 + rot.offsetX * 5, yCoord, zCoord + dir.offsetZ * 1 + rot.offsetZ * 5, rot) }; return inpos; } @Override - public ChunkCoordinates[] getOutputPositions() { + public DirPos[] getOutputPositions() { if(outpos != null) return outpos; @@ -265,11 +264,11 @@ public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase { ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); ForgeDirection rot = dir.getRotation(ForgeDirection.UP); - outpos = new ChunkCoordinates[] { - new ChunkCoordinates(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2), - new ChunkCoordinates(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1), - new ChunkCoordinates(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4), - new ChunkCoordinates(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5) + outpos = new DirPos[] { + new DirPos(xCoord + dir.offsetX * 4 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 4 + rot.offsetZ * 2, dir), + new DirPos(xCoord - dir.offsetX * 5 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 5 - rot.offsetZ * 1, dir.getOpposite()), + new DirPos(xCoord + dir.offsetX * 1 - rot.offsetX * 4, yCoord, zCoord + dir.offsetZ * 1 - rot.offsetZ * 4, rot.getOpposite()), + new DirPos(xCoord - dir.offsetX * 2 + rot.offsetX * 5, yCoord, zCoord - dir.offsetZ * 2 + rot.offsetZ * 5, rot) }; return outpos; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java index 3a14f536b..edc19ee83 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java @@ -363,6 +363,7 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements IInventory inv = (IInventory) te; ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(dir.ordinal()) : null; for(AStack ingredient : recipe.inputs) { @@ -371,15 +372,17 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements boolean found = false; - for(int i = 0; i < inv.getSizeInventory(); i++) { + for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) { + + int slot = access != null ? access[i] : i; + ItemStack stack = inv.getStackInSlot(slot); - ItemStack stack = inv.getStackInSlot(i); - if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(i, stack, 0))) { + if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) { for(int j = 13; j <= 16; j++) { if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) { - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); slots[j].stackSize++; continue outer; } @@ -390,7 +393,7 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements if(slots[j] == null) { slots[j] = stack.copy(); slots[j].stackSize = 1; - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); continue outer; } } @@ -417,6 +420,8 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements if(te instanceof IInventory) { IInventory inv = (IInventory) te; + ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(dir.ordinal()) : null; for(int i = 5; i <= 8; i++) { @@ -424,12 +429,14 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements if(out != null) { - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!inv.isItemValidForSlot(slot, out)) continue; - ItemStack target = inv.getStackInSlot(j); + ItemStack target = inv.getStackInSlot(slot); if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize()) { this.decrStackSize(i, 1); @@ -438,15 +445,17 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements } } - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!inv.isItemValidForSlot(slot, out)) continue; - if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) { + if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, dir.ordinal()) : inv.isItemValidForSlot(slot, out))) { ItemStack copy = out.copy(); copy.stackSize = 1; - inv.setInventorySlotContents(j, copy); + inv.setInventorySlotContents(slot, copy); this.decrStackSize(i, 1); return; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplantBase.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplantBase.java index 5363c7e9e..129a665fd 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplantBase.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplantBase.java @@ -14,6 +14,7 @@ import com.hbm.lib.Library; import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; import com.hbm.util.InventoryUtil; +import com.hbm.util.fauxpointtwelve.DirPos; import api.hbm.energy.IEnergyUser; import api.hbm.fluid.IFluidUser; @@ -22,7 +23,6 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; /** * Base class for single and multi chemplants. @@ -202,17 +202,18 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa if(recipe != null) { - ChunkCoordinates[] positions = getInputPositions(); + DirPos[] positions = getInputPositions(); int[] indices = getSlotIndicesFromIndex(index); - for(ChunkCoordinates coord : positions) { - - TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ); + for(DirPos coord : positions) { + + TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ()); if(te instanceof IInventory) { IInventory inv = (IInventory) te; ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null; for(AStack ingredient : recipe.inputs) { @@ -221,15 +222,16 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa boolean found = false; - for(int i = 0; i < inv.getSizeInventory(); i++) { - - ItemStack stack = inv.getStackInSlot(i); - if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(i, stack, 0))) { + for(int i = 0; i < (access != null ? access.length : inv.getSizeInventory()); i++) { + + int slot = access != null ? access[i] : i; + ItemStack stack = inv.getStackInSlot(slot); + if(ingredient.matchesRecipe(stack, true) && (sided == null || sided.canExtractItem(slot, stack, 0))) { for(int j = indices[0]; j <= indices[1]; j++) { if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) { - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); slots[j].stackSize++; continue outer; } @@ -240,7 +242,7 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa if(slots[j] == null) { slots[j] = stack.copy(); slots[j].stackSize = 1; - inv.decrStackSize(i, 1); + inv.decrStackSize(slot, 1); continue outer; } } @@ -257,17 +259,18 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa private void unloadItems(int index) { - ChunkCoordinates[] positions = getOutputPositions(); + DirPos[] positions = getOutputPositions(); int[] indices = getSlotIndicesFromIndex(index); - for(ChunkCoordinates coord : positions) { - - TileEntity te = worldObj.getTileEntity(coord.posX, coord.posY, coord.posZ); + for(DirPos coord : positions) { + + TileEntity te = worldObj.getTileEntity(coord.getX(), coord.getY(), coord.getZ()); if(te instanceof IInventory) { IInventory inv = (IInventory) te; - //ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + ISidedInventory sided = inv instanceof ISidedInventory ? (ISidedInventory) inv : null; + int[] access = sided != null ? sided.getAccessibleSlotsFromSide(coord.getDir().ordinal()) : null; for(int i = indices[2]; i <= indices[3]; i++) { @@ -275,12 +278,14 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa if(out != null) { - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!inv.isItemValidForSlot(slot, out)) continue; - ItemStack target = inv.getStackInSlot(j); + ItemStack target = inv.getStackInSlot(slot); if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize() && target.stackSize < inv.getInventoryStackLimit()) { this.decrStackSize(i, 1); @@ -289,15 +294,17 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa } } - for(int j = 0; j < inv.getSizeInventory(); j++) { + for(int j = 0; j < (access != null ? access.length : inv.getSizeInventory()); j++) { + + int slot = access != null ? access[j] : j; - if(!inv.isItemValidForSlot(j, out)) + if(!inv.isItemValidForSlot(slot, out)) continue; - if(inv.getStackInSlot(j) == null && inv.isItemValidForSlot(j, out)) { + if(inv.getStackInSlot(slot) == null && (sided != null ? sided.canInsertItem(slot, out, coord.getDir().ordinal()) : inv.isItemValidForSlot(slot, out))) { ItemStack copy = out.copy(); copy.stackSize = 1; - inv.setInventorySlotContents(j, copy); + inv.setInventorySlotContents(slot, copy); this.decrStackSize(i, 1); return; } @@ -585,6 +592,6 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa * @return A size 4 int array containing min input, max input, min output and max output indices in that order. */ public abstract int[] getSlotIndicesFromIndex(int index); - public abstract ChunkCoordinates[] getInputPositions(); - public abstract ChunkCoordinates[] getOutputPositions(); + public abstract DirPos[] getInputPositions(); + public abstract DirPos[] getOutputPositions(); } diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityDroneCrate.java b/src/main/java/com/hbm/tileentity/network/TileEntityDroneCrate.java new file mode 100644 index 000000000..1fbad4f7d --- /dev/null +++ b/src/main/java/com/hbm/tileentity/network/TileEntityDroneCrate.java @@ -0,0 +1,88 @@ +package com.hbm.tileentity.network; + +import java.util.List; + +import com.hbm.entity.item.EntityDeliveryDrone; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.tileentity.INBTPacketReceiver; +import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.util.fauxpointtwelve.BlockPos; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class TileEntityDroneCrate extends TileEntityMachineBase implements IGUIProvider, INBTPacketReceiver, IDroneLinkable { + + public int nextX = -1; + public int nextY = -1; + public int nextZ = -1; + + public TileEntityDroneCrate() { + super(19); + } + + @Override + public String getName() { + return "container.droneCrate"; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + if(nextY != -1) { + + List drones = worldObj.getEntitiesWithinAABB(EntityDeliveryDrone.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord, xCoord + 1, yCoord + 2, zCoord + 1)); + for(EntityDeliveryDrone drone : drones) { + if(Vec3.createVectorHelper(drone.motionX, drone.motionY, drone.motionZ).lengthVector() < 0.05) { + drone.setTarget(nextX + 0.5, nextY, nextZ + 0.5); + } + } + } + + NBTTagCompound data = new NBTTagCompound(); + data.setIntArray("pos", new int[] {nextX, nextY, nextZ}); + INBTPacketReceiver.networkPack(this, data, 25); + } + } + + @Override + public BlockPos getPoint() { + return new BlockPos(xCoord, yCoord + 1, zCoord); + } + + @Override + public void setNextTarget(int x, int y, int z) { + this.nextX = x; + this.nextY = y; + this.nextZ = z; + this.markDirty(); + } + + @Override + public void networkUnpack(NBTTagCompound nbt) { + int[] pos = nbt.getIntArray("pos"); + this.nextX = pos[0]; + this.nextY = pos[1]; + this.nextZ = pos[2]; + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return null; + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return null; + } +} diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityDroneWaypoint.java b/src/main/java/com/hbm/tileentity/network/TileEntityDroneWaypoint.java index 073562a08..8476fef96 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityDroneWaypoint.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityDroneWaypoint.java @@ -30,7 +30,7 @@ public class TileEntityDroneWaypoint extends TileEntity implements INBTPacketRec List drones = worldObj.getEntitiesWithinAABB(EntityDeliveryDrone.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1).offset(dir.offsetX * height, dir.offsetY * height, dir.offsetZ * height)); for(EntityDeliveryDrone drone : drones) { if(Vec3.createVectorHelper(drone.motionX, drone.motionY, drone.motionZ).lengthVector() < 0.05) { - drone.setTarget(nextX + 0.5, nextY + 0.5, nextZ + 0.5); + drone.setTarget(nextX + 0.5, nextY, nextZ + 0.5); } } } diff --git a/src/main/resources/assets/hbm/textures/models/machines/drone.png b/src/main/resources/assets/hbm/textures/models/machines/drone.png index c264733bd5aed8568681f45230db1c4fa53df8c6..56d1e7312ed1159a4d699f2efe572c103a39d04f 100644 GIT binary patch delta 2724 zcmV;V3S0H&6ucFXG=FnRL_t(|ob8&)ZyQGz#(z~^O?Hz~wAiMX#4=#niWDJ$<{lu+ zA%`3i1o0)n94DB2f?V}?KYl}U*dwNf-jA0V*BuI{S$>eYK+eJnv2eEZEz((PV9@PGa%^P->qshw_~zbtrp z(rWu|Z7E`XIq7=87kWM4dcU8LeeZEVv13H6FDI-ohx@+Y3kQAvFtM+7cv$(P-+5ps z>=+R{;r!);*>G5SAb~{eb3$98w$AQeW@)d9Qe$l?+I8EV#+N|S`gstCD0n`*$C0gf zgKp#d%iLUh!+(5!-+f4E%#etT?Xgm+L_VK4hIZuGW-N}h3%(96SM>KKb zh$c=P(Zq=(nmBPp6DN*n;=~b6^wc8;0mq_8bn3icJJD_iADbSrz2l>u5$%BE{5fHp z9Q;+C0umktH!}~koDD@KU#20S&dGqE?^oTwQhyX3##yYc-X5@XmU=AWh^}9ZbCz?> zlQH>x{z$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