diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index ffa8a6c5a..72ae1df74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -153,7 +153,6 @@ public final class ActuallyAdditionsAPI{ /** * Adds a new conversion recipe to the compost. - * StackSize is regarded on both input and output and they can be different. * * @param input The itemstack to be input into the compost * @param inputDisplay The block to display when there is input in the compost diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index 45df9cabb..4bcb9f1a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -93,7 +93,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ if(StackUtil.isValid(stackPlayer)){ CompostRecipe recipeHand = TileEntityCompost.getRecipeForInput(stackPlayer); if(recipeHand != null && (recipeIn == null || recipeIn == recipeHand)){ - int maxAdd = Math.min(StackUtil.getStackSize(recipeHand.input), StackUtil.getStackSize(stackPlayer)); + int maxAdd = StackUtil.getStackSize(stackPlayer); if(!StackUtil.isValid(slot)){ ItemStack stackToAdd = stackPlayer.copy(); @@ -104,8 +104,8 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ } else{ ItemStack stackIn = slot.copy(); - if(StackUtil.getStackSize(stackIn) < StackUtil.getStackSize(recipeHand.input)){ - int sizeAdded = Math.min(maxAdd, StackUtil.getStackSize(recipeHand.input)-StackUtil.getStackSize(stackIn)); + if(StackUtil.getStackSize(stackIn) < recipeHand.input.getMaxStackSize()){ + int sizeAdded = Math.min(maxAdd, recipeHand.input.getMaxStackSize()-StackUtil.getStackSize(stackIn)); stackIn = StackUtil.addStackSize(stackIn, sizeAdded); compost.setInventorySlotContents(0, stackIn); player.inventory.decrStackSize(player.inventory.currentItem, sizeAdded); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderCompost.java index 59aa9a365..fb42f4da0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderCompost.java @@ -36,12 +36,12 @@ public class RenderCompost extends TileEntitySpecialRenderer{ for(CompostRecipe aRecipe : ActuallyAdditionsAPI.COMPOST_RECIPES){ if(slot.isItemEqual(aRecipe.input)){ display = aRecipe.inputDisplay; - maxAmount = StackUtil.getStackSize(aRecipe.input); + maxAmount = aRecipe.input.getMaxStackSize(); break; } else if(slot.isItemEqual(aRecipe.output)){ display = aRecipe.outputDisplay; - maxAmount = StackUtil.getStackSize(aRecipe.output); + maxAmount = aRecipe.output.getMaxStackSize(); break; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java index 7e15d8f79..0be84934c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java @@ -30,8 +30,8 @@ public final class InitCrafting{ FoodCrafting.init(); ToolCrafting.init(); - ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemMisc, 10, TheMiscItems.MASHED_FOOD.ordinal()), Blocks.LEAVES, new ItemStack(InitItems.itemFertilizer, 10), Blocks.DIRT); - ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemCanolaSeed, 20), Blocks.DIRT, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND); + ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()), Blocks.LEAVES, new ItemStack(InitItems.itemFertilizer), Blocks.DIRT); + ActuallyAdditionsAPI.addCompostRecipe(new ItemStack(InitItems.itemCanolaSeed), Blocks.DIRT, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND); ActuallyAdditionsAPI.addOilGenRecipe(InitFluids.fluidCanolaOil.getName(), 40); ActuallyAdditionsAPI.addOilGenRecipe(InitFluids.fluidOil.getName(), 100); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java index 4e1621804..4b39754bb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/FuelHandler.java @@ -37,7 +37,7 @@ public class FuelHandler implements IFuelHandler{ addFuel(InitItems.itemMisc, TheMiscItems.TINY_CHAR.ordinal(), 200); addFuel(InitItems.itemMisc, TheMiscItems.TINY_COAL.ordinal(), 200); addFuel(InitBlocks.blockMisc, TheMiscBlocks.CHARCOAL_BLOCK.ordinal(), 16000); - addFuel(InitItems.itemMisc, TheMiscItems.BIOCOAL.ordinal(), 1450); + addFuel(InitItems.itemMisc, TheMiscItems.BIOCOAL.ordinal(), 80); } private static void addFuel(Item item, int meta, int value){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java index 3475b24d2..3208df49a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java @@ -65,10 +65,11 @@ public class TileEntityCompost extends TileEntityInventoryBase{ if(StackUtil.isValid(this.slots[0])){ CompostRecipe recipe = getRecipeForInput(this.slots[0]); - if(recipe != null && this.slots[0].isItemEqual(recipe.input) && StackUtil.getStackSize(this.slots[0]) >= StackUtil.getStackSize(recipe.input)){ + if(recipe != null){ this.conversionTime++; if(this.conversionTime >= 3000){ - this.slots[0] = recipe.output.copy(); + ItemStack copy = recipe.output.copy(); + this.slots[0] = StackUtil.setStackSize(copy, StackUtil.getStackSize(this.slots[0])); this.conversionTime = 0; this.markDirty(); } @@ -95,17 +96,6 @@ public class TileEntityCompost extends TileEntityInventoryBase{ this.sendUpdate(); } - @Override - public int getInventoryStackLimit(){ - if(StackUtil.isValid(this.slots[0])){ - CompostRecipe recipe = getRecipeForInput(this.slots[0]); - if(recipe != null && StackUtil.isValid(recipe.input)){ - return StackUtil.getStackSize(recipe.input); - } - } - return super.getInventoryStackLimit(); - } - @Override public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){ return this.isItemValidForSlot(slot, stack); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 1bf717764..57a24a509 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -814,7 +814,7 @@ booklet.actuallyadditions.chapter.feeder.name=Feeder booklet.actuallyadditions.chapter.feeder.text.1=The Feeder is a good alternative to a manual animal farm. Place it in the middle of an animal pen and supply it with some wheat, seeds or carrots, depending on the animal you want to feed, and just wait. It will automatically feed the animals and if there is enough animals near it, it will shut off on its own to prevent lag or animal overflow. Greenpeace approves booklet.actuallyadditions.chapter.compost.name=Compost and Fertilizer -booklet.actuallyadditions.chapter.compost.text.1=The Compost is used to make Fertilizer from Bio-Mash. Fertilizer acts just like Bone Meal, but can be crafted in a much simpler manner just by crafting Bio-Mash and then putting 10 of those inside of a Compost and waiting for a bit. When the mash is composted, just take it out by right-clicking again. This, however, also works for some other items, which will be explained when needed. +booklet.actuallyadditions.chapter.compost.text.1=The Compost is used to make Fertilizer from Bio-Mash. Fertilizer acts just like Bone Meal, but can be crafted in a much simpler manner just by crafting Bio-Mash and then putting those inside of a Compost and waiting for a bit. When the mash is composted, just take it out by right-clicking again. This, however, also works for some other items, which will be explained when needed. booklet.actuallyadditions.chapter.compost.text.3=Bio-Mash can be crafted from any type of food or plantable item. booklet.actuallyadditions.chapter.crate.name=Storage Crates