mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 06:18:00 +01:00
Include players in the debug box rendering and frustrum checks
This commit is contained in:
parent
2d68ff9ae9
commit
5e56f5101f
1 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,7 @@ import com.minelittlepony.MineLittlePony;
|
|||
import com.minelittlepony.ducks.IRenderPony;
|
||||
import com.minelittlepony.model.ModelWrapper;
|
||||
import com.minelittlepony.pony.data.IPony;
|
||||
import com.minelittlepony.render.DebugBoundingBoxRenderer;
|
||||
import com.minelittlepony.render.RenderPony;
|
||||
import com.minelittlepony.render.layer.LayerDJPon3Head;
|
||||
import com.minelittlepony.render.layer.LayerEntityOnPonyShoulder;
|
||||
|
@ -15,6 +16,7 @@ import com.minelittlepony.render.layer.LayerPonyCustomHead;
|
|||
import com.minelittlepony.render.layer.LayerPonyElytra;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.culling.ICamera;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.client.renderer.entity.layers.LayerArrow;
|
||||
|
@ -77,6 +79,18 @@ public class RenderPonyPlayer extends RenderPlayer implements IRenderPony<Abstra
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(AbstractClientPlayer entity, double xPosition, double yPosition, double zPosition, float yaw, float ticks) {
|
||||
super.doRender(entity, xPosition, yPosition, zPosition, yaw, ticks);
|
||||
|
||||
DebugBoundingBoxRenderer.instance.render(renderPony.getPony(entity), entity, ticks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender(AbstractClientPlayer entity, ICamera camera, double camX, double camY, double camZ) {
|
||||
return super.shouldRender(entity, renderPony.getFrustrum(entity, camera), camX, camY, camZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLivingLabel(AbstractClientPlayer entity, String name, double x, double y, double z, int maxDistance) {
|
||||
super.renderLivingLabel(entity, name, x, renderPony.getNamePlateYOffset(entity, y), z, maxDistance);
|
||||
|
|
Loading…
Reference in a new issue