Merge branch 'mc1.15/dev' into mc1.16/dev

This commit is contained in:
simibubi 2020-10-13 20:57:30 +02:00
commit f2acea7f77
16 changed files with 92 additions and 3274 deletions

File diff suppressed because it is too large Load diff

View file

@ -548,7 +548,7 @@
"create.recipe.pressing": "Pressing", "create.recipe.pressing": "Pressing",
"create.recipe.mixing": "Mixing", "create.recipe.mixing": "Mixing",
"create.recipe.packing": "Compacting", "create.recipe.packing": "Compacting",
"create.recipe.mechanical_sawing": "Sawing", "create.recipe.sawing": "Sawing",
"create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.mechanical_crafting": "Mechanical Crafting",
"create.recipe.block_cutting": "Block Cutting", "create.recipe.block_cutting": "Block Cutting",
"create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper",
@ -571,6 +571,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "1 Bucket",
"create.generic.unit.millibuckets": "%1$smB",
"create.action.scroll": "Scroll", "create.action.scroll": "Scroll",
"create.action.confirm": "Confirm", "create.action.confirm": "Confirm",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 859", "_": "Missing Localizations: 861",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Mechanische Presse", "create.recipe.pressing": "Mechanische Presse",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.mechanical_sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Blockpistole", "create.recipe.blockzapper_upgrade": "Blockpistole",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "UNLOCALIZED: RPM", "create.generic.unit.rpm": "UNLOCALIZED: RPM",
"create.generic.unit.stress": "UNLOCALIZED: su", "create.generic.unit.stress": "UNLOCALIZED: su",
"create.generic.unit.degrees": "UNLOCALIZED: °", "create.generic.unit.degrees": "UNLOCALIZED: °",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "Wechseln", "create.action.scroll": "Wechseln",
"create.action.confirm": "Bestätigen", "create.action.confirm": "Bestätigen",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 483", "_": "Missing Localizations: 486",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Pressage", "create.recipe.pressing": "Pressage",
"create.recipe.mixing": "Mixage", "create.recipe.mixing": "Mixage",
"create.recipe.packing": "Compactage", "create.recipe.packing": "Compactage",
"create.recipe.mechanical_sawing": "Sciage", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "Fabrication mécanique", "create.recipe.mechanical_crafting": "Fabrication mécanique",
"create.recipe.block_cutting": "Coupe de bloc", "create.recipe.block_cutting": "Coupe de bloc",
"create.recipe.blockzapper_upgrade": "Blockzappeur portable", "create.recipe.blockzapper_upgrade": "Blockzappeur portable",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "tr/min", "create.generic.unit.rpm": "tr/min",
"create.generic.unit.stress": "us", "create.generic.unit.stress": "us",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "Faire défiler", "create.action.scroll": "Faire défiler",
"create.action.confirm": "Confirmer", "create.action.confirm": "Confirmer",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 467", "_": "Missing Localizations: 470",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Pressatura", "create.recipe.pressing": "Pressatura",
"create.recipe.mixing": "Mescolamento", "create.recipe.mixing": "Mescolamento",
"create.recipe.packing": "Compattazione", "create.recipe.packing": "Compattazione",
"create.recipe.mechanical_sawing": "Segagione", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "Creazione Meccanico", "create.recipe.mechanical_crafting": "Creazione Meccanico",
"create.recipe.block_cutting": "Taglio Blocco", "create.recipe.block_cutting": "Taglio Blocco",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "Scorri", "create.action.scroll": "Scorri",
"create.action.confirm": "Conferma", "create.action.confirm": "Conferma",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 462", "_": "Missing Localizations: 465",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "押しつぶし", "create.recipe.pressing": "押しつぶし",
"create.recipe.mixing": "混合", "create.recipe.mixing": "混合",
"create.recipe.packing": "圧縮", "create.recipe.packing": "圧縮",
"create.recipe.mechanical_sawing": "製材", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "メカニカルクラフト", "create.recipe.mechanical_crafting": "メカニカルクラフト",
"create.recipe.block_cutting": "ブロックカット", "create.recipe.block_cutting": "ブロックカット",
"create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー", "create.recipe.blockzapper_upgrade": "携帯型ブロックザッパー",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "スクロール", "create.action.scroll": "スクロール",
"create.action.confirm": "確認", "create.action.confirm": "確認",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 467", "_": "Missing Localizations: 470",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "압착", "create.recipe.pressing": "압착",
"create.recipe.mixing": "혼합", "create.recipe.mixing": "혼합",
"create.recipe.packing": "압축", "create.recipe.packing": "압축",
"create.recipe.mechanical_sawing": "제재", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "기계 조합", "create.recipe.mechanical_crafting": "기계 조합",
"create.recipe.block_cutting": "블럭 절단", "create.recipe.block_cutting": "블럭 절단",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "스크롤하세요", "create.action.scroll": "스크롤하세요",
"create.action.confirm": "확인", "create.action.confirm": "확인",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 797", "_": "Missing Localizations: 800",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Persen", "create.recipe.pressing": "Persen",
"create.recipe.mixing": "Mengen", "create.recipe.mixing": "Mengen",
"create.recipe.packing": "Compressen", "create.recipe.packing": "Compressen",
"create.recipe.mechanical_sawing": "Zagen", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "Blok Zagen", "create.recipe.block_cutting": "Blok Zagen",
"create.recipe.blockzapper_upgrade": "Blokzapper", "create.recipe.blockzapper_upgrade": "Blokzapper",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "UNLOCALIZED: RPM", "create.generic.unit.rpm": "UNLOCALIZED: RPM",
"create.generic.unit.stress": "UNLOCALIZED: su", "create.generic.unit.stress": "UNLOCALIZED: su",
"create.generic.unit.degrees": "UNLOCALIZED: °", "create.generic.unit.degrees": "UNLOCALIZED: °",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "Scroll", "create.action.scroll": "Scroll",
"create.action.confirm": "Bevestigen", "create.action.confirm": "Bevestigen",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 866", "_": "Missing Localizations: 868",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Prensa Mecânica", "create.recipe.pressing": "Prensa Mecânica",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.mechanical_sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Blockzapper Portátil", "create.recipe.blockzapper_upgrade": "Blockzapper Portátil",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "UNLOCALIZED: RPM", "create.generic.unit.rpm": "UNLOCALIZED: RPM",
"create.generic.unit.stress": "UNLOCALIZED: su", "create.generic.unit.stress": "UNLOCALIZED: su",
"create.generic.unit.degrees": "UNLOCALIZED: °", "create.generic.unit.degrees": "UNLOCALIZED: °",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "Rolar", "create.action.scroll": "Rolar",
"create.action.confirm": "Confirmar", "create.action.confirm": "Confirmar",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 860", "_": "Missing Localizations: 862",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "Механический пресс", "create.recipe.pressing": "Механический пресс",
"create.recipe.mixing": "UNLOCALIZED: Mixing", "create.recipe.mixing": "UNLOCALIZED: Mixing",
"create.recipe.packing": "UNLOCALIZED: Compacting", "create.recipe.packing": "UNLOCALIZED: Compacting",
"create.recipe.mechanical_sawing": "UNLOCALIZED: Sawing", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting", "create.recipe.mechanical_crafting": "UNLOCALIZED: Mechanical Crafting",
"create.recipe.block_cutting": "UNLOCALIZED: Block Cutting", "create.recipe.block_cutting": "UNLOCALIZED: Block Cutting",
"create.recipe.blockzapper_upgrade": "Портативный размещатель блоков", "create.recipe.blockzapper_upgrade": "Портативный размещатель блоков",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "UNLOCALIZED: RPM", "create.generic.unit.rpm": "UNLOCALIZED: RPM",
"create.generic.unit.stress": "UNLOCALIZED: su", "create.generic.unit.stress": "UNLOCALIZED: su",
"create.generic.unit.degrees": "UNLOCALIZED: °", "create.generic.unit.degrees": "UNLOCALIZED: °",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "КолМыши", "create.action.scroll": "КолМыши",
"create.action.confirm": "Подтвердить", "create.action.confirm": "Подтвердить",

