Skip to content

Commit

Permalink
Better EntityESP fixes + extra mobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonk9043 committed Aug 4, 2024
1 parent 4a9a66c commit 977c016
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 59 deletions.
15 changes: 15 additions & 0 deletions src/main/java/net/aoba/mixin/interfaces/IAnimalModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package net.aoba.mixin.interfaces;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.AnimalModel;

@Mixin(AnimalModel.class)
public interface IAnimalModel {
@Invoker("getHeadParts")
Iterable<ModelPart> invokeGetHeadParts();

@Invoker("getBodyParts")
Iterable<ModelPart> invokeGetBodyParts();
}
33 changes: 33 additions & 0 deletions src/main/java/net/aoba/mixin/interfaces/ILlamaEntityModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package net.aoba.mixin.interfaces;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.LlamaEntityModel;

@Mixin(LlamaEntityModel.class)
public interface ILlamaEntityModel {
@Accessor("head")
ModelPart getHead();

@Accessor("body")
ModelPart getBody();

@Accessor("rightHindLeg")
ModelPart getRightHindLeg();

@Accessor("leftHindLeg")
ModelPart getLeftHindLeg();

@Accessor("rightFrontLeg")
ModelPart getRightFrontLeg();

@Accessor("leftFrontLeg")
ModelPart getLeftFrontLeg();

@Accessor("rightChest")
ModelPart getRightChest();

@Accessor("leftChest")
ModelPart getLeftChest();
}
45 changes: 45 additions & 0 deletions src/main/java/net/aoba/mixin/interfaces/IRabbitEntityModel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package net.aoba.mixin.interfaces;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.entity.model.RabbitEntityModel;

@Mixin(RabbitEntityModel.class)
public interface IRabbitEntityModel {
@Accessor("leftHindLeg")
ModelPart getLeftHindLeg();

@Accessor("rightHindLeg")
ModelPart getRightHindLeg();

@Accessor("leftHaunch")
ModelPart getLeftHaunch();

@Accessor("rightHaunch")
ModelPart getRightHaunch();

@Accessor("body")
ModelPart getBody();

@Accessor("leftFrontLeg")
ModelPart getLeftFrontLeg();

@Accessor("rightFrontLeg")
ModelPart getRightFrontLeg();

@Accessor("head")
ModelPart getHead();

@Accessor("rightEar")
ModelPart getRightEar();

@Accessor("leftEar")
ModelPart getLeftEar();

@Accessor("tail")
ModelPart getTail();

@Accessor("nose")
ModelPart getNose();
}
6 changes: 2 additions & 4 deletions src/main/java/net/aoba/module/modules/render/EntityESP.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ public void OnRender(Render3DEvent event) {
float partialTicks = event.GetPartialTicks();

for (Entity entity : MC.world.getEntities()) {


if (entity instanceof LivingEntity && !(entity instanceof PlayerEntity)) {
double interpolatedX = MathHelper.lerp(partialTicks, entity.prevX, entity.getX());
double interpolatedY = MathHelper.lerp(partialTicks, entity.prevY, entity.getY());
Expand All @@ -105,8 +103,8 @@ public void OnRender(Render3DEvent event) {

Color color = getColorForEntity(entity);
if (color != null) {
//Render3D.drawEntityModel(matrixStack, entity, color, lineThickness.getValue());
Render3D.draw3DBox(matrixStack, boundingBox, color, lineThickness.getValue());
Render3D.drawEntityModel(matrixStack, partialTicks, entity, color, lineThickness.getValue());
//Render3D.draw3DBox(matrixStack, boundingBox, color, lineThickness.getValue());
}
}
}
Expand Down
Loading

0 comments on commit 977c016

Please sign in to comment.