diff --git a/gradle.properties b/gradle.properties index a6a4f08..faf42f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/versions.html -minecraft_version=24w44a -yarn_mappings=24w44a+build.1 +minecraft_version=24w46a +yarn_mappings=24w46a+build.1 loader_version=0.16.9 # Mod Properties diff --git a/src/main/java/com/ishland/vmp/mixins/general/ingredient_matching/MixinIngredient.java b/src/main/java/com/ishland/vmp/mixins/general/ingredient_matching/MixinIngredient.java deleted file mode 100644 index 7bada6e..0000000 --- a/src/main/java/com/ishland/vmp/mixins/general/ingredient_matching/MixinIngredient.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ishland.vmp.mixins.general.ingredient_matching; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.Ingredient; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.entry.RegistryEntryList; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Overwrite; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.*; -import java.util.stream.Collectors; - -@Mixin(Ingredient.class) -public abstract class MixinIngredient { - - @Shadow - @Final - private RegistryEntryList entries; - - @Shadow public abstract List> getMatchingItems(); - - @Unique - private Set> matchingItems = null; - - @Unique - private boolean isEmptyMatch = false; - - /** - * @author ishland - * @reason optimize test() - */ - @Overwrite - public boolean test(@Nullable ItemStack itemStack) { - if (itemStack == null) { - return false; - } else { - Set> matchingItems = this.matchingItems; - boolean isEmptyMatch = this.isEmptyMatch; - if (matchingItems == null) { - matchingItems = this.matchingItems = new HashSet<>(this.getMatchingItems()); - isEmptyMatch = this.isEmptyMatch = this.matchingItems.isEmpty(); - } - if (itemStack.isEmpty()) { - return isEmptyMatch; - } - return matchingItems.contains(itemStack.getItem().getRegistryEntry()); - } - } - -} diff --git a/src/main/resources/vmp.mixins.json b/src/main/resources/vmp.mixins.json index af932a9..99b67ca 100644 --- a/src/main/resources/vmp.mixins.json +++ b/src/main/resources/vmp.mixins.json @@ -32,7 +32,6 @@ "general.biome_access.MixinBiomeAccess", "general.biome_access.fast_chunk_access.MixinWorldView", "general.collections.MixinTypeFilterableList", - "general.ingredient_matching.MixinIngredient", "general.no_locking.MixinPalettedContainer", "general.spawn_density_cap.MixinSpawnDensityCapperDensityCap", "networking.avoid_deadlocks.MixinClientConnection",