View file

@ -1,5 +1,5 @@
{ {
"_": "Missing Localizations: 147", "_": "Missing Localizations: 150",
"_": "->------------------------] Game Elements [------------------------<-", "_": "->------------------------] Game Elements [------------------------<-",
@ -549,7 +549,7 @@
"create.recipe.pressing": "金属压片", "create.recipe.pressing": "金属压片",
"create.recipe.mixing": "混合搅拌", "create.recipe.mixing": "混合搅拌",
"create.recipe.packing": "压块塑形", "create.recipe.packing": "压块塑形",
"create.recipe.mechanical_sawing": "木材切割", "create.recipe.sawing": "UNLOCALIZED: Sawing",
"create.recipe.mechanical_crafting": "自动合成", "create.recipe.mechanical_crafting": "自动合成",
"create.recipe.block_cutting": "方块切割", "create.recipe.block_cutting": "方块切割",
"create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "UNLOCALIZED: Handheld Blockzapper",
@ -572,6 +572,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "°", "create.generic.unit.degrees": "°",
"create.generic.unit.bucket": "UNLOCALIZED: 1 Bucket",
"create.generic.unit.millibuckets": "UNLOCALIZED: %1$smB",
"create.action.scroll": "滚轮", "create.action.scroll": "滚轮",
"create.action.confirm": "确认", "create.action.confirm": "确认",

View file

@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.mutable.MutableInt;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.contraptions.processing.BasinRecipe; import com.simibubi.create.content.contraptions.processing.BasinRecipe;
import com.simibubi.create.content.contraptions.processing.HeatCondition; import com.simibubi.create.content.contraptions.processing.HeatCondition;
@ -109,6 +110,8 @@ public class BasinCategory extends CreateRecipeCategory<BasinRecipe> {
fluidStacks.init(j, false, 142, 51 + yOffset); fluidStacks.init(j, false, 142, 51 + yOffset);
fluidStacks.set(j, fluidOutput); fluidStacks.set(j, fluidOutput);
} }
addFluidTooltip(fluidStacks, fluidIngredients, ImmutableList.of(fluidOutput));
} }
@Override @Override
@ -119,6 +122,7 @@ public class BasinCategory extends CreateRecipeCategory<BasinRecipe> {
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0; int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
HeatCondition requiredHeat = recipe.getRequiredHeat(); HeatCondition requiredHeat = recipe.getRequiredHeat();
int yOffset = requiredHeat != HeatCondition.NONE ? 30 : 10; int yOffset = requiredHeat != HeatCondition.NONE ? 30 : 10;
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
AllGuiTextures.JEI_SLOT.draw(matrixStack, 16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset); AllGuiTextures.JEI_SLOT.draw(matrixStack, 16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
@ -126,5 +130,5 @@ public class BasinCategory extends CreateRecipeCategory<BasinRecipe> {
AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 136, 32 + yOffset); AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 136, 32 + yOffset);
AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 57 + yOffset); AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 57 + yOffset);
} }
} }

