20w17a compile pass
This commit is contained in:
parent
178e0937d5
commit
7ccd5bcebd
68 changed files with 868 additions and 658 deletions
|
@ -34,6 +34,7 @@ import me.shedaniel.rei.gui.entries.RecipeEntry;
|
|||
import me.shedaniel.rei.gui.entries.SimpleRecipeEntry;
|
||||
import me.shedaniel.rei.gui.widget.Widget;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
@ -66,7 +67,7 @@ public class MachineRecipeCategory<R extends RebornRecipe> implements RecipeCate
|
|||
|
||||
@Override
|
||||
public String getCategoryName() {
|
||||
return StringUtils.t(rebornRecipeType.getName().toString());
|
||||
return new TranslatableText(rebornRecipeType.getName().toString()).asString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,7 +95,7 @@ public class MachineRecipeCategory<R extends RebornRecipe> implements RecipeCate
|
|||
|
||||
Text energyPerTick = new TranslatableText("techreborn.jei.recipe.running.cost", "E", machineRecipe.getEnergy());
|
||||
Label costLabel;
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(startPoint.x + 1, startPoint.y + 1 + (i++ * 20)), energyPerTick.asFormattedString()));
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(startPoint.x + 1, startPoint.y + 1 + (i++ * 20)), energyPerTick));
|
||||
costLabel.shadow(false);
|
||||
costLabel.color(0xFF404040, 0xFFBBBBBB);
|
||||
|
||||
|
@ -105,7 +106,7 @@ public class MachineRecipeCategory<R extends RebornRecipe> implements RecipeCate
|
|||
|
||||
int heat = machineRecipe.getHeat();
|
||||
if (heat > 0) {
|
||||
String neededHeat = heat + " " + StringUtils.t("techreborn.jei.recipe.heat");
|
||||
Text neededHeat = new LiteralText(String.valueOf(heat)).append(" ").append(new TranslatableText("techreborn.jei.recipe.heat"));
|
||||
Label heatLabel;
|
||||
widgets.add(heatLabel = Widgets.createLabel(new Point(startPoint.x + 61, startPoint.y + 1 + (i++ * 20)), neededHeat));
|
||||
heatLabel.shadow(false);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
package techreborn.compat.rei;
|
||||
|
||||
import me.shedaniel.math.api.Rectangle;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.BaseBoundsHandler;
|
||||
import me.shedaniel.rei.api.DisplayHelper;
|
||||
import me.shedaniel.rei.api.EntryRegistry;
|
||||
|
@ -32,8 +32,6 @@ import me.shedaniel.rei.api.EntryStack;
|
|||
import me.shedaniel.rei.api.RecipeDisplay;
|
||||
import me.shedaniel.rei.api.RecipeHelper;
|
||||
import me.shedaniel.rei.api.plugins.REIPluginV0;
|
||||
import net.fabricmc.loader.api.SemanticVersion;
|
||||
import net.fabricmc.loader.util.version.VersionParsingException;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class FluidGeneratorRecipeCategory implements RecipeCategory<FluidGenerat
|
|||
|
||||
@Override
|
||||
public String getCategoryName() {
|
||||
return StringUtils.t(identifier.toString());
|
||||
return new TranslatableText(identifier.toString()).asString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,7 +80,7 @@ public class FluidGeneratorRecipeCategory implements RecipeCategory<FluidGenerat
|
|||
|
||||
Text energyPerTick = new TranslatableText("techreborn.jei.recipe.generator.total", machineRecipe.getTotalEnergy());
|
||||
Label costLabel;
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(bounds.getCenterX(), startPoint.y + 20), energyPerTick.asFormattedString()));
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(bounds.getCenterX(), startPoint.y + 20), energyPerTick));
|
||||
costLabel.shadow(false);
|
||||
costLabel.color(0xFF404040, 0xFFBBBBBB);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class FluidReplicatorRecipeCategory implements RecipeCategory<FluidReplic
|
|||
|
||||
@Override
|
||||
public String getCategoryName() {
|
||||
return StringUtils.t(rebornRecipeType.getName().toString());
|
||||
return new TranslatableText(rebornRecipeType.getName().toString()).asString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,7 @@ public class FluidReplicatorRecipeCategory implements RecipeCategory<FluidReplic
|
|||
|
||||
Text energyPerTick = new TranslatableText("techreborn.jei.recipe.running.cost", "E", machineRecipe.getEnergy());
|
||||
Label costLabel;
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(startPoint.x + 1, startPoint.y + 1 + (i++ * 20)), energyPerTick.asFormattedString()));
|
||||
widgets.add(costLabel = Widgets.createLabel(new Point(startPoint.x + 1, startPoint.y + 1 + (i++ * 20)), energyPerTick));
|
||||
costLabel.shadow(false);
|
||||
costLabel.color(0xFF404040, 0xFFBBBBBB);
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ package techreborn.compat.rei.rollingmachine;
|
|||
import me.shedaniel.rei.api.EntryStack;
|
||||
import me.shedaniel.rei.plugin.crafting.DefaultCraftingCategory;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import reborncore.common.util.StringUtils;
|
||||
|
@ -48,7 +49,7 @@ public class RollingMachineCategory extends DefaultCraftingCategory {
|
|||
|
||||
@Override
|
||||
public String getCategoryName() {
|
||||
return StringUtils.t(rebornRecipeType.getName().toString());
|
||||
return new TranslatableText(rebornRecipeType.getName().toString()).asString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue