One-liner marathon
- Version bump - Implement #1969 - Guard emptying JEI integration from empty item outputs, addresses #1994 - Goggles icon no longer renders when menu button is set invisible, addresses #1979 - Fixed missing blaze burner in JEI's display of heated compacting recipes, addresses #1970
This commit is contained in:
parent
909bf8a03f
commit
1e7078fe56
9 changed files with 31 additions and 12 deletions
|
@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G
|
|||
org.gradle.daemon = false
|
||||
|
||||
# mod version info
|
||||
mod_version = 0.3.2b
|
||||
mod_version = 0.3.2c
|
||||
minecraft_version = 1.16.5
|
||||
forge_version = 36.1.32
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class Create {
|
|||
|
||||
public static final String ID = "create";
|
||||
public static final String NAME = "Create";
|
||||
public static final String VERSION = "0.3.2b";
|
||||
public static final String VERSION = "0.3.2c";
|
||||
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRec
|
|||
return icon;
|
||||
}
|
||||
|
||||
protected static AllGuiTextures getRenderedSlot(IRecipe<?> recipe, int index) {
|
||||
public static AllGuiTextures getRenderedSlot(IRecipe<?> recipe, int index) {
|
||||
AllGuiTextures jeiSlot = AllGuiTextures.JEI_SLOT;
|
||||
if (!(recipe instanceof ProcessingRecipe))
|
||||
return jeiSlot;
|
||||
|
@ -85,23 +85,29 @@ public abstract class CreateRecipeCategory<T extends IRecipe<?>> implements IRec
|
|||
return AllGuiTextures.JEI_CHANCE_SLOT;
|
||||
}
|
||||
|
||||
protected static IDrawable emptyBackground(int width, int height) {
|
||||
public static IDrawable emptyBackground(int width, int height) {
|
||||
return new EmptyBackground(width, height);
|
||||
}
|
||||
|
||||
protected static IDrawable doubleItemIcon(IItemProvider item1, IItemProvider item2) {
|
||||
public static IDrawable doubleItemIcon(IItemProvider item1, IItemProvider item2) {
|
||||
return new DoubleItemIcon(() -> new ItemStack(item1), () -> new ItemStack(item2));
|
||||
}
|
||||
|
||||
protected static IDrawable itemIcon(IItemProvider item) {
|
||||
public static IDrawable itemIcon(IItemProvider item) {
|
||||
return new DoubleItemIcon(() -> new ItemStack(item), () -> ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
protected static void addStochasticTooltip(IGuiItemStackGroup itemStacks, List<ProcessingOutput> results) {
|
||||
public static void addStochasticTooltip(IGuiItemStackGroup itemStacks, List<ProcessingOutput> results) {
|
||||
addStochasticTooltip(itemStacks, results, 1);
|
||||
}
|
||||
|
||||
public static void addStochasticTooltip(IGuiItemStackGroup itemStacks, List<ProcessingOutput> results, int startIndex) {
|
||||
itemStacks.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
|
||||
if (input)
|
||||
return;
|
||||
ProcessingOutput output = results.get(slotIndex - 1);
|
||||
if (slotIndex < startIndex)
|
||||
return;
|
||||
ProcessingOutput output = results.get(slotIndex - startIndex);
|
||||
float chance = output.getChance();
|
||||
if (chance != 1)
|
||||
tooltip.add(1, Lang.translate("recipe.processing.chance", chance < 0.01 ? "<1" : (int) (chance * 100))
|
||||
|
|
|
@ -53,6 +53,8 @@ public class DeployingCategory extends CreateRecipeCategory<DeployerApplicationR
|
|||
.getItems()));
|
||||
itemStacks.init(2, false, 131, 50);
|
||||
itemStacks.set(2, recipe.getResultItem());
|
||||
|
||||
addStochasticTooltip(itemStacks, recipe.getRollableResults(), 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,6 +70,8 @@ public class ItemDrainCategory extends CreateRecipeCategory<EmptyingRecipe> {
|
|||
ItemStack result = handler.getContainer();
|
||||
if (extracted.isEmpty())
|
||||
return;
|
||||
if (result.isEmpty())
|
||||
return;
|
||||
|
||||
Ingredient ingredient = Ingredient.of(stack);
|
||||
ResourceLocation itemName = stack.getItem()
|
||||
|
|
|
@ -4,8 +4,10 @@ import java.util.Arrays;
|
|||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.compat.jei.category.animations.AnimatedBlazeBurner;
|
||||
import com.simibubi.create.compat.jei.category.animations.AnimatedPress;
|
||||
import com.simibubi.create.content.contraptions.processing.BasinRecipe;
|
||||
import com.simibubi.create.content.contraptions.processing.HeatCondition;
|
||||
import com.simibubi.create.foundation.gui.AllGuiTextures;
|
||||
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
|
@ -19,6 +21,7 @@ import net.minecraft.util.NonNullList;
|
|||
public class PackingCategory extends BasinCategory {
|
||||
|
||||
private AnimatedPress press = new AnimatedPress(true);
|
||||
private final AnimatedBlazeBurner heater = new AnimatedBlazeBurner();
|
||||
private PackingType type;
|
||||
|
||||
enum PackingType {
|
||||
|
@ -80,7 +83,11 @@ public class PackingCategory extends BasinCategory {
|
|||
AllGuiTextures.JEI_SHADOW.draw(matrixStack, 81, 68);
|
||||
}
|
||||
|
||||
press.draw(matrixStack, getBackground().getWidth() / 2 + 6, 40);
|
||||
HeatCondition requiredHeat = recipe.getRequiredHeat();
|
||||
if (requiredHeat != HeatCondition.NONE)
|
||||
heater.withHeat(requiredHeat.visualizeAsBlazeBurner())
|
||||
.draw(matrixStack, getBackground().getWidth() / 2 + 3, 55);
|
||||
press.draw(matrixStack, getBackground().getWidth() / 2 + 3, 34);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ public class AnimatedPress extends AnimatedKinetics {
|
|||
@Override
|
||||
public void draw(MatrixStack matrixStack, int xOffset, int yOffset) {
|
||||
matrixStack.pushPose();
|
||||
matrixStack.translate(xOffset, yOffset, 100);
|
||||
matrixStack.translate(xOffset, yOffset, 200);
|
||||
matrixStack.mulPose(Vector3f.XP.rotationDegrees(-15.5f));
|
||||
matrixStack.mulPose(Vector3f.YP.rotationDegrees(22.5f));
|
||||
int scale = basin ? 20 : 24;
|
||||
int scale = basin ? 23 : 24;
|
||||
|
||||
defaultBlockElement(shaft(Axis.Z))
|
||||
.rotateBlock(0, 0, getCurrentAngle())
|
||||
|
|
|
@ -34,6 +34,8 @@ public class OpenCreateMenuButton extends Button {
|
|||
@Override
|
||||
public void render(MatrixStack mstack, int mouseX, int mouseY, float pticks) {
|
||||
super.render(mstack, mouseX, mouseY, pticks);
|
||||
if (!visible)
|
||||
return;
|
||||
Minecraft.getInstance().getItemRenderer().renderGuiItem(icon, x + 2, y + 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ license="MIT"
|
|||
|
||||
[[mods]]
|
||||
modId="create"
|
||||
version="v0.3.2b for 1.16.5"
|
||||
version="v0.3.2c for 1.16.5"
|
||||
displayName="Create"
|
||||
#updateJSONURL=""
|
||||
displayURL="https://www.curseforge.com/minecraft/mc-mods/create"
|
||||
|
|
Loading…
Reference in a new issue