It runs, sort of...

This commit is contained in:
modmuss50 2023-05-13 11:01:44 +01:00 committed by modmuss
parent 027be66230
commit 08f75889ec
19 changed files with 75 additions and 79 deletions

View file

@ -27,7 +27,7 @@ package reborncore.api.events;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.RecipeInputInventory;
import net.minecraft.item.ItemStack;
@ -39,6 +39,6 @@ public interface ItemCraftCallback {
}
});
void onCraft(ItemStack stack, CraftingInventory craftingInventory, PlayerEntity playerEntity);
void onCraft(ItemStack stack, RecipeInputInventory craftingInventory, PlayerEntity playerEntity);
}

View file

@ -25,7 +25,7 @@
package reborncore.mixin.common;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.RecipeInputInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.screen.slot.CraftingResultSlot;
import org.spongepowered.asm.mixin.Final;
@ -41,7 +41,7 @@ public abstract class MixinCraftingResultSlot {
@Shadow
@Final
private CraftingInventory input;
private RecipeInputInventory input;
@Shadow
@Final

View file

@ -32,7 +32,7 @@
"fabric-api": ">=0.75.3",
"team_reborn_energy": ">=3.0.0",
"fabric-biome-api-v1": ">=3.0.0",
"minecraft": ">=1.19.4- <1.19.5-"
"minecraft": ">=1.20- <1.20.1-"
},
"authors": [
"Team Reborn",

View file

@ -50,6 +50,7 @@ import me.shedaniel.rei.api.common.util.EntryStacks;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandler;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.fluid.Fluid;
@ -95,6 +96,11 @@ import java.util.stream.Stream;
public class ReiPlugin implements REIClientPlugin {
public static final Map<RebornRecipeType<?>, ItemConvertible> iconMap = new HashMap<>();
@Deprecated(forRemoval = true)
public static DrawContext drawContext() {
throw new IllegalStateException("TODO 1.20 port!");
}
public ReiPlugin() {
iconMap.put(ModRecipes.ALLOY_SMELTER, Machine.ALLOY_SMELTER);
iconMap.put(ModRecipes.ASSEMBLING_MACHINE, Machine.ASSEMBLY_MACHINE);
@ -270,19 +276,18 @@ public class ReiPlugin implements REIClientPlugin {
}
public static Widget createProgressBar(int x, int y, double animationDuration, GuiBuilder.ProgressDirection direction) {
return Widgets.createDrawableWidget((helper, matrices, mouseX, mouseY, delta) -> {
RenderSystem.setShaderTexture(0, GuiBuilder.defaultTextureSheet);
helper.drawTexture(matrices, x, y, direction.x, direction.y, direction.width, direction.height);
return Widgets.createDrawableWidget((drawContext, matrices, mouseX, mouseY, delta) -> {
drawContext.drawTexture(GuiBuilder.defaultTextureSheet, x, y, direction.x, direction.y, direction.width, direction.height);
int j = (int) ((System.currentTimeMillis() / animationDuration) % 1.0 * 16.0);
if (j < 0) {
j = 0;
}
switch (direction) {
case RIGHT -> helper.drawTexture(matrices, x, y, direction.xActive, direction.yActive, j, 10);
case LEFT -> helper.drawTexture(matrices, x + 16 - j, y, direction.xActive + 16 - j, direction.yActive, j, 10);
case UP -> helper.drawTexture(matrices, x, y + 16 - j, direction.xActive, direction.yActive + 16 - j, 10, j);
case DOWN -> helper.drawTexture(matrices, x, y, direction.xActive, direction.yActive, 10, j);
case RIGHT -> drawContext.drawTexture(GuiBuilder.defaultTextureSheet, x, y, direction.xActive, direction.yActive, j, 10);
case LEFT -> drawContext.drawTexture(GuiBuilder.defaultTextureSheet, x + 16 - j, y, direction.xActive + 16 - j, direction.yActive, j, 10);
case UP -> drawContext.drawTexture(GuiBuilder.defaultTextureSheet, x, y + 16 - j, direction.xActive, direction.yActive + 16 - j, 10, j);
case DOWN -> drawContext.drawTexture(GuiBuilder.defaultTextureSheet, x, y, direction.xActive, direction.yActive, 10, j);
}
});
}
@ -315,15 +320,14 @@ public class ReiPlugin implements REIClientPlugin {
int innerHeight = height - 2;
PowerSystem.EnergySystem displayPower = PowerSystem.getDisplayPower();
RenderSystem.setShaderTexture(0, GuiBuilder.defaultTextureSheet);
drawTexture(matrices, bounds.x - 1, bounds.y - 1, displayPower.xBar - 15, displayPower.yBar - 1, width, height);
drawContext().drawTexture(GuiBuilder.defaultTextureSheet, bounds.x - 1, bounds.y - 1, displayPower.xBar - 15, displayPower.yBar - 1, width, height);
int innerDisplayHeight;
if (animation.animationType != EntryAnimationType.NONE) {
innerDisplayHeight = MathHelper.ceil((System.currentTimeMillis() / (animation.duration / (float) innerHeight) % innerHeight));
if (animation.animationType == EntryAnimationType.DOWNWARDS)
innerDisplayHeight = innerHeight - innerDisplayHeight;
} else innerDisplayHeight = innerHeight;
drawTexture(matrices, bounds.x, bounds.y + innerHeight - innerDisplayHeight, displayPower.xBar, innerHeight + displayPower.yBar - innerDisplayHeight, width - 2, innerDisplayHeight);
drawContext().drawTexture(GuiBuilder.defaultTextureSheet, bounds.x, bounds.y + innerHeight - innerDisplayHeight, displayPower.xBar, innerHeight + displayPower.yBar - innerDisplayHeight, width - 2, innerDisplayHeight);
}
@Override
@ -347,9 +351,8 @@ public class ReiPlugin implements REIClientPlugin {
int width = bounds.width;
int height = bounds.height;
RenderSystem.setShaderTexture(0, GuiBuilder.defaultTextureSheet);
drawTexture(matrices, bounds.x - 4, bounds.y - 4, 194, 26, width + 8, height + 8);
drawTexture(matrices, bounds.x - 1, bounds.y - 1, 194, 82, width + 2, height + 2);
drawContext().drawTexture(GuiBuilder.defaultTextureSheet, bounds.x - 4, bounds.y - 4, 194, 26, width + 8, height + 8);
drawContext().drawTexture(GuiBuilder.defaultTextureSheet, bounds.x - 1, bounds.y - 1, 194, 82, width + 2, height + 2);
int innerDisplayHeight;
if (animation.animationType != EntryAnimationType.NONE) {
innerDisplayHeight = MathHelper.ceil((System.currentTimeMillis() / (animation.duration / (float) height) % height));
@ -382,7 +385,7 @@ public class ReiPlugin implements REIClientPlugin {
while (offsetHeight != 0) {
final int curHeight = Math.min(offsetHeight, iconHeight);
drawSprite(matrixStack, x, y - offsetHeight, 0, width, curHeight, sprite);
drawContext().drawSprite(x, y - offsetHeight, 0, width, curHeight, sprite);
offsetHeight -= curHeight;
iteration++;
if (iteration > 50) {

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import reborncore.client.ClientNetworkManager;
@ -71,8 +72,9 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
final Layer layer = Layer.FOREGROUND;
if (!hideGuiElements()) {
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
final MatrixStack matrices = drawContext.getMatrices();
matrices.push();
matrices.scale(0.6f, 0.6f, 1.0f);
Text text = Text.literal(PowerSystem.getLocalizedPowerNoSuffix(blockEntity.getEnergy()))
.append("/")
.append(PowerSystem.getLocalizedPowerNoSuffix(blockEntity.getMaxStoredPower()))
@ -80,7 +82,7 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
.append(PowerSystem.getDisplayPower().abbreviation);
drawCentredText(drawContext, text, 35, 0, 58, layer);
drawContext.pop();
matrices.pop();
}
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import reborncore.client.gui.builder.GuiBase;
@ -56,14 +57,15 @@ public class GuiBatbox extends GuiBase<BuiltScreenHandler> {
final Layer layer = Layer.FOREGROUND;
if (!hideGuiElements()) {
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
final MatrixStack matrices = drawContext.getMatrices();
matrices.push();
matrices.scale(0.6f, 0.6f, 1.0f);
Text text = Text.literal(PowerSystem.getLocalizedPowerNoSuffix(blockEntity.getEnergy()))
.append("/")
.append(PowerSystem.getLocalizedPower(blockEntity.getMaxStoredPower()));
drawCentredText(drawContext, text, 35, 0, 58, layer);
drawContext.pop();
matrices.pop();
}
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);

View file

@ -112,8 +112,8 @@ public class GuiFusionReactor extends GuiBase<BuiltScreenHandler> {
}
}
drawTextWithShadow(drawContext, this.textRenderer, Text.literal("Size: ").append(String.valueOf(blockEntity.size)), 83, 81, 0xFFFFFF);
drawTextWithShadow(drawContext, this.textRenderer, Text.literal(String.valueOf(blockEntity.getPowerMultiplier())).append("x"), 10, 81, 0xFFFFFF);
drawContext.drawText(this.textRenderer, Text.literal("Size: ").append(String.valueOf(blockEntity.size)), 83, 81, 0xFFFFFF, true);
drawContext.drawText(this.textRenderer, Text.literal(String.valueOf(blockEntity.getPowerMultiplier())).append("x"), 10, 81, 0xFFFFFF, true);
builder.drawMultiEnergyBar(drawContext, this, 9, 19, this.blockEntity.getEnergy(), this.blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
}

View file

@ -24,9 +24,8 @@
package techreborn.client.gui;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
@ -64,17 +63,14 @@ public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
drawSlot(drawContext, 48, gridYPos + 36, layer);
if (!blockEntity.isMultiblockValid()) {
RenderSystem.setShaderTexture(0, new Identifier("techreborn", "textures/item/part/digital_display.png"));
drawTexture(drawContext, x + 68, y + 22, 0, 0, 16, 16, 16, 16);
drawContext.drawTexture(new Identifier("techreborn", "textures/item/part/digital_display.png"), x + 68, y + 22, 0, 0, 16, 16, 16, 16);
if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) {
List<Text> list = Arrays.stream(I18n.translate("techreborn.tooltip.greenhouse.upgrade_available")
.split("\\r?\\n"))
.map(Text::literal)
.collect(Collectors.toList());
drawContext.push();
renderTooltip(drawContext, list, mouseX, mouseY);
drawContext.pop();
drawContext.drawTooltip(getTextRenderer(), list, mouseX, mouseY);
}
}
@ -95,9 +91,7 @@ public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
.map(Text::literal)
.collect(Collectors.toList());
drawContext.push();
renderTooltip(drawContext, list, mouseX - getGuiLeft(), mouseY - getGuiTop());
drawContext.pop();
drawContext.drawTooltip(getTextRenderer(), list, mouseX - getGuiLeft(), mouseY - getGuiTop());
}
}

View file

@ -56,9 +56,6 @@ public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
super.drawForeground(drawContext, mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
Text text = Text.literal(PowerSystem.getLocalizedPowerNoSuffix(idsu.getEnergy()))
.append("/")
.append(PowerSystem.getLocalizedPowerNoSuffix(idsu.getMaxStoredPower()))
@ -66,7 +63,6 @@ public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
.append(PowerSystem.getDisplayPower().abbreviation);
drawCentredText(drawContext, text, 35, 0, 58, layer);
drawContext.pop();
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) idsu.getEnergy(), (int) idsu.getMaxStoredPower(), mouseX, mouseY, 0, layer);
}

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import reborncore.client.gui.builder.GuiBase;
@ -55,16 +56,16 @@ public class GuiLESU extends GuiBase<BuiltScreenHandler> {
protected void drawForeground(DrawContext drawContext, final int mouseX, final int mouseY) {
super.drawForeground(drawContext, mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
final MatrixStack matrices = drawContext.getMatrices();
matrices.push();
matrices.scale(0.6f, 0.6f, 1.0f);
drawCentredText(drawContext, Text.literal(PowerSystem.getLocalizedPowerNoSuffix( blockEntity.getEnergy()))
.append("/")
.append(PowerSystem.getLocalizedPowerNoSuffix(blockEntity.getMaxStoredPower()))
.append(" ")
.append(PowerSystem.getDisplayPower().abbreviation),
35, 0, 58, layer);
drawContext.pop();
matrices.pop();
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
}

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import reborncore.client.gui.builder.GuiBase;
@ -57,15 +58,16 @@ public class GuiMFE extends GuiBase<BuiltScreenHandler> {
final Layer layer = Layer.FOREGROUND;
if (!hideGuiElements()) {
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
MatrixStack matrices = drawContext.getMatrices();
matrices.push();
matrices.scale(0.6f, 0.6f, 1.0f);
drawCentredText(drawContext, Text.literal(PowerSystem.getLocalizedPowerNoSuffix(mfe.getEnergy()))
.append("/")
.append(PowerSystem.getLocalizedPower(mfe.getMaxStoredPower()))
, 35, 0, 58, layer);
drawContext.pop();
matrices.pop();
}
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) mfe.getEnergy(), (int) mfe.getMaxStoredPower(), mouseX, mouseY, 0, layer);

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import reborncore.client.gui.builder.GuiBase;
@ -55,11 +56,11 @@ public class GuiMFSU extends GuiBase<BuiltScreenHandler> {
protected void drawForeground(DrawContext drawContext, final int mouseX, final int mouseY) {
super.drawForeground(drawContext, mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
drawContext.push();
drawContext.scale(0.6f, 0.6f, 1.0f);
final MatrixStack matrices = drawContext.getMatrices();
matrices.push();
matrices.scale(0.6f, 0.6f, 1.0f);
drawCentredText(drawContext, Text.literal(PowerSystem.getLocalizedPowerNoSuffix(mfsu.getEnergy()) + "/" + PowerSystem.getLocalizedPower(mfsu.getMaxStoredPower())), 35, 0, 58, layer);
drawContext.pop();
matrices.pop();
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) mfsu.getEnergy(), (int) mfsu.getMaxStoredPower(), mouseX, mouseY, 0, layer);
}

View file

@ -83,10 +83,10 @@ public class GuiManual extends Screen {
int centerY = (height / 2) - guiHeight / 2;
drawContext.drawTexture(MANUAL_TEXTURE, centerX, centerY, 0, 0, guiWidth, guiHeight);
drawContext.drawText(textRenderer, text1, (float) ((width / 2) - textRenderer.getWidth(text1) / 2), centerY + 40, 4210752);
drawContext.drawText(textRenderer, text2, (float) ((width / 2) - textRenderer.getWidth(text2) / 2), centerY + 90, 4210752);
drawContext.drawText(textRenderer, text1, (width / 2) - textRenderer.getWidth(text1) / 2, centerY + 40, 4210752, false);
drawContext.drawText(textRenderer, text2, (width / 2) - textRenderer.getWidth(text2) / 2, centerY + 90, 4210752, false);
if (TechRebornConfig.allowManualRefund) {
drawContext.drawText(textRenderer, text3, (float) ((width / 2) - textRenderer.getWidth(text3) / 2), centerY + 140, 4210752);
drawContext.drawText(textRenderer, text3, (width / 2) - textRenderer.getWidth(text3) / 2, centerY + 140, 4210752, false);
}
super.render(drawContext, mouseX, mouseY, partialTicks);

View file

@ -66,19 +66,20 @@ public class GuiStorageUnit extends GuiBase<BuiltScreenHandler> {
int storedAmount = storageEntity.storedAmount;
if (storedAmount == 0 && !storageEntity.isLocked()) {
textRenderer.draw(drawContext, Text.translatable("techreborn.tooltip.unit.empty"), 10, 20, 4210752);
} else {
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.storage.store"), 10, 20, 4210752);
textRenderer.draw(drawContext, storageEntity.getDisplayedStack().getName(), 10, 30, 4210752);
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.storage.amount"), 10, 50, 4210752);
textRenderer.draw(drawContext, String.valueOf(storedAmount), 10, 60, 4210752);
drawContext.drawText(textRenderer, Text.translatable("techreborn.tooltip.unit.empty"), 10, 20, 4210752, false);
} else {
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.storage.store"), 10, 20, 4210752, false);
drawContext.drawText(textRenderer, storageEntity.getDisplayedStack().getName(), 10, 30, 4210752, false);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.storage.amount"), 10, 50, 4210752, false);
drawContext.drawText(textRenderer, String.valueOf(storedAmount), 10, 60, 4210752, false);
String percentFilled = String.valueOf((int) ((double) storedAmount / (double) storageEntity.getMaxCapacity() * 100));
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.unit.used").append(percentFilled + "%"), 10, 70, 4210752);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.unit.used").append(percentFilled + "%"), 10, 70, 4210752, false);
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680, false);
}
}

View file

@ -64,20 +64,20 @@ public class GuiTankUnit extends GuiBase<BuiltScreenHandler> {
FluidInstance fluid = tankEntity.getTank().getFluidInstance();
if (fluid.isEmpty()) {
textRenderer.draw(drawContext, Text.translatable("techreborn.tooltip.unit.empty"), 10, 20, 4210752);
drawContext.drawText(textRenderer, Text.translatable("techreborn.tooltip.unit.empty"), 10, 20, 4210752, false);
} else {
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.tank.type"), 10, 20, 4210752);
textRenderer.draw(drawContext, FluidUtils.getFluidName(fluid).replace("_", " "), 10, 30, 4210752);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.tank.type"), 10, 20, 4210752, false);
drawContext.drawText(textRenderer, FluidUtils.getFluidName(fluid).replace("_", " "), 10, 30, 4210752, false);
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.tank.amount"), 10, 50, 4210752);
textRenderer.draw(drawContext, fluid.getAmount().toString(), 10, 60, 4210752);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.tank.amount"), 10, 50, 4210752, false);
drawContext.drawText(textRenderer, fluid.getAmount().toString(), 10, 60, 4210752, false);
String percentFilled = String.valueOf((int) ((double) fluid.getAmount().getRawValue() / (double) tankEntity.getTank().getFluidValueCapacity().getRawValue() * 100));
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.unit.used").append(percentFilled + "%"), 10, 70, 4210752);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.unit.used").append(percentFilled + "%"), 10, 70, 4210752, false);
textRenderer.draw(drawContext, Text.translatable("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680);
drawContext.drawText(textRenderer, Text.translatable("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680, false);
}
}

View file

@ -89,7 +89,6 @@ class ExtractorRecipesProvider extends TechRebornRecipesProvider {
power 10
time 300
criterion getCriterionName(item), getCriterionConditions(item)
feature FeatureFlags.UPDATE_1_20
}
}
}
@ -138,7 +137,6 @@ class ExtractorRecipesProvider extends TechRebornRecipesProvider {
power 10
time 300
criterion getCriterionName(Items.CHERRY_LEAVES), getCriterionConditions(Items.CHERRY_LEAVES)
feature FeatureFlags.UPDATE_1_20
}
}

View file

@ -69,7 +69,6 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
power 40
time 200
fluidAmount 1000 // in millibuckets
feature FeatureFlags.UPDATE_1_20
}
offerIndustrialSawmillRecipe {
ingredients ItemTags.BAMBOO_BLOCKS
@ -77,7 +76,6 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
power 40
time 100
fluidAmount 500 // in millibuckets
feature FeatureFlags.UPDATE_1_20
}
[
(Items.ACACIA_STAIRS): Items.ACACIA_SLAB,
@ -114,7 +112,6 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
fluidAmount 250 // in millibuckets
source "stairs"
criterion getCriterionName(stairs), getCriterionConditions(stairs)
feature FeatureFlags.UPDATE_1_20
}
}
[
@ -152,7 +149,6 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
fluidAmount 250 // in millibuckets
source ((slab == Items.BAMBOO_MOSAIC_SLAB ? "mosaic_" : "") + "slab")
criterion getCriterionName(slab), getCriterionConditions(slab)
feature FeatureFlags.UPDATE_1_20
}
}
[

View file

@ -28,7 +28,7 @@ import com.google.common.collect.Maps;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.RecipeInputInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import reborncore.api.events.ItemCraftCallback;
@ -48,7 +48,7 @@ public final class PoweredCraftingHandler implements ItemCraftCallback {
}
@Override
public void onCraft(ItemStack stack, CraftingInventory craftingInventory, PlayerEntity playerEntity) {
public void onCraft(ItemStack stack, RecipeInputInventory craftingInventory, PlayerEntity playerEntity) {
if (stack.getItem() instanceof RcEnergyItem energyItem) {
long totalEnergy = IntStream.range(0, craftingInventory.size())
.mapToObj(craftingInventory::getStack)

View file

@ -35,7 +35,7 @@
"reborncore": "*",
"team_reborn_energy": ">=3.0.0",
"fabric-biome-api-v1": ">=3.0.0",
"minecraft": ">=1.19.4- <1.19.5-"
"minecraft": ">=1.20- <1.20.1-"
},
"accessWidener": "techreborn.accesswidener",
"authors": [