Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Sep 26, 2024
1 parent 83c4725 commit 3a1c0d8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
3 changes: 0 additions & 3 deletions enderio-base/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ logoFile="logo.png"
[[mixins]]
config="enderiobase.mixins.json"

[[mixins]]
config="enderio-machines.mixins.json"

[[dependencies.enderio_base]]
modId="minecraft"
type="required"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import net.minecraft.core.HolderLookup;
import net.minecraft.core.component.DataComponentMap;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
Expand Down Expand Up @@ -297,17 +296,6 @@ protected void consumeInputs(AlloySmeltingRecipe recipe) {
}
}

@Nullable
@Override
protected RecipeHolder<AlloySmeltingRecipe> loadRecipe(ResourceLocation id) {
//noinspection unchecked
return (RecipeHolder<AlloySmeltingRecipe>) level
.getRecipeManager()
.byKey(id)
.filter(recipe -> recipe.value().getType() == MachineRecipes.ALLOY_SMELTING.type().get())
.orElse(null);
}

@Override
public void deserializeNBT(HolderLookup.Provider lookupProvider, CompoundTag nbt) {
super.deserializeNBT(lookupProvider, nbt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public class AlloySmeltingRecipe implements MachineRecipe<AlloySmeltingRecipe.In
private final ItemStack output;
private final int energy;
private final float experience;
private final boolean smelting;
private final boolean isSmelting;

public AlloySmeltingRecipe(List<SizedIngredient> inputs, ItemStack output, int energy, float experience, boolean smelting) {
public AlloySmeltingRecipe(List<SizedIngredient> inputs, ItemStack output, int energy, float experience, boolean isSmelting) {
this.inputs = inputs;
this.output = output;
this.energy = energy;
this.experience = experience;
this.smelting = smelting;
this.isSmelting = isSmelting;
}

public AlloySmeltingRecipe(List<SizedIngredient> inputs, ItemStack output, int energy, float experience) {
Expand All @@ -56,7 +56,7 @@ public float experience() {
}

public boolean isSmelting() {
return smelting;
return isSmelting;
}

@Override
Expand Down Expand Up @@ -109,7 +109,7 @@ public boolean matches(Input recipeInput, Level level) {
@Override
public List<OutputStack> craft(Input container, RegistryAccess registryAccess) {
ItemStack outputStack = output.copy();
if (smelting) {
if (isSmelting) {
outputStack.setCount(container.inputsConsumed);
}
return List.of(OutputStack.of(outputStack));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ description="The machines module for Ender IO"
displayURL="https://enderio.com/"
logoFile="logo.png"

[[mixins]]
config="enderio-machines.mixins.json"

[[dependencies.enderio_machines]]
modId="minecraft"
type="required"
Expand Down

0 comments on commit 3a1c0d8

Please sign in to comment.