Display compressed hammer recipes more accurately
This commit is contained in:
parent
2900a445aa
commit
c2623ec377
|
|
@ -25,6 +25,7 @@ import mezz.jei.api.recipe.RecipeType;
|
|||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||
import thedarkcolour.exdeorum.data.TranslationKeys;
|
||||
import thedarkcolour.exdeorum.recipe.hammer.HammerRecipe;
|
||||
import thedarkcolour.exdeorum.registry.EItems;
|
||||
|
|
@ -52,7 +53,11 @@ class HammerCategory extends OneToOneCategory<HammerRecipe> {
|
|||
|
||||
@Override
|
||||
protected void addOutput(IRecipeSlotBuilder slot, HammerRecipe recipe) {
|
||||
slot.addItemStack(new ItemStack(recipe.result));
|
||||
SieveCategory.addTooltips(slot, false, recipe.resultAmount);
|
||||
if (recipe.resultAmount instanceof ConstantValue constant) {
|
||||
slot.addItemStack(new ItemStack(recipe.result, (int) constant.value));
|
||||
} else {
|
||||
slot.addItemStack(new ItemStack(recipe.result));
|
||||
SieveCategory.addTooltips(slot, false, recipe.resultAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ public class DefaultMaterials {
|
|||
public static void registerMaterials() {
|
||||
BARRELS.search(BarrelMaterial::readFromJson);
|
||||
SIEVES.search(SieveMaterial::readFromJson);
|
||||
// todo compressed sieve JSON
|
||||
LAVA_CRUCIBLES.search(parser -> AbstractCrucibleMaterial.readFromJson(parser, LavaCrucibleMaterial::new));
|
||||
WATER_CRUCIBLES.search(parser -> AbstractCrucibleMaterial.readFromJson(parser, WaterCrucibleMaterial::new));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user