diff --git a/common/src/main/java/net/cmr/jurassicrevived/CommonClientClass.java b/common/src/main/java/net/cmr/jurassicrevived/CommonClientClass.java index f646fcf..778ff2a 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/CommonClientClass.java +++ b/common/src/main/java/net/cmr/jurassicrevived/CommonClientClass.java @@ -116,6 +116,8 @@ public class CommonClientClass { EntityRendererRegistry.register(ModEntities.MUSSASAURUS, MussasaurusRenderer::new); EntityRendererRegistry.register(ModEntities.THESCELOSAURUS, ThescelosaurusRenderer::new); EntityRendererRegistry.register(ModEntities.COELACANTH, CoelacanthRenderer::new); + EntityRendererRegistry.register(ModEntities.MAWSONIA, MawsoniaRenderer::new); + EntityRendererRegistry.register(ModEntities.ALLIGATOR_GAR, AlligatorGarRenderer::new); if (Platform.isFabric()) { registerSpawnEggColors(); diff --git a/common/src/main/java/net/cmr/jurassicrevived/Constants.java b/common/src/main/java/net/cmr/jurassicrevived/Constants.java index a8c3eb7..3fab5a7 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/Constants.java +++ b/common/src/main/java/net/cmr/jurassicrevived/Constants.java @@ -11,7 +11,7 @@ public class Constants public static final String MOD_NAME = "JurassicRevived"; public static final Logger LOG = LoggerFactory.getLogger(MOD_NAME); - public static final boolean DEBUG_SIZES = false; + public static final boolean DEBUG_SIZES = true; public static ResourceLocation rl(String path) { //? if >1.20.1 { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/ModEntities.java b/common/src/main/java/net/cmr/jurassicrevived/entity/ModEntities.java index 6855201..66acefd 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/ModEntities.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/ModEntities.java @@ -355,6 +355,14 @@ public class ModEntities { ENTITIES.register("coelacanth", () -> EntityType.Builder.of(CoelacanthEntity::new, MobCategory.CREATURE) .sized(1.3f, 1.8f).build("coelacanth")); + public static final RegistrySupplier> MAWSONIA = + ENTITIES.register("mawsonia", () -> EntityType.Builder.of(MawsoniaEntity::new, MobCategory.CREATURE) + .sized(1.3f, 1.8f).build("mawsonia")); + + public static final RegistrySupplier> ALLIGATOR_GAR = + ENTITIES.register("alligator_gar", () -> EntityType.Builder.of(AlligatorGarEntity::new, MobCategory.CREATURE) + .sized(1.3f, 1.8f).build("alligator_gar")); + public static void registerAttributes() { EntityAttributeRegistry.register(APATOSAURUS, ApatosaurusEntity::createAttributes); EntityAttributeRegistry.register(ALBERTOSAURUS, AlbertosaurusEntity::createAttributes); @@ -437,6 +445,8 @@ public class ModEntities { EntityAttributeRegistry.register(MUSSASAURUS, MussasaurusEntity::createAttributes); EntityAttributeRegistry.register(THESCELOSAURUS, ThescelosaurusEntity::createAttributes); EntityAttributeRegistry.register(COELACANTH, CoelacanthEntity::createAttributes); + EntityAttributeRegistry.register(MAWSONIA, MawsoniaEntity::createAttributes); + EntityAttributeRegistry.register(ALLIGATOR_GAR, AlligatorGarEntity::createAttributes); } public static void registerSpawnPlacements() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/ai/DinoEntityBase.java b/common/src/main/java/net/cmr/jurassicrevived/entity/ai/DinoEntityBase.java index b16d20f..de5c22c 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/ai/DinoEntityBase.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/ai/DinoEntityBase.java @@ -35,9 +35,20 @@ public abstract class DinoEntityBase extends Animal { public float liveDebugWidth = -1.0F; public float liveDebugHeight = -1.0F; + public float liveDebugScale = -1.0F; + + public final float getDinoScale() { + // If debug is active, intercept the scale + if (Constants.DEBUG_SIZES && liveDebugScale > 0) { + return liveDebugScale; + } + // Otherwise, ask the specific dinosaur what its scale should be + return this.getLiveDinoScale(); + } - public float getDinoScale() { - return 1.0F; + // 2. The Hook: Subclasses will override this instead of getDinoScale() + public float getLiveDinoScale() { + return 1.0F; // Default base scale } @Override @@ -205,14 +216,12 @@ public abstract class DinoEntityBase extends Animal { } else if (hand == InteractionHand.OFF_HAND) { liveDebugHeight += adjustment; // Off hand edits HEIGHT } - - // INSTANT VISUAL UPDATE (Works because mobInteract is client+server) this.refreshDimensions(); if (!this.level().isClientSide) { String action = player.isShiftKeyDown() ? "§c[-] SHRUNK" : "§a[+] GREW"; String dimension = hand == InteractionHand.MAIN_HAND ? "WIDTH" : "HEIGHT"; - String dinoName = net.minecraft.world.entity.EntityType.getKey(this.getType()).getPath(); + String dinoName = EntityType.getKey(this.getType()).getPath(); player.sendSystemMessage(Component.literal(action + " " + dimension + "§f: " + dinoName + " -> §e.sized(" + String.format("%.1f", liveDebugWidth) + "F, " + @@ -222,6 +231,33 @@ public abstract class DinoEntityBase extends Animal { } // --- END LIVE HITBOX TUNER --- + + // --- LIVE SCALE TUNER --- + if (Constants.DEBUG_SIZES && stack.is(Items.BONE)) { + if (liveDebugScale < 0) { + liveDebugScale = 1.0F; + } + + float adjustment = player.isShiftKeyDown() ? -0.1f : 0.1f; + liveDebugScale += adjustment; + + if (liveDebugScale < 0.1F) { + liveDebugScale = 0.1F; + } + + this.refreshDimensions(); + + if (!this.level().isClientSide) { + String action = player.isShiftKeyDown() ? "§cShrunk" : "§aGrown"; + String dinoName = EntityType.getKey(this.getType()).getPath(); + player.sendSystemMessage(Component.literal(action + " SCALE§f: " + dinoName + + " -> §e" + String.format("%.1f", liveDebugScale) + "x")); + + } + return InteractionResult.SUCCESS; + } + // --- END LIVE SCALE TUNER --- + if (this.isFood(stack)) { if (!this.level().isClientSide) { feedDino(player, stack); diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AchillobatorRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AchillobatorRenderer.java index 6e26251..71d660b 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AchillobatorRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AchillobatorRenderer.java @@ -16,7 +16,7 @@ public class AchillobatorRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, AchillobatorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlbertosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlbertosaurusRenderer.java index b839a96..670fa2e 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlbertosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlbertosaurusRenderer.java @@ -16,7 +16,7 @@ public class AlbertosaurusRenderer extends GeoEntityRenderer { + + private static final Map LOCATION_BY_VARIANT = + Util.make(Maps.newEnumMap(AlligatorGarVariant.class), map -> { + map.put(AlligatorGarVariant.MALE, Constants.rl("textures/entity/alligator_gar.png")); + map.put(AlligatorGarVariant.FEMALE, Constants.rl("textures/entity/alligator_gar_female.png")); + }); + + // Model-local "currently applied" offsets; cleared before each entity render + private float[] appliedYaw = null; + private float[] appliedRoll = null; + + @Override + public ResourceLocation getModelResource(AlligatorGarEntity animatable) { + return Constants.rl("geo/alligator_gar.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(AlligatorGarEntity animatable) { + return LOCATION_BY_VARIANT.get(animatable.getVariant()); + } + + @Override + public ResourceLocation getAnimationResource(AlligatorGarEntity animatable) { + return Constants.rl("animations/alligator_gar.animation.json"); + } + + @Override + public void setCustomAnimations(AlligatorGarEntity entity, long id, AnimationState state) { + super.setCustomAnimations(entity, id, state); + + String[] tailBones = { "BodySection3", "TailSection1", "TailSection2", "TailSection3", "TailSection5", "TailSection4" }; + int n = tailBones.length; + + if (appliedYaw == null || appliedYaw.length != n) { + appliedYaw = new float[n]; + appliedRoll = new float[n]; + } + + // 1) Clear previous offsets (from the last entity rendered with this model instance) + for (int i = 0; i < n; i++) { + if (appliedYaw[i] == 0.0f && appliedRoll[i] == 0.0f) continue; + GeoBone bone = (GeoBone) getAnimationProcessor().getBone(tailBones[i]); + if (bone == null) continue; + if (appliedYaw[i] != 0.0f) bone.setRotY(bone.getRotY() - appliedYaw[i]); + if (appliedRoll[i] != 0.0f) bone.setRotZ(bone.getRotZ() - appliedRoll[i]); + appliedYaw[i] = 0.0f; + appliedRoll[i] = 0.0f; + } + + // 2) Interpolated sway for extra smoothness between ticks + float sway = entity.getTailSwayOffset(state.getPartialTick()); // [-1, 1] + + // Tuning + float maxYawDeg = 22.0f; // increased max sweep + float swayGain = 1.35f; // amplifies overall power + float rollFraction = 0.40f; // slightly stronger roll for heft + + float deg2rad = (float)Math.PI / 180f; + + // Direction: positive sway (left turn) -> tail swings right (negative yaw) + // Flip the sign here if the sway feels inverted + float baseYaw = sway * maxYawDeg * deg2rad; + float baseRoll = -baseYaw * rollFraction; + + float[] weights = { 1.00f, 0.78f, 0.58f, 0.42f }; + + for (int i = 0; i < n; i++) { + GeoBone bone = (GeoBone) getAnimationProcessor().getBone(tailBones[i]); + if (bone == null) continue; + + float w = weights[i]; + float yaw = baseYaw * w; + float roll = baseRoll * w; + + // OVERRIDE animations on Y/Z only: keep the model's predefined X bend intact + // Do NOT reset rotX here, so the upward bend stays + bone.setRotY(yaw); + bone.setRotZ(roll); + + appliedYaw[i] = yaw; + appliedRoll[i] = roll; + } + + GeoBone head = (GeoBone) getAnimationProcessor().getBone("Neck"); + + if (head != null) { + var entityData = state.getData(DataTickets.ENTITY_MODEL_DATA); + float clampedYawDeg = Mth.clamp(entityData.netHeadYaw(), -20.0f, 20.0f); + head.setRotY(clampedYawDeg * Mth.DEG_TO_RAD); + } + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarRenderer.java new file mode 100644 index 0000000..9c0a79b --- /dev/null +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarRenderer.java @@ -0,0 +1,21 @@ +package net.cmr.jurassicrevived.entity.client; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.cmr.jurassicrevived.entity.custom.AlligatorGarEntity; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import software.bernie.geckolib.cache.object.BakedGeoModel; +import software.bernie.geckolib.renderer.GeoEntityRenderer; + + +public class AlligatorGarRenderer extends GeoEntityRenderer { + public AlligatorGarRenderer(EntityRendererProvider.Context renderManager) { + super(renderManager, new AlligatorGarModel()); + } + + @Override + public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, AlligatorGarEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { + super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); + float scale = animatable.getDinoScale(); + poseStack.scale(scale, scale, scale); + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarVariant.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarVariant.java new file mode 100644 index 0000000..376a700 --- /dev/null +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlligatorGarVariant.java @@ -0,0 +1,26 @@ +package net.cmr.jurassicrevived.entity.client; + +import java.util.Arrays; +import java.util.Comparator; + +public enum AlligatorGarVariant { + MALE(0), + FEMALE(1); + + private static final AlligatorGarVariant[] BY_ID = Arrays.stream(values()).sorted( + Comparator.comparingInt(AlligatorGarVariant::getId)).toArray(AlligatorGarVariant[]::new); + + private final int id; + + AlligatorGarVariant(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public static AlligatorGarVariant byId(int id) { + return BY_ID[id % BY_ID.length]; + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AllosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AllosaurusRenderer.java index 5a040a4..a35d044 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AllosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AllosaurusRenderer.java @@ -16,7 +16,7 @@ public class AllosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, AllosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlvarezsaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlvarezsaurusRenderer.java index b4daef0..3010b80 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlvarezsaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/AlvarezsaurusRenderer.java @@ -16,7 +16,7 @@ public class AlvarezsaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, AnkylosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ApatosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ApatosaurusRenderer.java index 7f94c99..6a60242 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ApatosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ApatosaurusRenderer.java @@ -16,7 +16,7 @@ public class ApatosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, ApatosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ArambourgianiaRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ArambourgianiaRenderer.java index 0c0ee2b..10b6da7 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ArambourgianiaRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ArambourgianiaRenderer.java @@ -16,7 +16,7 @@ public class ArambourgianiaRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, BaryonyxEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/BrachiosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/BrachiosaurusRenderer.java index ffac3a9..0b1f53d 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/BrachiosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/BrachiosaurusRenderer.java @@ -16,7 +16,7 @@ public class BrachiosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, CarnotaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CearadactylusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CearadactylusRenderer.java index 1d53229..354cbba 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CearadactylusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CearadactylusRenderer.java @@ -16,7 +16,7 @@ public class CearadactylusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, CeratosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChasmosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChasmosaurusRenderer.java index d48f70c..4970ee9 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChasmosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChasmosaurusRenderer.java @@ -16,7 +16,7 @@ public class ChasmosaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, ChasmosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChickenosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChickenosaurusRenderer.java index d5e9f6c..9a28537 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChickenosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ChickenosaurusRenderer.java @@ -16,7 +16,7 @@ public class ChickenosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, ChilesaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthModel.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthModel.java index 228e21d..c3b0498 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthModel.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthModel.java @@ -48,7 +48,7 @@ public class CoelacanthModel extends GeoModel { public void setCustomAnimations(CoelacanthEntity entity, long id, AnimationState state) { super.setCustomAnimations(entity, id, state); - String[] tailBones = { "tail1", "tail2", "tail3", "tail4", "tail5", "tail6" }; + String[] tailBones = { "BodySection2", "BodySection3", "TailSection1", "TailSection2" , "TailSection3" }; int n = tailBones.length; if (appliedYaw == null || appliedYaw.length != n) { @@ -82,7 +82,7 @@ public class CoelacanthModel extends GeoModel { float baseYaw = sway * maxYawDeg * deg2rad; float baseRoll = -baseYaw * rollFraction; - float[] weights = { 1.00f, 0.78f, 0.58f, 0.42f, 0.30f, 0.22f }; + float[] weights = { 1.00f, 0.78f, 0.58f, 0.42f, 0.30f }; for (int i = 0; i < n; i++) { GeoBone bone = (GeoBone) getAnimationProcessor().getBone(tailBones[i]); @@ -101,7 +101,7 @@ public class CoelacanthModel extends GeoModel { appliedRoll[i] = roll; } - GeoBone head = (GeoBone) getAnimationProcessor().getBone("body1"); + GeoBone head = (GeoBone) getAnimationProcessor().getBone("BodySection1"); if (head != null) { var entityData = state.getData(DataTickets.ENTITY_MODEL_DATA); diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthRenderer.java index 1c97921..752c154 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelacanthRenderer.java @@ -15,7 +15,7 @@ public class CoelacanthRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, CoelacanthEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelophysisRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelophysisRenderer.java index f3106d0..d555917 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelophysisRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelophysisRenderer.java @@ -16,7 +16,7 @@ public class CoelophysisRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, CoelophysisEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelurusRenderer.java index b2a33be..bc98810 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CoelurusRenderer.java @@ -16,7 +16,7 @@ public class CoelurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, CoelurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CompsognathusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CompsognathusRenderer.java index 8db65f5..203f92b 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CompsognathusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CompsognathusRenderer.java @@ -16,7 +16,7 @@ public class CompsognathusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, ConcavenatorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CorythosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CorythosaurusRenderer.java index b8efecc..4f87266 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/CorythosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/CorythosaurusRenderer.java @@ -16,7 +16,7 @@ public class CorythosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, DeinonychusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DilophosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DilophosaurusRenderer.java index d9426bb..6ceed25 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DilophosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DilophosaurusRenderer.java @@ -16,7 +16,7 @@ public class DilophosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, DimorphodonEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DiplodocusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DiplodocusRenderer.java index 279fca6..aa0f7bd 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DiplodocusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DiplodocusRenderer.java @@ -16,7 +16,7 @@ public class DiplodocusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, DiplodocusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DistortusRexRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DistortusRexRenderer.java index 8068c0f..8aef1cd 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DistortusRexRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DistortusRexRenderer.java @@ -16,7 +16,7 @@ public class DistortusRexRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, DistortusRexEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DryosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DryosaurusRenderer.java index 39073d2..5b3387d 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/DryosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/DryosaurusRenderer.java @@ -16,7 +16,7 @@ public class DryosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, DryosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/EdmontosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/EdmontosaurusRenderer.java index 3461c9e..5aa4be8 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/EdmontosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/EdmontosaurusRenderer.java @@ -16,7 +16,7 @@ public class EdmontosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, FDuckEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GallimimusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GallimimusRenderer.java index 02e7ebe..29b8c67 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GallimimusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GallimimusRenderer.java @@ -16,7 +16,7 @@ public class GallimimusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, GallimimusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GeosternbergiaRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GeosternbergiaRenderer.java index 363a280..e4e2336 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GeosternbergiaRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GeosternbergiaRenderer.java @@ -16,7 +16,7 @@ public class GeosternbergiaRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, GuanlongEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GuidracoRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GuidracoRenderer.java index 5e677ee..6498e57 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/GuidracoRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/GuidracoRenderer.java @@ -16,7 +16,7 @@ public class GuidracoRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, GuidracoEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/HadrosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/HadrosaurusRenderer.java index 76b4516..fa310a8 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/HadrosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/HadrosaurusRenderer.java @@ -16,7 +16,7 @@ public class HadrosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, HadrosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/HerrerasaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/HerrerasaurusRenderer.java index 3b0eefe..6d46f6a 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/HerrerasaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/HerrerasaurusRenderer.java @@ -16,7 +16,7 @@ public class HerrerasaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, IndominusRexEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/IndoraptorRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/IndoraptorRenderer.java index 890faa2..84faaa9 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/IndoraptorRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/IndoraptorRenderer.java @@ -16,7 +16,7 @@ public class IndoraptorRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, IndoraptorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/InostranceviaRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/InostranceviaRenderer.java index b314a00..2e3ea83 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/InostranceviaRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/InostranceviaRenderer.java @@ -16,7 +16,7 @@ public class InostranceviaRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, LambeosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/LudodactylusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/LudodactylusRenderer.java index 11a8fe6..526b0e8 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/LudodactylusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/LudodactylusRenderer.java @@ -16,7 +16,7 @@ public class LudodactylusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, LudodactylusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MajungasaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MajungasaurusRenderer.java index 4d565b3..c43fa4e 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MajungasaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MajungasaurusRenderer.java @@ -16,7 +16,7 @@ public class MajungasaurusRenderer extends GeoEntityRenderer { + + private static final Map LOCATION_BY_VARIANT = + Util.make(Maps.newEnumMap(MawsoniaVariant.class), map -> { + map.put(MawsoniaVariant.MALE, Constants.rl("textures/entity/mawsonia.png")); + map.put(MawsoniaVariant.FEMALE, Constants.rl("textures/entity/mawsonia_female.png")); + }); + + // Model-local "currently applied" offsets; cleared before each entity render + private float[] appliedYaw = null; + private float[] appliedRoll = null; + + @Override + public ResourceLocation getModelResource(MawsoniaEntity animatable) { + return Constants.rl("geo/mawsonia.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(MawsoniaEntity animatable) { + return LOCATION_BY_VARIANT.get(animatable.getVariant()); + } + + @Override + public ResourceLocation getAnimationResource(MawsoniaEntity animatable) { + return Constants.rl("animations/mawsonia.animation.json"); + } + + @Override + public void setCustomAnimations(MawsoniaEntity entity, long id, AnimationState state) { + super.setCustomAnimations(entity, id, state); + + String[] tailBones = { "BodySection6", "TailSection4", "TailSection5", "TailSection6" }; + int n = tailBones.length; + + if (appliedYaw == null || appliedYaw.length != n) { + appliedYaw = new float[n]; + appliedRoll = new float[n]; + } + + // 1) Clear previous offsets (from the last entity rendered with this model instance) + for (int i = 0; i < n; i++) { + if (appliedYaw[i] == 0.0f && appliedRoll[i] == 0.0f) continue; + GeoBone bone = (GeoBone) getAnimationProcessor().getBone(tailBones[i]); + if (bone == null) continue; + if (appliedYaw[i] != 0.0f) bone.setRotY(bone.getRotY() - appliedYaw[i]); + if (appliedRoll[i] != 0.0f) bone.setRotZ(bone.getRotZ() - appliedRoll[i]); + appliedYaw[i] = 0.0f; + appliedRoll[i] = 0.0f; + } + + // 2) Interpolated sway for extra smoothness between ticks + float sway = entity.getTailSwayOffset(state.getPartialTick()); // [-1, 1] + + // Tuning + float maxYawDeg = 22.0f; // increased max sweep + float swayGain = 1.35f; // amplifies overall power + float rollFraction = 0.40f; // slightly stronger roll for heft + + float deg2rad = (float)Math.PI / 180f; + + // Direction: positive sway (left turn) -> tail swings right (negative yaw) + // Flip the sign here if the sway feels inverted + float baseYaw = sway * maxYawDeg * deg2rad; + float baseRoll = -baseYaw * rollFraction; + + float[] weights = { 1.00f, 0.78f, 0.58f, 0.42f }; + + for (int i = 0; i < n; i++) { + GeoBone bone = (GeoBone) getAnimationProcessor().getBone(tailBones[i]); + if (bone == null) continue; + + float w = weights[i]; + float yaw = baseYaw * w; + float roll = baseRoll * w; + + // OVERRIDE animations on Y/Z only: keep the model's predefined X bend intact + // Do NOT reset rotX here, so the upward bend stays + bone.setRotY(yaw); + bone.setRotZ(roll); + + appliedYaw[i] = yaw; + appliedRoll[i] = roll; + } + + GeoBone head = (GeoBone) getAnimationProcessor().getBone("Mainhead2"); + + if (head != null) { + var entityData = state.getData(DataTickets.ENTITY_MODEL_DATA); + float clampedYawDeg = Mth.clamp(entityData.netHeadYaw(), -20.0f, 20.0f); + head.setRotY(clampedYawDeg * Mth.DEG_TO_RAD); + } + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaRenderer.java new file mode 100644 index 0000000..6a68309 --- /dev/null +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaRenderer.java @@ -0,0 +1,21 @@ +package net.cmr.jurassicrevived.entity.client; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.cmr.jurassicrevived.entity.custom.MawsoniaEntity; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import software.bernie.geckolib.cache.object.BakedGeoModel; +import software.bernie.geckolib.renderer.GeoEntityRenderer; + + +public class MawsoniaRenderer extends GeoEntityRenderer { + public MawsoniaRenderer(EntityRendererProvider.Context renderManager) { + super(renderManager, new MawsoniaModel()); + } + + @Override + public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, MawsoniaEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { + super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); + float scale = animatable.getDinoScale(); + poseStack.scale(scale, scale, scale); + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaVariant.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaVariant.java new file mode 100644 index 0000000..8209208 --- /dev/null +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MawsoniaVariant.java @@ -0,0 +1,26 @@ +package net.cmr.jurassicrevived.entity.client; + +import java.util.Arrays; +import java.util.Comparator; + +public enum MawsoniaVariant { + MALE(0), + FEMALE(1); + + private static final MawsoniaVariant[] BY_ID = Arrays.stream(values()).sorted( + Comparator.comparingInt(MawsoniaVariant::getId)).toArray(MawsoniaVariant[]::new); + + private final int id; + + MawsoniaVariant(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public static MawsoniaVariant byId(int id) { + return BY_ID[id % BY_ID.length]; + } +} diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MetriacanthosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MetriacanthosaurusRenderer.java index d0e7d51..07a346f 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MetriacanthosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MetriacanthosaurusRenderer.java @@ -16,7 +16,7 @@ public class MetriacanthosaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, MoganopterusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MussasaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MussasaurusRenderer.java index d8c14da..0d87cd5 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/MussasaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/MussasaurusRenderer.java @@ -16,7 +16,7 @@ public class MussasaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, MussasaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/NyctosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/NyctosaurusRenderer.java index 3abcacb..0d3be15 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/NyctosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/NyctosaurusRenderer.java @@ -16,7 +16,7 @@ public class NyctosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, NyctosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OrnitholestesRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OrnitholestesRenderer.java index d85d5b3..8ccf63e 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OrnitholestesRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OrnitholestesRenderer.java @@ -16,7 +16,7 @@ public class OrnitholestesRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, OrnithomimusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OuranosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OuranosaurusRenderer.java index 1582f49..1330373 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OuranosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OuranosaurusRenderer.java @@ -16,7 +16,7 @@ public class OuranosaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, OuranosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OviraptorRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OviraptorRenderer.java index ef2ec54..e4ba7b1 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/OviraptorRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/OviraptorRenderer.java @@ -16,7 +16,7 @@ public class OviraptorRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, OviraptorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/PachycephalosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/PachycephalosaurusRenderer.java index d5a908f..08dc3c0 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/PachycephalosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/PachycephalosaurusRenderer.java @@ -16,7 +16,7 @@ public class PachycephalosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, PteranodonEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/PterodaustroRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/PterodaustroRenderer.java index 546850e..8c29c21 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/PterodaustroRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/PterodaustroRenderer.java @@ -16,7 +16,7 @@ public class PterodaustroRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, PterodaustroEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/QuetzalcoatlusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/QuetzalcoatlusRenderer.java index ef8721a..787caa3 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/QuetzalcoatlusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/QuetzalcoatlusRenderer.java @@ -16,7 +16,7 @@ public class QuetzalcoatlusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, RajasaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/RugopsRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/RugopsRenderer.java index 3c7ccc7..eb297b6 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/RugopsRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/RugopsRenderer.java @@ -16,7 +16,7 @@ public class RugopsRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, RugopsEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/SegisaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/SegisaurusRenderer.java index 5c80e8d..39a3acc 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/SegisaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/SegisaurusRenderer.java @@ -16,7 +16,7 @@ public class SegisaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, SegisaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ShantungosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ShantungosaurusRenderer.java index cff8cb4..2d1b46b 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ShantungosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ShantungosaurusRenderer.java @@ -16,7 +16,7 @@ public class ShantungosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, SpinosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/StegosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/StegosaurusRenderer.java index df96f5f..172db82 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/StegosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/StegosaurusRenderer.java @@ -16,7 +16,7 @@ public class StegosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, StegosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/StyracosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/StyracosaurusRenderer.java index 50de16a..c95a530 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/StyracosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/StyracosaurusRenderer.java @@ -16,7 +16,7 @@ public class StyracosaurusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, SuchomimusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TapejaraRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TapejaraRenderer.java index 9d084e3..fb89149 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TapejaraRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TapejaraRenderer.java @@ -16,7 +16,7 @@ public class TapejaraRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, TapejaraEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TherizinosaurusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TherizinosaurusRenderer.java index 22e9984..f019f31 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TherizinosaurusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TherizinosaurusRenderer.java @@ -16,7 +16,7 @@ public class TherizinosaurusRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, TitanosaurusEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TriceratopsRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TriceratopsRenderer.java index ca5e402..f67e629 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TriceratopsRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TriceratopsRenderer.java @@ -16,7 +16,7 @@ public class TriceratopsRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, TriceratopsEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TroodonRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TroodonRenderer.java index a895673..061ba2e 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TroodonRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TroodonRenderer.java @@ -16,7 +16,7 @@ public class TroodonRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, TroodonEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TropeognathusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TropeognathusRenderer.java index 2114d19..2ae6fe1 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TropeognathusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TropeognathusRenderer.java @@ -16,7 +16,7 @@ public class TropeognathusRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, TupuxuaraEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TyrannosaurusRexRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TyrannosaurusRexRenderer.java index b9eb070..35d3f14 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/TyrannosaurusRexRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/TyrannosaurusRexRenderer.java @@ -16,7 +16,7 @@ public class TyrannosaurusRexRenderer extends GeoEntityRenderer { @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, UtahraptorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/VelociraptorRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/VelociraptorRenderer.java index 0a4cd0f..ab0eed6 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/VelociraptorRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/VelociraptorRenderer.java @@ -16,7 +16,7 @@ public class VelociraptorRenderer extends GeoEntityRenderer @Override public void scaleModelForRender(float widthScale, float heightScale, PoseStack poseStack, VelociraptorEntity animatable, BakedGeoModel model, boolean isReRender, float partialTick, int packedLight, int packedOverlay) { super.scaleModelForRender(widthScale, heightScale, poseStack, animatable, model, isReRender, partialTick, packedLight, packedOverlay); - float scale = animatable.getTotalModelScale(); + float scale = animatable.getDinoScale(); poseStack.scale(scale, scale, scale); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ZhenyuanopterusRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ZhenyuanopterusRenderer.java index 060cee5..d14b5cb 100755 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/client/ZhenyuanopterusRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/client/ZhenyuanopterusRenderer.java @@ -16,7 +16,7 @@ public class ZhenyuanopterusRenderer extends GeoEntityRenderer VARIANT = + SynchedEntityData.defineId(AlligatorGarEntity.class, EntityDataSerializers.INT); + private static final EntityDataAccessor DATA_SYNCED_AGE = + SynchedEntityData.defineId(AlligatorGarEntity.class, EntityDataSerializers.INT); + private static final EntityDataAccessor DATA_ANIMAL_SCALE = + SynchedEntityData.defineId(AlligatorGarEntity.class, EntityDataSerializers.FLOAT); + + // Procedural tail sway state (client-side use for rendering) + private float tailSwayOffset; // Smoothed offset in range roughly [-1, 1] + private float tailSwayVelocity; // Internal velocity for spring-damper + private float tailSwayPrev; // Previous frame value for interpolation + + public AlligatorGarEntity(EntityType pEntityType, Level pLevel) { + super(pEntityType, pLevel); + + this.dinoData = new DinoData( + getAIConfig().maxHunger(), + getAIConfig().maxThirst(), + IDinoData.Mood.NEUTRAL, + IDinoData.Aggression.TERRITORIAL, + 0.75f, + IDinoData.DietaryClassification.CARNIVORE, + IDinoData.Type.MARINE, + IDinoData.Group.PISCINE, + IDinoData.BirthType.EGG_LAYING, + IDinoData.ActivityPattern.CATHEMERAL + ); + + // Replaces the default move control with 3D swimming mechanics + this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02F, 0.1F, true); + + // Tells the pathfinder that water is perfectly safe to navigate through + /*? if <=1.20.1 {*/ + this.setPathfindingMalus(net.minecraft.world.level.pathfinder.BlockPathTypes.WATER, 0.0F); + /*?} else {*/ + /*this.setPathfindingMalus(net.minecraft.world.level.pathfinder.PathType.WATER, 0.0F); + *//*?}*/ + } + + @Override + protected PathNavigation createNavigation(Level pLevel) { + return new WaterBoundPathNavigation(this, pLevel); + } + + //@Override + //public ItemStack getPickResult() { + // return new ItemStack(ModItems.ALLIGATOR_GAR_SPAWN_EGG.get()); + //} + + @Override + public boolean isCarnivore() { + return true; + } + + @Override + public boolean isMarine() { + return true; + } + + @Override + public boolean isAmphibious() { + return false; + } + + @Override + public boolean isSimpleFish() { + return true; + } + + @Override + public Block getEggBlock() { + return null; + } + + @Override + public DinoAIConfig getAIConfig() { + return new DinoAIConfig(0.3D, 1.1D, 1.5D, 100, 100, 0.05f, 0.1f, 20); + } + + @Override + public void setBaby(boolean baby) { + this.setAge(baby ? -BABY_TO_ADULT_AGE_TICKS : 0); + } + + public static AttributeSupplier.Builder createAttributes() { + return Animal.createLivingAttributes() + .add(Attributes.MAX_HEALTH, 30D) + .add(Attributes.MOVEMENT_SPEED, 0.3D) + .add(Attributes.ARMOR, 0D) + .add(Attributes.FOLLOW_RANGE, 32D) + .add(Attributes.ATTACK_DAMAGE, 8D) + .add(Attributes.KNOCKBACK_RESISTANCE, 0.3D) + .add(Attributes.ATTACK_KNOCKBACK, 0D); + } + + @Nullable + @Override + public AgeableMob getBreedOffspring(ServerLevel pLevel, AgeableMob pOtherParent) { + AgeableMob child = ModEntities.ALLIGATOR_GAR.get().create(pLevel); + if (child instanceof AlligatorGarEntity baby) { + AlligatorGarVariant randomVariant = Util.getRandom(AlligatorGarVariant.values(), this.random); + baby.setVariant(randomVariant); + baby.setBaby(true); + baby.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + } + return child; + } + + @Override + public boolean doHurtTarget(Entity target) { + boolean hit = super.doHurtTarget(target); + if (!level().isClientSide && hit && target instanceof LivingEntity) { + if (this.level() instanceof ServerLevel serverLevel) { + this.triggerAnim("attackController", "attack"); + } + } + return hit; + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { + controllers.add(new AnimationController<>(this, "SwimController", 5, state -> { + // 1. Highest Priority: Out of water flapping + if (!this.isInWater()) { + return state.setAndContinue(RawAnimation.begin().then("anim.alligator_gar.flop", Animation.LoopType.LOOP)); + } + + // 2. Aquatic movement: Just swim + return state.setAndContinue(RawAnimation.begin().then("anim.alligator_gar.swim", Animation.LoopType.LOOP)); + })); + + controllers.add(new AnimationController<>(this, "attackController", 5, state -> PlayState.STOP) + .triggerableAnim("attack", RawAnimation.begin().then("anim.alligator_gar.attack", Animation.LoopType.PLAY_ONCE))); + + controllers.add(new AnimationController<>(this, "mouthController", 5, state -> PlayState.STOP) + .triggerableAnim("mouth", RawAnimation.begin().then("anim.alligator_gar.mouth", Animation.LoopType.PLAY_ONCE))); + } + + private float getSignedTurnDelta() { + // Only consider the body (torso) rotation so head look does not affect tail sway + return Mth.wrapDegrees(this.yBodyRot - this.yBodyRotO); + } + + private int mouthAnimCooldown = 0; + + @Override + public void tick() { + super.tick(); + + if (!level().isClientSide) { + this.entityData.set(DATA_SYNCED_AGE, this.getAge()); + var maxHealthAttr = getAttribute(Attributes.MAX_HEALTH); + if (maxHealthAttr != null) { + double baseAdult = DefaultAttributes.getSupplier((EntityType) this.getType()).getValue(Attributes.MAX_HEALTH); + double desired = this.isBaby() ? baseAdult * 0.10D : baseAdult; + if (maxHealthAttr.getBaseValue() != desired) { + double oldMax = maxHealthAttr.getBaseValue(); + double healthRatio = this.getHealth() / (float) oldMax; + maxHealthAttr.setBaseValue(desired); + this.setHealth((float) (desired * Mth.clamp(healthRatio, 0.0F, 1.0F))); + } + } + } + + updateDynamicDimensions(); + + if (!level().isClientSide) { + if (mouthAnimCooldown > 0) { + mouthAnimCooldown--; + } else { + this.triggerAnim("mouthController", "mouth"); + // 30s–60s in ticks + mouthAnimCooldown = this.random.nextInt(1200 - 600 + 1) + 600; + } + } + + if (level().isClientSide) { + // Capture previous for smooth interpolation between ticks + this.tailSwayPrev = this.tailSwayOffset; + updateProceduralTailSway(); + } + } + + private void updateProceduralTailSway() { + // Turn input derived from rotation deltas; works even when standing still and turning + float turnDegrees = getSignedTurnDelta(); + + // Deadzone to ignore tiny jitter so the tail can return to center cleanly + float deadzoneDeg = 0.6f; // smaller deadzone for more responsiveness + float turnInput = 0.0f; + if (Math.abs(turnDegrees) >= deadzoneDeg) { + // Higher sensitivity so small in-place turns still affect the model + turnInput = Mth.clamp(turnDegrees / 15.0f, -1.0f, 1.0f); + } + + // Target offset: keep intuitive sign (positive input -> positive sway) + float target = turnInput; + + // One-pole low-pass (no bounce). Larger alpha => snappier and less "stiff". + float alpha = 0.24f; // try 0.20–0.30 to taste + + tailSwayOffset += (target - tailSwayOffset) * alpha; + + // Snap tiny residuals to zero so it visibly settles + if (Math.abs(tailSwayOffset) < 0.003f) { + tailSwayOffset = 0.0f; + } + + // No oscillation velocity retained + tailSwayVelocity = 0.0f; + + tailSwayOffset = Mth.clamp(tailSwayOffset, -1.5f, 1.5f); + } + + // Expose to the model for bone rotation + public float getTailSwayOffset() { + return tailSwayOffset; + } + + // Interpolated sway for smooth rendering between ticks + public float getTailSwayOffset(float partialTick) { + return Mth.lerp(Mth.clamp(partialTick, 0.0f, 1.0f), tailSwayPrev, tailSwayOffset); + } + + /*? if <=1.20.1 {*/ + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + this.entityData.define(VARIANT, 0); + this.entityData.define(DATA_SYNCED_AGE, 0); + this.entityData.define(DATA_ANIMAL_SCALE, 1.0F); + } + /*?} else {*/ + /*@Override + protected void defineSynchedData(SynchedEntityData.Builder pBuilder) { + super.defineSynchedData(pBuilder); + pBuilder.define(VARIANT, 0); + pBuilder.define(DATA_SYNCED_AGE, 0); + pBuilder.define(DATA_ANIMAL_SCALE, 1.0F); + } + *//*?}*/ + + public int getSyncedAge() { + return this.entityData.get(DATA_SYNCED_AGE); + } + + public float getAnimalScale() { + return this.entityData.get(DATA_ANIMAL_SCALE); + } + + private void setAnimalScale(float animalScale) { + this.entityData.set(DATA_ANIMAL_SCALE, animalScale); + } + + public float getGrowthScale() { + if (!this.isBaby()) { + return 1.0F; + } + + int age = this.level().isClientSide ? this.getSyncedAge() : this.getAge(); + float growthProgress = Mth.clamp((BABY_TO_ADULT_AGE_TICKS + age) / (float) BABY_TO_ADULT_AGE_TICKS, 0.0F, 1.0F); + return Mth.lerp(growthProgress, 0.2F, 1.0F); + } + public float getTotalModelScale() { + return this.getAnimalScale() * this.getGrowthScale(); + } + + private void updateDynamicDimensions() { + float dimensionsScale = this.getTotalModelScale(); + if (Math.abs(dimensionsScale - this.lastDimensionsScale) > 0.01F) { + this.lastDimensionsScale = dimensionsScale; + this.refreshDimensions(); + } + } + + @Override + public float getLiveDinoScale() { + return this.getTotalModelScale(); + } + + public int getTypeVariant() { + return this.entityData.get(VARIANT); + } + + public AlligatorGarVariant getVariant() { + return AlligatorGarVariant.byId(this.getTypeVariant() & 255); + } + + private void setVariant(AlligatorGarVariant variant) { + this.entityData.set(VARIANT, variant.getId() & 255); + } + + @Override + public boolean canMate(Animal other) { + if (!super.canMate(other)) return false; + if (!(other instanceof AlligatorGarEntity that)) return false; + return this.getVariant() != that.getVariant(); + } + @Override + public void addAdditionalSaveData(CompoundTag pCompound) { + super.addAdditionalSaveData(pCompound); + pCompound.putInt("Variant", this.getTypeVariant()); + pCompound.putFloat("AnimalScale", this.getAnimalScale()); + } + + @Override + public void readAdditionalSaveData(CompoundTag pCompound) { + super.readAdditionalSaveData(pCompound); + this.entityData.set(VARIANT, pCompound.getInt("Variant")); + if (pCompound.contains("AnimalScale")) { + this.setAnimalScale(pCompound.getFloat("AnimalScale")); + } + } + + /*? if <=1.20.1 {*/ + @Override + public SpawnGroupData finalizeSpawn(ServerLevelAccessor pLevel, DifficultyInstance pDifficulty, MobSpawnType pReason, @Nullable SpawnGroupData pSpawnData, @Nullable CompoundTag pDataTag) { + AlligatorGarVariant variant = Util.getRandom(AlligatorGarVariant.values(), this.random); + this.setVariant(variant); + this.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + return super.finalizeSpawn(pLevel, pDifficulty, pReason, pSpawnData, pDataTag); + } + /*?} else {*/ + /*@Override + public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnGroupData) { + AlligatorGarVariant variant = Util.getRandom(AlligatorGarVariant.values(), this.random); + this.setVariant(variant); + this.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + return super.finalizeSpawn(level, difficulty, spawnType, spawnGroupData); + } + *//*?}*/ + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return cache; + } + + @Override + public double getFluidJumpThreshold() { + return this.getEyeHeight(); + } +} \ No newline at end of file diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AllosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AllosaurusEntity.java index ef4a205..b046832 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AllosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AllosaurusEntity.java @@ -312,7 +312,7 @@ public class AllosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AlvarezsaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AlvarezsaurusEntity.java index 7db3391..26ba998 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AlvarezsaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AlvarezsaurusEntity.java @@ -316,7 +316,7 @@ public class AlvarezsaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AnkylosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AnkylosaurusEntity.java index 0dd3c20..ab4edc4 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AnkylosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/AnkylosaurusEntity.java @@ -315,7 +315,7 @@ public class AnkylosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ApatosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ApatosaurusEntity.java index 7aa1e55..53728b5 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ApatosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ApatosaurusEntity.java @@ -319,7 +319,7 @@ public class ApatosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ArambourgianiaEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ArambourgianiaEntity.java index 42a9582..8265688 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ArambourgianiaEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ArambourgianiaEntity.java @@ -355,7 +355,7 @@ public class ArambourgianiaEntity extends DinoEntityBase implements GeoEntity, F } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BaryonyxEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BaryonyxEntity.java index 5e7a1a9..bf951b2 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BaryonyxEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BaryonyxEntity.java @@ -318,7 +318,7 @@ public class BaryonyxEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BrachiosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BrachiosaurusEntity.java index f52aba9..e3590c2 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BrachiosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/BrachiosaurusEntity.java @@ -319,7 +319,7 @@ public class BrachiosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarcharodontosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarcharodontosaurusEntity.java index e4e8e82..4ee4453 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarcharodontosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarcharodontosaurusEntity.java @@ -316,7 +316,7 @@ public class CarcharodontosaurusEntity extends DinoEntityBase implements GeoEnti } @Override - public float getDinoScale() { + public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarnotaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarnotaurusEntity.java index b496826..1735d34 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarnotaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CarnotaurusEntity.java @@ -313,7 +313,7 @@ public class CarnotaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CearadactylusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CearadactylusEntity.java index 9c82790..b2a8984 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CearadactylusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CearadactylusEntity.java @@ -355,7 +355,7 @@ public class CearadactylusEntity extends DinoEntityBase implements GeoEntity, Fl } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CeratosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CeratosaurusEntity.java index 2d89a08..82beb92 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CeratosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CeratosaurusEntity.java @@ -312,7 +312,7 @@ public class CeratosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChasmosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChasmosaurusEntity.java index c1b6f26..bb7700a 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChasmosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChasmosaurusEntity.java @@ -315,7 +315,7 @@ public class ChasmosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChickenosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChickenosaurusEntity.java index db48876..b4de625 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChickenosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChickenosaurusEntity.java @@ -316,7 +316,7 @@ public class ChickenosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChilesaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChilesaurusEntity.java index 10db54c..c978e4c 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChilesaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ChilesaurusEntity.java @@ -304,7 +304,7 @@ public class ChilesaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelacanthEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelacanthEntity.java index 1efe8eb..d6ea1c6 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelacanthEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelacanthEntity.java @@ -333,7 +333,7 @@ public class CoelacanthEntity extends DinoEntityBase implements GeoEntity { } @Override - public float getDinoScale() { + public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelophysisEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelophysisEntity.java index 2c2eaab..399dbfd 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelophysisEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelophysisEntity.java @@ -316,7 +316,7 @@ public class CoelophysisEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelurusEntity.java index 28eaa62..e0f9955 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CoelurusEntity.java @@ -316,7 +316,7 @@ public class CoelurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CompsognathusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CompsognathusEntity.java index 9ee5e67..6289453 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CompsognathusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CompsognathusEntity.java @@ -313,7 +313,7 @@ public class CompsognathusEntity extends DinoEntityBase implements GeoEntity { } @Override - public float getDinoScale() { + public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ConcavenatorEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ConcavenatorEntity.java index f920412..ed5c831 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ConcavenatorEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ConcavenatorEntity.java @@ -312,7 +312,7 @@ public class ConcavenatorEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CorythosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CorythosaurusEntity.java index d5106f8..7d01f65 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CorythosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/CorythosaurusEntity.java @@ -313,7 +313,7 @@ public class CorythosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DeinonychusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DeinonychusEntity.java index b0d8d7b..241874f 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DeinonychusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DeinonychusEntity.java @@ -316,7 +316,7 @@ public class DeinonychusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DilophosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DilophosaurusEntity.java index b91a3b6..4820552 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DilophosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DilophosaurusEntity.java @@ -321,7 +321,7 @@ public class DilophosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DimorphodonEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DimorphodonEntity.java index 78c6b59..ef3914d 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DimorphodonEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DimorphodonEntity.java @@ -355,7 +355,7 @@ public class DimorphodonEntity extends DinoEntityBase implements GeoEntity, Flyi } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DiplodocusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DiplodocusEntity.java index 34fb36d..b4fe0c5 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DiplodocusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DiplodocusEntity.java @@ -318,7 +318,7 @@ public class DiplodocusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DistortusRexEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DistortusRexEntity.java index a7a9c76..2cf4ceb 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DistortusRexEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DistortusRexEntity.java @@ -316,7 +316,7 @@ public class DistortusRexEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DryosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DryosaurusEntity.java index 8864157..c920cd2 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DryosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/DryosaurusEntity.java @@ -313,7 +313,7 @@ public class DryosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/EdmontosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/EdmontosaurusEntity.java index eceae2c..c785256 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/EdmontosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/EdmontosaurusEntity.java @@ -313,7 +313,7 @@ public class EdmontosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/FDuckEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/FDuckEntity.java index 29fab71..493f18e 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/FDuckEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/FDuckEntity.java @@ -316,7 +316,7 @@ public class FDuckEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GallimimusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GallimimusEntity.java index 1958e93..7344529 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GallimimusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GallimimusEntity.java @@ -313,7 +313,7 @@ public class GallimimusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GeosternbergiaEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GeosternbergiaEntity.java index 4cc79bd..74b7f32 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GeosternbergiaEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GeosternbergiaEntity.java @@ -355,7 +355,7 @@ public class GeosternbergiaEntity extends DinoEntityBase implements GeoEntity, F } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GiganotosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GiganotosaurusEntity.java index 265a91b..e953d37 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GiganotosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GiganotosaurusEntity.java @@ -316,7 +316,7 @@ public class GiganotosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override - public float getDinoScale() { + public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuanlongEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuanlongEntity.java index a5b99bc..7fc48e1 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuanlongEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuanlongEntity.java @@ -317,7 +317,7 @@ public class GuanlongEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuidracoEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuidracoEntity.java index 456885a..dd49b1d 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuidracoEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/GuidracoEntity.java @@ -355,7 +355,7 @@ public class GuidracoEntity extends DinoEntityBase implements GeoEntity, FlyingA } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HadrosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HadrosaurusEntity.java index f914e35..51160d8 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HadrosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HadrosaurusEntity.java @@ -313,7 +313,7 @@ public class HadrosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HerrerasaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HerrerasaurusEntity.java index 55e7942..1d39460 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HerrerasaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HerrerasaurusEntity.java @@ -318,7 +318,7 @@ public class HerrerasaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HypsilophodonEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HypsilophodonEntity.java index ab67c95..07cdb4d 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HypsilophodonEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/HypsilophodonEntity.java @@ -313,7 +313,7 @@ public class HypsilophodonEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndominusRexEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndominusRexEntity.java index e4fc416..d25c11e 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndominusRexEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndominusRexEntity.java @@ -319,7 +319,7 @@ public class IndominusRexEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndoraptorEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndoraptorEntity.java index 1562e54..fdcc58c 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndoraptorEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/IndoraptorEntity.java @@ -317,7 +317,7 @@ public class IndoraptorEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/InostranceviaEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/InostranceviaEntity.java index 4872e88..b40812a 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/InostranceviaEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/InostranceviaEntity.java @@ -317,7 +317,7 @@ public class InostranceviaEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LambeosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LambeosaurusEntity.java index f9afc84..ddfe1fd 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LambeosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LambeosaurusEntity.java @@ -313,7 +313,7 @@ public class LambeosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LudodactylusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LudodactylusEntity.java index 148eb32..fd6dc2f 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LudodactylusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/LudodactylusEntity.java @@ -355,7 +355,7 @@ public class LudodactylusEntity extends DinoEntityBase implements GeoEntity, Fly } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MajungasaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MajungasaurusEntity.java index 58a8830..fb37994 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MajungasaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MajungasaurusEntity.java @@ -318,7 +318,7 @@ public class MajungasaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MamenchisaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MamenchisaurusEntity.java index 073a097..061fff3 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MamenchisaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MamenchisaurusEntity.java @@ -319,7 +319,7 @@ public class MamenchisaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MawsoniaEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MawsoniaEntity.java new file mode 100644 index 0000000..deb112c --- /dev/null +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MawsoniaEntity.java @@ -0,0 +1,395 @@ +package net.cmr.jurassicrevived.entity.custom; + +import net.cmr.jurassicrevived.Constants; +import net.cmr.jurassicrevived.entity.ModEntities; +import net.cmr.jurassicrevived.entity.ai.DinoData; +import net.cmr.jurassicrevived.entity.ai.DinoEntityBase; +import net.cmr.jurassicrevived.entity.ai.IDinoData; +import net.cmr.jurassicrevived.entity.client.MawsoniaVariant; +import net.minecraft.Util; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.DifficultyInstance; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.attributes.DefaultAttributes; +import net.minecraft.world.entity.ai.control.SmoothSwimmingMoveControl; +import net.minecraft.world.entity.ai.navigation.PathNavigation; +import net.minecraft.world.entity.ai.navigation.WaterBoundPathNavigation; +import net.minecraft.world.entity.animal.Animal; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.block.Block; +import org.jetbrains.annotations.Nullable; +import software.bernie.geckolib.animatable.GeoEntity; +/*? if <=1.20.1 {*/ +import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache; +import software.bernie.geckolib.core.animatable.instance.SingletonAnimatableInstanceCache; +import software.bernie.geckolib.core.animation.AnimatableManager; +import software.bernie.geckolib.core.animation.Animation; +import software.bernie.geckolib.core.animation.AnimationController; +import software.bernie.geckolib.core.animation.RawAnimation; +import software.bernie.geckolib.core.object.PlayState; +/*?} else {*/ +/*import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; +import software.bernie.geckolib.animatable.instance.SingletonAnimatableInstanceCache; +import software.bernie.geckolib.animation.*; +*//*?}*/ + +public class MawsoniaEntity extends DinoEntityBase implements GeoEntity { + private AnimatableInstanceCache cache = new SingletonAnimatableInstanceCache(this); + + public static final int BABY_TO_ADULT_AGE_TICKS = 28800; + private static final float ANIMAL_SCALE = 1.0F; + private static final float MIN_ANIMAL_SCALE = !Constants.DEBUG_SIZES ? (ANIMAL_SCALE - 0.2F) : ANIMAL_SCALE; + private static final float MAX_ANIMAL_SCALE = !Constants.DEBUG_SIZES ? (ANIMAL_SCALE + 0.2F) : ANIMAL_SCALE; + + private float lastDimensionsScale = 1.0F; + + private static final EntityDataAccessor VARIANT = + SynchedEntityData.defineId(MawsoniaEntity.class, EntityDataSerializers.INT); + private static final EntityDataAccessor DATA_SYNCED_AGE = + SynchedEntityData.defineId(MawsoniaEntity.class, EntityDataSerializers.INT); + private static final EntityDataAccessor DATA_ANIMAL_SCALE = + SynchedEntityData.defineId(MawsoniaEntity.class, EntityDataSerializers.FLOAT); + + // Procedural tail sway state (client-side use for rendering) + private float tailSwayOffset; // Smoothed offset in range roughly [-1, 1] + private float tailSwayVelocity; // Internal velocity for spring-damper + private float tailSwayPrev; // Previous frame value for interpolation + + public MawsoniaEntity(EntityType pEntityType, Level pLevel) { + super(pEntityType, pLevel); + + this.dinoData = new DinoData( + getAIConfig().maxHunger(), + getAIConfig().maxThirst(), + IDinoData.Mood.NEUTRAL, + IDinoData.Aggression.TERRITORIAL, + 0.75f, + IDinoData.DietaryClassification.CARNIVORE, + IDinoData.Type.MARINE, + IDinoData.Group.PISCINE, + IDinoData.BirthType.EGG_LAYING, + IDinoData.ActivityPattern.CATHEMERAL + ); + + // Replaces the default move control with 3D swimming mechanics + this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02F, 0.1F, true); + + // Tells the pathfinder that water is perfectly safe to navigate through + /*? if <=1.20.1 {*/ + this.setPathfindingMalus(net.minecraft.world.level.pathfinder.BlockPathTypes.WATER, 0.0F); + /*?} else {*/ + /*this.setPathfindingMalus(net.minecraft.world.level.pathfinder.PathType.WATER, 0.0F); + *//*?}*/ + } + + @Override + protected PathNavigation createNavigation(Level pLevel) { + return new WaterBoundPathNavigation(this, pLevel); + } + + //@Override + //public ItemStack getPickResult() { + // return new ItemStack(ModItems.MAWSONIA_SPAWN_EGG.get()); + //} + + @Override + public boolean isCarnivore() { + return true; + } + + @Override + public boolean isMarine() { + return true; + } + + @Override + public boolean isAmphibious() { + return false; + } + + @Override + public boolean isSimpleFish() { + return true; + } + + @Override + public Block getEggBlock() { + return null; + } + + @Override + public DinoAIConfig getAIConfig() { + return new DinoAIConfig(0.3D, 1.1D, 1.5D, 100, 100, 0.05f, 0.1f, 20); + } + + @Override + public void setBaby(boolean baby) { + this.setAge(baby ? -BABY_TO_ADULT_AGE_TICKS : 0); + } + + public static AttributeSupplier.Builder createAttributes() { + return Animal.createLivingAttributes() + .add(Attributes.MAX_HEALTH, 30D) + .add(Attributes.MOVEMENT_SPEED, 0.3D) + .add(Attributes.ARMOR, 0D) + .add(Attributes.FOLLOW_RANGE, 32D) + .add(Attributes.ATTACK_DAMAGE, 8D) + .add(Attributes.KNOCKBACK_RESISTANCE, 0.3D) + .add(Attributes.ATTACK_KNOCKBACK, 0D); + } + + @Nullable + @Override + public AgeableMob getBreedOffspring(ServerLevel pLevel, AgeableMob pOtherParent) { + AgeableMob child = ModEntities.MAWSONIA.get().create(pLevel); + if (child instanceof MawsoniaEntity baby) { + MawsoniaVariant randomVariant = Util.getRandom(MawsoniaVariant.values(), this.random); + baby.setVariant(randomVariant); + baby.setBaby(true); + baby.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + } + return child; + } + + @Override + public boolean doHurtTarget(Entity target) { + boolean hit = super.doHurtTarget(target); + if (!level().isClientSide && hit && target instanceof LivingEntity) { + if (this.level() instanceof ServerLevel serverLevel) { + this.triggerAnim("attackController", "attack"); + } + } + return hit; + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { + controllers.add(new AnimationController<>(this, "SwimController", 5, state -> { + // 1. Highest Priority: Out of water flapping + if (!this.isInWater()) { + return state.setAndContinue(RawAnimation.begin().then("anim.mawsonia.flop", Animation.LoopType.LOOP)); + } + + // 2. Aquatic movement: Just swim + return state.setAndContinue(RawAnimation.begin().then("anim.mawsonia.swim", Animation.LoopType.LOOP)); + })); + + controllers.add(new AnimationController<>(this, "attackController", 5, state -> PlayState.STOP) + .triggerableAnim("attack", RawAnimation.begin().then("anim.mawsonia.attack", Animation.LoopType.PLAY_ONCE))); + + controllers.add(new AnimationController<>(this, "mouthController", 5, state -> PlayState.STOP) + .triggerableAnim("mouth", RawAnimation.begin().then("anim.mawsonia.mouth", Animation.LoopType.PLAY_ONCE))); + } + + private float getSignedTurnDelta() { + // Only consider the body (torso) rotation so head look does not affect tail sway + return Mth.wrapDegrees(this.yBodyRot - this.yBodyRotO); + } + + private int mouthAnimCooldown = 0; + + @Override + public void tick() { + super.tick(); + + if (!level().isClientSide) { + this.entityData.set(DATA_SYNCED_AGE, this.getAge()); + var maxHealthAttr = getAttribute(Attributes.MAX_HEALTH); + if (maxHealthAttr != null) { + double baseAdult = DefaultAttributes.getSupplier((EntityType) this.getType()).getValue(Attributes.MAX_HEALTH); + double desired = this.isBaby() ? baseAdult * 0.10D : baseAdult; + if (maxHealthAttr.getBaseValue() != desired) { + double oldMax = maxHealthAttr.getBaseValue(); + double healthRatio = this.getHealth() / (float) oldMax; + maxHealthAttr.setBaseValue(desired); + this.setHealth((float) (desired * Mth.clamp(healthRatio, 0.0F, 1.0F))); + } + } + } + + updateDynamicDimensions(); + + if (!level().isClientSide) { + if (mouthAnimCooldown > 0) { + mouthAnimCooldown--; + } else { + this.triggerAnim("mouthController", "mouth"); + // 30s–60s in ticks + mouthAnimCooldown = this.random.nextInt(1200 - 600 + 1) + 600; + } + } + + if (level().isClientSide) { + // Capture previous for smooth interpolation between ticks + this.tailSwayPrev = this.tailSwayOffset; + updateProceduralTailSway(); + } + } + + private void updateProceduralTailSway() { + // Turn input derived from rotation deltas; works even when standing still and turning + float turnDegrees = getSignedTurnDelta(); + + // Deadzone to ignore tiny jitter so the tail can return to center cleanly + float deadzoneDeg = 0.6f; // smaller deadzone for more responsiveness + float turnInput = 0.0f; + if (Math.abs(turnDegrees) >= deadzoneDeg) { + // Higher sensitivity so small in-place turns still affect the model + turnInput = Mth.clamp(turnDegrees / 15.0f, -1.0f, 1.0f); + } + + // Target offset: keep intuitive sign (positive input -> positive sway) + float target = turnInput; + + // One-pole low-pass (no bounce). Larger alpha => snappier and less "stiff". + float alpha = 0.24f; // try 0.20–0.30 to taste + + tailSwayOffset += (target - tailSwayOffset) * alpha; + + // Snap tiny residuals to zero so it visibly settles + if (Math.abs(tailSwayOffset) < 0.003f) { + tailSwayOffset = 0.0f; + } + + // No oscillation velocity retained + tailSwayVelocity = 0.0f; + + tailSwayOffset = Mth.clamp(tailSwayOffset, -1.5f, 1.5f); + } + + // Expose to the model for bone rotation + public float getTailSwayOffset() { + return tailSwayOffset; + } + + // Interpolated sway for smooth rendering between ticks + public float getTailSwayOffset(float partialTick) { + return Mth.lerp(Mth.clamp(partialTick, 0.0f, 1.0f), tailSwayPrev, tailSwayOffset); + } + + /*? if <=1.20.1 {*/ + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + this.entityData.define(VARIANT, 0); + this.entityData.define(DATA_SYNCED_AGE, 0); + this.entityData.define(DATA_ANIMAL_SCALE, 1.0F); + } + /*?} else {*/ + /*@Override + protected void defineSynchedData(SynchedEntityData.Builder pBuilder) { + super.defineSynchedData(pBuilder); + pBuilder.define(VARIANT, 0); + pBuilder.define(DATA_SYNCED_AGE, 0); + pBuilder.define(DATA_ANIMAL_SCALE, 1.0F); + } + *//*?}*/ + + public int getSyncedAge() { + return this.entityData.get(DATA_SYNCED_AGE); + } + + public float getAnimalScale() { + return this.entityData.get(DATA_ANIMAL_SCALE); + } + + private void setAnimalScale(float animalScale) { + this.entityData.set(DATA_ANIMAL_SCALE, animalScale); + } + + public float getGrowthScale() { + if (!this.isBaby()) { + return 1.0F; + } + + int age = this.level().isClientSide ? this.getSyncedAge() : this.getAge(); + float growthProgress = Mth.clamp((BABY_TO_ADULT_AGE_TICKS + age) / (float) BABY_TO_ADULT_AGE_TICKS, 0.0F, 1.0F); + return Mth.lerp(growthProgress, 0.2F, 1.0F); + } + public float getTotalModelScale() { + return this.getAnimalScale() * this.getGrowthScale(); + } + + private void updateDynamicDimensions() { + float dimensionsScale = this.getTotalModelScale(); + if (Math.abs(dimensionsScale - this.lastDimensionsScale) > 0.01F) { + this.lastDimensionsScale = dimensionsScale; + this.refreshDimensions(); + } + } + + @Override + public float getLiveDinoScale() { + return this.getTotalModelScale(); + } + + public int getTypeVariant() { + return this.entityData.get(VARIANT); + } + + public MawsoniaVariant getVariant() { + return MawsoniaVariant.byId(this.getTypeVariant() & 255); + } + + private void setVariant(MawsoniaVariant variant) { + this.entityData.set(VARIANT, variant.getId() & 255); + } + + @Override + public boolean canMate(Animal other) { + if (!super.canMate(other)) return false; + if (!(other instanceof MawsoniaEntity that)) return false; + return this.getVariant() != that.getVariant(); + } + @Override + public void addAdditionalSaveData(CompoundTag pCompound) { + super.addAdditionalSaveData(pCompound); + pCompound.putInt("Variant", this.getTypeVariant()); + pCompound.putFloat("AnimalScale", this.getAnimalScale()); + } + + @Override + public void readAdditionalSaveData(CompoundTag pCompound) { + super.readAdditionalSaveData(pCompound); + this.entityData.set(VARIANT, pCompound.getInt("Variant")); + if (pCompound.contains("AnimalScale")) { + this.setAnimalScale(pCompound.getFloat("AnimalScale")); + } + } + + /*? if <=1.20.1 {*/ + @Override + public SpawnGroupData finalizeSpawn(ServerLevelAccessor pLevel, DifficultyInstance pDifficulty, MobSpawnType pReason, @Nullable SpawnGroupData pSpawnData, @Nullable CompoundTag pDataTag) { + MawsoniaVariant variant = Util.getRandom(MawsoniaVariant.values(), this.random); + this.setVariant(variant); + this.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + return super.finalizeSpawn(pLevel, pDifficulty, pReason, pSpawnData, pDataTag); + } + /*?} else {*/ + /*@Override + public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnGroupData) { + MawsoniaVariant variant = Util.getRandom(MawsoniaVariant.values(), this.random); + this.setVariant(variant); + this.setAnimalScale(Mth.nextFloat(this.random, MIN_ANIMAL_SCALE, MAX_ANIMAL_SCALE)); + return super.finalizeSpawn(level, difficulty, spawnType, spawnGroupData); + } + *//*?}*/ + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return cache; + } + + @Override + public double getFluidJumpThreshold() { + return this.getEyeHeight(); + } +} \ No newline at end of file diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MetriacanthosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MetriacanthosaurusEntity.java index 31be07c..5922ebe 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MetriacanthosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MetriacanthosaurusEntity.java @@ -308,7 +308,7 @@ public class MetriacanthosaurusEntity extends DinoEntityBase implements GeoEntit } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MoganopterusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MoganopterusEntity.java index 2be14bb..44cc1ae 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MoganopterusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MoganopterusEntity.java @@ -351,7 +351,7 @@ public class MoganopterusEntity extends DinoEntityBase implements GeoEntity, Fly } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MussasaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MussasaurusEntity.java index b072de2..2f81181 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MussasaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/MussasaurusEntity.java @@ -304,7 +304,7 @@ public class MussasaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/NyctosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/NyctosaurusEntity.java index 3c06ebe..ebce948 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/NyctosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/NyctosaurusEntity.java @@ -351,7 +351,7 @@ public class NyctosaurusEntity extends DinoEntityBase implements GeoEntity, Flyi } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnitholestesEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnitholestesEntity.java index a5a2f0e..2ef4b9d 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnitholestesEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnitholestesEntity.java @@ -316,7 +316,7 @@ public class OrnitholestesEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnithomimusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnithomimusEntity.java index 49c0181..fcde111 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnithomimusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OrnithomimusEntity.java @@ -313,7 +313,7 @@ public class OrnithomimusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OuranosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OuranosaurusEntity.java index eb073c7..bc5b96f 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OuranosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OuranosaurusEntity.java @@ -313,7 +313,7 @@ public class OuranosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OviraptorEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OviraptorEntity.java index 3bda5e5..ce2c0fe 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OviraptorEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/OviraptorEntity.java @@ -315,7 +315,7 @@ public class OviraptorEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PachycephalosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PachycephalosaurusEntity.java index 0c8760c..bd38183 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PachycephalosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PachycephalosaurusEntity.java @@ -315,7 +315,7 @@ public class PachycephalosaurusEntity extends DinoEntityBase implements GeoEntit } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ParasaurolophusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ParasaurolophusEntity.java index 772464c..e19c278 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ParasaurolophusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ParasaurolophusEntity.java @@ -313,7 +313,7 @@ public class ParasaurolophusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProceratosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProceratosaurusEntity.java index d69378f..6b63c96 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProceratosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProceratosaurusEntity.java @@ -316,7 +316,7 @@ public class ProceratosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProcompsognathusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProcompsognathusEntity.java index 9024ae5..1dd4f0c 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProcompsognathusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProcompsognathusEntity.java @@ -316,7 +316,7 @@ public class ProcompsognathusEntity extends DinoEntityBase implements GeoEntity } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProtoceratopsEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProtoceratopsEntity.java index 604881e..62787d2 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProtoceratopsEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ProtoceratopsEntity.java @@ -315,7 +315,7 @@ public class ProtoceratopsEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PteranodonEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PteranodonEntity.java index 88f1911..228fc55 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PteranodonEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PteranodonEntity.java @@ -355,7 +355,7 @@ public class PteranodonEntity extends DinoEntityBase implements GeoEntity, Flyin } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PterodaustroEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PterodaustroEntity.java index a9da4fb..55ef268 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PterodaustroEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/PterodaustroEntity.java @@ -355,7 +355,7 @@ public class PterodaustroEntity extends DinoEntityBase implements GeoEntity, Fly } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/QuetzalcoatlusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/QuetzalcoatlusEntity.java index d918c18..251f927 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/QuetzalcoatlusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/QuetzalcoatlusEntity.java @@ -351,7 +351,7 @@ public class QuetzalcoatlusEntity extends DinoEntityBase implements GeoEntity, F } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RajasaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RajasaurusEntity.java index 8cf5efb..8212d05 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RajasaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RajasaurusEntity.java @@ -314,7 +314,7 @@ public class RajasaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RugopsEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RugopsEntity.java index 697f80b..ec50f1c 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RugopsEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/RugopsEntity.java @@ -314,7 +314,7 @@ public class RugopsEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SegisaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SegisaurusEntity.java index 73cfb82..85fa66e 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SegisaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SegisaurusEntity.java @@ -312,7 +312,7 @@ public class SegisaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ShantungosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ShantungosaurusEntity.java index 85e773a..2548058 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ShantungosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ShantungosaurusEntity.java @@ -313,7 +313,7 @@ public class ShantungosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SpinosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SpinosaurusEntity.java index 27d33b0..71d243c 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SpinosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SpinosaurusEntity.java @@ -315,7 +315,7 @@ public class SpinosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StegosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StegosaurusEntity.java index 746ab2d..0dee320 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StegosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StegosaurusEntity.java @@ -316,7 +316,7 @@ public class StegosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StyracosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StyracosaurusEntity.java index 92a9de9..7e5619f 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StyracosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/StyracosaurusEntity.java @@ -315,7 +315,7 @@ public class StyracosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SuchomimusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SuchomimusEntity.java index 85307b4..51e3aa9 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SuchomimusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/SuchomimusEntity.java @@ -306,7 +306,7 @@ public class SuchomimusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TapejaraEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TapejaraEntity.java index a31be3a..ec4cdd3 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TapejaraEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TapejaraEntity.java @@ -355,7 +355,7 @@ public class TapejaraEntity extends DinoEntityBase implements GeoEntity, FlyingA } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TherizinosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TherizinosaurusEntity.java index c9fbe41..fa0f5a9 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TherizinosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TherizinosaurusEntity.java @@ -316,7 +316,7 @@ public class TherizinosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ThescelosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ThescelosaurusEntity.java index f0abd44..63e1f11 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ThescelosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ThescelosaurusEntity.java @@ -304,7 +304,7 @@ public class ThescelosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TitanosaurusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TitanosaurusEntity.java index d06122a..78325a4 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TitanosaurusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TitanosaurusEntity.java @@ -315,7 +315,7 @@ public class TitanosaurusEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TriceratopsEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TriceratopsEntity.java index a5d7ff8..9afc7bd 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TriceratopsEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TriceratopsEntity.java @@ -315,7 +315,7 @@ public class TriceratopsEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TroodonEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TroodonEntity.java index f5ef0b9..8eedb38 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TroodonEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TroodonEntity.java @@ -316,7 +316,7 @@ public class TroodonEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TropeognathusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TropeognathusEntity.java index 6ebddad..83b4f7a 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TropeognathusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TropeognathusEntity.java @@ -355,7 +355,7 @@ public class TropeognathusEntity extends DinoEntityBase implements GeoEntity, Fl } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TupuxuaraEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TupuxuaraEntity.java index ee6cc97..81ee073 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TupuxuaraEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TupuxuaraEntity.java @@ -351,7 +351,7 @@ public class TupuxuaraEntity extends DinoEntityBase implements GeoEntity, Flying } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TyrannosaurusRexEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TyrannosaurusRexEntity.java index da13274..be4422a 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TyrannosaurusRexEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/TyrannosaurusRexEntity.java @@ -316,7 +316,7 @@ public class TyrannosaurusRexEntity extends DinoEntityBase implements GeoEntity } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/UtahraptorEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/UtahraptorEntity.java index f404e79..2f54838 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/UtahraptorEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/UtahraptorEntity.java @@ -315,7 +315,7 @@ public class UtahraptorEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/VelociraptorEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/VelociraptorEntity.java index 28b579e..a3d4f07 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/VelociraptorEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/VelociraptorEntity.java @@ -317,7 +317,7 @@ public class VelociraptorEntity extends DinoEntityBase implements GeoEntity { } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } public int getTypeVariant() { diff --git a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ZhenyuanopterusEntity.java b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ZhenyuanopterusEntity.java index 5f5b776..6fcda58 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ZhenyuanopterusEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/entity/custom/ZhenyuanopterusEntity.java @@ -351,7 +351,7 @@ public class ZhenyuanopterusEntity extends DinoEntityBase implements GeoEntity, } @Override -public float getDinoScale() { +public float getLiveDinoScale() { return this.getTotalModelScale(); } diff --git a/common/src/main/resources/assets/jurassicrevived/animations/alligator_gar.animation.json b/common/src/main/resources/assets/jurassicrevived/animations/alligator_gar.animation.json new file mode 100644 index 0000000..0d811ea --- /dev/null +++ b/common/src/main/resources/assets/jurassicrevived/animations/alligator_gar.animation.json @@ -0,0 +1,990 @@ +{ + "format_version": "1.8.0", + "animations": { + "anim.alligator_gar.swim": { + "loop": true, + "animation_length": 1, + "bones": { + "Body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [-0.5, 0, 0] + }, + "post": { + "vector": [-0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Head": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Tail1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tail2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Dorsalfin2": { + "rotation": { + "0.0": { + "vector": [-2.5, 0, 0] + }, + "0.5417": { + "vector": [-4.85, 0, 0] + }, + "1.0": { + "vector": [-2.5, 0, 0] + } + } + }, + "Leftbottomfin": { + "rotation": { + "0.0": { + "vector": [0, 17.5, 0] + }, + "0.5": { + "vector": [0, 22.5, 0] + }, + "1.0": { + "vector": [0, 17.5, 0] + } + } + }, + "root": { + "rotation": { + "vector": [0.5, 0, 0] + }, + "position": { + "vector": [0, 0, -19] + } + }, + "Mainhead": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7917": { + "post": { + "vector": [0, 3.33, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0.2, 0] + }, + "1.0": { + "vector": [0, 0.2, 0] + } + } + }, + "Lowerjawtop": { + "rotation": { + "0.0": { + "vector": [-10, 0, 0] + }, + "1.0": { + "vector": [-10, 0, 0] + } + } + }, + "Neck": { + "rotation": { + "0.0": { + "vector": [12.5, 0, 0] + }, + "0.25": { + "pre": { + "vector": [12.5, -10, 0] + }, + "post": { + "vector": [12.5, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [15, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [12.5, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2917": { + "vector": [0.5, 0, 0] + }, + "0.75": { + "vector": [-0.5, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "BodySection1": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0.22049, -0.00241, 0.60573] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.22033, 0.00481, -1.26926] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.75": { + "vector": [0.3, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "BodySection2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0.44067, 9.99038, 2.53852] + }, + "post": { + "vector": [0.44067, 9.99038, 2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.75": { + "vector": [-0.3, 0, 0] + } + } + }, + "BodySection3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [-0.38468, 4.75353, -2.68073] + }, + "post": { + "vector": [-0.38468, 4.75353, -2.68073] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [-0.43564, -4.99053, 2.49996] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.63, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.5, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tailsection5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [-0.38898, 9.75342, -2.71475] + }, + "post": { + "vector": [-0.38898, 9.75342, -2.71475] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [-0.44067, -9.99038, 2.53852] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Dorsalfin": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.5": { + "vector": [-4, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Neckback1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 4.17, 0] + }, + "0.75": { + "vector": [0, -10, 0] + }, + "1.0": { + "vector": [0, 2.5, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [-1.03, 0, 0] + }, + "0.75": { + "vector": [1.4, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Neckback2": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.375": { + "vector": [0, 0, 0] + } + } + } + } + }, + "anim.alligator_gar.mouth": { + "loop": "hold_on_last_frame", + "animation_length": 1.25, + "bones": { + "Jaw": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Lowerjawfront": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.5": { + "vector": [40, 0, 0] + }, + "1.25": { + "vector": [0, 0, 0] + } + } + }, + "root": { + "position": { + "vector": [0, 0, -20] + } + }, + "Lowerjawrear": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Lowerjawtop": { + "rotation": { + "0.0": { + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Neck": { + "rotation": { + "0.0": { + "vector": [15, 0, 0] + }, + "1.25": { + "vector": [15, 0, 0] + } + } + } + } + }, + "anim.alligator_gar.flop": { + "loop": true, + "animation_length": 0.5, + "bones": { + "Body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 112.5] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 67.5] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 112.5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, -2, 0] + }, + "0.125": { + "pre": { + "vector": [0, 0, 0] + }, + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, -2, 0] + } + } + }, + "Head": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Jaw": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Tail1": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "root": { + "position": { + "0.0": { + "vector": [4, -16, -17] + }, + "0.1667": { + "vector": [4, -17, -16] + }, + "0.5": { + "vector": [4, -16, -17] + } + } + }, + "Mainhead": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -0.3, 1.6] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Lowerjawrear": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 0, 0] + } + } + }, + "Neck": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0.5, 1] + }, + "0.25": { + "vector": [-0.9, 0.5, 0.4] + }, + "0.5": { + "vector": [-0.4, 0.5, 1] + } + } + }, + "BodySection1": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 107.5] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 67.5] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 107.5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, -2, 0] + }, + "0.125": { + "pre": { + "vector": [0, 0, 0] + }, + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, -2, 0] + } + } + }, + "BodySection2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, -18.67, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "BodySection3": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "TailSection1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, -10, 0] + } + } + }, + "TailSection2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "TailSection3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, -7.5, 0] + }, + "0.4583": { + "vector": [0, -2.5, 0] + } + } + }, + "Tailsection5": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -22.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/jurassicrevived/animations/mawsonia.animation.json b/common/src/main/resources/assets/jurassicrevived/animations/mawsonia.animation.json new file mode 100644 index 0000000..8819816 --- /dev/null +++ b/common/src/main/resources/assets/jurassicrevived/animations/mawsonia.animation.json @@ -0,0 +1,1142 @@ +{ + "format_version": "1.8.0", + "animations": { + "anim.mawsonia.swim": { + "loop": true, + "animation_length": 1, + "bones": { + "Body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [-0.5, 0, 0] + }, + "post": { + "vector": [-0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Head": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Dorsalfin2": { + "rotation": { + "0.0": { + "vector": [-2.5, 0, 0] + }, + "0.5417": { + "vector": [-4.85, 0, 0] + }, + "1.0": { + "vector": [-2.5, 0, 0] + } + } + }, + "Body1": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0.21986, 0.01682, -4.39424] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.21992, -0.01441, 3.7307] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Body3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tail1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tail2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Dorsalfin": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.5": { + "vector": [-4, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Neck2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, -10, 0] + }, + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2917": { + "vector": [0.5, 0, 0] + }, + "0.75": { + "vector": [-0.5, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Mainhead2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7917": { + "post": { + "vector": [0, 3.33, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0.2, 0] + }, + "1.0": { + "vector": [0, 0.2, 0] + } + } + }, + "BodySection4": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0.21986, 0.01682, -4.39424] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.21992, -0.01441, 3.7307] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "BodySection5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection4": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.63, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection6": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.5, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Leftbottomfin4": { + "rotation": { + "0.0": { + "vector": [0, 17.5, 0] + }, + "0.5": { + "vector": [0, 22.5, 0] + }, + "1.0": { + "vector": [0, 17.5, 0] + } + } + } + } + }, + "anim.mawsonia.fast_swim": { + "loop": true, + "animation_length": 1, + "bones": { + "Body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [-0.5, 0, 0] + }, + "post": { + "vector": [-0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Head": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Dorsalfin2": { + "rotation": { + "0.0": { + "vector": [-2.5, 0, 0] + }, + "0.5417": { + "vector": [-4.85, 0, 0] + }, + "1.0": { + "vector": [-2.5, 0, 0] + } + } + }, + "Body1": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0.21986, 0.01682, -4.39424] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.21992, -0.01441, 3.7307] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Body3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tail1": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Tail2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Dorsalfin": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.5": { + "vector": [-4, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Neck2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, -10, 0] + }, + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2917": { + "vector": [0.5, 0, 0] + }, + "0.75": { + "vector": [-0.5, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Mainhead2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7917": { + "post": { + "vector": [0, 3.33, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0.2, 0] + }, + "1.0": { + "vector": [0, 0.2, 0] + } + } + }, + "BodySection4": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0.21986, 0.01682, -4.39424] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0.44067, -9.99038, -2.53852] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0.21992, -0.01441, 3.7307] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "BodySection5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection4": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.63, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "pre": { + "vector": [0, 10, 0] + }, + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "TailSection6": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 5, 0] + }, + "0.625": { + "vector": [0, -7.5, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } + } + }, + "Leftbottomfin4": { + "rotation": { + "0.0": { + "vector": [0, 17.5, 0] + }, + "0.5": { + "vector": [0, 22.5, 0] + }, + "1.0": { + "vector": [0, 17.5, 0] + } + } + } + } + }, + "anim.mawsonia.landed": { + "animation_length": 1.75, + "bones": { + "Lowerjawrear2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "BodySection5": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [-2, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [-2, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "BodySection6": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [-6.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [-6.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "TailSection4": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [5.008, 2.98426, 0.30709] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [5.008, 2.98426, 0.30709] + }, + "lerp_mode": "catmullrom" + } + } + }, + "TailSection5": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [1, 7, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [1, 7, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "TailSection6": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [3.77387, 1.43693, 7.81599] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [3.77387, 1.43693, 7.81599] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Toprearfin4": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-18, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Topfinfrontbase2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-40, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + } + } + }, + "anim.mawsonia.mouth": { + "loop": "hold_on_last_frame", + "animation_length": 1.25, + "bones": { + "Jaw": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Lowerjawfront": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "shape6": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "Lowerjawforward2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/jurassicrevived/geo/alligator_gar.geo.json b/common/src/main/resources/assets/jurassicrevived/geo/alligator_gar.geo.json new file mode 100644 index 0000000..cf83cd2 --- /dev/null +++ b/common/src/main/resources/assets/jurassicrevived/geo/alligator_gar.geo.json @@ -0,0 +1,280 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.alligator_gar", + "texture_width": 96, + "texture_height": 96, + "visible_bounds_width": 7, + "visible_bounds_height": 3.5, + "visible_bounds_offset": [0, 1.25, 0] + }, + "bones": [ + { + "name": "root", + "pivot": [0, 24, 0] + }, + { + "name": "BodySection1", + "parent": "root", + "pivot": [0, 19.1356, 1.70486], + "cubes": [ + {"origin": [-2.5, 17.1356, 1.70486], "size": [5, 8, 6], "uv": [1, 26]} + ] + }, + { + "name": "BodySection2", + "parent": "BodySection1", + "pivot": [0, 25.4356, 6.70486], + "cubes": [ + {"origin": [-3, 16.4356, 6.70486], "size": [6, 9, 10], "uv": [26, 22]} + ] + }, + { + "name": "BodySection3", + "parent": "BodySection2", + "pivot": [0, 25.4356, 15.70486], + "cubes": [ + {"origin": [-2.5, 16.4356, 15.70486], "size": [5, 9, 10], "uv": [60, 22]} + ] + }, + { + "name": "TailSection1", + "parent": "BodySection3", + "pivot": [0, 25.4356, 24.70486], + "cubes": [ + {"origin": [-2, 16.4356, 24.70486], "size": [4, 9, 8], "uv": [1, 42]} + ] + }, + { + "name": "TailSection2", + "parent": "TailSection1", + "pivot": [0, 25.4356, 31.70486], + "rotation": [0.09, 0, 0], + "cubes": [ + {"origin": [-1.5, 16.4356, 31.70486], "size": [3, 9, 8], "uv": [26, 42]} + ] + }, + { + "name": "TailSection3", + "parent": "TailSection2", + "pivot": [0, 25.2356, 37.70486], + "cubes": [ + {"origin": [-1, 17.2356, 37.70486], "size": [2, 8, 7], "uv": [49, 42]} + ] + }, + { + "name": "Tailsection5", + "parent": "TailSection3", + "pivot": [0, 24.7356, 43.70486], + "cubes": [ + {"origin": [-0.5, 17.7356, 43.70486], "size": [1, 7, 6], "uv": [68, 42]} + ] + }, + { + "name": "Tailsection4", + "parent": "Tailsection5", + "pivot": [0, 24.2356, 48.70486], + "cubes": [ + {"origin": [-0.5, 18.2356, 48.70486], "size": [1, 6, 4], "uv": [83, 42]} + ] + }, + { + "name": "Tailfin", + "parent": "Tailsection4", + "pivot": [-0.5, 21.2356, 47.70486], + "rotation": [45, 0, 0], + "cubes": [ + {"origin": [0, 9.2356, 47.70486], "size": [0, 12, 12], "uv": [22, 48]} + ] + }, + { + "name": "Dorsalfin", + "parent": "Tailsection5", + "pivot": [0, 24.7356, 42.90486], + "rotation": [41.22, 0, 0], + "cubes": [ + {"origin": [0, 19.7356, 42.90486], "size": [0, 5, 8], "uv": [1, 80]} + ] + }, + { + "name": "Assfin", + "parent": "Tailsection5", + "pivot": [0, 17.2356, 42.90486], + "rotation": [-47.55, 0, 0], + "cubes": [ + {"origin": [0, 17.2356, 42.90486], "size": [0, 5, 8], "uv": [1, 74]} + ] + }, + { + "name": "RightFrontFlipper2", + "parent": "BodySection3", + "pivot": [2.1, 17.6356, 20.30486], + "rotation": [0, -31.46, -48.49], + "cubes": [ + {"origin": [2.1, 17.6356, 20.30486], "size": [8, 0, 5], "uv": [-4, 70]} + ] + }, + { + "name": "LeftFrontFlipper2", + "parent": "BodySection3", + "pivot": [-2.1, 17.6356, 20.30486], + "rotation": [0, 31.46, 48.49], + "cubes": [ + {"origin": [-10.1, 17.6356, 20.30486], "size": [8, 0, 5], "uv": [-4, 76], "mirror": true} + ] + }, + { + "name": "Neck", + "parent": "BodySection1", + "pivot": [0, 23.8356, 0.00486], + "rotation": [-15.54, 0, 0], + "cubes": [ + {"origin": [-2, 17.1356, -0.99514], "size": [4, 6, 4], "uv": [18, 1]} + ] + }, + { + "name": "Neckback1", + "parent": "Neck", + "pivot": [0, 21.3356, -5.29514], + "rotation": [25.3247, 0, 0], + "cubes": [ + {"origin": [-2, 18.3356, -5.29514], "size": [4, 4, 4], "uv": [1, 13]} + ] + }, + { + "name": "Neckback2", + "parent": "Neckback1", + "pivot": [0, 22.3356, -1.29514], + "rotation": [-8.38, 0, 0], + "cubes": [ + {"origin": [-2, 15.3356, -1.29514], "size": [4, 7, 4], "uv": [1, 1]} + ] + }, + { + "name": "LeftFrontFlipper", + "parent": "Neck", + "pivot": [-2.3, 18.0356, 1.70486], + "rotation": [29.68, 47.77, 55.02], + "cubes": [ + {"origin": [-9.3, 18.0356, 1.70486], "size": [7, 0, 4], "uv": [-3, 65], "mirror": true} + ] + }, + { + "name": "RightFrontFlipper", + "parent": "Neck", + "pivot": [2.3, 18.0356, 1.70486], + "rotation": [29.68, -47.77, -55.02], + "cubes": [ + {"origin": [2.3, 18.0356, 1.70486], "size": [7, 0, 4], "uv": [-3, 60]} + ] + }, + { + "name": "Mainhead", + "parent": "Neck", + "pivot": [0, 23.9, -0.6], + "rotation": [15.54, 0, 0], + "cubes": [ + {"origin": [-2.5, 19.9, -7.6], "size": [5, 4, 7], "uv": [47, 58]} + ] + }, + { + "name": "Lowerjawrear", + "parent": "Mainhead", + "pivot": [0, 20.4, -1.3], + "rotation": [-22.93, 0, 0], + "cubes": [ + {"origin": [-2, 17.4, -7.3], "size": [4, 3, 6], "uv": [49, 22]} + ] + }, + { + "name": "Lowerjawtop", + "parent": "Lowerjawrear", + "pivot": [0, 18.3, -6.8], + "rotation": [21.68985, 0, 0], + "cubes": [ + {"origin": [-1.5, 18.3, -15.8], "size": [3, 1, 9], "uv": [30, 11]} + ] + }, + { + "name": "Lowerjawbottom", + "parent": "Lowerjawtop", + "pivot": [0, 17.5, -6.6], + "rotation": [-5.36366, 0, 0], + "cubes": [ + {"origin": [-1, 17.5, -15.6], "size": [2, 1, 9], "uv": [55, 11]} + ] + }, + { + "name": "Lowerteeth", + "parent": "Lowerjawtop", + "pivot": [0, 19.3, -6.8], + "cubes": [ + {"origin": [-1.5, 19.3, -15.8], "size": [3, 1, 9], "uv": [19, 73]} + ] + }, + { + "name": "Gillright", + "parent": "Mainhead", + "pivot": [1.9, 22.7, 1.5], + "cubes": [ + {"origin": [1.9, 18.7, -4.5], "size": [1, 4, 6], "uv": [19, 17]} + ] + }, + { + "name": "Gillleft", + "parent": "Mainhead", + "pivot": [-1.9, 22.7, 1.5], + "cubes": [ + {"origin": [-2.9, 18.7, -4.5], "size": [1, 4, 6], "uv": [19, 17], "mirror": true} + ] + }, + { + "name": "Upperjawmain", + "parent": "Mainhead", + "pivot": [0, 22.7, -7.4], + "rotation": [-12.66, 0, 0], + "cubes": [ + {"origin": [-2, 21.7, -16.4], "size": [4, 1, 9], "uv": [35, 1]} + ] + }, + { + "name": "Upperjawtop", + "parent": "Upperjawmain", + "pivot": [0, 23.7, -7.4], + "rotation": [6.44, 0, 0], + "cubes": [ + {"origin": [-1.5, 22.7, -16.4], "size": [3, 1, 9], "uv": [62, 1]} + ] + }, + { + "name": "Upperjawend", + "parent": "Upperjawmain", + "pivot": [0, 22.7, -16.4], + "rotation": [31.21835, 0, 0], + "cubes": [ + {"origin": [-2, 21.7, -17.4], "size": [4, 1, 1], "uv": [78, 7]} + ] + }, + { + "name": "Upperjaw", + "parent": "Upperjawend", + "pivot": [0, 21.7, -16.4], + "cubes": [ + {"origin": [-2, 20.7, -17.4], "size": [4, 1, 1], "uv": [78, 12]} + ] + }, + { + "name": "Upperteethmain", + "parent": "Mainhead", + "pivot": [0, 22.7, -7.4], + "rotation": [-12.66, 0, 0], + "cubes": [ + {"origin": [-2, 20.7, -15.6], "size": [4, 1, 9], "uv": [45, 70]} + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/jurassicrevived/geo/mawsonia.geo.json b/common/src/main/resources/assets/jurassicrevived/geo/mawsonia.geo.json new file mode 100644 index 0000000..ac78358 --- /dev/null +++ b/common/src/main/resources/assets/jurassicrevived/geo/mawsonia.geo.json @@ -0,0 +1,471 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.mawsonia", + "texture_width": 256, + "texture_height": 200, + "visible_bounds_width": 6, + "visible_bounds_height": 4.5, + "visible_bounds_offset": [0, 1.75, 0] + }, + "bones": [ + { + "name": "bb_main", + "pivot": [0, 0, 0], + "cubes": [ + {"origin": [8, 16.4, -1], "size": [3, 0, 3], "uv": [55, 164]} + ] + }, + { + "name": "root2", + "pivot": [0, 24, 0] + }, + { + "name": "Neck2", + "parent": "root2", + "pivot": [2, 27.7, -28.4], + "cubes": [ + {"origin": [-2.5, 13, -28.4], "size": [9, 14, 8], "uv": [67, 22]} + ] + }, + { + "name": "BodySection4", + "parent": "Neck2", + "pivot": [-1.5, 25.1, -21.9], + "rotation": [1.79, 0, 0], + "cubes": [ + {"origin": [-3.5, 12.1, -21.9], "size": [11, 19, 13], "uv": [203, 80]} + ] + }, + { + "name": "BodySection5", + "parent": "BodySection4", + "pivot": [1, 31.5, -10.6], + "cubes": [ + {"origin": [-4, 12, -10.6], "size": [12, 20, 14], "uv": [146, 80]} + ] + }, + { + "name": "BodySection6", + "parent": "BodySection5", + "pivot": [2.5, 30.2, 1.4], + "rotation": [-2.16, 0, 0], + "cubes": [ + {"origin": [-3.5, 14, 1.4], "size": [11, 17, 10], "uv": [101, 79]} + ] + }, + { + "name": "TailSection4", + "parent": "BodySection6", + "pivot": [1, 31.5, 10.7], + "rotation": [-2.13, 0, 0], + "cubes": [ + {"origin": [-1.5, 14.5, 10.7], "size": [7, 17, 9], "uv": [66, 76]} + ] + }, + { + "name": "TailSection5", + "parent": "TailSection4", + "pivot": [0.5, 32, 18.2], + "rotation": [0.09, 0, 0], + "cubes": [ + {"origin": [-0.5, 14, 18.2], "size": [5, 18, 9], "uv": [33, 75]} + ] + }, + { + "name": "TailSection6", + "parent": "TailSection5", + "pivot": [0.5, 32.2, 27.4], + "rotation": [-45, 0, 0], + "cubes": [ + {"origin": [0.5, 19.2, 27.4], "size": [3, 13, 13], "uv": [23, 110]} + ] + }, + { + "name": "FlukeSection4", + "parent": "TailSection6", + "pivot": [1.5, 30.2, 27.3], + "rotation": [8.09, 0, 0], + "cubes": [ + {"origin": [1.5, 30.2, 27.3], "size": [1, 2, 12], "uv": [5, 100]} + ] + }, + { + "name": "FlukeSection5", + "parent": "FlukeSection4", + "pivot": [1.5, 31.2, 27.2], + "rotation": [8.09, 0, 0], + "cubes": [ + {"origin": [2, 30.2, 27.2], "size": [0, 3, 12], "uv": [4, 78]} + ] + }, + { + "name": "FlukeSection6", + "parent": "TailSection6", + "pivot": [1.5, 30.6, 38.8], + "rotation": [-45, 0, 0], + "cubes": [ + {"origin": [1.5, 31.6, 37.8], "size": [1, 3, 2], "uv": [12, 120]} + ] + }, + { + "name": "FlukeSection7", + "parent": "FlukeSection6", + "pivot": [1, 33.4, 36.8], + "rotation": [-45, 0, 0], + "cubes": [ + {"origin": [2, 34.4, 35.8], "size": [0, 3, 3], "uv": [3, 120]} + ] + }, + { + "name": "FlukeSection8", + "parent": "TailSection6", + "pivot": [1.5, 30.2, 39], + "rotation": [-8.09, 0, 0], + "cubes": [ + {"origin": [1.5, 19.1, 40], "size": [1, 12, 2], "uv": [5, 138]} + ] + }, + { + "name": "FlukeSection9", + "parent": "FlukeSection8", + "pivot": [1, 30.3, 40.6], + "rotation": [-8.09, 0, 0], + "cubes": [ + {"origin": [2, 19.2, 41.6], "size": [0, 12, 3], "uv": [5, 154]} + ] + }, + { + "name": "TailSection1girth2", + "parent": "TailSection4", + "pivot": [6.5, 29.4, 10.7], + "cubes": [ + {"origin": [-2.5, 16.4, 10.7], "size": [9, 13, 6], "uv": [69, 108]} + ] + }, + { + "name": "Assfin4", + "parent": "BodySection6", + "pivot": [1.5, 15.7, 8.9], + "rotation": [-42.79, 0, 0], + "cubes": [ + {"origin": [1.5, 13.7, 8.9], "size": [1, 4, 7], "uv": [26, 139]} + ] + }, + { + "name": "Assfin5", + "parent": "Assfin4", + "pivot": [1, 16.2, 12.4], + "cubes": [ + {"origin": [2, 13.2, 12.4], "size": [0, 5, 5], "uv": [28, 149]} + ] + }, + { + "name": "Assfin6", + "parent": "Assfin5", + "pivot": [1, 15.7, 17], + "cubes": [ + {"origin": [2, 14.7, 17], "size": [0, 3, 2], "uv": [29, 162]} + ] + }, + { + "name": "Toprearfin4", + "parent": "BodySection6", + "pivot": [2.5, 33.1, 5.7], + "rotation": [37.46, 0, 0], + "cubes": [ + {"origin": [1.5, 29.1, 3.7], "size": [1, 4, 8], "uv": [5, 38]} + ] + }, + { + "name": "Toprearfin5", + "parent": "Toprearfin4", + "pivot": [2, 33.1, 12.6], + "rotation": [2.08, 0, 0], + "cubes": [ + {"origin": [2, 28.1, 10.6], "size": [0, 5, 5], "uv": [7, 24]} + ] + }, + { + "name": "Toprearfin6", + "parent": "Toprearfin5", + "pivot": [2, 32.2, 17.6], + "rotation": [-5.11, 0, 0], + "cubes": [ + {"origin": [2, 28.2, 15.6], "size": [0, 4, 2], "uv": [9, 19]} + ] + }, + { + "name": "Toprearfin7", + "parent": "Toprearfin6", + "pivot": [2, 30.7, 19.6], + "rotation": [-5.11, 0, 0], + "cubes": [ + {"origin": [2, 28.7, 17.6], "size": [0, 2, 2], "uv": [8, 13]} + ] + }, + { + "name": "Neckback6", + "parent": "BodySection6", + "pivot": [5.5, 32.3, 1.2], + "rotation": [-1.14, 0, 0], + "cubes": [ + {"origin": [-1.5, 29.3, 1.2], "size": [7, 3, 10], "uv": [109, 61]} + ] + }, + { + "name": "Neckback7", + "parent": "BodySection5", + "pivot": [1.5, 31.2, 0.3], + "rotation": [-3.57, 0, 0], + "cubes": [ + {"origin": [-2, 27.53, -8], "size": [8, 5, 11], "uv": [155, 57]} + ] + }, + { + "name": "Neckback8", + "parent": "BodySection4", + "pivot": [1.5, 31.9, -9.1], + "rotation": [0.38, 0, 0], + "cubes": [ + {"origin": [-2.5, 27.23, -17.4], "size": [9, 6, 10], "uv": [201, 57]} + ] + }, + { + "name": "Topfinfrontbase2", + "parent": "Neckback8", + "pivot": [2.5, 32.2, -14.1], + "rotation": [76.65, 0, 0], + "cubes": [ + {"origin": [1.5, 28.2, -14.1], "size": [1, 4, 5], "uv": [33, 35]} + ] + }, + { + "name": "Topfinfront5", + "parent": "Topfinfrontbase2", + "pivot": [2, 32.2, -11.9], + "rotation": [-4.77, 0, 0], + "cubes": [ + {"origin": [2, 26.2, -11.9], "size": [0, 6, 5], "uv": [30, 21]} + ] + }, + { + "name": "Topfinfront6", + "parent": "Topfinfront5", + "pivot": [2, 31.8, -6.9], + "rotation": [-0.60823, 0, 0], + "cubes": [ + {"origin": [2, 26.8, -6.9], "size": [0, 5, 3], "uv": [33, 15]} + ] + }, + { + "name": "Topfinfront7", + "parent": "Topfinfront6", + "pivot": [2, 31.5, -3.9], + "rotation": [-1.47355, 0, 0], + "cubes": [ + {"origin": [2, 28.5, -3.9], "size": [0, 3, 2], "uv": [36, 10]} + ] + }, + { + "name": "RightFrontFlipper4", + "parent": "BodySection4", + "pivot": [7.5, 16.3, -17.3], + "rotation": [15.24, -2.61, 90], + "cubes": [ + {"origin": [4, 15.3, -17.3], "size": [6, 1, 10], "uv": [105, 138]} + ] + }, + { + "name": "RightFrontFlipper5", + "parent": "RightFrontFlipper4", + "pivot": [11, 15.8, -12.3], + "cubes": [ + {"origin": [3, 15.8, -12.3], "size": [8, 0, 8], "uv": [105, 155]} + ] + }, + { + "name": "RightFrontFlipper6", + "parent": "RightFrontFlipper5", + "pivot": [9.5, 15.8, -4.3], + "cubes": [ + {"origin": [4.5, 15.8, -4.3], "size": [5, 0, 6], "uv": [110, 167]} + ] + }, + { + "name": "LeftFrontFlipper4", + "parent": "BodySection4", + "pivot": [-3.5, 16.3, -17.3], + "rotation": [15.24, 2.61, -90], + "cubes": [ + {"origin": [-6, 15.3, -17.3], "size": [6, 1, 10], "uv": [141, 138]} + ] + }, + { + "name": "LeftFrontFlipper5", + "parent": "LeftFrontFlipper4", + "pivot": [-2.5, 15.8, -11.7], + "cubes": [ + {"origin": [-7, 15.8, -11.7], "size": [8, 0, 8], "uv": [138, 155]} + ] + }, + { + "name": "LeftFrontFlipper6", + "parent": "LeftFrontFlipper5", + "pivot": [-4, 15.8, -3.7], + "cubes": [ + {"origin": [-5.5, 15.8, -3.7], "size": [5, 0, 6], "uv": [141, 167]} + ] + }, + { + "name": "Leftbottomfin4", + "parent": "BodySection4", + "pivot": [-2.5, 14.9, -11.3], + "rotation": [11.91, -55.8, -90], + "cubes": [ + {"origin": [-3, 13.9, -11.3], "size": [4, 1, 8], "uv": [77, 140]} + ] + }, + { + "name": "Leftbottomfin5", + "parent": "Leftbottomfin4", + "pivot": [1.5, 14.4, -6], + "cubes": [ + {"origin": [-3.5, 14.4, -6], "size": [5, 0, 5], "uv": [77, 154]} + ] + }, + { + "name": "Leftbottomfin6", + "parent": "Leftbottomfin5", + "pivot": [1, 14.4, -1], + "cubes": [ + {"origin": [-2, 14.4, -1], "size": [3, 0, 3], "uv": [82, 164]} + ] + }, + { + "name": "Rightbottomfin4", + "parent": "BodySection4", + "pivot": [7.5, 14.9, -11.3], + "rotation": [-11.91, -55.8, -90], + "cubes": [ + {"origin": [7, 15.9, -11.3], "size": [4, 1, 8], "uv": [49, 140]} + ] + }, + { + "name": "Rightbottomfin5", + "parent": "Rightbottomfin4", + "pivot": [8, 14.4, -6], + "cubes": [ + {"origin": [6.5, 16.4, -6], "size": [5, 0, 5], "uv": [50, 154]} + ] + }, + { + "name": "Rightbottomfin6", + "parent": "Rightbottomfin5", + "pivot": [7.5, 14.4, -1], + "cubes": [ + {"origin": [8, 16.4, -1], "size": [3, 0, 3], "uv": [55, 164]} + ] + }, + { + "name": "Neckback9", + "parent": "Neck2", + "pivot": [4.5, 22.8, -31.6], + "rotation": [41.75, 0, 0], + "cubes": [ + {"origin": [-2.5, 19.8, -31.6], "size": [9, 4, 8], "uv": [93, 5]} + ] + }, + { + "name": "Neckback10", + "parent": "Neck2", + "pivot": [1.5, 31.5, -18.4], + "rotation": [26.51, 0, 0], + "cubes": [ + {"origin": [-3, 27.83, -26.7], "size": [10, 5, 10], "uv": [46, 3]} + ] + }, + { + "name": "Mainhead2", + "parent": "Neck2", + "pivot": [3, 23.2, -26.9], + "rotation": [33.66, 0, 0], + "cubes": [ + {"origin": [-3, 18.2, -34.9], "size": [10, 9, 9], "uv": [107, 24]} + ] + }, + { + "name": "UpperJaw3", + "parent": "Mainhead2", + "pivot": [3.5, 23.3, -29.7], + "rotation": [-31.75, 0, 0], + "cubes": [ + {"origin": [-2.5, 20.3, -41.7], "size": [9, 2, 8], "uv": [149, 18]} + ] + }, + { + "name": "UpperJaw4", + "parent": "UpperJaw3", + "pivot": [2.5, 25.9, -30.5], + "rotation": [11.02, 0, 0], + "cubes": [ + {"origin": [-1.5, 22.9, -42.5], "size": [7, 2, 8], "uv": [145, 4]} + ] + }, + { + "name": "Rightgill2", + "parent": "Mainhead2", + "pivot": [7.7, 23.2, -30.9], + "cubes": [ + {"origin": [6.7, 15.2, -30.9], "size": [1, 8, 11], "uv": [51, 50]} + ] + }, + { + "name": "Leftgill2", + "parent": "Mainhead2", + "pivot": [-2.7, 23.2, -30.9], + "cubes": [ + {"origin": [-3.7, 15.2, -30.9], "size": [1, 8, 11], "uv": [81, 50]} + ] + }, + { + "name": "Lowerjawrear2", + "parent": "Mainhead2", + "pivot": [1.5, 20.5, -33.2], + "rotation": [-34.17256, 0, 0], + "cubes": [ + {"origin": [-1.5, 18, -37.2], "size": [7, 5, 5], "uv": [142, 45]} + ] + }, + { + "name": "Lowerjawforward2", + "parent": "Lowerjawrear2", + "pivot": [1.5, 20.4, -37.2], + "cubes": [ + {"origin": [-1.5, 19.4, -43.2], "size": [7, 2, 6], "uv": [169, 33]} + ] + }, + { + "name": "Chin2", + "parent": "Lowerjawforward2", + "pivot": [1, 17.3, -31.9], + "rotation": [-10.59, 0, 0], + "cubes": [ + {"origin": [-1, 17.3, -42.9], "size": [6, 2, 6], "uv": [170, 46]} + ] + }, + { + "name": "Lowerjawrear3", + "parent": "Mainhead2", + "pivot": [6, 22.4, -34.3], + "rotation": [-41.09, 0, 0], + "cubes": [ + {"origin": [-2, 18.4, -34.3], "size": [8, 4, 5], "uv": [110, 47]} + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar.png b/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar.png new file mode 100644 index 0000000..873d45b Binary files /dev/null and b/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar.png differ diff --git a/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar_female.png b/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar_female.png new file mode 100644 index 0000000..82f1132 Binary files /dev/null and b/common/src/main/resources/assets/jurassicrevived/textures/entity/alligator_gar_female.png differ diff --git a/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia.png b/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia.png new file mode 100644 index 0000000..33d692e Binary files /dev/null and b/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia.png differ diff --git a/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia_female.png b/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia_female.png new file mode 100644 index 0000000..e2cdbd1 Binary files /dev/null and b/common/src/main/resources/assets/jurassicrevived/textures/entity/mawsonia_female.png differ diff --git a/gradle.properties b/gradle.properties index e37e9d6..174c9f2 100755 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ fabric.loom.multiProjectOptimisation=true mod.name=Jurassic Revived mod.id=jurassicrevived mod.group=net.cmr.jurassicrevived -mod.version=0.228.0 +mod.version=0.229.0 mod.author=CMR Team, Eli Gibbs mod.description=A Minecraft mod that brings dinosaurs back to life using ancient DNA and modern technology\nBreed, study, and build your own prehistoric park with a wide variety of creatures... mod.license=CC-BY-ND-4.0