Skip to content

Commit

Permalink
挪common,给neo加上
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyRespawnanchor committed Nov 24, 2024
1 parent 5dd6f74 commit 1cd144b
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
package org.ayamemc.ayame.client.handler;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Axis;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.ItemInHandRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.EntityType;
Expand All @@ -37,9 +34,6 @@
import net.minecraft.world.item.ItemStack;
import org.ayamemc.ayame.client.gui.screen.AyameScreen;
import org.ayamemc.ayame.client.gui.screen.ModelSelectMenuScreen;
import org.ayamemc.ayame.client.renderer.AyamePlayerHandRenderer;
import software.bernie.geckolib.model.GeoModel;
import software.bernie.geckolib.renderer.GeoItemRenderer;

public class ClientEventHandler {
public static final int TOOLTIP_BACKGROUND_COLOR = 0xCC_5f5f5f;
Expand Down Expand Up @@ -86,8 +80,7 @@ public static void renderCustomHandInHud(GuiGraphics guiGraphics, DeltaTracker t
}

private static void renderEntityInGui(LivingEntity entity, int x, int y, int size) {
Minecraft client = Minecraft.getInstance();
EntityRenderDispatcher dispatcher = client.getEntityRenderDispatcher();
EntityRenderDispatcher dispatcher = minecraft.getEntityRenderDispatcher();


com.mojang.blaze3d.vertex.PoseStack poseStack = new com.mojang.blaze3d.vertex.PoseStack();
Expand All @@ -96,7 +89,7 @@ private static void renderEntityInGui(LivingEntity entity, int x, int y, int siz
poseStack.scale(size, size, size);
poseStack.mulPose(Axis.ZP.rotationDegrees(180.0F));

dispatcher.render(entity, 0.0, 0.0, 0.0, 0.0F, 1.0F, poseStack, client.renderBuffers().bufferSource(), 15728880);
dispatcher.render(entity, 0.0, 0.0, 0.0, 0.0F, 1.0F, poseStack, minecraft.renderBuffers().bufferSource(), 15728880);
poseStack.popPose();
}
}

0 comments on commit 1cd144b

Please sign in to comment.