Skip to content

Commit

Permalink
Made custom spider eyes not need custom render layer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyuppo committed Nov 16, 2023
1 parent be6a7ed commit 96c770a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 39 deletions.
28 changes: 0 additions & 28 deletions src/main/java/com/github/nyuppo/client/render/ModRenderLayers.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
package com.github.nyuppo.mixin;

import com.github.nyuppo.MoreMobVariants;
import com.github.nyuppo.MoreMobVariantsClient;
import com.github.nyuppo.client.render.ModRenderLayers;
import com.github.nyuppo.config.Variants;
import com.github.nyuppo.variant.MobVariant;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.SpiderEntityRenderer;
import net.minecraft.client.render.entity.feature.EyesFeatureRenderer;
import net.minecraft.client.render.entity.feature.SpiderEyesFeatureRenderer;
import net.minecraft.client.render.entity.model.SpiderEntityModel;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
Expand All @@ -19,10 +12,7 @@
import net.minecraft.util.Identifier;
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.ModifyArg;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;

@Mixin(EyesFeatureRenderer.class)
Expand Down Expand Up @@ -50,7 +40,7 @@ private void mixinEyesFeatureTexture(Args args, MatrixStack matrices, VertexCons
String[] split = Variants.splitVariant(variant);

if (Variants.getVariant(EntityType.SPIDER, Identifier.of(split[0], split[1])).hasCustomEyes()) {
args.set(0, ModRenderLayers.getEyes(new Identifier(split[0], "textures/entity/spider/eyes/" + split[1] + ".png")));
args.set(0, RenderLayer.getEyes(new Identifier(split[0], "textures/entity/spider/eyes/" + split[1] + ".png")));
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 96c770a

Please sign in to comment.