Tag mixin & fixes
This commit is contained in:
parent
7316480289
commit
1d206295b7
116 changed files with 1669 additions and 802 deletions
|
@ -0,0 +1,26 @@
|
|||
package ru.betterend.mixin.common;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.tag.TagGroup;
|
||||
import net.minecraft.tag.TagGroupLoader;
|
||||
import net.minecraft.util.Identifier;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
||||
@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");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue