blob: 12f1cdc61f1081d9501d6d4ae6fc1a69b008d245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package at.hannibal2.skyhanni.mixins.transformers;
import at.hannibal2.skyhanni.data.EntityData;
import net.minecraft.entity.Entity;
import net.minecraft.util.ChatComponentText;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(Entity.class)
public abstract class MixinEntity {
@ModifyVariable(
method = "getDisplayName",
at = @At(value = "INVOKE", target = "Lnet/minecraft/util/ChatStyle;setInsertion(Ljava/lang/String;)Lnet/minecraft/util/ChatStyle;", shift = At.Shift.AFTER)
)
public ChatComponentText getDisplayName(ChatComponentText value) {
return EntityData.getDisplayName((Entity) (Object) this, value);
}
}
|