View file

@ -1,24 +1,29 @@
package com.simibubi.create.compat.jei.category; package com.simibubi.create.compat.jei.category;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.compat.jei.DoubleItemIcon; import com.simibubi.create.compat.jei.DoubleItemIcon;
import com.simibubi.create.compat.jei.EmptyBackground; import com.simibubi.create.compat.jei.EmptyBackground;
import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
import com.simibubi.create.foundation.fluid.FluidIngredient;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.drawable.IDrawable;
import mezz.jei.api.gui.ingredient.IGuiFluidStackGroup;
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
import mezz.jei.api.recipe.category.IRecipeCategory; import mezz.jei.api.recipe.category.IRecipeCategory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.IItemProvider; import net.minecraft.util.IItemProvider;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fluids.FluidStack;
public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRecipeCategory<T> { public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRecipeCategory<T> {
@ -46,7 +51,8 @@ public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRec
@Override @Override
public String getTitle() { public String getTitle() {
return Lang.translate("recipe." + name).getString(); return Lang.translate("recipe." + name)
.getString();
} }
@Override @Override
@ -62,7 +68,9 @@ public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRec
List<ProcessingOutput> rollableResults = processingRecipe.getRollableResults(); List<ProcessingOutput> rollableResults = processingRecipe.getRollableResults();
if (rollableResults.size() <= index) if (rollableResults.size() <= index)
return jeiSlot; return jeiSlot;
if (processingRecipe.getRollableResults().get(index).getChance() == 1) if (processingRecipe.getRollableResults()
.get(index)
.getChance() == 1)
return jeiSlot; return jeiSlot;
return AllGuiTextures.JEI_CHANCE_SLOT; return AllGuiTextures.JEI_CHANCE_SLOT;
} }
@ -85,19 +93,28 @@ public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRec
return; return;
ProcessingOutput output = results.get(slotIndex - 1); ProcessingOutput output = results.get(slotIndex - 1);
if (output.getChance() != 1) if (output.getChance() != 1)
tooltip.add(1, Lang.translate("recipe.processing.chance", (int) (output.getChance() * 100)).formatted(TextFormatting.GOLD)); tooltip.add(1, Lang.translate("recipe.processing.chance", (int) (output.getChance() * 100))
.formatted(TextFormatting.GOLD));
}); });
} }
protected static void addCatalystTooltip(IGuiItemStackGroup itemStacks, Map<Integer, Float> catalystIndices) { protected static void addFluidTooltip(IGuiFluidStackGroup fluidStacks, List<FluidIngredient> inputs,
itemStacks.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> { List<FluidStack> outputs) {
if (!input) List<Integer> amounts = new ArrayList<>();
return; inputs.forEach(f -> amounts.add(f.getRequiredAmount()));
if (!catalystIndices.containsKey(slotIndex)) outputs.forEach(f -> amounts.add(f.getAmount()));
return;
Float chance = catalystIndices.get(slotIndex); fluidStacks.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
tooltip.add(1, Lang.translate("recipe.processing.catalyst").formatted(TextFormatting.YELLOW)); int amount = amounts.get(slotIndex);
tooltip.add(2, Lang.translate("recipe.processing.chanceToReturn", (int) (chance.floatValue() * 100)).formatted(TextFormatting.GOLD)); ITextComponent text = ((amount == 1000 ? Lang.translate("generic.unit.bucket")
: Lang.translate("generic.unit.millibuckets", amount))).formatted(TextFormatting.GOLD);
if (tooltip.isEmpty())
tooltip.add(0, text);
else {
List<ITextComponent> siblings = tooltip.get(0).getSiblings();
siblings.add(new StringTextComponent(" "));
siblings.add(text);
}
}); });
} }

View file

@ -20,7 +20,7 @@ public class PackingCategory extends BasinCategory {
public PackingCategory() { public PackingCategory() {
super("packing", doubleItemIcon(AllBlocks.MECHANICAL_PRESS.get(), AllBlocks.BASIN.get()), super("packing", doubleItemIcon(AllBlocks.MECHANICAL_PRESS.get(), AllBlocks.BASIN.get()),
emptyBackground(177, 70)); emptyBackground(177, 110));
} }
@Override @Override
@ -29,7 +29,7 @@ public class PackingCategory extends BasinCategory {
super.setRecipe(recipeLayout, recipe, ingredients); super.setRecipe(recipeLayout, recipe, ingredients);
return; return;
} }
IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
int i = 0; int i = 0;
@ -38,12 +38,12 @@ public class PackingCategory extends BasinCategory {
int rows = size == 4 ? 2 : 3; int rows = size == 4 ? 2 : 3;
while (i < size) { while (i < size) {
Ingredient ingredient = ingredients2.get(i); Ingredient ingredient = ingredients2.get(i);
itemStacks.init(i, true, (rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19); itemStacks.init(i, true, (rows == 2 ? 26 : 17) + (i % rows) * 19, 60 - (i / rows) * 19);
itemStacks.set(i, Arrays.asList(ingredient.getMatchingStacks())); itemStacks.set(i, Arrays.asList(ingredient.getMatchingStacks()));
i++; i++;
} }
itemStacks.init(i, false, 141, 50); itemStacks.init(i, false, 141, 60);
itemStacks.set(i, recipe.getRecipeOutput()); itemStacks.set(i, recipe.getRecipeOutput());
} }
@ -51,19 +51,20 @@ public class PackingCategory extends BasinCategory {
public void draw(BasinRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) { public void draw(BasinRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) {
if (!recipe.convertedRecipe) { if (!recipe.convertedRecipe) {
super.draw(recipe, matrixStack, mouseX, mouseY); super.draw(recipe, matrixStack, mouseX, mouseY);
} else { } else {
NonNullList<Ingredient> ingredients2 = recipe.getIngredients(); NonNullList<Ingredient> ingredients2 = recipe.getIngredients();
int size = ingredients2.size(); int size = ingredients2.size();
int rows = size == 4 ? 2 : 3; int rows = size == 4 ? 2 : 3;
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
AllGuiTextures.JEI_SLOT.draw(matrixStack, (rows == 2 ? 26 : 17) + (i % rows) * 19, 50 - (i / rows) * 19); AllGuiTextures.JEI_SLOT.draw(matrixStack, (rows == 2 ? 26 : 17) + (i % rows) * 19,
AllGuiTextures.JEI_SLOT.draw(matrixStack, 141, 50); 60 - (i / rows) * 19);
AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 136, 32); AllGuiTextures.JEI_SLOT.draw(matrixStack, 141, 60);
AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 57); AllGuiTextures.JEI_DOWN_ARROW.draw(matrixStack, 136, 42);
AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 67);
} }
press.draw(matrixStack, getBackground().getWidth() / 2 + 6, 30); press.draw(matrixStack, getBackground().getWidth() / 2 + 6, 40);
} }
} }

