From 7eb08712d132fd051e2872c350a95cbb35868eb9 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 19 Mar 2015 21:27:56 +0100 Subject: [PATCH] The ESD! --- build.gradle | 2 +- .../actuallyadditions/ActuallyAdditions.java | 2 + .../blocks/BlockInputter.java | 171 +++++++++++++++ .../actuallyadditions/blocks/BlockMisc.java | 2 + .../actuallyadditions/blocks/InitBlocks.java | 6 + .../config/ConfigValues.java | 1 - .../crafting/GrinderCrafting.java | 41 +++- .../crafting/InitCrafting.java | 1 - .../crafting/MiscCrafting.java | 7 +- .../creative/CreativeTab.java | 3 +- .../inventory/ContainerGiantChest.java | 6 +- .../inventory/ContainerInputter.java | 92 ++++++++ .../inventory/GuiFeeder.java | 2 +- .../inventory/GuiGiantChest.java | 6 +- .../inventory/GuiHandler.java | 7 + .../inventory/GuiInputter.java | 150 +++++++++++++ .../actuallyadditions/items/InitItems.java | 23 +- .../actuallyadditions/items/ItemKnife.java | 5 + .../items/tools/ItemAxeAA.java | 9 +- .../items/tools/ItemHoeAA.java | 9 +- .../items/tools/ItemPickaxeAA.java | 9 +- .../items/tools/ItemShovelAA.java | 9 +- .../items/tools/ItemSwordAA.java | 9 +- .../network/PacketHandler.java | 2 +- .../network/PacketInputterButton.java | 66 ++++++ .../network/PacketTileEntityFeeder.java | 3 + .../tile/TileEntityBase.java | 2 +- .../tile/TileEntityCompost.java | 4 + .../tile/TileEntityFeeder.java | 22 +- .../tile/TileEntityFurnaceDouble.java | 4 +- .../tile/TileEntityGiantChest.java | 2 +- .../tile/TileEntityGrinder.java | 4 +- .../tile/TileEntityInputter.java | 198 ++++++++++++++++++ .../tile/TileEntityPackager.java | 115 ---------- .../ellpeck/actuallyadditions/util/Util.java | 4 +- .../assets/actuallyadditions/lang/de_DE.lang | 4 +- .../assets/actuallyadditions/lang/en_US.lang | 39 +++- .../textures/blocks/blockInputter.png | Bin 0 -> 538 bytes .../textures/gui/guiFurnaceDouble.png | Bin 2592 -> 2286 bytes .../textures/gui/guiGiantChest.png | Bin 1898 -> 1852 bytes .../textures/gui/guiInputter.png | Bin 0 -> 2642 bytes .../textures/items/ItemSpecialPearlShard.png | Bin 0 -> 605 bytes .../items/ItemSpecialSolidifiedExperience.png | Bin 0 -> 601 bytes .../textures/items/itemFoodHamburger.png | Bin 288 -> 422 bytes .../textures/items/itemFoodToast.png | Bin 374 -> 457 bytes .../items/itemSpecialBloodFragment.png | Bin 0 -> 377 bytes .../items/itemSpecialEmeraldShard.png | Bin 0 -> 395 bytes .../textures/items/itemSpecialHeartPart.png | Bin 0 -> 557 bytes .../items/itemSpecialUnknownSubstance.png | Bin 0 -> 631 bytes src/main/resources/mcmod.info | 2 +- 50 files changed, 867 insertions(+), 176 deletions(-) create mode 100644 src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java create mode 100644 src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java create mode 100644 src/main/java/ellpeck/actuallyadditions/inventory/GuiInputter.java create mode 100644 src/main/java/ellpeck/actuallyadditions/network/PacketInputterButton.java create mode 100644 src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java delete mode 100644 src/main/java/ellpeck/actuallyadditions/tile/TileEntityPackager.java create mode 100644 src/main/resources/assets/actuallyadditions/textures/blocks/blockInputter.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/gui/guiInputter.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/ItemSpecialPearlShard.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/ItemSpecialSolidifiedExperience.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialBloodFragment.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialEmeraldShard.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialHeartPart.png create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png diff --git a/build.gradle b/build.gradle index b848ebb1a..421f07bbd 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.7.10-0.0.1.3" +version = "1.7.10-0.0.1.4" group = "ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" diff --git a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java index 08b1e3324..e5ad5e275 100644 --- a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java +++ b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java @@ -10,6 +10,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import ellpeck.actuallyadditions.achievement.InitAchievements; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.config.ConfigurationHandler; +import ellpeck.actuallyadditions.crafting.GrinderCrafting; import ellpeck.actuallyadditions.crafting.InitCrafting; import ellpeck.actuallyadditions.event.InitEvents; import ellpeck.actuallyadditions.gen.OreGen; @@ -67,6 +68,7 @@ public class ActuallyAdditions{ public void postInit(FMLPostInitializationEvent event){ Util.logInfo("Starting PostInitialization Phase..."); + GrinderCrafting.init(); proxy.postInit(); Util.logInfo("PostInitialization Finished."); diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java new file mode 100644 index 000000000..9940358ca --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java @@ -0,0 +1,171 @@ +package ellpeck.actuallyadditions.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.ActuallyAdditions; +import ellpeck.actuallyadditions.creative.CreativeTab; +import ellpeck.actuallyadditions.inventory.GuiHandler; +import ellpeck.actuallyadditions.tile.TileEntityInputter; +import ellpeck.actuallyadditions.util.IName; +import ellpeck.actuallyadditions.util.Util; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.StatCollector; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import java.util.List; +import java.util.Random; + +public class BlockInputter extends BlockContainerBase implements IName{ + + public static final int NAME_FLAVOUR_AMOUNTS = 12; + + private long lastSysTime; + private int toPick; + + public BlockInputter(){ + super(Material.rock); + this.setHarvestLevel("pickaxe", 0); + this.setHardness(1.0F); + this.setStepSound(soundTypeStone); + this.setTickRandomly(true); + this.setCreativeTab(CreativeTab.instance); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z){ + super.onBlockAdded(world, x, y, z); + + if (!world.isRemote){ + Block block1 = world.getBlock(x, y, z-1); + Block block2 = world.getBlock(x, y, z+1); + Block block3 = world.getBlock(x-1, y, z); + Block block4 = world.getBlock(x+1, y, z); + + int metaToSet = 1; + if (block1.func_149730_j() && !block2.func_149730_j()) metaToSet = 0; + if (block2.func_149730_j() && !block1.func_149730_j()) metaToSet = 1; + if (block3.func_149730_j() && !block4.func_149730_j()) metaToSet = 2; + if (block4.func_149730_j() && !block3.func_149730_j()) metaToSet = 3; + + world.setBlockMetadataWithNotify(x, y, z, metaToSet, 2); + } + } + + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ + int rotation = MathHelper.floor_double((double)(player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + + if (rotation == 0) world.setBlockMetadataWithNotify(x, y, z, 0, 2); + if (rotation == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2); + if (rotation == 2) world.setBlockMetadataWithNotify(x, y, z, 1, 2); + if (rotation == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2); + } + + @Override + public String getUnlocalizedName(){ + String norm = "tile." + Util.MOD_ID_LOWER + "." + this.getName(); + + Random rand = new Random(); + long sysTime = System.currentTimeMillis(); + + if(this.lastSysTime+5000 < sysTime){ + this.lastSysTime = sysTime; + this.toPick = rand.nextInt(NAME_FLAVOUR_AMOUNTS+1); + } + + return norm + "." + this.toPick; + } + + @Override + public TileEntity createNewTileEntity(World world, int par2){ + return new TileEntityInputter(); + } + + @Override + public int getLightValue(IBlockAccess world, int x, int y, int z){ + return world.getBlockMetadata(x, y, z) > 3 ? 12 : 0; + } + + @Override + public IIcon getIcon(int side, int meta){ + return this.blockIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconReg){ + this.blockIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + this.getName()); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ + if(!world.isRemote){ + TileEntityInputter furnace = (TileEntityInputter)world.getTileEntity(x, y, z); + if (furnace != null) player.openGui(ActuallyAdditions.instance, GuiHandler.INPUTTER_ID, world, x, y, z); + return true; + } + return true; + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int par6){ + this.dropInventory(world, x, y, z); + super.breakBlock(world, x, y, z, block, par6); + } + + @Override + public String getName(){ + return "blockInputter"; + } + + public static class TheItemBlock extends ItemBlock{ + + private Block theBlock; + + public TheItemBlock(Block block){ + super(block); + this.theBlock = block; + this.setHasSubtypes(false); + this.setMaxDamage(0); + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.rare; + } + + @Override + public String getUnlocalizedName(ItemStack stack){ + return this.getUnlocalizedName(); + } + + @Override + @SuppressWarnings("unchecked") + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { + if(Util.isShiftPressed()){ + list.add(StatCollector.translateToLocalFormatted("tooltip." + Util.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + 1, Util.OBFUSCATED, Util.LIGHT_GRAY)); + for(int i = 1; i < 5; i++){ + list.add(StatCollector.translateToLocal("tooltip." + Util.MOD_ID_LOWER + "." + ((IName)theBlock).getName() + ".desc." + (i + 1))); + } + } + else list.add(Util.shiftForInfo()); + } + + @Override + public int getMetadata(int damage){ + return damage; + } + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java index 157baf1b2..9634b74a3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java @@ -26,6 +26,8 @@ public class BlockMisc extends Block implements IName{ public BlockMisc(){ super(Material.rock); + this.setHarvestLevel("pickaxe", 0); + this.setHardness(1.0F); } @SuppressWarnings("all") diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java index 29a583a57..a8d4e73e4 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java @@ -1,5 +1,7 @@ package ellpeck.actuallyadditions.blocks; +import cpw.mods.fml.common.registry.GameRegistry; +import ellpeck.actuallyadditions.util.IName; import ellpeck.actuallyadditions.util.Util; import net.minecraft.block.Block; @@ -13,6 +15,7 @@ public class InitBlocks{ public static Block blockGrinder; public static Block blockGrinderDouble; public static Block blockFurnaceDouble; + public static Block blockInputter; public static void init(){ Util.logInfo("Initializing Blocks..."); @@ -37,5 +40,8 @@ public class InitBlocks{ blockFurnaceDouble = new BlockFurnaceDouble(); Util.register(blockFurnaceDouble, BlockFurnaceDouble.TheItemBlock.class); + + blockInputter = new BlockInputter(); + GameRegistry.registerBlock(blockInputter, BlockInputter.TheItemBlock.class, ((IName)blockInputter).getName()); } } \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java index 11a156d98..7d87fd0a1 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java @@ -74,7 +74,6 @@ public class ConfigValues{ blackQuartzMinHeight = config.getInt("Black Quartz Min Height", ConfigurationHandler.CATEGORY_WORLD_GEN, 0, 0, 256, "How high the Black Quartz starts to generate"); blackQuartzMaxHeight = config.getInt("Black Quartz Max Height", ConfigurationHandler.CATEGORY_WORLD_GEN, 25, 0, 256, "How high the Black Quartz stops to generate at"); - //TODO CHANGE TO BE TRUE BY DEFAULT enableExperienceDrop = config.getBoolean("Solidified Experience", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Solidified Experience drops from Mobs"); enableBloodDrop = config.getBoolean("Blood Fragments", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Blood Fragments drop from Mobs"); enableHeartDrop = config.getBoolean("Heart Parts", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Heart Parts drop from Mobs"); diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/GrinderCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/GrinderCrafting.java index f302d54a2..c4eee3c8f 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/GrinderCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/GrinderCrafting.java @@ -15,6 +15,7 @@ import java.util.ArrayList; public class GrinderCrafting{ public static void init(){ + Util.logInfo("Initializing Grinder Recipes..."); GrinderRecipes.instance().registerRecipe(new ItemStack(Blocks.iron_ore), new ItemStack(InitItems.itemDust, 2, TheDusts.IRON.ordinal()), new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), 10); GrinderRecipes.instance().registerRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 10), null, 0); @@ -26,24 +27,43 @@ public class GrinderCrafting{ public static void registerFinally(){ String[] names = OreDictionary.getOreNames(); for(String name : names){ - if(name.contains("ore")){ - String nameOfOre = name.substring(3); - ArrayList allDusts; - if(nameOfOre.contains("Nether")) allDusts = OreDictionary.getOres("dust" + nameOfOre.substring(6)); - else allDusts = OreDictionary.getOres("dust" + nameOfOre); + int resultAmount = 1; + String nameOfOre = null; + + if(name.length() > 3 && name.substring(0, 3).equals("ore")){ + nameOfOre = name.substring(3); + resultAmount = 2; + } + if(name.length() > 9 && name.substring(0, 9).equals("oreNether")){ + nameOfOre = name.substring(9); + resultAmount = 2; + } + if(name.length() > 8 && name.substring(0, 8).equals("denseore")){ + nameOfOre = name.substring(8); + resultAmount = 6; + } + if(name.length() > 3 && name.substring(0, 3).equals("gem")) nameOfOre = name.substring(3); + if(name.length() > 5 && name.substring(0, 5).equals("ingot")) nameOfOre = name.substring(5); + + if(nameOfOre != null){ + ArrayList allDusts; + String nameToGetFrom = "dust" + nameOfOre; + + allDusts = OreDictionary.getOres(nameToGetFrom); if(allDusts != null && allDusts.size() > 0){ ArrayList allOresOfName = OreDictionary.getOres(name); if(allOresOfName != null && allOresOfName.size() > 0){ for(ItemStack output : allDusts){ - output.stackSize = 2; + output.stackSize = resultAmount; for(ItemStack input : allOresOfName){ if(GrinderRecipes.instance().getOutput(input, false) == null){ - //Special Second Outputs - if(name.equals("oreNickel")) - GrinderRecipes.instance().registerRecipe(input, output, OreDictionary.getOres("dustPlatinum").get(0), 10); + if(name.equals("oreNickel")){ + ArrayList specialStacks = OreDictionary.getOres("dustPlatinum"); + for(ItemStack theSpecial : specialStacks) GrinderRecipes.instance().registerRecipe(input, output, theSpecial, 10); + } else GrinderRecipes.instance().registerRecipe(input, output, null, 0); } @@ -52,9 +72,8 @@ public class GrinderCrafting{ } else Util.AA_LOGGER.log(Level.ERROR, "Couldn't register Crusher Recipe! Didn't find Items registered as '" + name + "'! This shouldn't happen as there is something registered as '" + name + "' that doesn't exist!"); } - else Util.AA_LOGGER.log(Level.WARN, "Couldn't register Crusher Recipe! An Item with OreDictionary Registry 'dust" + nameOfOre + "' doesn't exist! It should correspond to '" + name + "'! This is not an Error, just a bit sad :("); + else if(!name.equals("ingotBrick") && !name.equals("ingotBrickNether")) Util.AA_LOGGER.log(Level.WARN, "Couldn't register Crusher Recipe! An Item with OreDictionary Registry '" + nameToGetFrom + "' doesn't exist! It should correspond to '" + name + "'! This is not an Error, just a bit sad :("); } - } } } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java index 0ceaa24da..e52c97ae2 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java @@ -12,7 +12,6 @@ public class InitCrafting { MiscCrafting.init(); FoodCrafting.init(); ToolCrafting.init(); - GrinderCrafting.init(); } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java index 686a53ea8..e044852d8 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java @@ -30,9 +30,10 @@ public class MiscCrafting{ //Knife Blade if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_BLADE.ordinal()]) - GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), - new ItemStack(Items.iron_ingot), - new ItemStack(Items.flint)); + GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), + "KF", + 'K', new ItemStack(Items.iron_ingot), + 'F', new ItemStack(Items.flint)); } diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index 73f59316c..119ed1c18 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -26,6 +26,7 @@ public class CreativeTab extends CreativeTabs{ public void displayAllReleventItems(List list){ this.list = list; + this.addBlock(InitBlocks.blockInputter); this.addBlock(InitBlocks.blockGrinder); this.addBlock(InitBlocks.blockGrinderDouble); this.addBlock(InitBlocks.blockFurnaceDouble); @@ -58,7 +59,7 @@ public class CreativeTab extends CreativeTabs{ @Override public Item getTabIconItem(){ - return Item.getItemFromBlock(InitBlocks.blockGrinderDouble); + return Item.getItemFromBlock(InitBlocks.blockInputter); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java index 9708534ff..6ddf263dd 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java @@ -15,7 +15,7 @@ public class ContainerGiantChest extends Container{ public ContainerGiantChest(InventoryPlayer inventory, TileEntityBase tile){ this.tileChest = (TileEntityGiantChest)tile; - for (int i = 0; i < 13; i++){ + for (int i = 0; i < 9; i++){ for (int j = 0; j < 13; j++){ this.addSlotToContainer(new Slot(this.tileChest, j + (i*13), 5 + j * 18, 5 + i * 18)); } @@ -23,11 +23,11 @@ public class ContainerGiantChest extends Container{ for (int i = 0; i < 3; i++){ for (int j = 0; j < 9; j++){ - this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 33 + 8 + j * 18, 244 + 4 + i * 18)); + this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 33 + 8 + j * 18, 172 + 4 + i * 18)); } } for (int i = 0; i < 9; i++){ - this.addSlotToContainer(new Slot(inventory, i, 33 + 8 + i * 18, 244 + 62)); + this.addSlotToContainer(new Slot(inventory, i, 33 + 8 + i * 18, 172 + 62)); } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java new file mode 100644 index 000000000..cd969c79a --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java @@ -0,0 +1,92 @@ +package ellpeck.actuallyadditions.inventory; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.tile.TileEntityBase; +import ellpeck.actuallyadditions.tile.TileEntityInputter; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerInputter extends Container{ + + private TileEntityInputter tileInputter; + + private int lastSideToPut; + private int lastSlotToPut; + private int lastSideToPull; + private int lastSlotToPull; + private int lastPlaceToPutSlotAmount; + private int lastPlaceToPullSlotAmount; + + public ContainerInputter(InventoryPlayer inventory, TileEntityBase tile){ + this.tileInputter = (TileEntityInputter)tile; + + this.addSlotToContainer(new Slot(this.tileInputter, 0, 80, 21)); + + for (int i = 0; i < 3; i++){ + for (int j = 0; j < 9; j++){ + this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18)); + } + } + for (int i = 0; i < 9; i++){ + this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155)); + } + } + + @Override + public void addCraftingToCrafters(ICrafting iCraft){ + super.addCraftingToCrafters(iCraft); + iCraft.sendProgressBarUpdate(this, 0, this.tileInputter.sideToPut); + iCraft.sendProgressBarUpdate(this, 1, this.tileInputter.slotToPut); + iCraft.sendProgressBarUpdate(this, 2, this.tileInputter.sideToPull); + iCraft.sendProgressBarUpdate(this, 3, this.tileInputter.slotToPull); + iCraft.sendProgressBarUpdate(this, 4, this.tileInputter.placeToPullSlotAmount); + iCraft.sendProgressBarUpdate(this, 5, this.tileInputter.placeToPutSlotAmount); + } + + @Override + public void detectAndSendChanges(){ + super.detectAndSendChanges(); + for(Object crafter : this.crafters){ + ICrafting iCraft = (ICrafting)crafter; + if(this.lastSideToPut != this.tileInputter.sideToPut) iCraft.sendProgressBarUpdate(this, 0, this.tileInputter.sideToPut); + if(this.lastSlotToPut != this.tileInputter.slotToPut) iCraft.sendProgressBarUpdate(this, 1, this.tileInputter.slotToPut); + if(this.lastSideToPull != this.tileInputter.sideToPull) iCraft.sendProgressBarUpdate(this, 2, this.tileInputter.sideToPull); + if(this.lastSlotToPull != this.tileInputter.slotToPull) iCraft.sendProgressBarUpdate(this, 3, this.tileInputter.slotToPull); + if(this.lastPlaceToPullSlotAmount != this.tileInputter.placeToPullSlotAmount) iCraft.sendProgressBarUpdate(this, 4, this.tileInputter.placeToPullSlotAmount); + if(this.lastPlaceToPutSlotAmount != this.tileInputter.placeToPutSlotAmount) iCraft.sendProgressBarUpdate(this, 5, this.tileInputter.placeToPutSlotAmount); + } + this.lastSideToPut = this.tileInputter.sideToPut; + this.lastSlotToPut = this.tileInputter.slotToPut; + this.lastSideToPull = this.tileInputter.sideToPull; + this.lastSlotToPull = this.tileInputter.slotToPull; + this.lastPlaceToPullSlotAmount = this.tileInputter.placeToPullSlotAmount; + this.lastPlaceToPutSlotAmount = this.tileInputter.placeToPutSlotAmount; + + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2){ + if(par1 == 0) this.tileInputter.sideToPut = par2; + if(par1 == 1) this.tileInputter.slotToPut = par2; + if(par1 == 2) this.tileInputter.sideToPull = par2; + if(par1 == 3) this.tileInputter.slotToPull = par2; + if(par1 == 4) this.tileInputter.placeToPullSlotAmount = par2; + if(par1 == 5) this.tileInputter.placeToPutSlotAmount = par2; + } + + @Override + public boolean canInteractWith(EntityPlayer player){ + return this.tileInputter.isUseableByPlayer(player); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int slot){ + return null; + } +} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiFeeder.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiFeeder.java index b3a66dda1..827a3ab6f 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/GuiFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiFeeder.java @@ -58,7 +58,7 @@ public class GuiFeeder extends GuiContainer{ public void drawScreen(int x, int y, float f){ super.drawScreen(x, y, f); if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){ - String[] array = new String[]{(this.tileFeeder.currentAnimalAmount + " " + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".feeder.animals.desc")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".feeder.enoughToBreed.desc") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".feeder.tooMany.desc") : StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".feeder.notEnough.desc")))}; + String[] array = new String[]{(this.tileFeeder.currentAnimalAmount + " " + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.tooMany") : StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.notEnough")))}; this.func_146283_a(Arrays.asList(array), x, y); } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiGiantChest.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiGiantChest.java index d7d2d7681..7ebdd1543 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/GuiGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiGiantChest.java @@ -18,15 +18,15 @@ public class GuiGiantChest extends GuiContainer{ super(new ContainerGiantChest(inventory, tile)); this.xSize = 242; - this.ySize = 244+86; + this.ySize = 172+86; } @Override public void drawGuiContainerBackgroundLayer(float f, int x, int y){ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(resLoc); - this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 244); + this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 190); this.mc.getTextureManager().bindTexture(Util.GUI_INVENTORY_LOCATION); - this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+244, 0, 0, 176, 86); + this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+172, 0, 0, 176, 86); } } \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java index b073452c2..676aee8d0 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java @@ -31,6 +31,9 @@ public class GuiHandler implements IGuiHandler{ case FURNACE_DOUBLE_ID: TileEntityBase tileFurnace = (TileEntityBase)world.getTileEntity(x, y, z); return new ContainerFurnaceDouble(entityPlayer.inventory, tileFurnace); + case INPUTTER_ID: + TileEntityBase tileInputter = (TileEntityBase)world.getTileEntity(x, y, z); + return new ContainerInputter(entityPlayer.inventory, tileInputter); default: return null; } @@ -56,6 +59,9 @@ public class GuiHandler implements IGuiHandler{ case FURNACE_DOUBLE_ID: TileEntityBase tileFurnace = (TileEntityBase)world.getTileEntity(x, y, z); return new GuiFurnaceDouble(entityPlayer.inventory, tileFurnace); + case INPUTTER_ID: + TileEntityBase tileInputter = (TileEntityBase)world.getTileEntity(x, y, z); + return new GuiInputter(entityPlayer.inventory, tileInputter, x, y, z, world); default: return null; } @@ -67,6 +73,7 @@ public class GuiHandler implements IGuiHandler{ public static final int GRINDER_ID = 3; public static final int GRINDER_DOUBLE_ID = 4; public static final int FURNACE_DOUBLE_ID = 5; + public static final int INPUTTER_ID = 6; public static void init(){ Util.logInfo("Initializing GuiHandler..."); diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiInputter.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiInputter.java new file mode 100644 index 000000000..8d99ee171 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiInputter.java @@ -0,0 +1,150 @@ +package ellpeck.actuallyadditions.inventory; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.network.PacketHandler; +import ellpeck.actuallyadditions.network.PacketInputterButton; +import ellpeck.actuallyadditions.tile.TileEntityBase; +import ellpeck.actuallyadditions.tile.TileEntityInputter; +import ellpeck.actuallyadditions.util.Util; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import org.lwjgl.opengl.GL11; + +@SideOnly(Side.CLIENT) +public class GuiInputter extends GuiContainer{ + + private static final ResourceLocation resLoc = Util.getGuiLocation("guiInputter"); + private TileEntityInputter tileInputter; + + private int x; + private int y; + private int z; + private World world; + + private SmallerButton buttonSlotPutP; + private SmallerButton buttonSlotPullP; + private SmallerButton buttonSlotPutM; + private SmallerButton buttonSlotPullM; + + public static final String[] sideString = new String[]{ + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.disabled"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.up"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.down"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.north"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.east"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.south"), + StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.west")}; + + public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, int x, int y, int z, World world){ + super(new ContainerInputter(inventory, tile)); + this.tileInputter = (TileEntityInputter)tile; + this.x = x; + this.y = y; + this.z = z; + this.world = world; + this.xSize = 176; + this.ySize = 93+86; + } + + @SuppressWarnings("unchecked") + @Override + public void initGui(){ + super.initGui(); + + SmallerButton buttonSidePutP = new SmallerButton(0, guiLeft + 70, guiTop + 43, ">"); + SmallerButton buttonSidePutM = new SmallerButton(1, guiLeft + 5, guiTop + 43, "<"); + buttonSlotPutP = new SmallerButton(2, guiLeft + 70, guiTop + 64, "+"); + buttonSlotPutM = new SmallerButton(3, guiLeft + 5, guiTop + 64, "-"); + + SmallerButton buttonSidePullP = new SmallerButton(4, guiLeft + 155, guiTop + 43, ">"); + SmallerButton buttonSidePullM = new SmallerButton(5, guiLeft + 90, guiTop + 43, "<"); + buttonSlotPullP = new SmallerButton(6, guiLeft+ 155, guiTop + 64, "+"); + buttonSlotPullM = new SmallerButton(7, guiLeft + 90, guiTop + 64, "-"); + + this.buttonList.add(buttonSidePutP); + this.buttonList.add(buttonSlotPutP); + this.buttonList.add(buttonSidePullP); + this.buttonList.add(buttonSlotPullP); + this.buttonList.add(buttonSidePutM); + this.buttonList.add(buttonSlotPutM); + this.buttonList.add(buttonSidePullM); + this.buttonList.add(buttonSlotPullM); + } + + @Override + public void drawGuiContainerBackgroundLayer(float f, int x, int y){ + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + + this.mc.getTextureManager().bindTexture(Util.GUI_INVENTORY_LOCATION); + this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); + + this.mc.getTextureManager().bindTexture(resLoc); + this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); + + this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.put"), guiLeft + 22 + 3, guiTop + 32, 4210752); + this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.pull"), guiLeft + 107 + 3, guiTop + 32, 4210752); + + this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft + 24 + 3, guiTop + 45 + 1, 4210752); + this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPut == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPut).toString(), guiLeft + 24, guiTop + 66 + 1, 4210752); + + this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft + 109 + 3, guiTop + 45 + 1, 4210752); + this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPull == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPull).toString(), guiLeft + 109, guiTop + 66 + 1, 4210752); + } + + @Override + public void drawScreen(int x, int y, float f){ + super.drawScreen(x, y, f); + + this.buttonSlotPullP.enabled = this.tileInputter.placeToPullSlotAmount > 0; + this.buttonSlotPullM.enabled = this.tileInputter.placeToPullSlotAmount > 0; + + this.buttonSlotPutP.enabled = this.tileInputter.placeToPutSlotAmount > 0; + this.buttonSlotPutM.enabled = this.tileInputter.placeToPutSlotAmount > 0; + } + + @Override + public void actionPerformed(GuiButton button){ + PacketHandler.theNetwork.sendToServer(new PacketInputterButton(x, y, z, world, button.id)); + } + + public class SmallerButton extends GuiButton{ + + private final ResourceLocation resLoc = Util.getGuiLocation("guiInputter"); + + public SmallerButton(int id, int x, int y, String display){ + super(id, x, y, 16, 16, display); + } + + @Override + public void drawButton(Minecraft mc, int x, int y){ + if (this.visible){ + FontRenderer renderer = mc.fontRenderer; + mc.getTextureManager().bindTexture(resLoc); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.field_146123_n = x >= this.xPosition && y >= this.yPosition && x < this.xPosition + this.width && y < this.yPosition + this.height; + int k = this.getHoverState(this.field_146123_n); + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + this.drawTexturedModalRect(this.xPosition, this.yPosition, 176, k*16, 16, 16); + this.mouseDragged(mc, x, y); + + int color = 14737632; + if (packedFGColour != 0) color = packedFGColour; + else if (!this.enabled) color = 10526880; + else if (this.field_146123_n) color = 16777120; + + this.drawCenteredString(renderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height-3) / 2, color); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java index badfbb8f6..4f9b98407 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java @@ -3,8 +3,11 @@ package ellpeck.actuallyadditions.items; import ellpeck.actuallyadditions.items.tools.*; import ellpeck.actuallyadditions.material.InitItemMaterials; import ellpeck.actuallyadditions.util.Util; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; public class InitItems{ @@ -52,18 +55,18 @@ public class InitItems{ itemSpecialDrop = new ItemSpecialDrop(); Util.register(itemSpecialDrop); - itemPickaxeEmerald = new ItemPickaxeAA(InitItemMaterials.toolMaterialEmerald, "itemPickaxeEmerald", EnumRarity.rare); - itemAxeEmerald = new ItemAxeAA(InitItemMaterials.toolMaterialEmerald, "itemAxeEmerald", EnumRarity.rare); - itemShovelEmerald = new ItemShovelAA(InitItemMaterials.toolMaterialEmerald, "itemShovelEmerald", EnumRarity.rare); - itemSwordEmerald = new ItemSwordAA(InitItemMaterials.toolMaterialEmerald, "itemSwordEmerald", EnumRarity.rare); - itemHoeEmerald = new ItemHoeAA(InitItemMaterials.toolMaterialEmerald, "itemHoeEmerald", EnumRarity.rare); + itemPickaxeEmerald = new ItemPickaxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemPickaxeEmerald", EnumRarity.rare); + itemAxeEmerald = new ItemAxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemAxeEmerald", EnumRarity.rare); + itemShovelEmerald = new ItemShovelAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemShovelEmerald", EnumRarity.rare); + itemSwordEmerald = new ItemSwordAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemSwordEmerald", EnumRarity.rare); + itemHoeEmerald = new ItemHoeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemHoeEmerald", EnumRarity.rare); Util.registerItems(new Item[]{itemPickaxeEmerald, itemAxeEmerald, itemShovelEmerald, itemSwordEmerald, itemHoeEmerald}); - itemPickaxeObsidian = new ItemPickaxeAA(InitItemMaterials.toolMaterialObsidian, "itemPickaxeObsidian", EnumRarity.uncommon); - itemAxeObsidian = new ItemAxeAA(InitItemMaterials.toolMaterialObsidian, "itemAxeObsidian", EnumRarity.uncommon); - itemShovelObsidian = new ItemShovelAA(InitItemMaterials.toolMaterialObsidian, "itemShovelObsidian", EnumRarity.uncommon); - itemSwordObsidian = new ItemSwordAA(InitItemMaterials.toolMaterialObsidian, "itemSwordObsidian", EnumRarity.uncommon); - itemHoeObsidian = new ItemHoeAA(InitItemMaterials.toolMaterialObsidian, "itemHoeObsidian", EnumRarity.uncommon); + itemPickaxeObsidian = new ItemPickaxeAA(InitItemMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemPickaxeObsidian", EnumRarity.uncommon); + itemAxeObsidian = new ItemAxeAA(InitItemMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemAxeObsidian", EnumRarity.uncommon); + itemShovelObsidian = new ItemShovelAA(InitItemMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemShovelObsidian", EnumRarity.uncommon); + itemSwordObsidian = new ItemSwordAA(InitItemMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemSwordObsidian", EnumRarity.uncommon); + itemHoeObsidian = new ItemHoeAA(InitItemMaterials.toolMaterialObsidian, new ItemStack(Blocks.obsidian), "itemHoeObsidian", EnumRarity.uncommon); Util.registerItems(new Item[]{itemPickaxeObsidian, itemAxeObsidian, itemShovelObsidian, itemSwordObsidian, itemHoeObsidian}); } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java index cb8c61903..3671b01c6 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java @@ -30,6 +30,11 @@ public class ItemKnife extends Item implements IName{ return theStack; } + @Override + public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack){ + return false; + } + @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.epic; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java index 6b8a93b97..723d3bb78 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java @@ -18,11 +18,13 @@ public class ItemAxeAA extends ItemAxe implements IName{ private String name; private EnumRarity rarity; + private ItemStack repairItem; - public ItemAxeAA(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity){ + public ItemAxeAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; + this.repairItem = repairItem; this.setUnlocalizedName(Util.setUnlocalizedName(this)); } @@ -36,6 +38,11 @@ public class ItemAxeAA extends ItemAxe implements IName{ } } + @Override + public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ + return stack.getItem() == repairItem.getItem(); + } + @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java index 34a77e2c0..e49b6719c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java @@ -18,11 +18,13 @@ public class ItemHoeAA extends ItemHoe implements IName{ private String name; private EnumRarity rarity; + private ItemStack repairItem; - public ItemHoeAA(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity){ + public ItemHoeAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; + this.repairItem = repairItem; this.setUnlocalizedName(Util.setUnlocalizedName(this)); } @@ -36,6 +38,11 @@ public class ItemHoeAA extends ItemHoe implements IName{ } } + @Override + public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ + return stack.getItem() == repairItem.getItem(); + } + @Override public EnumRarity getRarity(ItemStack stack){ return this.rarity; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java index e7851b6ea..899db2e77 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java @@ -18,11 +18,13 @@ public class ItemPickaxeAA extends ItemPickaxe implements IName{ private String name; private EnumRarity rarity; + private ItemStack repairItem; - public ItemPickaxeAA(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity){ + public ItemPickaxeAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; + this.repairItem = repairItem; this.setUnlocalizedName(Util.setUnlocalizedName(this)); } @@ -36,6 +38,11 @@ public class ItemPickaxeAA extends ItemPickaxe implements IName{ } } + @Override + public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ + return stack.getItem() == repairItem.getItem(); + } + @Override public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java index 6eada4854..e5baf54dc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java @@ -18,11 +18,13 @@ public class ItemShovelAA extends ItemSpade implements IName{ private String name; private EnumRarity rarity; + private ItemStack repairItem; - public ItemShovelAA(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity){ + public ItemShovelAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; + this.repairItem = repairItem; this.setUnlocalizedName(Util.setUnlocalizedName(this)); } @@ -36,6 +38,11 @@ public class ItemShovelAA extends ItemSpade implements IName{ } } + @Override + public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ + return stack.getItem() == repairItem.getItem(); + } + @Override public EnumRarity getRarity(ItemStack stack){ return this.rarity; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java index 45e73a38c..5def8bdd2 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java @@ -18,11 +18,13 @@ public class ItemSwordAA extends ItemSword implements IName{ private String name; private EnumRarity rarity; + private ItemStack repairItem; - public ItemSwordAA(ToolMaterial toolMat, String unlocalizedName, EnumRarity rarity){ + public ItemSwordAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, EnumRarity rarity){ super(toolMat); this.name = unlocalizedName; this.rarity = rarity; + this.repairItem = repairItem; this.setUnlocalizedName(Util.setUnlocalizedName(this)); } @@ -36,6 +38,11 @@ public class ItemSwordAA extends ItemSword implements IName{ } } + @Override + public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack){ + return stack.getItem() == repairItem.getItem(); + } + @Override public EnumRarity getRarity(ItemStack stack){ return this.rarity; diff --git a/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java b/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java index 1ad92b988..1a0990e3f 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java @@ -13,6 +13,6 @@ public class PacketHandler{ theNetwork = NetworkRegistry.INSTANCE.newSimpleChannel(Util.MOD_ID + "Channel"); theNetwork.registerMessage(PacketTileEntityFeeder.Handler.class, PacketTileEntityFeeder.class, 0, Side.CLIENT); + theNetwork.registerMessage(PacketInputterButton.Handler.class, PacketInputterButton.class, 1, Side.SERVER); } - } diff --git a/src/main/java/ellpeck/actuallyadditions/network/PacketInputterButton.java b/src/main/java/ellpeck/actuallyadditions/network/PacketInputterButton.java new file mode 100644 index 000000000..231201764 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/network/PacketInputterButton.java @@ -0,0 +1,66 @@ +package ellpeck.actuallyadditions.network; + +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; +import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import ellpeck.actuallyadditions.tile.TileEntityInputter; +import io.netty.buffer.ByteBuf; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.DimensionManager; + +public class PacketInputterButton implements IMessage{ + + private int tileX; + private int tileY; + private int tileZ; + private int worldID; + private int buttonID; + + @SuppressWarnings("unused") + public PacketInputterButton(){ + + } + + public PacketInputterButton(int x, int y, int z, World world, int buttonID){ + this.tileX = x; + this.tileY = y; + this.tileZ = z; + this.worldID = world.provider.dimensionId; + this.buttonID = buttonID; + } + + @Override + public void fromBytes(ByteBuf buf){ + this.tileX = buf.readInt(); + this.tileY = buf.readInt(); + this.tileZ = buf.readInt(); + this.worldID = buf.readInt(); + this.buttonID = buf.readInt(); + } + + @Override + public void toBytes(ByteBuf buf){ + buf.writeInt(this.tileX); + buf.writeInt(this.tileY); + buf.writeInt(this.tileZ); + buf.writeInt(this.worldID); + buf.writeInt(this.buttonID); + } + + public static class Handler implements IMessageHandler{ + + @Override + public IMessage onMessage(PacketInputterButton message, MessageContext ctx){ + World world = DimensionManager.getWorld(message.worldID); + TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); + + if(tile instanceof TileEntityInputter){ + TileEntityInputter inputter = (TileEntityInputter)tile; + inputter.onButtonPressed(message.buttonID); + } + + return null; + } + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/network/PacketTileEntityFeeder.java b/src/main/java/ellpeck/actuallyadditions/network/PacketTileEntityFeeder.java index bc0940995..5f172baca 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/PacketTileEntityFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/network/PacketTileEntityFeeder.java @@ -4,6 +4,8 @@ import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.inventory.GuiFeeder; import ellpeck.actuallyadditions.tile.TileEntityFeeder; import io.netty.buffer.ByteBuf; @@ -50,6 +52,7 @@ public class PacketTileEntityFeeder implements IMessage{ public static class Handler implements IMessageHandler{ @Override + @SideOnly(Side.CLIENT) public IMessage onMessage(PacketTileEntityFeeder message, MessageContext ctx){ World world = FMLClientHandler.instance().getClient().theWorld; TileEntity tile = world.getTileEntity(message.tileX, message.tileY, message.tileZ); diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java index d32b7bf8b..8e1e356a0 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java @@ -33,7 +33,7 @@ public class TileEntityBase extends TileEntity{ GameRegistry.registerTileEntity(TileEntityGiantChest.class, Util.MOD_ID_LOWER + ":tileEntityGiantChest"); GameRegistry.registerTileEntity(TileEntityGrinder.class, Util.MOD_ID_LOWER + ":tileEntityGrinder"); GameRegistry.registerTileEntity(TileEntityFurnaceDouble.class, Util.MOD_ID_LOWER + ":tileEntityFurnaceDouble"); - GameRegistry.registerTileEntity(TileEntityPackager.class, Util.MOD_ID_LOWER + ":tileEntityPackager"); + GameRegistry.registerTileEntity(TileEntityInputter.class, Util.MOD_ID_LOWER + ":tileEntityInputter"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java index 03feb9cbe..121249555 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java @@ -22,6 +22,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{ @Override public void updateEntity(){ if(!worldObj.isRemote){ + boolean theFlag = this.conversionTime > 0; if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= this.amountNeededToConvert){ this.conversionTime++; if(this.conversionTime >= this.conversionTimeNeeded){ @@ -29,6 +30,9 @@ public class TileEntityCompost extends TileEntityInventoryBase{ this.conversionTime = 0; } } + if(theFlag != this.conversionTime > 0){ + this.markDirty(); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java index 1f7e14cc4..d584157d0 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java @@ -31,21 +31,25 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ @SuppressWarnings("unchecked") public void updateEntity(){ if(!worldObj.isRemote){ + boolean theFlag = this.currentTimer > 0; List animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord - reach, this.yCoord - reach, this.zCoord - reach, this.xCoord + reach, this.yCoord + reach, this.zCoord + reach)); if(animals != null){ this.currentAnimalAmount = animals.size(); if(this.currentAnimalAmount >= 2){ if(this.currentAnimalAmount < this.animalThreshold){ - if(this.currentTimer >= this.timerGoal && this.slots[0] != null){ + if(this.currentTimer >= this.timerGoal){ this.currentTimer = 0; - EntityAnimal randomAnimal = animals.get(new Random().nextInt(this.currentAnimalAmount)); - if(!randomAnimal.isInLove() && randomAnimal.getGrowingAge() == 0 && randomAnimal.isBreedingItem(this.slots[0])){ + if(this.slots[0] != null){ + EntityAnimal randomAnimal = animals.get(new Random().nextInt(this.currentAnimalAmount)); + if(!randomAnimal.isInLove() && randomAnimal.getGrowingAge() == 0 && randomAnimal.isBreedingItem(this.slots[0])){ - PacketHandler.theNetwork.sendToAllAround(new PacketTileEntityFeeder(this, randomAnimal.getEntityId()), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 80)); - this.feedAnimal(randomAnimal); + PacketHandler.theNetwork.sendToAllAround(new PacketTileEntityFeeder(this, randomAnimal.getEntityId()), new NetworkRegistry.TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 80)); + this.feedAnimal(randomAnimal); - this.slots[0].stackSize--; - if(this.slots[0].stackSize == 0) this.slots[0] = this.slots[0].getItem().getContainerItem(this.slots[0]); + this.slots[0].stackSize--; + if(this.slots[0].stackSize == 0) + this.slots[0] = this.slots[0].getItem().getContainerItem(this.slots[0]); + } } } else this.currentTimer++; @@ -54,6 +58,10 @@ public class TileEntityFeeder extends TileEntityInventoryBase{ } else this.currentTimer = 0; } + + if(theFlag != this.currentTimer > 0){ + this.markDirty(); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java index 3b019dfae..27e233207 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java @@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.tile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.ConfigValues; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; @@ -76,6 +77,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase{ if(theFlag != this.coalTimeLeft > 0){ int metaBefore = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, (this.coalTimeLeft > 0 ? metaBefore+4 : metaBefore-4), 2); + this.markDirty(); } } @@ -149,6 +151,6 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase{ @Override public boolean canExtractItem(int slot, ItemStack stack, int side){ - return slot == SLOT_OUTPUT_1 || slot == SLOT_OUTPUT_2; + return slot == SLOT_OUTPUT_1 || slot == SLOT_OUTPUT_2 || (slot == SLOT_COAL && stack.getItem() == Items.bucket); } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java index 730c81ec5..821035a55 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java @@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagList; public class TileEntityGiantChest extends TileEntityInventoryBase{ public TileEntityGiantChest(){ - super(169, "tileEntityGiantChest"); + super(9*13, "tileEntityGiantChest"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java index 953601e15..c7614f0b4 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java @@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.ConfigValues; import ellpeck.actuallyadditions.recipe.GrinderRecipes; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; @@ -90,6 +91,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase{ if(theFlag != this.coalTimeLeft > 0){ worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, (this.coalTimeLeft > 0 ? 1 : 0), 2); + this.markDirty(); } } } @@ -181,6 +183,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase{ @Override public boolean canExtractItem(int slot, ItemStack stack, int side){ - return slot == SLOT_OUTPUT_1_1 || slot == SLOT_OUTPUT_1_2 || slot == SLOT_OUTPUT_2_1 || slot == SLOT_OUTPUT_2_2; + return slot == SLOT_OUTPUT_1_1 || slot == SLOT_OUTPUT_1_2 || slot == SLOT_OUTPUT_2_1 || slot == SLOT_OUTPUT_2_2 || (slot == SLOT_COAL && stack.getItem() == Items.bucket); } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java new file mode 100644 index 000000000..848ec16db --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java @@ -0,0 +1,198 @@ +package ellpeck.actuallyadditions.tile; + +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityInputter extends TileEntityInventoryBase{ + + public int sideToPut = -1; + public int slotToPut = -1; + public int placeToPutSlotAmount; + public TileEntity placeToPut; + + public int sideToPull = -1; + public int slotToPull = -1; + public int placeToPullSlotAmount; + public TileEntity placeToPull; + + public TileEntityInputter(){ + super(1, "tileEntityInputter"); + } + + @Override + public void updateEntity(){ + if(!worldObj.isRemote){ + this.initVars(); + + if(!(this.sideToPull == this.sideToPut && this.slotToPull == this.slotToPut)){ + if(sideToPull != -1) this.pull(); + if(sideToPut != -1) this.put(); + } + } + } + + public void pull(){ + if(this.placeToPullSlotAmount > 0){ + IInventory theInventory = (IInventory)placeToPull; + int theSlotToPull = this.slotToPull; + + ItemStack theStack = null; + if(theSlotToPull != -1) theStack = theInventory.getStackInSlot(theSlotToPull); + else{ + for(int i = 0; i < this.placeToPullSlotAmount; i++){ + ItemStack tempStack = theInventory.getStackInSlot(i); + if(tempStack != null && (this.slots[0] == null || (tempStack.isItemEqual(this.slots[0]) && this.slots[0].stackSize < this.getInventoryStackLimit()))){ + theStack = tempStack; + theSlotToPull = i; + break; + } + } + } + if(theSlotToPull != -1 && theStack != null){ + if(this.slots[0] != null){ + if(theStack.isItemEqual(this.slots[0])){ + if(theStack.stackSize <= this.getInventoryStackLimit() - this.slots[0].stackSize){ + this.slots[0].stackSize += theStack.stackSize; + theInventory.setInventorySlotContents(theSlotToPull, null); + } + else if(theStack.stackSize > this.getInventoryStackLimit() - this.slots[0].stackSize){ + theStack.stackSize -= (this.getInventoryStackLimit() - this.slots[0].stackSize); + this.slots[0].stackSize = this.getInventoryStackLimit(); + } + } + } + else{ + this.setInventorySlotContents(0, theStack.copy()); + theInventory.setInventorySlotContents(theSlotToPull, null); + } + } + } + } + + public void put(){ + if(this.placeToPutSlotAmount > 0){ + IInventory theInventory = (IInventory)placeToPut; + int theSlotToPut = this.slotToPut; + + if(this.slots[0] != null){ + ItemStack theStack = null; + if(theSlotToPut != -1) theStack = theInventory.getStackInSlot(theSlotToPut); + else{ + for(int i = 0; i < this.placeToPutSlotAmount; i++){ + ItemStack tempStack = theInventory.getStackInSlot(i); + if(tempStack == null || (theInventory.isItemValidForSlot(i, this.slots[0]) && tempStack.isItemEqual(this.slots[0]) && tempStack.stackSize < theInventory.getInventoryStackLimit())){ + theStack = tempStack; + theSlotToPut = i; + break; + } + } + } + if(theSlotToPut != -1 && theInventory.isItemValidForSlot(theSlotToPut, this.slots[0])){ + if(theStack != null){ + if(theStack.isItemEqual(this.slots[0])){ + if(this.slots[0].stackSize <= theInventory.getInventoryStackLimit() - theStack.stackSize){ + theStack.stackSize += this.slots[0].stackSize; + this.slots[0] = null; + } + else if(this.slots[0].stackSize > theInventory.getInventoryStackLimit() - theStack.stackSize){ + this.slots[0].stackSize -= (theInventory.getInventoryStackLimit() - theStack.stackSize); + theStack.stackSize = theInventory.getInventoryStackLimit(); + } + } + } + else{ + theInventory.setInventorySlotContents(theSlotToPut, this.slots[0].copy()); + this.slots[0] = null; + } + } + } + } + } + + public void initVars(){ + this.placeToPull = this.getTileEntityFromSide(this.sideToPull); + this.placeToPut = this.getTileEntityFromSide(this.sideToPut); + + if(this.placeToPull != null && this.placeToPull instanceof IInventory){ + this.placeToPullSlotAmount = ((IInventory)this.placeToPull).getSizeInventory(); + } + else{ + this.placeToPullSlotAmount = 0; + this.slotToPull = -1; + } + + if(this.placeToPut != null && this.placeToPut instanceof IInventory){ + this.placeToPutSlotAmount = ((IInventory)this.placeToPut).getSizeInventory(); + } + else{ + this.placeToPutSlotAmount = 0; + this.slotToPut = -1; + } + } + + public TileEntity getTileEntityFromSide(int side){ + if(side == 0) return worldObj.getTileEntity(xCoord, yCoord+1, zCoord); + if(side == 1) return worldObj.getTileEntity(xCoord, yCoord-1, zCoord); + if(side == 2) return worldObj.getTileEntity(xCoord, yCoord, zCoord-1); + if(side == 3) return worldObj.getTileEntity(xCoord-1, yCoord, zCoord); + if(side == 4) return worldObj.getTileEntity(xCoord, yCoord, zCoord+1); + if(side == 5) return worldObj.getTileEntity(xCoord+1, yCoord, zCoord); + else return null; + } + + public void onButtonPressed(int buttonID){ + if(buttonID == 0) this.sideToPut++; + if(buttonID == 1) this.sideToPut--; + if(buttonID == 2) this.slotToPut++; + if(buttonID == 3) this.slotToPut--; + + if(buttonID == 4) this.sideToPull++; + if(buttonID == 5) this.sideToPull--; + if(buttonID == 6) this.slotToPull++; + if(buttonID == 7) this.slotToPull--; + + if(this.sideToPut >= 6) this.sideToPut = -1; + else if(this.sideToPut < -1) this.sideToPut = 5; + else if(this.sideToPull >= 6) this.sideToPull = -1; + else if(this.sideToPull < -1) this.sideToPull = 5; + else if(this.slotToPut >= this.placeToPutSlotAmount) this.slotToPut = -1; + else if(this.slotToPut < -1) this.slotToPut = this.placeToPutSlotAmount-1; + else if(this.slotToPull >= this.placeToPullSlotAmount) this.slotToPull = -1; + else if(this.slotToPull < -1) this.slotToPull = this.placeToPullSlotAmount-1; + } + + @Override + public void writeToNBT(NBTTagCompound compound){ + super.writeToNBT(compound); + compound.setInteger("SideToPut", this.sideToPut); + compound.setInteger("SlotToPut", this.slotToPut); + compound.setInteger("SideToPull", this.sideToPull); + compound.setInteger("SlotToPull", this.slotToPull); + } + + @Override + public void readFromNBT(NBTTagCompound compound){ + super.readFromNBT(compound); + this.sideToPut = compound.getInteger("SideToPut"); + this.slotToPut = compound.getInteger("SlotToPut"); + this.sideToPull = compound.getInteger("SideToPull"); + this.slotToPull = compound.getInteger("SlotToPull"); + } + + @Override + public boolean isItemValidForSlot(int i, ItemStack stack){ + return true; + } + + @Override + public boolean canInsertItem(int slot, ItemStack stack, int side){ + return this.isItemValidForSlot(slot, stack); + } + + @Override + public boolean canExtractItem(int slot, ItemStack stack, int side){ + return true; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPackager.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPackager.java deleted file mode 100644 index 6aebf4821..000000000 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPackager.java +++ /dev/null @@ -1,115 +0,0 @@ -package ellpeck.actuallyadditions.tile; - -import net.minecraft.inventory.Container; -import net.minecraft.inventory.InventoryCrafting; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.nbt.NBTTagCompound; - -public class TileEntityPackager extends TileEntityInventoryBase{ - - public static final int SLOT_INPUT = 0; - public static final int SLOT_OUTPUT = 1; - - public int currentWaitTime; - public final int waitTime = 30; - - public boolean isTwoByTwo = false; - - public TileEntityPackager(){ - super(2, "tileEntityPackager"); - } - - @Override - @SuppressWarnings("unchecked") - public void updateEntity(){ - if(!worldObj.isRemote){ - if(this.canBeConverted(this.slots[SLOT_INPUT])){ - - ItemStack output = findMatchingRecipe(this.slots[SLOT_INPUT]); - if(this.slots[SLOT_OUTPUT] == null || (this.slots[SLOT_OUTPUT].isItemEqual(output) && this.slots[SLOT_OUTPUT].stackSize <= this.slots[SLOT_OUTPUT].getMaxStackSize()-output.stackSize)){ - - if(this.currentWaitTime >= this.waitTime){ - this.currentWaitTime = 0; - - if (this.slots[SLOT_OUTPUT] == null) this.slots[SLOT_OUTPUT] = output.copy(); - else if(this.slots[SLOT_OUTPUT].getItem() == output.getItem()) this.slots[SLOT_OUTPUT].stackSize += output.stackSize; - - this.slots[SLOT_INPUT].stackSize--; - if (this.slots[SLOT_INPUT].stackSize <= 0) this.slots[SLOT_INPUT] = null; - } - else this.currentWaitTime++; - } - } - } - } - - public boolean canBeConverted(ItemStack stack){ - return findMatchingRecipe(stack) != null; - } - - public ItemStack findMatchingRecipe(ItemStack stack){ - int k = this.isTwoByTwo ? 2 : 3; - - TheInventoryCrafting craftMatrix = new TheInventoryCrafting(null, k, k); - for(int i = 0; i < craftMatrix.getSizeInventory(); i++){ - craftMatrix.setInventorySlotContents(i, stack.copy()); - } - return CraftingManager.getInstance().findMatchingRecipe(craftMatrix, this.worldObj); - } - - @Override - public void writeToNBT(NBTTagCompound compound){ - super.writeToNBT(compound); - compound.setInteger("CurrentWaitTime", this.currentWaitTime); - compound.setBoolean("EnabledSlots", this.isTwoByTwo); - - } - - @Override - public void readFromNBT(NBTTagCompound compound){ - super.readFromNBT(compound); - this.currentWaitTime = compound.getInteger("CurrentWaitTime"); - this.isTwoByTwo = compound.getBoolean("EnabledSlots"); - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack stack){ - return i == SLOT_INPUT; - } - - @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ - return this.isItemValidForSlot(slot, stack); - } - - @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ - return slot == SLOT_OUTPUT; - } - - public static class TheInventoryCrafting extends InventoryCrafting{ - - private ItemStack[] stackList; - - public TheInventoryCrafting(Container container, int x, int y){ - super(container, x, y); - this.stackList = new ItemStack[x*y]; - } - - @Override - public void setInventorySlotContents(int index, ItemStack stack){ - this.stackList[index] = stack; - } - - @Override - public ItemStack getStackInSlot(int position){ - return this.stackList[position]; - } - - @Override - public int getSizeInventory(){ - return this.stackList.length; - } - } -} diff --git a/src/main/java/ellpeck/actuallyadditions/util/Util.java b/src/main/java/ellpeck/actuallyadditions/util/Util.java index c6df06b6e..4f7dde362 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/Util.java +++ b/src/main/java/ellpeck/actuallyadditions/util/Util.java @@ -18,7 +18,7 @@ import org.lwjgl.input.Keyboard; @SuppressWarnings("unused") public class Util{ - public static final String VERSION = "1.7.10-0.0.1.3"; + public static final String VERSION = "1.7.10-0.0.1.4"; public static final String MOD_ID = "ActuallyAdditions"; public static final String NAME = "Actually Additions"; @@ -48,6 +48,8 @@ public class Util{ public static final String BOLD = (char)167 + "l"; public static final String UNDERLINE = (char)167 + "n"; public static final String ITALIC = (char)167 + "o"; + public static final String OBFUSCATED = (char) 167 + "k"; + public static final String RESET = (char) 167 + "r"; public static final String[] ROMAN_NUMERALS = new String[]{"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"}; diff --git a/src/main/resources/assets/actuallyadditions/lang/de_DE.lang b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang index d2dd44e53..2c27b0217 100644 --- a/src/main/resources/assets/actuallyadditions/lang/de_DE.lang +++ b/src/main/resources/assets/actuallyadditions/lang/de_DE.lang @@ -9,7 +9,7 @@ tile.actuallyadditions.blockMiscBlackQuartzPillar.name=Schwarzquartzsäule tile.actuallyadditions.blockFeeder.name=Fütterungsanlage tile.actuallyadditions.blockGiantChest.name=Riesenkiste tile.actuallyadditions.blockGrinder.name=Zerkleinerer -tile.actuallyadditions.blockGrinderDouble.name=Zerkleinerte Mk2 +tile.actuallyadditions.blockGrinderDouble.name=Zerkleinerer Mk2 tile.actuallyadditions.blockFurnaceDouble.name=Ofen Mk2 item.actuallyadditions.itemMiscMashedFood.name=Brei @@ -168,6 +168,6 @@ achievement.actuallyadditions.craftKnife=Noch schärfer? Definitiv Phillips! achievement.actuallyadditions.craftKnife.desc=Baue ein Messer. info.actuallyadditions.feeder.animals.desc=Tiere -info.actuallyadditions.feeder.enoughToBreed.desc=Nicht genug zur Züchtung! +info.actuallyadditions.feeder.enoughToBreed.desc=Genug zur Züchtung! info.actuallyadditions.feeder.tooMany.desc=Zu viele zur Züchtung! info.actuallyadditions.feeder.notEnough.desc=Nicht genug zur Züchtung! diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 47b40ba5e..8230b2dfb 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -12,6 +12,20 @@ tile.actuallyadditions.blockGrinder.name=Crusher tile.actuallyadditions.blockGrinderDouble.name=Double Crusher tile.actuallyadditions.blockFurnaceDouble.name=Double Furnace +tile.actuallyadditions.blockInputter.0.name=ESD (Ellpeck's Slot Device) +tile.actuallyadditions.blockInputter.1.name=ESD (Energetic Solo Dancer) +tile.actuallyadditions.blockInputter.2.name=ESD (Ethereal System Dude) +tile.actuallyadditions.blockInputter.3.name=ESD (Energy Stuff Distributor) +tile.actuallyadditions.blockInputter.4.name=ESD (Existing Stuff Donator) +tile.actuallyadditions.blockInputter.5.name=ESD (ExtraUtils Stealing Device) +tile.actuallyadditions.blockInputter.6.name=ESD (Experienced Sauce Deriver) +tile.actuallyadditions.blockInputter.7.name=ESD (Excellent Spaghetti Dessert) +tile.actuallyadditions.blockInputter.8.name=ESD (Extraordinary Sample Deliverer) +tile.actuallyadditions.blockInputter.9.name=ESD (Express Sending Doughnut) +tile.actuallyadditions.blockInputter.10.name=ESD (Expelling Sugar Dagger) +tile.actuallyadditions.blockInputter.11.name=ESD (Extra-Long Solidifying Dissociation) +tile.actuallyadditions.blockInputter.12.name=ESD (Extravagant Supreme Dirt) + item.actuallyadditions.itemMiscMashedFood.name=Mashed Food item.actuallyadditions.itemFertilizer.name=Fertilizer item.actuallyadditions.itemMiscDough.name=Dough @@ -86,7 +100,11 @@ tooltip.actuallyadditions.blockGrinder.desc.4=build the Double Crusher! tooltip.actuallyadditions.blockGrinderDouble.desc.1=Crushes Ores into Dusts! tooltip.actuallyadditions.blockGrinderDouble.desc.2=You get two Dusts per Ore and Extras! tooltip.actuallyadditions.blockGrinderDouble.desc.3=Can crush two Ores simultaneously! -tooltip.actuallyadditions.blockFurnaceDouble.desc=Smelts two Things simultaneously! +tooltip.actuallyadditions.blockInputter.desc.1=Its real name is %sObfuscated%s! +tooltip.actuallyadditions.blockInputter.desc.2=Acts like a more advanced Hopper +tooltip.actuallyadditions.blockInputter.desc.3=Configurable: +tooltip.actuallyadditions.blockInputter.desc.4=-Side to Output to and Input from +tooltip.actuallyadditions.blockInputter.desc.5=-Slot in the other Inventory to Output to and Input from tooltip.actuallyadditions.itemMiscMashedFood.desc=Used to make Fertilizer tooltip.actuallyadditions.itemFertilizer.desc=Om nom nom. Don't eat it. Made in a Compost. @@ -167,7 +185,18 @@ achievement.actuallyadditions.craftKnifeBlade.desc=Craft a Knife Blade achievement.actuallyadditions.craftKnife=Sharper! Even sharper! achievement.actuallyadditions.craftKnife.desc=Craft a Knife -info.actuallyadditions.feeder.animals.desc=Animals -info.actuallyadditions.feeder.enoughToBreed.desc=Enough to breed! -info.actuallyadditions.feeder.tooMany.desc=Too many to breed! -info.actuallyadditions.feeder.notEnough.desc=Not enough to breed! \ No newline at end of file +info.actuallyadditions.gui.animals=Animals +info.actuallyadditions.gui.enoughToBreed=Enough to breed! +info.actuallyadditions.gui.tooMany=Too many to breed! +info.actuallyadditions.gui.notEnough=Not enough to breed! +info.actuallyadditions.gui.disabled=Disabled +info.actuallyadditions.gui.up=Up +info.actuallyadditions.gui.down=Down +info.actuallyadditions.gui.north=North +info.actuallyadditions.gui.east=East +info.actuallyadditions.gui.south=South +info.actuallyadditions.gui.west=West +info.actuallyadditions.gui.all=All +info.actuallyadditions.gui.slot=Slot +info.actuallyadditions.gui.put=Put +info.actuallyadditions.gui.pull=Pull \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockInputter.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockInputter.png new file mode 100644 index 0000000000000000000000000000000000000000..d96783c2aeff3af1c01540782fca085e7bbb3c6e GIT binary patch literal 538 zcmV+#0_FXQP)o!0000TX;fHrLvL+uWo~o;00000Lvm$d zbY)~9cWHEJAV*0}P-HG;2LJ#8kV!;AR4C6)QrT`3K@hB-?ZtK$EF39^LX-`%@)>*q zulzqTNyHI57|1&7o#}2K3Ra${>gi*uYFa*h{P6kP&fV*}25_;^)sGhd0II5bcU(U_ zWdI^#W>+WE>hYDcK~b#z#4#X0zGYd37??`^}*GPYE@wR;#Y-05nb0wk=Bm48w50Ny;MLQeW3~ z>-BncmS7kLf{%|Chf`=* zN-3puu~5BR?@5CKCX>nG4~&WnP*xWY}(vDOFW>clWPb zi|FWvh*VWYChq>zofOH6%5F*#hH9f?TJnWZ1dt{?4unjB3sTkH}&M2EMHz%$Qs_;{;GpqQo_#Bsf2snv5B z?)~%l_jh)5Ncq`Bri$;*8yjx1#+>{e#wix?SJ0#Mdp~c4!&i3&aXJ6k#S+{rVh)&I zpF3|?nBiA$iFvK8HTlg&&sdjSdY^b{xoo2~_fefU3|#EbYVP<7Fvhwodb>AVGWOw= z(0i83RK@*N=N_|$-3zr8ApbjSK=uESbDw-Ce3H*=<`MtgB)egHDx<`SvvO_SHx(Y7 z_kXuPeb>H7TZ;`&4rUj&R!QikbvN9&#eXM$Yi&V7Z-aru;`WD0S)vU0ts5UE=`_@| zu|_nomgN8IVBPSGkvl;lk?{*}1OqcC_k#QbOcE6bm~;*>MI12Rp)tLV|M1Zqfr7Vn zlb`aj3EgIA4|~VJ)vjEAV0C0Qi-v9S3&9H0)$bWaxue_e!|Hlj)LJ#v?HM!WKizx&O_4F6?Z6#WH913fp~uvvXQE zFKY0v-gocZ%iI21FYY*&GJWFg(6^s=m}#!{3O|S2$M(Lzbj&*Do|=Ma0smd?ghLE> z`*rRxUwU``_JYpC4$t|_-ZD(%FIm^5>F}KY8S9-}8v8P5TQFW+P|QA?#pa6Rb*~vy z7QR;ZHb3}NE^|=!seK}Lfxc_Vz zE~a1B^C&O7_Gv{6GJL zGnw)6{$DR2HhEq<&%+qJ;l=$YQ}#XgjJS00!$bdy#>OwE{)d|Q+WX~=|JzSDpUC=Q z=lt{BdHm}w!a@@nm*|K&oJty{FoHlMKK?)Bzx0jiB718ZKy{F(tDnm{r-UW|8U+VJ literal 2592 zcmeHI{WsKE9RA+#7-2>u86zp9jf&Auh>5&~5M#w)W=$EEuq@Ly%tn}LGufQH?Mi86 z)+uIL8BJ(aOe)h>GpSjnmsujqsOU|Ox4!#rf8D=e&-OXzp68zDe4giX&U5cQ_lNMX zKw~3IBM5?wgM<7dAPAsa02yFVNc)w^KtV6rm+lKet);kycq{~Apzu&e0Loi=OT3T9mb~c~S9|#RV+93q777B$Tk*KJssJOVe zqN1X@x>_ogHa0f)_VywOf*O9RPYL{25@`9RSM~9s@FKz@(cAlfE+}$li7k3=hTI_5 zJ_uUc{&4~Ijo;3oqy;a4$&1X~!{f()n*?#=Q!{uQGm>~@myOhoo0AHik{}2x3ikJ9 ze7F0hxHw{Xhgra=y?UH>(1`X5L3Exq6slltYV|AWNlC>C-0fF!uBb&Ui2FM#H-$iwt(>anop$V1XX}ZWnHoKasaQg5eGE*O)>|7?8x<#(d z2EV+sqja{%O5$x!mN*D{gqve#O#FSc<-rdeeRM>MAv&K5(r~jpFU)!`DTzT9t901# z`8kK$$;0GPx98pU4w9cTfQ7U=%|iW`0YF~f+j@tWr^)5|5kRG|vrY6gy=0k5)q8Ul zOG(HW|BQ_9V_xODcGyeuiBB$=qM~D1f89;^UK3{*xMUPfl}Zu^BjkvQUJM{?B~*oEyuMT1Ly~`gsEn zef54Up8f@h)mP`>@boxfjA^~XbyebmW~i#6LGgBv{_`&@bKjZEHkCcXC+~9yNJ?7- z-Qxs=XV69REtP`V`N3|N$I|+mFrOqz#wM{USdZdGvMv}LeCU27=aC`y5U@mrFetu0 zHa4czXd>IP%BE72;N2(MLml05>q#bK(~kB{b6=)}IxMFK>o?v>%r=IHuXQ<^7k6~N zC9BZhV?Q2`EI8}ylb3)xk9#WapLYT+8s^rcA>_PqiiGWxmEbWkcq-bCQ=xY{gkx!q z`kGN|XSN_7nwxr|F|9N$(nR%524~=WRjwGRNezH^H|)$6FS6K1Ef2WZ+i@Rw_q&~& zgA|F=?y+6<@>)h8%jajoSXC9N{qex5=(Ung% zN*_zH6K3XwA4_}C7%b|QFzgGQNxPSgd z^Q8=+1MipDJlKI$nsb1;0*EmpE2MUgY(GVC3A&`HY?-?kglmz(&15^G;1`NU9 z*;RpY&RO6QSH=d6ZyUR4;rWwP`T;@SSZF|P> a`yYSl!L@6rT-yEx6w{urelF{r5}E)E);Xd8 literal 1898 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fo{p?&#~tz_78O`%fY(0|PTd zfKP}kP+U}0)ZE-WG&HokyZhL&WB>pE2MUgY(GVC3A&`HY?-?kglmz(&15^G;1`NU9 z*;RpY&RO6QS=YE+7usz&QGCf4#_$z8uN2NZ z?q_*i=K061!Er2od!PNU>S6lNDEIqGnKa8hhW`D@?<}kBmds?l(_T}X1uDT9X4-(t zGX{oI@pacgw1b*IgAL=m`>z+t|Gbj+jkQPf&dDclc5eB|0+gI^QW&I$A)x$W7B7gA z@`;6^fh}NrW8~VIwT#JJr^aU?`QIadp;Baf4+A>XSD=zjO>_Immq=;BdEfwJC@Jc9WFDUADBXqt2yi z=rU~xWXRzwsAje3PyemA-&3RhXKWn9IpzIlK1DJd{^Q^9jpyF8a>hR=_s@G;{bt_u zr0onRcIGlXxnssqlqbz#xt+IR&h50~hR=W4zs`R1K_%S~oSHmc{an^LB{Ts5_yHrE diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiInputter.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiInputter.png new file mode 100644 index 0000000000000000000000000000000000000000..11b8583ade7f55dbc7f6b8047acba4459702c065 GIT binary patch literal 2642 zcmd6pc~lek7RP6%MraW2Q@|x?z)FPzZakJ6NI=;vn^X}9Vn7Hn4Y zDhOIsY^_u(vIHt{5CW1KH-w5sFnNiJf=B{|NC<&U-Xw%#`_FrSHs|C_GLzr^-h02F zdr$KB2KpFd*I@wwFy7u)ep- zlYjDsp?UF-&%DT;hklOlPW{(`6Q9*zuHGfttbW6UV`PUSXKUV!-L14Y*l2tAJHl8~ zOv-6!hV#3R@mT|EtO~NWO*pMF8bfH3hA#1FermTmq z-ph=3OO&*+!l1hRA91YEF`fqLIA!>=og1Y>b* zRoGl4X78D)0|T{QB_(t)fgyEi5kzo&MeyPDm#2JkR`$0+O{3K)Ua~tLw zp|foo*nw5-E|MV2EXHg(Kj|O&8(BD|2ww{G3&jr=vf-n0!F6q3*An_S`rWUFj+BE+ zvuE`-qu0671$Oqm&=H!78OOj8#d1MR(rnM}6~^!{zi}XC16TYp?#7)*JM1|MkRnv} z`XS6dSg2Ihs1JhssjVSS38$`5$$)I1M)?)*s7mI*%Ch_P#q(S|(QethskT)qz}!#1{@xw(KK|jrS-e{i@SY}8*K{;XPhyPh^3!1b0^3JOC?0P zAe^|NAVLC35A;P)JI%t$6_{hEi#w72A=xR%g^IA3Y8Ep`O_~l9XV1#I2;(=45W7iH zO1BLsSReT=*1{>ZWVoD-{O*)IGx@5kH;B~w2}{)gtyyrR3b@Ep40Qccuo^aXfBEQ& zpJ0Qnrd9u(nzn)U_SaRzs;SWto_&jhJ*Vk09I&3IbZO!Je#@w{0-g0T95_@4NfPLnx zE0yU3N;ijt4b!uA&B7eG@x6(#tZ_UX*>ubU^w+0@>YO%hS7d2Mtk{H6fow)ToLg?o z`B3Ndzh_%1GFbCmf%}Vo=i$A_6PcrtFSkQFBV? zT0}Zfp9|B1fsnd`mS$`FDV_P!lTd$0jas}li4nbt)3};qvu}J@CntenS)`V=b`58(f%09PK^&{+sE3eyFX^lQOA;j zq)L3*&WDppOt!4F(WwS`(KnQf;%Cx1CCPRzc5i|51l_FB71*f#TG~tgL&qt9;Ibo_ zG%|o^CC}NrCn%h=<=xMjs`@+UYSe*x7SJhg0AB2Fb?FtvvFj65BXO|pmrT+_WNRDJ zF?3&o6fM$C2mMJ)=8$;joLzbRI2h`0Tbb90rKrau^s4BLA)z2YoR}CRZ`_ebVw7?k zfq9!Y`uQCIgk`gner%HHZ7?(;b1&W{I+Qul`g~XnnJ;v;| zC`5cC&3KTQ9D+=aj(=XhyZbD?s{wdA4)WKMoHW0Mib-}~&=1RfERU;iQB3D|rkk@Y zs_?xi`wVFT;iZnehg{PV#gM3HW$-(ADEJD!r_$mme7rtmVF zDr4jf#$<_XN8T(#Sx7voRso;u^EZ07$;OXxBO@y|K!;Y!V3Z8+aD8A4=fyr8!zR2) z3z0(P5;iOFk2i6rXknB#&mUgEQGX^FVChzmUi~tl(lOIrc;aXFg9dN#ZHN|zi#UUL z%~^UO^!l21>$^EG??bltuEX?%YKJ2$(Y#6>Q{kxJglNAyo-XG&UYRz}yuGMj6nmXJ z%q^}8Q5+mvh>O~-PY>PgUV5?raZ_tw)t~KK6gI;18n_kwG->N_k3$^!k8%PCVS_-J z9}%XIN7m{(m1&r=veU?f8@*Vn<4t$VciZ;&d;HhN>M|_f6o1C8^oq8 zUu=E!J)m0G$b-K5+!K83n8?OhjOIbF<3$M8z3(5Go+nLeQ%==~=+Bd8ZGmtf)P_Mt zD8N05@^M>M1H`UJ$tV<3z&kttzd-2UslWM4$z#5G%mymGui6N&<>0j0?(qurtlky% G<$nQdoyvLu literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/items/ItemSpecialPearlShard.png b/src/main/resources/assets/actuallyadditions/textures/items/ItemSpecialPearlShard.png new file mode 100644 index 0000000000000000000000000000000000000000..b726e96d86b22d7a068424e7b40ab5f53873d3cb GIT binary patch literal 605 zcmV-j0;2tiP)WFU8GbZ8()Nlj2>E@cM*00F^CL_t(I%WacgYg0iG zhM$?;lcYAWu?h-;7rpXYYM|8odRv5A{2hX{`KXYbWM{^UX zytE<$b7!;JkaK4Kv}8PbO->0_ZR_M15D|z-2M`ei@OC z^<@k$K0yTKVMba0Z6WIWQ(B@30myzozP^m=^9A|CJMzc($mkR~=`*_e62*-CtaqY? zxH$l2z9fo)2)r7g+f!^+@8)wnkcgnhsZbOcPbaY<(D@QC1_F6_3Mv4uNxKf7Hfv6* zKIX=FI*EEy6RVn7*TlAv&(E-R4Zk1!@#ZcObO9&1N4Vp@v+k=JN`a*Kwjh6I4)FN> zE@e%adl#T0hze)ZNvs#kop?7G`l>#=`I$rn5n*damC^wa5o}ALS5=1_>Gv26hYql~ zy-$c7uGx)V&PZc7j>4lNy!rOk0Oq&%saTKeDt-U2{fw)Atg4^$urWFU8GbZ8()Nlj2>E@cM*00F&8L_t(I%Z-z}ZWBQi zhQGP&?8;_kTp%H$AOVFVfw%}!b9n$HN=iEXMo>`DQ$_A+Ku}+Yj# zJ~b8}1i90cUQNNW!gl9p5L5tFio5}q%6D{PG&qavBhq9#~> zC3*H~&G)*JN!cRNlH4WO%CNnEhOKeV_0t6(e$H2<4?7y}J-!?O-t20+$#0B`*!_CG z2HrWFVU#0Qisu^_nmw?U=GN*603ReiNP69UMtO(#Kj36?z@$vr9(TBXbyyFhCP+;| zW?S4?*_=!9W;Q>&>zZ~I}k_5 nR1++Fh5r)h8RIh7*wFm}6&a`B<;!uP00000NkvXXu0mjf{rLD3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemFoodHamburger.png b/src/main/resources/assets/actuallyadditions/textures/items/itemFoodHamburger.png index cb5cbe6e1811e5a6008dd3196589ca7dcd5f51cd..092e0702bdd2e55dad7a380bbd52b64375b88feb 100644 GIT binary patch delta 377 zcmV-<0fzpd0;U6yB#|@~e+P6)O+^Ra0|x*EJ0PrT6951KMM*?KR5;7+lfO#CP!z_0 zxk(zLrYdR+RysKdRdLr;0w68`U3tNbkNN~#6hK~i;D=-rZ(RE zbqItewBYFAUCup+dp^GJJLkgxQL=?vwGwHn0KgAIG*u+=)0P~be?BRF0czDs1YmbO z0CKvD>jg=4q>pK6DG-rmV0Szm>8F~SZ3%#BXykM?^;ip#`^iX;E}xaZ^%s5s X^74jm-K}|sb0I`n?{9y%=AsBxcbVXQnQ*UN;cVTj60B~VxZgehg zWpp4kE-)@LjOLe60001n;8Xr=l}OnyMNQn>||!mT5Avdc1ZQ% z?o5sTWoB;L0UC`+N?P*f)~S33=&PZLu)ezBt@$x}Nr^#-G0=W`0pQ`W zRJU)eE&A;AC@H;S=7b=mq{J9dHDU}LpWLu}cu_z?L6Z08ZZ~1(s2XNYjDai%AjUu* zE&w9JKefH zZM$rZF_b#zEaOK8IdVhQ{p!#c2HC`qL#a_W^V(N_7btzTs}d1a^E~jGjjFMCbSeB- Z@dgx6v4wX981euB002ovPDHLkV1hcs!jS*~ delta 347 zcmV-h0i^!P1NH)tB!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00009a7bBm000ib z000ib0l1NC?EnA(2XskIMF-yl2NN#>7r6pk0000ObVXQnQ*UN;cVTj60B~VxZgehg zWpp4kE-)@NWrZ?j0002gNkl`~ttgFMqHUYr)o1un_DN4MfBb z62wLV!A21LuG6<<$mS%b&A_mCmz~+!gnl8$7{;SP$hWfy&)K|DtG553@m-$c^Pb07 zakO)J-5WQn>32r$R?rb!^mloZySg59&l&`gL< z5*bO%^s2pvk5t17+8L3Ao~;Q0)6>bYGX-D;5~N}YRXY>V7|n#vzQDeTKC&WHTi6u_>m)S3Hye(=d^ds z_C9mX)n8d|LCMwL>jlcO5-is1S2IpkGcJ*1VLJKy-*+dUNz5)$*VD_km#du=nqHh` zd(H29{Ijz)%Y3vLi*_0Y-ff)Ju!|?E!aug{&2JS(VdFg?_p_8rZn^cYpsDqHNa8G? z#9gm<&O8qkxUqk)!UHA2#`D2X{{G0F%em;t_18iI$;}fFG8cqhUVrG}@`p?&Z!f)l z|8fn(hPtXN#eo45b6Dg%e|R!Dh%U2QeQ>t-tj!Jkig>OBH1IM?9MGTjD{_^N>B|OC O2za{sxvX3kU zn0AHF{`dd;V}52~cJ9NcuU*!7^>J52V`HP^mKz`T`$s4=FPy@5xL3YkGVI@v&+~y2 zoRPf3dbeG>dH?@D+G}(c%wE={_wKc*^&}K zaL#_WqlH+)vTiZyf6u>%CnY>eO#Siwsrljcx8)`G#aEyHul03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00EInL_t(I%bk<4ZWBQe zhQC>#@6O~LIT6Sa(naJ%MMFmlo+dPTid13R=jvX31 z+S?cjvC?Rp`9F>3|3_4H7f`^he!s#eL7B)C{||sD5Z^#1Me%d3I-X9`4FCf;QPpi9 zGAW7*AQoXij`CND@*J-c=P}nuY{;D0@85AJ?09)d7s% zn2WmQ?Q+SvwY*p?IByyvdK}zoIn8q$LOOs_N^-f!)4^Rtdpz5D!2Na~aS<4|UWt0Y z8h^#L)M!#NmJvt8M~tIBb6Ma_L(~ra)*FX9fL~1?tw;1t%OI_I@4oT!>N970fpIA# zwr=^_0qn6$+gqaX6(8EKyedm#V|e}JJ9Br*fb@1SRCUX@@ifot!z?2e;ghwzxxVHw z%Q&-^li4itG9Z8vRn0uW8e*Sh831!@L$MzuBdR*wl*W~10G!Nb{UC{*3AQ)ff(y63 v&VHE0D9pCkq@IYs+=4`&6V4O<^Ev+ku2jhn6a^A<00000NkvXXu0mjfB@5%O literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png b/src/main/resources/assets/actuallyadditions/textures/items/itemSpecialUnknownSubstance.png new file mode 100644 index 0000000000000000000000000000000000000000..b58d8cfebba92153abeb3c9f871b5b626850b6d6 GIT binary patch literal 631 zcmV--0*L*IP)WFU8GbZ8()Nlj2>E@cM*00G-cL_t(I%f*vFXj4%X z#(($So0m2(Z4*;NX^K!BN*%gntwRTgg5sa4VmJ4SgG(J91Q)js4#hf%1ROGmn+_Qz zie20bPb#5D2!y}2$87)=Wf;u#O;`_4Jv`40T=5aW`jQYnrUxo-O;0yPGlSzcQ4 zbFIZ;N*n5DPa;vjf#vejN<4pUn|^Patk&2@$m&Zx+#Px93dfz}OIzExJ)3q28E=vx zh>(e(`)U`!G`+eMu4_gnFqKO2YPI0syR(UBdSsm(J)=010}j9SiH-zwYd6WY0#V&3 z{dF1%@L}y-uyywq`AmXNl0a!RAE1Yt#_IwsT_lwx7wg2=@A`(M7kdoZGbj1p|? z5R^fRd8P(}q%0{+J2(@9g9(d%Xk$8h1ZM%%n;rFdr$!Q;XAmqhsk0Q7PeFeoFFsS6 zQOuRkkS|UV&N=`cQ>lnQt`MdXv8@O#MJg3CO!#37JS(LYbV;Iw?@w!{>D5a^A+2Mh z=z6oG9zJ_ZJ56X01U@!trc7uY0>Ib??@5iZR~V9*2J#~4>$k5ECJ+gmG=`ZZ<>2`v z|NY0;C2^XOgzFA?;R;}IdGm&FvLSEw_5f%!_GiW4Jjv?Dy1%-y?*H>|{0XqJ%%