Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improv: boss cleanup and balancing #209

Open
wants to merge 23 commits into
base: 1.20.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e197c26
improv: initial rewrite of host eye projectile
bconlon1 Oct 30, 2024
d30bbd0
improv: host mimic animation and code naming
bconlon1 Oct 30, 2024
82819e2
improv: slider host mimic rewrite progress
bconlon1 Nov 5, 2024
bcb6d6b
update: aether jar
bconlon1 Nov 5, 2024
e489d54
improv: functional host mimic fight
bconlon1 Nov 6, 2024
4520cc7
improv: better host mimic avoidance and shooting
bconlon1 Nov 6, 2024
525ec10
feat: add sound events
bconlon1 Nov 6, 2024
dac072e
chore: remove todo
bconlon1 Nov 6, 2024
2cba29a
improv: begin labyrinth eye cleanup
bconlon1 Nov 7, 2024
42abb1e
improv: cog projectile progress
bconlon1 Nov 7, 2024
f6093bc
improv: fix cog motion and better rotation speeds
bconlon1 Nov 7, 2024
c555e92
improv: better labyrinth eye AI and cog targeting
bconlon1 Nov 9, 2024
e1920ce
improv: better cog visibility removal
bconlon1 Nov 9, 2024
ece5d9e
update: Aether 1.5.1
bconlon1 Nov 11, 2024
07ff63a
improv: begin sentry guardian cleanup
bconlon1 Nov 11, 2024
a4d3747
refactor: addAggro for mostDamageTargetGoal
bconlon1 Nov 11, 2024
8b3a6b8
improv: better sentry guardian behavior
bconlon1 Nov 12, 2024
6078b47
refactor: increase sentry guardian speed
bconlon1 Nov 12, 2024
285b3e0
refactor: decrease sentry guardian upwards movement
bconlon1 Nov 12, 2024
5ed92bd
refactor: adjust cog and labyrinth eye sizing
bconlon1 Jan 4, 2025
2372b34
refactor: allow host mimic to be damaged by all weapons
bconlon1 Jan 4, 2025
08a7fe8
refactor: increase sentry guardian fall speed and sentry spawn rate
bconlon1 Jan 4, 2025
93a9c31
refactor: host mimic runs away during beginning of fight
bconlon1 Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ sourceSets.main.resources {
dependencies {
implementation "net.neoforged:neoforge:${project.neoforge_version}"

// implementation "com.aetherteam.aether:aether:${project.aether_version}"
implementation "local:aether:${project.aether_version}"
implementation "com.aetherteam.aether:aether:${project.aether_version}"
// implementation "local:aether:${project.aether_version}"

implementation "com.aetherteam.nitrogen:nitrogen_internals:${project.nitrogen_version}"
implementation "com.aetherteam.cumulus:cumulus_menus:${project.cumulus_version}"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ neoforge_version=20.4.200
mappings=2023.12.31

# Dependencies
aether_version=1.20.4-1.5.0-neoforge
aether_version=1.20.4-1.5.1-neoforge
nitrogen_version=1.20.4-1.1.9-neoforge
cumulus_version=1.20.4-1.0.2-neoforge
curios_version=7.3.4
Expand Down
Binary file modified libs/aether-1.20.4-1.5.0-neoforge.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.4 2024-10-08T19:15:20.1292942 Sound Definitions
df30d82357e727e30abbd87c8196ed3bb33821af assets/aether_genesis/sounds.json
// 1.20.4 2024-11-06T10:17:38.1217774 Sound Definitions
96e0a61c71f62470ce732d690f8e8ffdf81697b9 assets/aether_genesis/sounds.json
65 changes: 65 additions & 0 deletions src/generated/resources/assets/aether_genesis/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
],
"subtitle": "subtitles.aether_genesis.entity.cog.break"
},
"entity.host_eye.collide": {
"sounds": [
"aether:entity/slider/collide"
],
"subtitle": "subtitles.aether_genesis.entity.host_eye.collide"
},
"entity.labyrinth_eye.cog_loss": {
"sounds": [
"aether_genesis:entity/labyrinth_eye/cog_loss"
Expand Down Expand Up @@ -79,6 +85,65 @@
],
"subtitle": "subtitles.aether_genesis.entity.sentry_guardian.spawn"
},
"entity.slider_host_mimic.ambient": {
"sounds": [
"ambient/cave/cave1",
"ambient/cave/cave2",
"ambient/cave/cave3",
"ambient/cave/cave4",
"ambient/cave/cave5",
"ambient/cave/cave6",
"ambient/cave/cave7",
"ambient/cave/cave8",
"ambient/cave/cave9",
"ambient/cave/cave10",
"ambient/cave/cave11",
"ambient/cave/cave12",
"ambient/cave/cave13",
"ambient/cave/cave14",
"ambient/cave/cave15",
"ambient/cave/cave16",
"ambient/cave/cave17",
"ambient/cave/cave18",
"ambient/cave/cave19"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.ambient"
},
"entity.slider_host_mimic.awaken": {
"sounds": [
"aether:entity/slider/awaken"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.awaken"
},
"entity.slider_host_mimic.death": {
"sounds": [
"aether:entity/slider/death"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.death"
},
"entity.slider_host_mimic.hurt": {
"sounds": [
"step/stone1",
"step/stone2",
"step/stone3",
"step/stone4",
"step/stone5",
"step/stone6"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.hurt"
},
"entity.slider_host_mimic.scare": {
"sounds": [
"aether_genesis:entity/tracking_golem/creepy_seen"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.scare"
},
"entity.slider_host_mimic.shoot": {
"sounds": [
"aether:entity/slider/awaken"
],
"subtitle": "subtitles.aether_genesis.entity.slider_host_mimic.shoot"
},
"entity.tempest.ambient": {
"sounds": [
"aether:entity/zephyr/call"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ public class GenesisSoundEvents {
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_TRACKING_GOLEM_SAY = register("entity.tracking_golem.say");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_TRACKING_GOLEM_CREEPY_SEEN = register("entity.tracking_golem.creepy_seen");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_AWAKEN = register("entity.slider_host_mimic.awaken");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_AMBIENT = register("entity.slider_host_mimic.ambient");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_SHOOT = register("entity.slider_host_mimic.shoot");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_SCARE = register("entity.slider_host_mimic.scare");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_HURT = register("entity.slider_host_mimic.hurt");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SLIDER_HOST_MIMIC_DEATH = register("entity.slider_host_mimic.death");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SENTRY_GUARDIAN_DEATH = register("entity.sentry_guardian.death");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SENTRY_GUARDIAN_SUMMON = register("entity.sentry_guardian.summon");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SENTRY_GUARDIAN_HIT = register("entity.sentry_guardian.hit");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_SENTRY_GUARDIAN_LIVING = register("entity.sentry_guardian.living");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_LABYRINTH_EYE_DEATH = register("entity.labyrinth_eye.death");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_LABYRINTH_EYE_COG_LOSS = register("entity.labyrinth_eye.cog_loss");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_LABYRINTH_EYE_MOVE = register("entity.labyrinth_eye.move");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_COG_BREAK = register("entity.cog.break");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_TEMPEST_AMBIENT = register("entity.tempest.ambient");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_TEMPEST_HURT = register("entity.tempest.hurt");
Expand All @@ -52,6 +56,10 @@ public class GenesisSoundEvents {
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_ZEPHYROO_HURT = register("entity.zephyroo.hurt");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_ZEPHYROO_DEATH = register("entity.zephyroo.death");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_ZEPHYROO_JUMP = register("entity.zephyroo.jump");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_LABYRINTH_EYE_MOVE = register("entity.labyrinth_eye.move");

public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_HOST_EYE_COLLIDE = register("entity.host_eye.collide");
public static final DeferredHolder<SoundEvent, SoundEvent> ENTITY_COG_BREAK = register("entity.cog.break");

public static final DeferredHolder<SoundEvent, SoundEvent> MUSIC_AETHER_NIGHT = register("music.aether_night");
public static final DeferredHolder<SoundEvent, SoundEvent> MUSIC_MINIBOSS = register("music.miniboss");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public void render(CogProjectile cog, float entityYaw, float partialTicks, PoseS
poseStack.pushPose();
float yRot = Mth.rotLerp(partialTicks, cog.yRotO, cog.getYRot());
float xRot = Mth.lerp(partialTicks, cog.xRotO, cog.getXRot());
poseStack.translate(1.0, 1.5, 1.0);
if (!cog.isLarge()) {
poseStack.scale(0.25F, 0.25F, 0.25F);
poseStack.translate(0.0, -0.75, 0.0);
if (cog.isLarge()) {
poseStack.scale(1.5F, 1.5F, 1.5F);
}
VertexConsumer vertexConsumer = buffer.getBuffer(RenderType.entityTranslucent(this.getTextureLocation(cog)));
this.cog.setupAnim(cog, 0.0F, 0.0F, cog.tickCount, yRot, xRot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,29 @@
import com.aetherteam.genesis.client.renderer.GenesisModelLayers;
import com.aetherteam.genesis.client.renderer.entity.model.HostEyeProjectileModel;
import com.aetherteam.genesis.entity.projectile.HostEyeProjectile;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;

public class HostEyeProjectileRenderer extends MobRenderer<HostEyeProjectile, HostEyeProjectileModel> {
public class HostEyeProjectileRenderer extends EntityRenderer<HostEyeProjectile> {
private static final ResourceLocation HOST_EYE_PROJECTILE_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/projectile/host_eye.png");
private final HostEyeProjectileModel eyeModel;

public HostEyeProjectileRenderer(EntityRendererProvider.Context context) {
super(context, new HostEyeProjectileModel(context.bakeLayer(GenesisModelLayers.HOST_EYE_PROJECTILE)), 0.5F);
super(context);
this.eyeModel = new HostEyeProjectileModel(context.bakeLayer(GenesisModelLayers.HOST_EYE_PROJECTILE));
}

@Override
public void render(HostEyeProjectile hostEye, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight) {
VertexConsumer vertexConsumer = buffer.getBuffer(RenderType.entityTranslucent(this.getTextureLocation(hostEye)));
this.eyeModel.renderToBuffer(poseStack, vertexConsumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
super.render(hostEye, entityYaw, partialTicks, poseStack, buffer, packedLight);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.aetherteam.genesis.AetherGenesis;
import com.aetherteam.genesis.client.renderer.GenesisModelLayers;
import com.aetherteam.genesis.client.renderer.entity.layers.HostMimicLayer;
import com.aetherteam.genesis.client.renderer.entity.layers.HostMimicGlowLayer;
import com.aetherteam.genesis.client.renderer.entity.model.SliderHostMimicModel;
import com.aetherteam.genesis.entity.monster.dungeon.boss.SliderHostMimic;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
Expand All @@ -11,11 +11,11 @@

public class HostMimicRenderer extends MobRenderer<SliderHostMimic, SliderHostMimicModel> {
private static final ResourceLocation HOST_MIMIC_ASLEEP_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/slider_host_mimic/slider_host_mimic_asleep.png");
private static final ResourceLocation HOST_MIMIC_AWAKE_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/slider_host_mimic/slider_host_mimic_critical.png");
private static final ResourceLocation HOST_MIMIC_AWAKE_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/slider_host_mimic/slider_host_mimic.png");

public HostMimicRenderer(EntityRendererProvider.Context context) {
super(context, new SliderHostMimicModel(context.bakeLayer(GenesisModelLayers.SLIDER_HOST_MIMIC)), 0.5F);
this.addLayer(new HostMimicLayer(this));
super(context, new SliderHostMimicModel(context.bakeLayer(GenesisModelLayers.SLIDER_HOST_MIMIC)), 1.25F);
this.addLayer(new HostMimicGlowLayer(this));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.aetherteam.genesis.AetherGenesis;
import com.aetherteam.genesis.client.renderer.GenesisModelLayers;
import com.aetherteam.genesis.client.renderer.entity.layers.LabyrinthEyeLayer;
import com.aetherteam.genesis.client.renderer.entity.layers.LabyrinthEyeGlowLayer;
import com.aetherteam.genesis.client.renderer.entity.model.LabyrinthEyeModel;
import com.aetherteam.genesis.entity.monster.dungeon.boss.LabyrinthEye;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
Expand All @@ -15,7 +15,7 @@ public class LabyrinthEyeRenderer extends MobRenderer<LabyrinthEye, LabyrinthEye

public LabyrinthEyeRenderer(EntityRendererProvider.Context context) {
super(context, new LabyrinthEyeModel(context.bakeLayer(GenesisModelLayers.LABYRINTH_EYE)), 0.5F);
this.addLayer(new LabyrinthEyeLayer(this));
this.addLayer(new LabyrinthEyeGlowLayer(this));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.aetherteam.genesis.AetherGenesis;
import com.aetherteam.genesis.client.renderer.GenesisModelLayers;
import com.aetherteam.genesis.client.renderer.entity.layers.SentryGuardianLayer;
import com.aetherteam.genesis.client.renderer.entity.layers.SentryGuardianGlowLayer;
import com.aetherteam.genesis.client.renderer.entity.model.SentryGuardianModel;
import com.aetherteam.genesis.entity.monster.dungeon.boss.SentryGuardian;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
Expand All @@ -11,15 +11,15 @@

public class SentryGuardianRenderer extends MobRenderer<SentryGuardian, SentryGuardianModel> {
private static final ResourceLocation SENTRY_GUARDIAN_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/sentry_guardian/sentry_guardian.png");
private static final ResourceLocation SENTRY_GUARDIAN_CRITICAL_GLOW = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/sentry_guardian/sentry_guardian_critical.png");
private static final ResourceLocation SENTRY_GUARDIAN_AWAKE_TEXTURE = new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/sentry_guardian/sentry_guardian_critical.png");

public SentryGuardianRenderer(EntityRendererProvider.Context context) {
super(context, new SentryGuardianModel(context.bakeLayer(GenesisModelLayers.SENTRY_GUARDIAN)), 0.5F);
this.addLayer(new SentryGuardianLayer(this));
this.addLayer(new SentryGuardianGlowLayer(this));
}

@Override
public ResourceLocation getTextureLocation(SentryGuardian sentryGuardian) {
return sentryGuardian.isAwake() ? SENTRY_GUARDIAN_CRITICAL_GLOW : SENTRY_GUARDIAN_TEXTURE;
return sentryGuardian.isAwake() ? SENTRY_GUARDIAN_AWAKE_TEXTURE : SENTRY_GUARDIAN_TEXTURE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;

public class HostMimicLayer extends EyesLayer<SliderHostMimic, SliderHostMimicModel> {
private static final RenderType HOST_MIMIC_CRITICAL_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/slider_host_mimic/slider_host_mimic_critical_glow.png"));
public class HostMimicGlowLayer extends EyesLayer<SliderHostMimic, SliderHostMimicModel> {
private static final RenderType HOST_MIMIC_CRITICAL_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/slider_host_mimic/slider_host_mimic_glow.png"));

public HostMimicLayer(RenderLayerParent<SliderHostMimic, SliderHostMimicModel> entityRenderer) {
public HostMimicGlowLayer(RenderLayerParent<SliderHostMimic, SliderHostMimicModel> entityRenderer) {
super(entityRenderer);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;

public class LabyrinthEyeLayer extends EyesLayer<LabyrinthEye, LabyrinthEyeModel> {
public class LabyrinthEyeGlowLayer extends EyesLayer<LabyrinthEye, LabyrinthEyeModel> {
private static final RenderType LABYRINTH_EYE_ASLEEP_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/labyrinth_eye/labyrinth_eye_sleep_glow.png"));
private static final RenderType LABYRINTH_EYE_AWAKE_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/labyrinth_eye/labyrinth_eye_awake_glow.png"));

public LabyrinthEyeLayer(RenderLayerParent<LabyrinthEye, LabyrinthEyeModel> entityRenderer) {
public LabyrinthEyeGlowLayer(RenderLayerParent<LabyrinthEye, LabyrinthEyeModel> entityRenderer) {
super(entityRenderer);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;

public class SentryGuardianLayer extends EyesLayer<SentryGuardian, SentryGuardianModel> {
public class SentryGuardianGlowLayer extends EyesLayer<SentryGuardian, SentryGuardianModel> {
private static final RenderType SENTRY_GUARDIAN_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/sentry_guardian/sentry_guardian_glow.png"));
private static final RenderType SENTRY_GUARDIAN_CRITICAL_GLOW = RenderType.eyes(new ResourceLocation(AetherGenesis.MODID, "textures/entity/mobs/sentry_guardian/sentry_guardian_critical_glow.png"));

public SentryGuardianLayer(RenderLayerParent<SentryGuardian, SentryGuardianModel> entityRenderer) {
public SentryGuardianGlowLayer(RenderLayerParent<SentryGuardian, SentryGuardianModel> entityRenderer) {
super(entityRenderer);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static LayerDefinition createBodyLayer() {

@Override
public void setupAnim(CogProjectile cog, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.cog.xRot += 0.15F;
this.cog.xRot += 0.01F;
this.cog.yRot = this.cog.xRot;
this.cog.zRot = this.cog.xRot;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static LayerDefinition createBodyLayer() {
MeshDefinition meshDefinition = new MeshDefinition();
PartDefinition partDefinition = meshDefinition.getRoot();

partDefinition.addOrReplaceChild("eye", CubeListBuilder.create().texOffs(0, 0).addBox(-5.5F, -11.0F, -5.5F, 11.0F, 11.0F, 11.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
partDefinition.addOrReplaceChild("eye", CubeListBuilder.create().texOffs(0, 0).addBox(-5.5F, -5.5F, -5.5F, 11.0F, 11.0F, 11.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 5.5F, 0.0F));

return LayerDefinition.create(meshDefinition, 64, 32);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import net.minecraft.client.model.geom.PartPose;
import net.minecraft.client.model.geom.builders.*;

import java.util.List;

public class LabyrinthEyeModel extends EntityModel<LabyrinthEye> {
private final ModelPart labyrinthEye;
private final ModelPart cogGroup;
Expand Down Expand Up @@ -472,23 +474,32 @@ public static LayerDefinition createBodyLayer() {

@Override
public void setupAnim(LabyrinthEye eye, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.cogGroup.zRot = ageInTicks * 4000;
this.cog.visible = eye.getHealth() >= 212.0F;
this.cog2.visible = eye.getHealth() >= 174.0F;
this.cog3.visible = eye.getHealth() >= 117.0F;
this.cog4.visible = eye.getHealth() >= 79.0F;
this.cog5.visible = eye.getHealth() >= 41.0F;
this.leftCog.visible = eye.getHealth() >= 231.0F;
this.cog6.visible = eye.getHealth() >= 60.0F;
this.cog7.visible = eye.getHealth() >= 155.0F;
this.cog8.visible = eye.getHealth() >= 193.0F;
this.cog9.visible = eye.getHealth() >= 98.0F;
this.cog10.visible = eye.getHealth() >= 22.0F;
this.rightCog.visible = eye.getHealth() >= 136.0F;
this.cogGroup.zRot = ageInTicks * 0.2F;
for (int i = 1; i < 13; i++) {
ModelPart part = this.cogParts().get(i - 1);
part.visible = i >= eye.getStage() && eye.isAlive();
}
}

@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
this.labyrinthEye.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}

public List<ModelPart> cogParts() {
return List.of(
this.rightCog,
this.cog4,
this.cog3,
this.cog,
this.cog2,
this.cog5,
this.leftCog,
this.cog9,
this.cog8,
this.cog6,
this.cog7,
this.cog10
);
}
}
Loading