View file

@ -60,6 +60,7 @@ public class OpenEndedPipe {
return; return;
if (waterlog) { if (waterlog) {
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, false), 3); world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, false), 3);
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
return; return;
} }
world.setBlockState(outputPos, fluidState.getBlockState() world.setBlockState(outputPos, fluidState.getBlockState()
@ -80,6 +81,7 @@ public class OpenEndedPipe {
if (providedFluid.getFluid() != Fluids.WATER) if (providedFluid.getFluid() != Fluids.WATER)
return; return;
world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, true), 3); world.setBlockState(outputPos, state.with(BlockStateProperties.WATERLOGGED, true), 3);
world.getPendingFluidTicks().scheduleTick(outputPos, Fluids.WATER, 1);
return; return;
} }
world.setBlockState(outputPos, providedFluid.getDefaultState() world.setBlockState(outputPos, providedFluid.getDefaultState()

View file

@ -23,7 +23,7 @@
"create.recipe.pressing": "Pressing", "create.recipe.pressing": "Pressing",
"create.recipe.mixing": "Mixing", "create.recipe.mixing": "Mixing",
"create.recipe.packing": "Compacting", "create.recipe.packing": "Compacting",
"create.recipe.mechanical_sawing": "Sawing", "create.recipe.sawing": "Sawing",
"create.recipe.mechanical_crafting": "Mechanical Crafting", "create.recipe.mechanical_crafting": "Mechanical Crafting",
"create.recipe.block_cutting": "Block Cutting", "create.recipe.block_cutting": "Block Cutting",
"create.recipe.blockzapper_upgrade": "Handheld Blockzapper", "create.recipe.blockzapper_upgrade": "Handheld Blockzapper",
@ -46,6 +46,8 @@
"create.generic.unit.rpm": "RPM", "create.generic.unit.rpm": "RPM",
"create.generic.unit.stress": "su", "create.generic.unit.stress": "su",
"create.generic.unit.degrees": "\u00B0", "create.generic.unit.degrees": "\u00B0",
"create.generic.unit.bucket": "1 Bucket",
"create.generic.unit.millibuckets": "%1$smB",
"create.action.scroll": "Scroll", "create.action.scroll": "Scroll",
"create.action.confirm": "Confirm", "create.action.confirm": "Confirm",