use of net.minecraft.entity.passive.SquidEntity in project meteor-client by MeteorDevelopment.
the class EntityTooltipComponent method renderEntity.
protected void renderEntity(MatrixStack matrices, int x, int y) {
if (mc.player == null)
return;
float size = 24;
if (Math.max(entity.getWidth(), entity.getHeight()) > 1.0) {
size /= Math.max(entity.getWidth(), entity.getHeight());
}
DiffuseLighting.disableGuiDepthLighting();
matrices.push();
int yOffset = 16;
if (entity instanceof SquidEntity) {
size = 16;
yOffset = 2;
}
matrices.translate(x + 10, y + yOffset, 1050);
matrices.scale(1f, 1f, -1);
matrices.translate(0, 0, 1000);
matrices.scale(size, size, size);
Quaternion quaternion = Vec3f.POSITIVE_Z.getDegreesQuaternion(180.f);
Quaternion quaternion2 = Vec3f.POSITIVE_X.getDegreesQuaternion(-10.f);
quaternion.hamiltonProduct(quaternion2);
matrices.multiply(quaternion);
setupAngles();
EntityRenderDispatcher entityRenderDispatcher = mc.getEntityRenderDispatcher();
quaternion2.conjugate();
entityRenderDispatcher.setRotation(quaternion2);
entityRenderDispatcher.setRenderShadows(false);
VertexConsumerProvider.Immediate immediate = mc.getBufferBuilders().getEntityVertexConsumers();
entity.age = mc.player.age;
entity.setCustomNameVisible(false);
entityRenderDispatcher.render(entity, 0, 0, 0, 0.f, 1.f, matrices, immediate, 15728880);
immediate.draw();
entityRenderDispatcher.setRenderShadows(true);
matrices.pop();
DiffuseLighting.enableGuiDepthLighting();
}
use of net.minecraft.entity.passive.SquidEntity in project Client by MatHax.
the class EntityTooltipComponent method renderEntity.
protected void renderEntity(MatrixStack matrices, int x, int y) {
if (mc.player == null)
return;
float size = 24;
if (Math.max(entity.getWidth(), entity.getHeight()) > 1.0)
size /= Math.max(entity.getWidth(), entity.getHeight());
DiffuseLighting.disableGuiDepthLighting();
matrices.push();
int yOffset = 16;
if (entity instanceof SquidEntity) {
size = 16;
yOffset = 2;
}
matrices.translate(x + 10, y + yOffset, 1050);
matrices.scale(1f, 1f, -1);
matrices.translate(0, 0, 1000);
matrices.scale(size, size, size);
Quaternion quaternion = Vec3f.POSITIVE_Z.getDegreesQuaternion(180.f);
Quaternion quaternion2 = Vec3f.POSITIVE_X.getDegreesQuaternion(-10.f);
quaternion.hamiltonProduct(quaternion2);
matrices.multiply(quaternion);
setupAngles();
EntityRenderDispatcher entityRenderDispatcher = mc.getEntityRenderDispatcher();
quaternion2.conjugate();
entityRenderDispatcher.setRotation(quaternion2);
entityRenderDispatcher.setRenderShadows(false);
VertexConsumerProvider.Immediate immediate = mc.getBufferBuilders().getEntityVertexConsumers();
entity.age = mc.player.age;
entity.setCustomNameVisible(false);
entityRenderDispatcher.render(entity, 0, 0, 0, 0.f, 1.f, matrices, immediate, 15728880);
immediate.draw();
entityRenderDispatcher.setRenderShadows(true);
matrices.pop();
DiffuseLighting.enableGuiDepthLighting();
}
use of net.minecraft.entity.passive.SquidEntity in project BudschieMorphMod by Budschie.
the class SquidSynchronizer method applyToMorphEntity.
@Override
public void applyToMorphEntity(Entity morphEntity, PlayerEntity player) {
SquidEntity squid = (SquidEntity) morphEntity;
squid.lastTentacleAngle = squid.tentacleAngle;
squid.tentacleAngle = MathHelper.abs(MathHelper.sin(squid.squidRotation)) * (float) Math.PI * 0.25F;
squid.prevSquidRotation = squid.squidRotation;
squid.squidRotation = (float) Math.sin(System.currentTimeMillis() / 250.0);
Vector3d squidPitchYaw = Vector3d.fromPitchYaw(player.getPitchYaw());
squid.prevSquidPitch = squid.squidPitch;
squid.prevSquidYaw = squid.squidYaw;
squid.squidPitch = -90;
squid.squidYaw = (float) squidPitchYaw.y;
}
Aggregations