blob: 7535b6704522a214cf57c2ddee8b17d24ef78a71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.dulkirfabric.mixin.render;
import com.dulkirfabric.util.render.GlowingEntityInterface;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.Entity;
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;
@Mixin(MinecraftClient.class)
public class MinecraftClientMixin {
@Inject(method = "hasOutline(Lnet/minecraft/entity/Entity;)Z", at = @At("HEAD"), cancellable = true)
public void outlineCheck(Entity entity, CallbackInfoReturnable<Boolean> cir) {
if (entity instanceof GlowingEntityInterface gEntity) {
if (gEntity.shouldDulkirEntityGlow()) {
cir.setReturnValue(true);
}
}
}
}
|