diff --git a/src/main/java/org/dimdev/dimdoors/criteria/TagBlockBreakCriteria.java b/src/main/java/org/dimdev/dimdoors/criteria/TagBlockBreakCriteria.java index 8d124730..d3e6f5ac 100644 --- a/src/main/java/org/dimdev/dimdoors/criteria/TagBlockBreakCriteria.java +++ b/src/main/java/org/dimdev/dimdoors/criteria/TagBlockBreakCriteria.java @@ -4,6 +4,7 @@ import java.util.Objects; import com.google.gson.JsonObject; +import net.fabricmc.fabric.api.tag.TagRegistry; import net.minecraft.advancement.criterion.AbstractCriterion; import net.minecraft.advancement.criterion.AbstractCriterionConditions; import net.minecraft.block.Block; @@ -14,14 +15,12 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; -import net.fabricmc.fabric.api.tag.TagFactory; - public class TagBlockBreakCriteria extends AbstractCriterion { public static final Identifier ID = new Identifier("dimdoors", "tag_block_break"); @Override protected Conditions conditionsFromJson(JsonObject obj, EntityPredicate.Extended playerPredicate, AdvancementEntityPredicateDeserializer predicateDeserializer) { - return new Conditions(playerPredicate, TagFactory.BLOCK.create(Identifier.tryParse(obj.get("tag").getAsString()))); + return new Conditions(playerPredicate, TagRegistry.block(Identifier.tryParse(obj.get("tag").getAsString()))); } public void trigger(ServerPlayerEntity player, Block block) {