mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-23 04:57:58 +01:00
Fixed GL errors when unicorns hold enchanted items
This commit is contained in:
parent
937e6a2af6
commit
a40bb7fa02
1 changed files with 6 additions and 8 deletions
|
@ -4,6 +4,7 @@ import com.minelittlepony.client.render.LevitatingItemRenderer;
|
||||||
|
|
||||||
import net.minecraft.client.render.item.ItemRenderer;
|
import net.minecraft.client.render.item.ItemRenderer;
|
||||||
import net.minecraft.client.render.model.BakedModel;
|
import net.minecraft.client.render.model.BakedModel;
|
||||||
|
import net.minecraft.client.texture.TextureManager;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.resource.SynchronousResourceReloadListener;
|
import net.minecraft.resource.SynchronousResourceReloadListener;
|
||||||
|
|
||||||
|
@ -24,15 +25,12 @@ public abstract class MixinItemRenderer implements SynchronousResourceReloadList
|
||||||
LevitatingItemRenderer.enableItemGlowRenderProfile();
|
LevitatingItemRenderer.enableItemGlowRenderProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "renderItemAndGlow("
|
@Inject(method = "Lnet/minecraft/client/render/item/ItemRenderer;renderGlint("
|
||||||
+ "Lnet/minecraft/item/ItemStack;"
|
|
||||||
+ "Lnet/minecraft/client/render/model/BakedModel;)V",
|
|
||||||
at = @At(value = "INVOKE",
|
|
||||||
target = "Lnet/minecraft/client/render/item/ItemRenderer;renderGlint("
|
|
||||||
+ "Lnet/minecraft/client/texture/TextureManager;"
|
+ "Lnet/minecraft/client/texture/TextureManager;"
|
||||||
+ "Ljava/lang/Runnable;I)V"),
|
+ "Ljava/lang/Runnable;I)V",
|
||||||
cancellable = true)
|
at = @At("HEAD"),
|
||||||
private void beforeRenderEffect(ItemStack stack, BakedModel model, CallbackInfo info) {
|
cancellable = true)
|
||||||
|
private static void onRenderGlint(TextureManager manager, Runnable task, int i, CallbackInfo info) {
|
||||||
if (LevitatingItemRenderer.usesTransparency()) {
|
if (LevitatingItemRenderer.usesTransparency()) {
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue