diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java index c1479c3b6..e8d2a6170 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CreateRecipeCategory.java @@ -101,9 +101,10 @@ public abstract class CreateRecipeCategory> implements IRec if (input) return; ProcessingOutput output = results.get(slotIndex - 1); - if (output.getChance() != 1) + float chance = output.getChance(); + if (chance != 1) tooltip.add(1, - TextFormatting.GOLD + Lang.translate("recipe.processing.chance", (int) (output.getChance() * 100))); + TextFormatting.GOLD + Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))); }); } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/FanWashingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/FanWashingCategory.java index 7779b3047..eb181aae7 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/FanWashingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/FanWashingCategory.java @@ -20,7 +20,7 @@ import net.minecraft.item.Items; public class FanWashingCategory extends ProcessingViaFanCategory { public FanWashingCategory() { - super(doubleItemIcon(AllItems.PROPELLER.get(), Items.WATER_BUCKET)); + super(185, doubleItemIcon(AllItems.PROPELLER.get(), Items.WATER_BUCKET)); } @Override @@ -37,18 +37,19 @@ public class FanWashingCategory extends ProcessingViaFanCategory results = recipe.getRollableResults(); boolean single = results.size() == 1; + boolean excessive = results.size() > 9; for (int outputIndex = 0; outputIndex < results.size(); outputIndex++) { - int xOffset = outputIndex % 2 == 0 ? 0 : 19; - int yOffset = (outputIndex / 2) * -19; + int xOffset = (outputIndex % 3) * 19; + int yOffset = (outputIndex / 3) * -19; - itemStacks.init(outputIndex + 1, false, single ? 139 : 133 + xOffset, 47 + yOffset); + itemStacks.init(outputIndex + 1, false, single ? 126 : 121 + xOffset, 47 + yOffset + (excessive ? 8 : 0)); itemStacks.set(outputIndex + 1, results.get(outputIndex) .getStack()); } @@ -61,22 +62,27 @@ public class FanWashingCategory extends ProcessingViaFanCategory 9 ? 8 : 0); + getRenderedSlot(recipe, i).draw(121 + xOffset, 47 + yOffset); } } + + @Override + protected void translateFan() { + RenderSystem.translatef(43, 33, 0); + } @Override public void renderAttachedBlock() { diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java index ea6afdac2..a76310777 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java @@ -24,7 +24,11 @@ import net.minecraft.util.text.TextFormatting; public abstract class ProcessingViaFanCategory> extends CreateRecipeCategory { public ProcessingViaFanCategory(IDrawable icon) { - super(icon, emptyBackground(177, 70)); + this(177, icon); + } + + protected ProcessingViaFanCategory(int width, IDrawable icon) { + super(icon, emptyBackground(width, 71)); } @Override @@ -62,7 +66,7 @@ public abstract class ProcessingViaFanCategory> extends Cre public void draw(T recipe, double mouseX, double mouseY) { renderWidgets(recipe, mouseX, mouseY); RenderSystem.pushMatrix(); - RenderSystem.translatef(56, 33, 0); + translateFan(); RenderSystem.rotatef(-12.5f, 1, 0, 0); RenderSystem.rotatef(22.5f, 0, 1, 0); int scale = 24; @@ -82,6 +86,10 @@ public abstract class ProcessingViaFanCategory> extends Cre RenderSystem.popMatrix(); } + protected void translateFan() { + RenderSystem.translatef(56, 33, 0); + } + public abstract void renderAttachedBlock(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/SplashingRecipe.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/SplashingRecipe.java index 0e47dc7a2..e6eafe17f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/SplashingRecipe.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/SplashingRecipe.java @@ -32,7 +32,7 @@ public class SplashingRecipe extends ProcessingRecipe 0) return; + if (!entityIn.isAlive()) + return; withTileEntityDo(worldIn, pos, te -> { ItemEntity itemEntity = (ItemEntity) entityIn; IItemHandler handler = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) diff --git a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteBlock.java index f9183aa1f..c1de7792b 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteBlock.java @@ -79,6 +79,8 @@ public class ChuteBlock extends Block implements IWrenchable, ITE