Tags Helper
This commit is contained in:
parent
1d206295b7
commit
b9962bd6a5
4 changed files with 41 additions and 30 deletions
|
@ -11,16 +11,14 @@ import net.minecraft.tag.Tag;
|
|||
import net.minecraft.tag.TagGroup;
|
||||
import net.minecraft.tag.TagGroupLoader;
|
||||
import net.minecraft.util.Identifier;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.util.TagHelper;
|
||||
|
||||
@Mixin(TagGroupLoader.class)
|
||||
public class TagGroupLoaderMixin {
|
||||
@Inject(method = "applyReload", at = @At(value = "HEAD"))
|
||||
private void onReload(Map<Identifier, Tag.Builder> tags, CallbackInfoReturnable<TagGroup<?>> info) {
|
||||
tags.forEach((id, builder) -> {
|
||||
if (id.toString().equals("minecraft:climbable")) {
|
||||
builder.add(new Identifier(BetterEnd.MOD_ID, "mossy_glowshroom_ladder"), "code");
|
||||
}
|
||||
TagHelper.apply(id, builder);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue