TagLoader fixes

This commit is contained in:
Frank Bauer 2021-07-07 13:32:17 +02:00
parent 558b1db714
commit c7b49be379
2 changed files with 26 additions and 26 deletions

View file

@ -1,5 +1,7 @@
package ru.bclib.mixin.common;
import java.util.Map;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.Tag;
import net.minecraft.tags.TagLoader;
@ -9,8 +11,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import ru.bclib.util.TagHelper;
import java.util.Map;
@Mixin(TagLoader.class)
public class TagLoaderMixin {
@Shadow

View file

@ -58,11 +58,11 @@ public class TagHelper {
return builder;
}
public static Map<ResourceLocation, Tag.Builder> apply(String entry, Map<ResourceLocation, Tag.Builder> tagsMap) {
public static Map<ResourceLocation, Tag.Builder> apply(String directory, Map<ResourceLocation, Tag.Builder> tagsMap) {
Map<ResourceLocation, Set<ResourceLocation>> endTags = null;
if (entry.equals("block")) {
if ("tags/blocks".equals(directory)) {
endTags = TAGS_BLOCK;
} else if (entry.equals("item")) {
} else if ("tags/items".equals(directory)) {
endTags = TAGS_ITEM;
}
if (endTags != null) {