Skip to content

Commit 85dfbf0

Browse files
committed
Fixed simple error
1 parent c6b1b4f commit 85dfbf0

File tree

5 files changed

+6
-131
lines changed

5 files changed

+6
-131
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Disable autocrlf on generated files, they always generate with LF
22
# Add any extra files or paths here to make git stop saying they
33
# are changed when only line endings change.
4+
* text=auto
45
text eol=crlf
56
src/generated/**/.cache/cache text eol=lf
67
src/generated/**/*.json text eol=lf

enderio-base/src/main/java/com/enderio/base/common/recipe/EnderIngredient.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import com.google.gson.JsonObject;
44
import net.minecraft.network.FriendlyByteBuf;
5-
import net.minecraft.tags.Tag;
5+
import net.minecraft.tags.TagKey;
66
import net.minecraft.world.item.Item;
77
import net.minecraft.world.item.ItemStack;
88
import net.minecraft.world.item.crafting.Ingredient;
99
import net.minecraft.world.level.ItemLike;
10-
import net.minecraft.world.level.block.Block;
1110

1211
import javax.annotation.Nullable;
1312
import java.util.Arrays;
@@ -45,11 +44,11 @@ public static EnderIngredient of(int count, Stream<ItemStack> stacks) {
4544
return new EnderIngredient(Ingredient.of(stacks), count);
4645
}
4746

48-
public static EnderIngredient of(Tag<Item> tag) {
47+
public static EnderIngredient of(TagKey<Item> tag) {
4948
return of(1, tag);
5049
}
5150

52-
public static EnderIngredient of(int count, Tag<Item> tag) {
51+
public static EnderIngredient of(int count, TagKey<Item> tag) {
5352
return new EnderIngredient(Ingredient.fromValues(Stream.of(new Ingredient.TagValue(tag))), count);
5453
}
5554

enderio-machines/src/main/java/com/enderio/machines/common/blockentity/base/PoweredCraftingMachineEntity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.enderio.base.common.util.UseOnly;
66
import com.enderio.machines.common.MachineTier;
77
import com.enderio.machines.common.block.ProgressMachineBlock;
8-
import com.enderio.machines.common.recipe.MachineRecipe;
8+
import com.enderio.machines.common.recipe.IMachineRecipe;
99
import net.minecraft.core.BlockPos;
1010
import net.minecraft.nbt.CompoundTag;
1111
import net.minecraft.resources.ResourceLocation;
@@ -120,7 +120,7 @@ protected boolean canSelectRecipe() {
120120
* Get the cost of crafting this recipe
121121
*/
122122
protected int getEnergyCost(R recipe) {
123-
if (recipe instanceof MachineRecipe<?,?> machineRecipe) {
123+
if (recipe instanceof IMachineRecipe<?,?> machineRecipe) {
124124
return machineRecipe.getEnergyCost();
125125
}
126126
throw new NotImplementedException("Machine must implement getEnergyCost for types not implementing MachineRecipe");

enderio-machines/src/main/java/com/enderio/machines/common/recipe/MachineRecipe.java

-45
This file was deleted.

enderio-machines/src/main/java/com/enderio/machines/datagen/recipe/RecipeResult.java

-80
This file was deleted.

0 commit comments

Comments
 (0)