Skip to content

Commit

Permalink
feat(mixin): method for getting langId of CreativeModeTab
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Mar 28, 2022
1 parent 69bbc74 commit a0aea48
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
@@ -0,0 +1,7 @@
package org.auioc.mods.arnicalib.api.mixin.common;

public interface IMixinCreativeModeTab {

String getLangId();

}
@@ -0,0 +1,21 @@
package org.auioc.mods.arnicalib.mixin.common;

import org.auioc.mods.arnicalib.api.mixin.common.IMixinCreativeModeTab;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import net.minecraft.world.item.CreativeModeTab;

@Mixin(value = CreativeModeTab.class)
public class MixinCreativeModeTab implements IMixinCreativeModeTab {

@Shadow
@Final
private String langId;

@Override
public String getLangId() {
return this.langId;
}

}
1 change: 1 addition & 0 deletions src/main/resources/arnicalib.mixin.json
Expand Up @@ -6,6 +6,7 @@
"common.MixinPistonBaseBlock",
"common.MixinMobEffectInstance",
"common.MixinCommandSourceStack",
"common.MixinCreativeModeTab",
"server.MixinServerLifecycleHooks",
"server.MixinLootContext",
"server.MixinServerPlayer",
Expand Down

0 comments on commit a0aea48

Please sign in to comment.