diff --git a/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java b/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java index 4830cb70..9102e4ea 100644 --- a/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java +++ b/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java @@ -145,7 +145,7 @@ public final class AntarchySettings { private static double nightmareSwordBaseDamage = 15.0D; - private static double nightmareSwordScalingFactor = 1.0D; + private static double nightmareSwordScalingFactor = 1.5D; private static boolean basiliskPetrifyingGazeEnabled = true; private static int basiliskSpawnMaxLightLevel = 5; private static double basiliskHealth = 150.0D; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java b/common/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java index 64ce3fb2..b139b9da 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java @@ -225,6 +225,8 @@ public final class AntarchyObjects { @SuppressWarnings("unchecked") public static Supplier SQUIRREL_NEST_BLOCK = (Supplier) UNBOUND; @SuppressWarnings("unchecked") + public static Supplier BRUTALFLY_COCOON_SPAWNER = (Supplier) UNBOUND; + @SuppressWarnings("unchecked") public static Supplier> ANT_NEST_BLOCK_ENTITY = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") public static Supplier> DREAM_CAMPFIRE_BLOCK_ENTITY = (Supplier>) UNBOUND; @@ -324,6 +326,7 @@ public final class AntarchyObjects { Supplier waspNest, Supplier hushweed, Supplier squirrelNestBlock, + Supplier brutalflyCocoonSpawner, Supplier> antNestBlockEntity, Supplier> dreamCampfireBlockEntity, Supplier> waspNestBlockEntity, @@ -417,6 +420,7 @@ public final class AntarchyObjects { WASP_NEST = waspNest; HUSHWEED = hushweed; SQUIRREL_NEST_BLOCK = squirrelNestBlock; + BRUTALFLY_COCOON_SPAWNER = brutalflyCocoonSpawner; ANT_NEST_BLOCK_ENTITY = antNestBlockEntity; DREAM_CAMPFIRE_BLOCK_ENTITY = dreamCampfireBlockEntity; WASP_NEST_BLOCK_ENTITY = waspNestBlockEntity; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/BrutalflyCocoonSpawnerBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/BrutalflyCocoonSpawnerBlock.java new file mode 100644 index 00000000..75d35d4b --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/BrutalflyCocoonSpawnerBlock.java @@ -0,0 +1,46 @@ +package com.craisinlord.antarchy.content.block; + +import com.craisinlord.antarchy.content.AntarchyObjects; +import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; + +public class BrutalflyCocoonSpawnerBlock extends Block { + + public BrutalflyCocoonSpawnerBlock(BlockBehaviour.Properties properties) { + super(properties); + } + + @Override + protected RenderShape getRenderShape(BlockState state) { + return RenderShape.INVISIBLE; + } + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL); + + BrutalflyEntity brutalfly = AntarchyObjects.BRUTALFLY.get().create(level); + if (brutalfly == null) { + return; + } + + BlockPos anchor = pos.above(); + brutalfly.moveTo( + anchor.getX() + 0.5D, + anchor.getY() - 1.5D, + anchor.getZ() + 0.5D, + random.nextFloat() * 360.0F, + 0.0F + ); + brutalfly.setCocooned(true, anchor); + brutalfly.setHealth(brutalfly.getMaxHealth()); + level.addFreshEntity(brutalfly); + } +} diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/CameraShakeClientState.java b/common/src/main/java/com/craisinlord/antarchy/content/client/CameraShakeClientState.java new file mode 100644 index 00000000..4cd02941 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/CameraShakeClientState.java @@ -0,0 +1,58 @@ +package com.craisinlord.antarchy.content.client; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.function.BooleanSupplier; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.phys.Vec3; + +public final class CameraShakeClientState { + public static final double TORETERROR_RANGE = 48.0D; + public static final float TORETERROR_STRENGTH = 1.0F; + public static final double NIGHTMARE_RANGE = 32.0D; + public static final float NIGHTMARE_STRENGTH = 1.35F; + + private record Source(double range, float strength, BooleanSupplier active) { + } + + private static final Map SOURCES = new HashMap<>(); + + private CameraShakeClientState() { + } + + public static void register(LivingEntity entity, double range, float strength, BooleanSupplier active) { + SOURCES.putIfAbsent(entity, new Source(range, strength, active)); + } + + public static float getStrength(Vec3 cameraPos) { + if (SOURCES.isEmpty()) { + return 0.0F; + } + + float total = 0.0F; + Iterator> iterator = SOURCES.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + LivingEntity entity = entry.getKey(); + Source source = entry.getValue(); + if (entity.isRemoved() || !entity.isAlive() || !source.active().getAsBoolean()) { + iterator.remove(); + continue; + } + + double distance = Math.sqrt(cameraPos.distanceToSqr(entity.position().add(0.0D, entity.getBbHeight() * 0.5D, 0.0D))); + if (distance > source.range()) { + continue; + } + + total += (float) ((1.0D - distance / source.range()) * source.strength()); + } + + return total; + } + + public static void clear() { + SOURCES.clear(); + } +} diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/AppleCowEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/AppleCowEntity.java index 13ddc3d6..301f1961 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/AppleCowEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/AppleCowEntity.java @@ -13,7 +13,6 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ai.goal.Goal; import net.minecraft.world.entity.animal.Cow; import net.minecraft.world.entity.Shearable; -import net.minecraft.core.BlockPos; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.entity.player.Player; @@ -21,7 +20,6 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.phys.Vec3; import software.bernie.geckolib.animatable.GeoEntity; import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; @@ -47,7 +45,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable private static final String NAP_COOLDOWN_KEY = "NapCooldown"; private static final String QUIRK_TICKS_KEY = "QuirkTicks"; private static final String SHEARED_KEY = "Sheared"; - private static final String GRASS_EAT_TICKS_KEY = "GrassEatTicks"; + private static final String REGROW_TICKS_KEY = "RegrowTicks"; private static final String MAIN_CONTROLLER = "main_controller"; private static final String SLEEP_TRANSITION_CONTROLLER = "sleep_transition_controller"; private static final String START_SLEEP_TRIGGER = "start_sleep"; @@ -60,7 +58,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable private static final int DAY_NAP_MAX_TICKS = 20 * 60 * 2; private static final int DAY_NAP_COOLDOWN_TICKS = 20 * 60 * 10; private static final int NIGHT_NAP_COOLDOWN_TICKS = 20 * 60 * 8; - private static final int GRASS_REGROW_TICKS = 20 * 60 * 3; + private static final int APPLE_REGROW_TICKS = 20 * 60 * 3; private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); @@ -73,7 +71,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable private int sleepTicksRemaining; private int napCooldownTicks; private int idleAnimationCycleTicks; - private int grassEatTicks; + private int regrowTicks; protected AppleCowEntity(EntityType entityType, Level level) { super(entityType, level); @@ -92,7 +90,6 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new AppleCowSleepGoal()); - this.goalSelector.addGoal(1, new AppleCowGrazeGoal()); } @Override @@ -148,8 +145,12 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable return; } - if (!this.isSheared()) { - this.grassEatTicks = 0; + if (this.isSheared()) { + this.regrowTicks++; + if (this.regrowTicks >= APPLE_REGROW_TICKS) { + this.setSheared(false); + this.regrowTicks = 0; + } } if (this.shouldStartNap()) { @@ -190,7 +191,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable tag.putInt(NAP_COOLDOWN_KEY, this.napCooldownTicks); tag.putInt(QUIRK_TICKS_KEY, this.getQuirkTicks()); tag.putBoolean(SHEARED_KEY, this.isSheared()); - tag.putInt(GRASS_EAT_TICKS_KEY, this.grassEatTicks); + tag.putInt(REGROW_TICKS_KEY, this.regrowTicks); } @Override @@ -201,7 +202,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable this.napCooldownTicks = tag.contains(NAP_COOLDOWN_KEY) ? tag.getInt(NAP_COOLDOWN_KEY) : randomNapCooldown(); this.setQuirkTicks(tag.getInt(QUIRK_TICKS_KEY)); this.setSheared(tag.getBoolean(SHEARED_KEY)); - this.grassEatTicks = tag.getInt(GRASS_EAT_TICKS_KEY); + this.regrowTicks = tag.getInt(REGROW_TICKS_KEY); } public boolean isSleeping() { @@ -346,7 +347,7 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable } this.setSheared(true); - this.grassEatTicks = 0; + this.regrowTicks = 0; this.stopCowSleeping(); this.playSound(SoundEvents.SHEEP_SHEAR, 1.0F, 1.0F); this.spawnAtLocation(new ItemStack(this.shearDropItem(), 2), this.getBbHeight() * 0.66F); @@ -389,57 +390,4 @@ public abstract class AppleCowEntity extends Cow implements GeoEntity, Shearable AppleCowEntity.this.applySleepStillness(); } } - - private final class AppleCowGrazeGoal extends Goal { - private AppleCowGrazeGoal() { - this.setFlags(EnumSet.of(Flag.MOVE, Flag.LOOK)); - } - - @Override - public boolean canUse() { - return AppleCowEntity.this.isSheared() - && AppleCowEntity.this.isOnGrassBlock() - && AppleCowEntity.this.isEligibleForSleep() - && AppleCowEntity.this.random.nextInt(20) == 0; - } - - @Override - public boolean canContinueToUse() { - return AppleCowEntity.this.isSheared() - && AppleCowEntity.this.isOnGrassBlock() - && AppleCowEntity.this.grassEatTicks < GRASS_REGROW_TICKS; - } - - @Override - public void start() { - AppleCowEntity.this.getNavigation().stop(); - } - - @Override - public void tick() { - AppleCowEntity.this.getNavigation().stop(); - if (!AppleCowEntity.this.level().isClientSide && AppleCowEntity.this.isSheared() && AppleCowEntity.this.isOnGrassBlock()) { - AppleCowEntity.this.grassEatTicks++; - if (AppleCowEntity.this.grassEatTicks >= GRASS_REGROW_TICKS) { - AppleCowEntity.this.setSheared(false); - AppleCowEntity.this.grassEatTicks = 0; - AppleCowEntity.this.playSound(SoundEvents.GENERIC_EAT, 0.7F, 1.0F + AppleCowEntity.this.random.nextFloat() * 0.2F); - } else if (AppleCowEntity.this.grassEatTicks % 40 == 0) { - AppleCowEntity.this.playSound(SoundEvents.GENERIC_EAT, 0.4F, 1.0F + AppleCowEntity.this.random.nextFloat() * 0.15F); - } - } - } - - @Override - public void stop() { - if (!AppleCowEntity.this.isSheared()) { - AppleCowEntity.this.grassEatTicks = 0; - } - } - } - - private boolean isOnGrassBlock() { - BlockPos below = this.blockPosition().below(); - return this.level().getBlockState(below).is(Blocks.GRASS_BLOCK); - } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/DorrieEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/DorrieEntity.java index 821d7bd9..8fa42815 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/DorrieEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/DorrieEntity.java @@ -275,9 +275,6 @@ public class DorrieEntity extends Animal implements GeoEntity { setJumpCharge((int) ((chargeTicks / (float) MAX_CHARGE_TICKS) * 100)); } - // Surface buoyancy: when in water and not mid-leap, push toward the waterline. - // Stronger upward force when fully submerged, gentle when at the surface so - // Dorrie glides on top rather than diving or bouncing. if (this.isInWater() && !isLeaping) { Vec3 mov = this.getDeltaMovement(); double push = this.isUnderWater() ? 0.07D : 0.015D; @@ -311,9 +308,6 @@ public class DorrieEntity extends Animal implements GeoEntity { if (power > 0.05F) { Vec3 look = this.getLookAngle(); Vec3 current = this.getDeltaMovement(); - // Add to existing momentum — no direction snap. The rider already has - // forward speed, so the jump just launches them upward and slightly - // accelerates in the direction they're already facing. double forwardAdd = power * 0.5D; double vertical = 0.55D + power * 0.9D; this.setDeltaMovement( diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/HerculesBeetleEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/HerculesBeetleEntity.java index 4cc98fb1..9c0bffee 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/HerculesBeetleEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/HerculesBeetleEntity.java @@ -142,8 +142,9 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl private static final double FLY_ATTACK_RANGE = 5.5D; private static final double CHARGE_TRIGGER_RANGE = 12.0D; private static final int MAX_BROKEN_BLOCKS = 32; + private static final int MAX_SUFFOCATION_BLOCKS = 12; private static final EntityDimensions DEFAULT_DIMENSIONS = EntityDimensions.scalable(3.0F, 4.0F); - private static final double MOUNTED_FLYING_SPEED_MULTIPLIER = 0.14D; + private static final double MOUNTED_FLYING_SPEED_MULTIPLIER = 0.06D; private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); private final ServerBossEvent bossEvent = @@ -314,6 +315,10 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl this.flightCooldown--; } + if (!this.level().isClientSide && !this.isKnockedDown() && this.isInWall()) { + this.breakBlocksForSuffocation(); + } + if (this.isKnockedDown()) { this.tickKnockedDown(); } else if (this.chargeTicksRemaining > 0 || this.getAnimationState() == ANIM_CHARGE) { @@ -469,6 +474,10 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl this.setAnimationState(ANIM_FLY); return; } + if (!this.onGround()) { + this.setAnimationState(ANIM_FLY); + return; + } if (this.getControllingPassenger() instanceof Player rider && (Math.abs(rider.zza) > 0.05F || Math.abs(rider.xxa) > 0.05F)) { this.setAnimationState(ANIM_WALK); @@ -482,7 +491,7 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl @Override protected Vec3 getRiddenInput(Player player, Vec3 travelVector) { if (!this.isFlying()) { - return new Vec3(player.xxa * 0.35D, 0.0D, player.zza); + return new Vec3(player.xxa * 0.22D, 0.0D, player.zza); } double vertical = 0.0D; @@ -495,7 +504,7 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl vertical -= 0.16D; } - return new Vec3(player.xxa * 0.35D, vertical, player.zza); + return new Vec3(player.xxa * 0.22D, vertical, player.zza); } @Override @@ -873,6 +882,34 @@ public class HerculesBeetleEntity extends TamableAnimal implements GeoEntity, Fl } } + private void breakBlocksForSuffocation() { + if (!(this.level() instanceof ServerLevel serverLevel) || !serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + return; + } + + AABB box = this.getBoundingBox().inflate(0.15D, 0.15D, 0.15D); + int broken = 0; + for (BlockPos pos : BlockPos.betweenClosed( + BlockPos.containing(box.minX, box.minY, box.minZ), + BlockPos.containing(box.maxX, box.maxY, box.maxZ) + )) { + if (broken >= MAX_SUFFOCATION_BLOCKS) { + break; + } + BlockState state = serverLevel.getBlockState(pos); + BlockEntity blockEntity = serverLevel.getBlockEntity(pos); + if (state.isAir() + || state.is(AntarchyTags.Blocks.HERCULES_BEETLE_CHARGE_IMMUNE_BLOCKS) + || blockEntity != null + || state.getDestroySpeed(serverLevel, pos) < 0.0F) { + continue; + } + if (serverLevel.destroyBlock(pos, true, this)) { + broken++; + } + } + } + private boolean blocksChargePath(Vec3 nextPosition) { if (!(this.level() instanceof ServerLevel serverLevel)) { return false; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/StinkBugEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/StinkBugEntity.java index 4bf9242e..d54e175e 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/StinkBugEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/StinkBugEntity.java @@ -34,10 +34,14 @@ import software.bernie.geckolib.animation.RawAnimation; import software.bernie.geckolib.util.GeckoLibUtil; public class StinkBugEntity extends Animal implements GeoEntity { + private static final String MAIN_CONTROLLER = "main_controller"; + private static final String FART_CONTROLLER = "fart_controller"; + private static final String FART_TRIGGER = "fart"; private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); private static final RawAnimation FART_ANIM = RawAnimation.begin().thenPlay("fart"); private static final int FART_ANIMATION_TICKS = 30; + private static final int FART_RELEASE_TICKS = 6; private static final int STINK_BURST_PARTICLES = 32; private static final double STINK_BURST_RADIUS = 8.0D; private static final int STINK_BURST_DURATION_TICKS = 1200; @@ -81,7 +85,7 @@ public class StinkBugEntity extends Animal implements GeoEntity { if (this.fartAnimationTicks > 0) { this.fartAnimationTicks--; - if (this.fartAnimationTicks == 0 && this.pendingFartBurst && !this.level().isClientSide()) { + if (this.fartAnimationTicks == FART_RELEASE_TICKS && this.pendingFartBurst && !this.level().isClientSide()) { StinkyBehavior.emitBurst(this, STINK_BURST_PARTICLES); StinkyBehavior.applyBurstStinkyEffect(this, STINK_BURST_RADIUS, STINK_BURST_DURATION_TICKS); this.pendingFartBurst = false; @@ -112,7 +116,9 @@ public class StinkBugEntity extends Animal implements GeoEntity { @Override public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { - controllers.add(new AnimationController<>(this, "main_controller", 2, this::mainAnimController)); + controllers.add(new AnimationController<>(this, MAIN_CONTROLLER, 2, this::mainAnimController)); + controllers.add(new AnimationController<>(this, FART_CONTROLLER, 0, state -> PlayState.STOP) + .triggerableAnim(FART_TRIGGER, FART_ANIM)); } @Override @@ -121,15 +127,14 @@ public class StinkBugEntity extends Animal implements GeoEntity { } private PlayState mainAnimController(AnimationState animationState) { - if (this.fartAnimationTicks > 0) { - animationState.setAnimation(FART_ANIM); - return PlayState.CONTINUE; - } animationState.setAnimation(animationState.isMoving() ? WALK_ANIM : IDLE_ANIM); return PlayState.CONTINUE; } private void triggerFartAnimation() { this.fartAnimationTicks = FART_ANIMATION_TICKS; + if (!this.level().isClientSide()) { + this.triggerAnim(FART_CONTROLLER, FART_TRIGGER); + } } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java index ce093a57..19138391 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/ToreterrorEntity.java @@ -207,7 +207,17 @@ public class ToreterrorEntity extends Monster implements GeoEntity { @Override public void tick() { super.tick(); - if (this.level().isClientSide) return; + if (this.level().isClientSide) { + if (this.isJumpShaking()) { + com.craisinlord.antarchy.content.client.CameraShakeClientState.register( + this, + com.craisinlord.antarchy.content.client.CameraShakeClientState.TORETERROR_RANGE, + com.craisinlord.antarchy.content.client.CameraShakeClientState.TORETERROR_STRENGTH, + this::isJumpShaking + ); + } + return; + } if (this.shootCooldown > 0) this.shootCooldown--; if (this.jumpCooldown > 0) this.jumpCooldown--; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/brutalfly/BrutalflyEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/brutalfly/BrutalflyEntity.java index ceab548f..295ede68 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/brutalfly/BrutalflyEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/brutalfly/BrutalflyEntity.java @@ -83,6 +83,7 @@ public class BrutalflyEntity extends Monster implements GeoEntity { private static final int SWIPE_TICKS = 18; private static final float SWIPE_KNOCKBACK = 2.8F; private static final int COCOON_HIT_THRESHOLD = 3; + private static final int COCOON_HIT_COOLDOWN_TICKS = 60; private static final int COCOON_HIT_ANIM_TICKS = 30; private static final int COCOON_HATCH_ANIM_TICKS = 40; private static final int COCOON_IDLE_ANIM_TICKS = 70; @@ -111,6 +112,7 @@ public class BrutalflyEntity extends Monster implements GeoEntity { @Nullable BlockPos anchorPos; private int cocoonHits; + private int cocoonHitCooldownTicks; private boolean isHatching; private int cocoonAnimTicks; private boolean pendingHatchAnim; @@ -261,6 +263,10 @@ public class BrutalflyEntity extends Monster implements GeoEntity { } private void tickCocoon() { + if (this.cocoonHitCooldownTicks > 0) { + this.cocoonHitCooldownTicks--; + } + // Pin position to hang from anchor if (this.anchorPos != null) { this.setPos(this.anchorPos.getX() + 0.5, this.anchorPos.getY() - 1.5, this.anchorPos.getZ() + 0.5); @@ -319,6 +325,8 @@ public class BrutalflyEntity extends Monster implements GeoEntity { this.entityData.set(IS_COCOONED, false); this.isHatching = false; this.anchorPos = null; + this.cocoonHits = 0; + this.cocoonHitCooldownTicks = 0; this.refreshDimensions(); this.setAnimationState(ANIM_FLY); Player nearbyPlayer = this.level().getNearestPlayer(this, 48.0D); @@ -344,6 +352,10 @@ public class BrutalflyEntity extends Monster implements GeoEntity { this.anchorPos = anchor; this.refreshDimensions(); if (cocooned) { + this.cocoonHits = 0; + this.cocoonHitCooldownTicks = 0; + this.isHatching = false; + this.pendingHatchAnim = false; this.setAnimationState(ANIM_COCOON); } } @@ -355,9 +367,10 @@ public class BrutalflyEntity extends Monster implements GeoEntity { } if (this.isCocooned() && !this.isHatching) { - if (this.level().isClientSide || this.hurtTime > 0) return false; + if (this.level().isClientSide || this.cocoonHitCooldownTicks > 0) return false; this.hurtTime = this.hurtDuration; this.cocoonHits++; + this.cocoonHitCooldownTicks = COCOON_HIT_COOLDOWN_TICKS; if (this.cocoonHits >= COCOON_HIT_THRESHOLD) { this.startHatching(); } else { @@ -706,6 +719,7 @@ public class BrutalflyEntity extends Monster implements GeoEntity { super.addAdditionalSaveData(tag); tag.putBoolean("IsCocooned", this.isCocooned()); tag.putInt("CocoonHits", this.cocoonHits); + tag.putInt("CocoonHitCooldown", this.cocoonHitCooldownTicks); if (this.anchorPos != null) { tag.putInt("AnchorX", this.anchorPos.getX()); tag.putInt("AnchorY", this.anchorPos.getY()); @@ -723,6 +737,7 @@ public class BrutalflyEntity extends Monster implements GeoEntity { } this.setCocooned(true, anchor); this.cocoonHits = tag.getInt("CocoonHits"); + this.cocoonHitCooldownTicks = tag.getInt("CocoonHitCooldown"); } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/flying_squirrel/FlyingSquirrelEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/flying_squirrel/FlyingSquirrelEntity.java index 4bde8a0f..1c7dcc9f 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/flying_squirrel/FlyingSquirrelEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/flying_squirrel/FlyingSquirrelEntity.java @@ -1137,11 +1137,16 @@ public class FlyingSquirrelEntity extends TamableAnimal implements GeoEntity { } public void collectNut(ItemEntity itemEntity) { + ItemStack itemStack = itemEntity.getItem(); + if (itemStack.isEmpty()) { + itemEntity.discard(); + return; + } + this.startPickupAnimation(); - ItemStack particleStack = itemEntity.getItem().copy(); + ItemStack particleStack = itemStack.copy(); particleStack.setCount(1); - ItemStack itemStack = itemEntity.getItem(); itemStack.shrink(1); if (itemStack.isEmpty()) { itemEntity.discard(); @@ -1667,6 +1672,11 @@ public class FlyingSquirrelEntity extends TamableAnimal implements GeoEntity { @Override public void tick() { if (this.targetNut != null) { + if (!this.targetNut.isAlive() || this.targetNut.getItem().isEmpty()) { + this.targetNut = null; + return; + } + FlyingSquirrelEntity.this.getLookControl().setLookAt(this.targetNut, 30.0F, 30.0F); if (--this.repathDelay <= 0 && !FlyingSquirrelEntity.this.isGliding()) { diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java index 6eaef628..cf8808fb 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java @@ -216,6 +216,14 @@ public class NightmareEntity extends Monster implements GeoEntity { if (this.level().isClientSide) { this.tickClientParticles(); this.updateFlightRotation(); + if (this.isRoaring()) { + com.craisinlord.antarchy.content.client.CameraShakeClientState.register( + this, + com.craisinlord.antarchy.content.client.CameraShakeClientState.NIGHTMARE_RANGE, + com.craisinlord.antarchy.content.client.CameraShakeClientState.NIGHTMARE_STRENGTH, + this::isRoaring + ); + } return; } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/BrutalflyCocoonFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/BrutalflyCocoonFeature.java index e68f0827..bb0aa81c 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/BrutalflyCocoonFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/BrutalflyCocoonFeature.java @@ -1,25 +1,20 @@ package com.craisinlord.antarchy.content.worldgen.elythia; import com.craisinlord.antarchy.content.AntarchyObjects; -import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity; import com.mojang.serialization.Codec; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.WorldGenRegion; import net.minecraft.tags.BlockTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class BrutalflyCocoonFeature extends Feature { - private static final Logger LOGGER = LoggerFactory.getLogger(BrutalflyCocoonFeature.class); private static final int MAX_ANCHOR_Y = 160; private static final int COCOON_CLEAR_RADIUS = 1; private static final int COCOON_CLEAR_MIN_Y_OFFSET = -16; @@ -33,22 +28,11 @@ public class BrutalflyCocoonFeature extends Feature { @Override public boolean place(FeaturePlaceContext context) { WorldGenLevel level = context.level(); - ServerLevel serverLevel; - if (level instanceof WorldGenRegion region) { - serverLevel = region.getLevel(); - } else if (level instanceof ServerLevel sl) { - serverLevel = sl; - } else { - return false; - } - RandomSource random = context.random(); BlockPos origin = context.origin(); int chunkX = origin.getX() & ~15; int chunkZ = origin.getZ() & ~15; BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(); - int failNoLog = 0; - int failClearBelow = 0; for (int attempt = 0; attempt < 12; attempt++) { int x = chunkX + 1 + random.nextInt(14); @@ -59,49 +43,21 @@ public class BrutalflyCocoonFeature extends Feature { } int searchTopY = Math.min(MAX_ANCHOR_Y, level.getMaxBuildHeight() - 2); - boolean foundLog = false; for (int y = searchTopY; y > groundY + 12; y--) { pos.set(x, y, z); if (!level.getBlockState(pos).is(BlockTags.LOGS)) { continue; } - foundLog = true; BlockPos anchor = pos.immutable(); - BlockPos blocker = findCocoonBlocker(level, anchor); - if (blocker != null) { - failClearBelow++; - LOGGER.info( - "[BrutalflyCocoon] chamber failed at log ({},{},{}) blocked by {} ({}) at {}", - x, - y, - z, - level.getBlockState(blocker), - level.getBlockState(blocker).getBlock(), - blocker - ); + if (findCocoonBlocker(level, anchor) != null) { continue; } - if (spawnCocoonedBrutalfly(serverLevel, level, anchor, random)) { - LOGGER.info("[BrutalflyCocoon] SUCCESS at ({},{},{})", x, y, z); - return true; - } - return false; - } - - if (!foundLog) { - failNoLog++; + return placeCocoonSpawner(level, anchor); } } - LOGGER.info( - "[BrutalflyCocoon] FAILED for chunk ({},{}): no-log={}, chamber={}", - chunkX >> 4, - chunkZ >> 4, - failNoLog, - failClearBelow - ); return false; } @@ -113,30 +69,23 @@ public class BrutalflyCocoonFeature extends Feature { return findCocoonBlocker(level, anchor) == null; } - static boolean spawnCocoonedBrutalfly(ServerLevel serverLevel, WorldGenLevel level, BlockPos anchor, RandomSource random) { + static boolean placeCocoonSpawner(WorldGenLevel level, BlockPos anchor) { if (!canUseAnchor(level, anchor)) { return false; } clearCocoonVolume(level, anchor); - BrutalflyEntity brutalfly = AntarchyObjects.BRUTALFLY.get().create(serverLevel); - if (brutalfly == null) { - return false; - } - - brutalfly.moveTo( - anchor.getX() + 0.5, - anchor.getY() - 15.0, - anchor.getZ() + 0.5, - random.nextFloat() * 360.0F, - 0.0F - ); - brutalfly.setCocooned(true, anchor); - brutalfly.setHealth(brutalfly.getMaxHealth()); - serverLevel.addFreshEntity(brutalfly); + setCocoonSpawnerMarker(level, anchor); return true; } + static void setCocoonSpawnerMarker(WorldGenLevel level, BlockPos anchor) { + Block marker = AntarchyObjects.BRUTALFLY_COCOON_SPAWNER.get(); + BlockPos markerPos = anchor.below(); + level.setBlock(markerPos, marker.defaultBlockState(), 19); + level.scheduleTick(markerPos, marker, 20); + } + static @org.jetbrains.annotations.Nullable BlockPos findCocoonBlocker(WorldGenLevel level, BlockPos anchor) { if (!hasCanopySupport(level, anchor)) { return anchor; @@ -173,7 +122,7 @@ public class BrutalflyCocoonFeature extends Feature { } pos.set(anchor.getX() + dx, worldY, anchor.getZ() + dz); - level.setBlock(pos, Blocks.AIR.defaultBlockState(), 3); + level.setBlock(pos, Blocks.AIR.defaultBlockState(), 19); } } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/OuranwoodCocoonTreeFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/OuranwoodCocoonTreeFeature.java index 7fca2748..942edd7e 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/OuranwoodCocoonTreeFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/OuranwoodCocoonTreeFeature.java @@ -1,11 +1,8 @@ package com.craisinlord.antarchy.content.worldgen.elythia; -import com.craisinlord.antarchy.content.AntarchyObjects; -import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity; import com.mojang.serialization.Codec; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; @@ -19,16 +16,14 @@ public class OuranwoodCocoonTreeFeature extends OuranwoodTreeFeature { @Override public boolean place(FeaturePlaceContext context) { if (!super.place(context)) return false; - spawnGuaranteedCocoon(context.level(), context.origin(), context.config(), context.random()); + placeGuaranteedCocoon(context.level(), context.origin(), context.config(), context.random()); return true; } - private void spawnGuaranteedCocoon(WorldGenLevel level, BlockPos origin, OuranwoodTreeConfiguration config, RandomSource random) { - if (!(level.getLevel() instanceof ServerLevel serverLevel)) return; - + private void placeGuaranteedCocoon(WorldGenLevel level, BlockPos origin, OuranwoodTreeConfiguration config, RandomSource random) { Direction dir = Direction.Plane.HORIZONTAL.getRandomDirection(random); int branchY = 10 + random.nextInt(8); - int branchLength = 4 + random.nextInt(3); // 4–6 logs out from the trunk + int branchLength = 4 + random.nextInt(3); for (int i = 1; i <= branchLength; i++) { BlockPos p = origin.above(branchY).relative(dir, i); @@ -37,12 +32,6 @@ public class OuranwoodCocoonTreeFeature extends OuranwoodTreeFeature { BlockPos anchor = origin.above(branchY).relative(dir, branchLength); BrutalflyCocoonFeature.clearCocoonVolume(level, anchor); - BrutalflyEntity brutalfly = AntarchyObjects.BRUTALFLY.get().create(serverLevel); - if (brutalfly == null) return; - brutalfly.moveTo(anchor.getX() + 0.5, anchor.getY() - 15.0, anchor.getZ() + 0.5, - random.nextFloat() * 360.0F, 0.0F); - brutalfly.setCocooned(true, anchor); - brutalfly.setHealth(brutalfly.getMaxHealth()); - serverLevel.addFreshEntity(brutalfly); + BrutalflyCocoonFeature.setCocoonSpawnerMarker(level, anchor); } } diff --git a/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntitySignMixin.java b/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntitySignMixin.java deleted file mode 100644 index 141359d5..00000000 --- a/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntitySignMixin.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.craisinlord.antarchy.mixins; - -import com.craisinlord.antarchy.Antarchy; -import java.util.Optional; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(net.minecraft.world.level.block.entity.BlockEntity.class) -public abstract class BlockEntitySignMixin { - private static final ResourceLocation OURANWOOD_SIGN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ouranwood_sign"); - private static final ResourceLocation OURANWOOD_WALL_SIGN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ouranwood_wall_sign"); - private static final ResourceLocation OURANWOOD_HANGING_SIGN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ouranwood_hanging_sign"); - private static final ResourceLocation OURANWOOD_WALL_HANGING_SIGN_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "ouranwood_wall_hanging_sign"); - - @Inject(method = "validateBlockState", at = @At("HEAD"), cancellable = true) - private static void antarchy$skipOuranwoodSignValidation(BlockState state, CallbackInfo ci) { - if (isOuranwoodSign(state)) { - ci.cancel(); - } - } - - private static boolean isOuranwoodSign(BlockState state) { - return matches(state, OURANWOOD_SIGN_ID) - || matches(state, OURANWOOD_WALL_SIGN_ID) - || matches(state, OURANWOOD_HANGING_SIGN_ID) - || matches(state, OURANWOOD_WALL_HANGING_SIGN_ID); - } - - private static boolean matches(BlockState state, ResourceLocation id) { - return BuiltInRegistries.BLOCK.getOptional(id).map(state::is).orElse(false); - } -} diff --git a/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntityTypeSignMixin.java b/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntityTypeSignMixin.java new file mode 100644 index 00000000..de6f8f78 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/mixins/BlockEntityTypeSignMixin.java @@ -0,0 +1,76 @@ +package com.craisinlord.antarchy.mixins; + +import com.craisinlord.antarchy.Antarchy; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(BlockEntityType.class) +public abstract class BlockEntityTypeSignMixin { + @Unique + private static Block antarchy$ouranwoodSign; + @Unique + private static Block antarchy$ouranwoodWallSign; + @Unique + private static Block antarchy$ouranwoodHangingSign; + @Unique + private static Block antarchy$ouranwoodWallHangingSign; + + @Inject(method = "isValid", at = @At("HEAD"), cancellable = true) + private void antarchy$allowOuranwoodSigns(BlockState state, CallbackInfoReturnable cir) { + Object self = this; + if (self == BlockEntityType.SIGN) { + if (state.is(antarchy$sign()) || state.is(antarchy$wallSign())) { + cir.setReturnValue(true); + } + } else if (self == BlockEntityType.HANGING_SIGN) { + if (state.is(antarchy$hangingSign()) || state.is(antarchy$wallHangingSign())) { + cir.setReturnValue(true); + } + } + } + + @Unique + private static Block antarchy$sign() { + if (antarchy$ouranwoodSign == null) { + antarchy$ouranwoodSign = antarchy$resolve("ouranwood_sign"); + } + return antarchy$ouranwoodSign; + } + + @Unique + private static Block antarchy$wallSign() { + if (antarchy$ouranwoodWallSign == null) { + antarchy$ouranwoodWallSign = antarchy$resolve("ouranwood_wall_sign"); + } + return antarchy$ouranwoodWallSign; + } + + @Unique + private static Block antarchy$hangingSign() { + if (antarchy$ouranwoodHangingSign == null) { + antarchy$ouranwoodHangingSign = antarchy$resolve("ouranwood_hanging_sign"); + } + return antarchy$ouranwoodHangingSign; + } + + @Unique + private static Block antarchy$wallHangingSign() { + if (antarchy$ouranwoodWallHangingSign == null) { + antarchy$ouranwoodWallHangingSign = antarchy$resolve("ouranwood_wall_hanging_sign"); + } + return antarchy$ouranwoodWallHangingSign; + } + + @Unique + private static Block antarchy$resolve(String path) { + return BuiltInRegistries.BLOCK.get(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path)); + } +} diff --git a/common/src/main/resources/antarchy-common.mixins.json b/common/src/main/resources/antarchy-common.mixins.json index 24677f3c..e738a860 100644 --- a/common/src/main/resources/antarchy-common.mixins.json +++ b/common/src/main/resources/antarchy-common.mixins.json @@ -5,7 +5,7 @@ "compatibilityLevel": "JAVA_21", "mixins": [ "AccessorRangedAttribute", - "BlockEntitySignMixin", + "BlockEntityTypeSignMixin", "BloodglassMixin", "DreamFireBlockMixin", "DreamSandLowGravityMixin", diff --git a/common/src/main/resources/assets/antarchy/animations/spit_bug.animation.json b/common/src/main/resources/assets/antarchy/animations/spit_bug.animation.json index fb501241..04f7b81c 100644 --- a/common/src/main/resources/assets/antarchy/animations/spit_bug.animation.json +++ b/common/src/main/resources/assets/antarchy/animations/spit_bug.animation.json @@ -1562,6 +1562,28 @@ "lerp_mode": "catmullrom" } } + }, + "jaw": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.1667": { + "vector": [12.5, 0, 0] + }, + "0.25": { + "vector": [0, 0, 0] + }, + "0.3333": { + "vector": [0, 0, 0] + }, + "0.5": { + "vector": [12.5, 0, 0] + }, + "0.5833": { + "vector": [0, 0, 0] + } + } } } }, @@ -1578,22 +1600,28 @@ }, "0.25": { "post": { - "vector": [-5, 0, 0] + "vector": [-25, 0, 0] }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [2.5, 0, 0] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [2.5, 0, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 0] @@ -1610,17 +1638,23 @@ }, "0.25": { "post": { - "vector": [0, 1, 2] + "vector": [0, 1, 10] }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [0, 0, -1] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { "post": { "vector": [0, 0, 0] }, @@ -1642,6 +1676,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [7.1226, 29.2189, 14.3589] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [7.1226, 29.2189, 14.3589] @@ -1658,6 +1698,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 10] @@ -1674,6 +1720,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 10] @@ -1690,6 +1742,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, -32.5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -32.5] @@ -1706,12 +1764,35 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [-25, 25, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-25, 25, 0] }, "lerp_mode": "catmullrom" } + }, + "scale": { + "0.0": { + "vector": [1, 1, 1] + }, + "0.1667": { + "vector": [1, 1, 1] + }, + "0.25": { + "vector": [1, 0.3, 1] + }, + "0.4583": { + "vector": [1, 1, 1] + }, + "1.0": { + "vector": [1, 1, 1] + } } }, "rightGrip": { @@ -1728,18 +1809,24 @@ }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [0, -20, 0] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [0, -20, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, -10, 0] @@ -1756,6 +1843,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, -11.5, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, -11.5, 0] @@ -1772,12 +1865,35 @@ }, "lerp_mode": "catmullrom" }, + "0.5417": { + "post": { + "vector": [-13.01658, -61.28435, 22.32925] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [-7.1226, -29.2189, 14.3589] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-7.1226, -29.2189, 14.3589] }, "lerp_mode": "catmullrom" } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 9, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } } }, "frontRightKnee": { @@ -1788,6 +1904,18 @@ }, "lerp_mode": "catmullrom" }, + "0.25": { + "post": { + "vector": [0, 0, 55] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, 10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 10] @@ -1804,6 +1932,18 @@ }, "lerp_mode": "catmullrom" }, + "0.25": { + "post": { + "vector": [0, 0, -35] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, 10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 10] @@ -1820,6 +1960,18 @@ }, "lerp_mode": "catmullrom" }, + "0.5417": { + "post": { + "vector": [0, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, -32.5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -32.5] @@ -1836,12 +1988,32 @@ }, "lerp_mode": "catmullrom" }, + "0.1667": { + "post": { + "vector": [-25, -25, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [-25, -25, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-25, -25, 0] }, "lerp_mode": "catmullrom" } + }, + "scale": { + "0.25": { + "vector": [1, 0.3, 1] + }, + "0.4583": { + "vector": [1, 1, 1] + } } }, "leftGrip": { @@ -1858,18 +2030,24 @@ }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [0, 20, 0] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [0, 20, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 10, 0] @@ -1886,6 +2064,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 60, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 60, 0] @@ -1908,12 +2092,18 @@ }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [41.8878, 17.5, -5] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [5, 17.5, -5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [5, 17.5, -5] @@ -1936,12 +2126,18 @@ }, "lerp_mode": "catmullrom" }, - "0.625": { + "0.5417": { "post": { "vector": [32.5, 0, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [-30, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-30, 0, 0] @@ -1958,18 +2154,24 @@ }, "lerp_mode": "catmullrom" }, - "0.375": { + "0.2917": { "post": { "vector": [-37.5, 0, 0] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [59.72, 0, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [40, 0, 0] @@ -1984,18 +2186,24 @@ }, "lerp_mode": "catmullrom" }, - "0.375": { + "0.2917": { "post": { "vector": [0, 0, 5] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [0, 0, -1] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 0] @@ -2012,6 +2220,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, -60, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, -60, 0] @@ -2034,12 +2248,18 @@ }, "lerp_mode": "catmullrom" }, - "0.5": { + "0.4167": { "post": { "vector": [41.8878, -17.5, 5] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [5, -17.5, 5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [5, -17.5, 5] @@ -2062,12 +2282,18 @@ }, "lerp_mode": "catmullrom" }, - "0.625": { + "0.5417": { "post": { "vector": [32.5, 0, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [-30, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-30, 0, 0] @@ -2084,18 +2310,24 @@ }, "lerp_mode": "catmullrom" }, - "0.375": { + "0.2917": { "post": { "vector": [-37.5, 0, 0] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [59.72, 0, 0] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [40, 0, 0] @@ -2110,18 +2342,24 @@ }, "lerp_mode": "catmullrom" }, - "0.375": { + "0.2917": { "post": { "vector": [0, 0, 5] }, "lerp_mode": "catmullrom" }, - "0.75": { + "0.6667": { "post": { "vector": [0, 0, -1] }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 0] @@ -2138,12 +2376,35 @@ }, "lerp_mode": "catmullrom" }, + "0.5417": { + "post": { + "vector": [-13.01658, 61.28435, -22.32925] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [-7.1226, 29.2189, -14.3589] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [-7.1226, 29.2189, -14.3589] }, "lerp_mode": "catmullrom" } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 9, 0] + }, + "1.0": { + "vector": [0, 0, 0] + } } }, "frontLeftKnee": { @@ -2154,6 +2415,18 @@ }, "lerp_mode": "catmullrom" }, + "0.25": { + "post": { + "vector": [0, 0, -55] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, -10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -10] @@ -2170,6 +2443,18 @@ }, "lerp_mode": "catmullrom" }, + "0.25": { + "post": { + "vector": [0, 0, 35] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, -10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -10] @@ -2186,6 +2471,18 @@ }, "lerp_mode": "catmullrom" }, + "0.5417": { + "post": { + "vector": [0, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, 32.5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 32.5] @@ -2202,6 +2499,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [7.1226, -29.2189, -14.3589] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [7.1226, -29.2189, -14.3589] @@ -2218,6 +2521,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, -10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -10] @@ -2234,6 +2543,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, -10] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, -10] @@ -2250,6 +2565,12 @@ }, "lerp_mode": "catmullrom" }, + "0.9167": { + "post": { + "vector": [0, 0, 32.5] + }, + "lerp_mode": "catmullrom" + }, "1.0": { "post": { "vector": [0, 0, 32.5] @@ -2257,6 +2578,46 @@ "lerp_mode": "catmullrom" } } + }, + "jaw": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-11.86, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } } } } diff --git a/common/src/main/resources/assets/antarchy/animations/stink_bug.animation.json b/common/src/main/resources/assets/antarchy/animations/stink_bug.animation.json index f75c3604..df0cdfa8 100644 --- a/common/src/main/resources/assets/antarchy/animations/stink_bug.animation.json +++ b/common/src/main/resources/assets/antarchy/animations/stink_bug.animation.json @@ -487,7 +487,6 @@ } }, "fart": { - "loop": true, "animation_length": 1.5, "bones": { "root": { @@ -946,4 +945,4 @@ } } } -} \ No newline at end of file +} diff --git a/common/src/main/resources/assets/antarchy/animations/triffid.animation.json b/common/src/main/resources/assets/antarchy/animations/triffid.animation.json index 4ce900dd..1f68650e 100644 --- a/common/src/main/resources/assets/antarchy/animations/triffid.animation.json +++ b/common/src/main/resources/assets/antarchy/animations/triffid.animation.json @@ -9,11 +9,11 @@ "rotation": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [-2.5, 0, 0] }, "lerp_mode": "catmullrom" }, - "1.0": { + "1.9167": { "post": { "vector": [10, 0, 0] }, @@ -21,7 +21,7 @@ }, "4.0": { "post": { - "vector": [0, 0, 0] + "vector": [-2.5, 0, 0] }, "lerp_mode": "catmullrom" } @@ -31,11 +31,11 @@ "rotation": { "0.0": { "post": { - "vector": [0, 0, 0] + "vector": [-5, 0, 0] }, "lerp_mode": "catmullrom" }, - "2.0": { + "1.5": { "post": { "vector": [12.5, 0, 0] }, @@ -43,7 +43,7 @@ }, "4.0": { "post": { - "vector": [0, 0, 0] + "vector": [-5, 0, 0] }, "lerp_mode": "catmullrom" } @@ -53,25 +53,19 @@ "rotation": { "0.0": { "post": { - "vector": [-2.5, 0, 0] + "vector": [-7.5, 0, 0] }, "lerp_mode": "catmullrom" }, - "1.6667": { + "2.2083": { "post": { "vector": [10, 0, 0] }, "lerp_mode": "catmullrom" }, - "2.7917": { - "post": { - "vector": [15, 0, 0] - }, - "lerp_mode": "catmullrom" - }, "4.0": { "post": { - "vector": [-2.5, 0, 0] + "vector": [-7.5, 0, 0] }, "lerp_mode": "catmullrom" } @@ -80,6 +74,12 @@ "head": { "rotation": { "0.0": { + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "2.5417": { "post": { "vector": [10, 0, 0] }, @@ -87,7 +87,7 @@ }, "4.0": { "post": { - "vector": [10, 0, 0] + "vector": [-10, 0, 0] }, "lerp_mode": "catmullrom" } @@ -101,7 +101,7 @@ }, "lerp_mode": "catmullrom" }, - "2.0": { + "0.875": { "post": { "vector": [0, 0, 55] }, @@ -1252,6 +1252,12 @@ }, "lerp_mode": "catmullrom" }, + "0.5": { + "post": { + "vector": [0, 0, 94.72] + }, + "lerp_mode": "catmullrom" + }, "0.75": { "post": { "vector": [0, 0, 45] @@ -1554,6 +1560,12 @@ }, "lerp_mode": "catmullrom" }, + "0.5": { + "post": { + "vector": [0, 0, -94.72] + }, + "lerp_mode": "catmullrom" + }, "0.75": { "post": { "vector": [0, 0, -45] diff --git a/common/src/main/resources/assets/antarchy/blockstates/brutalfly_cocoon_spawner.json b/common/src/main/resources/assets/antarchy/blockstates/brutalfly_cocoon_spawner.json new file mode 100644 index 00000000..b349b3c7 --- /dev/null +++ b/common/src/main/resources/assets/antarchy/blockstates/brutalfly_cocoon_spawner.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "antarchy:block/brutalfly_cocoon_spawner" + } + } +} diff --git a/common/src/main/resources/assets/antarchy/geo/lurking_terror.geo.json b/common/src/main/resources/assets/antarchy/geo/lurking_terror.geo.json index a58c99ac..d42c4716 100644 --- a/common/src/main/resources/assets/antarchy/geo/lurking_terror.geo.json +++ b/common/src/main/resources/assets/antarchy/geo/lurking_terror.geo.json @@ -6,9 +6,9 @@ "identifier": "geometry.lurkingterror", "texture_width": 128, "texture_height": 128, - "visible_bounds_width": 7, - "visible_bounds_height": 3.5, - "visible_bounds_offset": [0, 1.25, 0] + "visible_bounds_width": 8, + "visible_bounds_height": 4.5, + "visible_bounds_offset": [0, 1.75, 0] }, "bones": [ { @@ -96,7 +96,7 @@ "parent": "tailmiddle", "pivot": [0, 6, 35], "cubes": [ - {"origin": [-5, 1, 35], "size": [10, 10, 14], "uv": [0, 26]} + {"origin": [-5, 1, 35], "size": [10, 10, 14], "uv": [49, 95]} ] }, { diff --git a/common/src/main/resources/assets/antarchy/geo/spit_bug.geo.json b/common/src/main/resources/assets/antarchy/geo/spit_bug.geo.json index 11b4322d..ee5d6389 100644 --- a/common/src/main/resources/assets/antarchy/geo/spit_bug.geo.json +++ b/common/src/main/resources/assets/antarchy/geo/spit_bug.geo.json @@ -20,32 +20,37 @@ "parent": "root", "pivot": [0, 36, 0], "cubes": [ - {"origin": [-9.5, 36, -18], "size": [19, 18, 37], "uv": [0, 124]}, - {"origin": [-9.5, 54, -39], "size": [19, 7, 63], "uv": [0, 0]}, - {"origin": [-9.5, 44, 19], "size": [19, 10, 5], "uv": [112, 175]}, - {"origin": [-3.5, 52, -52], "size": [7, 7, 13], "uv": [0, 179]}, - {"origin": [-1.5, 47, -51], "size": [3, 5, 0], "uv": [58, 207]}, - {"origin": [-5.5, 59, -45], "size": [11, 2, 6], "uv": [108, 190]}, - {"origin": [-12.5, 36, -16], "size": [3, 18, 33], "uv": [112, 124]}, - {"origin": [9.5, 36, -16], "size": [3, 18, 33], "uv": [146, 70]}, - {"origin": [-9.5, 36, -26], "size": [19, 4, 8], "uv": [164, 45]}, - {"origin": [-11.5, 36, -30], "size": [2, 6, 14], "uv": [76, 179]}, - {"origin": [-10.5, 36, -35], "size": [3, 7, 5], "uv": [168, 196]}, - {"origin": [-8.5, 38, -51], "size": [2, 5, 16], "uv": [40, 179]}, - {"origin": [6.5, 38, -51], "size": [2, 5, 16], "uv": [40, 179], "mirror": true}, - {"origin": [7.5, 36, -35], "size": [3, 7, 5], "uv": [168, 196], "mirror": true}, - {"origin": [9.5, 36, -30], "size": [2, 6, 14], "uv": [76, 179], "mirror": true}, - {"origin": [-9.5, 50, -35], "size": [3, 4, 17], "uv": [160, 175]}, - {"origin": [6.5, 50, -35], "size": [3, 4, 17], "uv": [160, 175], "mirror": true}, - {"origin": [-7.5, 49, -39], "size": [5, 5, 4], "uv": [184, 196]}, - {"origin": [-3.5, 49, -51], "size": [2, 3, 12], "uv": [184, 157]}, - {"origin": [1.5, 49, -51], "size": [2, 3, 12], "uv": [184, 157], "mirror": true}, - {"origin": [2.5, 49, -39], "size": [5, 5, 4], "uv": [184, 196], "mirror": true}, - {"origin": [-6, 36, -35], "size": [12, 1, 9], "uv": [184, 136]}, - {"origin": [-11.5, 32, -35], "size": [23, 4, 50], "uv": [0, 70]}, - {"origin": [-8.5, 34, -53], "size": [17, 4, 18], "uv": [164, 0]}, - {"origin": [-5.5, 38, -52], "size": [11, 5, 0], "uv": [227, 32]}, - {"origin": [-8.5, 29, -53], "size": [17, 5, 0], "uv": [189, 22]} + {"origin": [-11.5, 36, -18], "size": [23, 18, 37], "inflate": -0.05, "uv": [0, 103]}, + {"origin": [-9.5, 54, -35], "size": [19, 7, 59], "uv": [0, 0]}, + {"origin": [-7.5, 54, -52], "size": [15, 7, 17], "uv": [112, 28]}, + {"origin": [-6.5, 42, -51.75], "size": [3, 12, 5], "uv": [34, 23]}, + {"origin": [3.5, 42, -51.75], "size": [3, 12, 5], "uv": [34, 23], "mirror": true}, + {"origin": [-7.5, 52, -52], "size": [15, 2, 0], "uv": [0, 24]}, + {"origin": [-7.5, 44, -52], "size": [0, 10, 17], "uv": [5, 29]}, + {"origin": [-9.5, 47, -35], "size": [2, 7, 0], "uv": [37, 16]}, + {"origin": [-9.5, 45, -35], "size": [0, 9, 17], "uv": [0, 18]}, + {"origin": [9.5, 45, -35], "size": [0, 9, 17], "uv": [0, 18], "mirror": true}, + {"origin": [7.5, 47, -35], "size": [2, 7, 0], "uv": [37, 16], "mirror": true}, + {"origin": [7.5, 44, -52], "size": [0, 10, 17], "uv": [5, 29], "mirror": true}, + {"origin": [-11.5, 32.1, -18], "size": [23, 4, 33], "inflate": -0.05, "uv": [0, 66]} + ] + }, + { + "name": "jaw", + "parent": "body", + "pivot": [-3.07143, 33.92857, -16], + "cubes": [ + {"origin": [-8.5, 32, -51], "size": [17, 2, 18], "uv": [97, 0]}, + {"origin": [-11.5, 30, -33], "size": [23, 4, 17], "uv": [79, 66]}, + {"origin": [-11.5, 34, -33], "size": [0, 8, 17], "uv": [0, -17]}, + {"origin": [-11.5, 34, -33], "size": [3, 8, 0], "uv": [0, 8]}, + {"origin": [8.5, 34, -33], "size": [3, 8, 0], "uv": [0, 8], "mirror": true}, + {"origin": [11.5, 34, -33], "size": [0, 8, 17], "uv": [0, -17], "mirror": true}, + {"origin": [-8.5, 34, -51], "size": [0, 8, 18], "uv": [0, -2]}, + {"origin": [-4.5, 32.5, -52.575], "size": [3, 8, 4], "pivot": [-3, 36.5, -50.575], "rotation": [22.5, 0, 0], "uv": [35, 0]}, + {"origin": [1.5, 32.5, -52.575], "size": [3, 8, 4], "pivot": [3, 36.5, -50.575], "rotation": [22.5, 0, 0], "uv": [35, 0], "mirror": true}, + {"origin": [-8.5, 34, -51], "size": [17, 8, 0], "uv": [0, 26]}, + {"origin": [8.5, 34, -51], "size": [0, 8, 18], "uv": [0, -2], "mirror": true} ] }, { @@ -53,7 +58,7 @@ "parent": "body", "pivot": [-11, 45.5, -17], "cubes": [ - {"origin": [-12, 45.5, -19], "size": [3, 3, 3], "uv": [142, 190]} + {"origin": [-12, 45.5, -19], "size": [3, 3, 3], "uv": [83, 114]} ] }, { @@ -61,33 +66,27 @@ "parent": "body", "pivot": [11, 45.5, -17], "cubes": [ - {"origin": [9, 45.5, -19], "size": [3, 3, 3], "uv": [142, 190], "mirror": true} + {"origin": [9, 45.5, -19], "size": [3, 3, 3], "uv": [83, 114], "mirror": true} ] }, { "name": "rightGrip", "parent": "body", "pivot": [-11.5, 54, -16], - "rotation": [0, 0, 90], - "cubes": [ - {"origin": [-15.5, 53, -28], "size": [8, 3, 12], "uv": [184, 121]} - ] + "rotation": [0, 0, 90] }, { "name": "leftGrip", "parent": "body", "pivot": [11.5, 54, -16], - "rotation": [0, 0, -90], - "cubes": [ - {"origin": [7.5, 53, -28], "size": [8, 3, 12], "uv": [184, 121], "mirror": true} - ] + "rotation": [0, 0, -90] }, { "name": "backRightThigh", "parent": "root", "pivot": [-11.5, 37, 10], "cubes": [ - {"origin": [-20.5, 33, 8], "size": [9, 4, 4], "uv": [142, 196]} + {"origin": [-20.5, 33, 8], "size": [9, 4, 4], "uv": [83, 120]} ] }, { @@ -96,7 +95,7 @@ "pivot": [-20.5, 37, 10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [-34.5, 32, 7], "size": [14, 5, 6], "inflate": 0.025, "uv": [184, 146]} + {"origin": [-34.5, 32, 7], "size": [14, 5, 6], "inflate": 0.025, "uv": [83, 103]} ] }, { @@ -105,7 +104,7 @@ "pivot": [-34.5, 32, 10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [-53.5, 32, 8], "size": [19, 4, 4], "uv": [164, 57]} + {"origin": [-53.5, 32, 8], "size": [19, 4, 4], "uv": [97, 20]} ] }, { @@ -114,8 +113,8 @@ "pivot": [-53.5, 32, 10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [-67.5, 30, 9], "size": [14, 2, 2], "inflate": 0.025, "uv": [164, 65]}, - {"origin": [-76.5, 30, 10], "size": [9, 2, 0], "uv": [146, 121]} + {"origin": [-67.5, 30, 9], "size": [14, 2, 2], "inflate": 0.025, "uv": [97, 28]}, + {"origin": [-76.5, 30, 10], "size": [9, 2, 0], "uv": [97, 32]} ] }, { @@ -123,7 +122,7 @@ "parent": "root", "pivot": [11.5, 37, 10], "cubes": [ - {"origin": [11.5, 33, 8], "size": [9, 4, 4], "uv": [142, 196]} + {"origin": [11.5, 33, 8], "size": [9, 4, 4], "uv": [83, 120]} ] }, { @@ -132,7 +131,7 @@ "pivot": [20.5, 37, 10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [20.5, 32, 7], "size": [14, 5, 6], "inflate": 0.025, "uv": [184, 146]} + {"origin": [20.5, 32, 7], "size": [14, 5, 6], "inflate": 0.025, "uv": [83, 103]} ] }, { @@ -141,7 +140,7 @@ "pivot": [34.5, 32, 10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [34.5, 32, 8], "size": [19, 4, 4], "uv": [164, 57]} + {"origin": [34.5, 32, 8], "size": [19, 4, 4], "uv": [97, 20]} ] }, { @@ -150,8 +149,8 @@ "pivot": [53.5, 32, 10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [53.5, 30, 9], "size": [14, 2, 2], "inflate": 0.025, "uv": [164, 65]}, - {"origin": [67.5, 30, 10], "size": [9, 2, 0], "uv": [146, 121], "mirror": true} + {"origin": [53.5, 30, 9], "size": [14, 2, 2], "inflate": 0.025, "uv": [97, 28]}, + {"origin": [67.5, 30, 10], "size": [9, 2, 0], "uv": [97, 32], "mirror": true} ] }, { @@ -159,7 +158,7 @@ "parent": "root", "pivot": [-11.5, 37, -10], "cubes": [ - {"origin": [-20.5, 33, -12], "size": [9, 4, 4], "uv": [142, 196]} + {"origin": [-20.5, 33, -12], "size": [9, 4, 4], "uv": [83, 120]} ] }, { @@ -168,7 +167,7 @@ "pivot": [-20.5, 37, -10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [-34.5, 32, -13], "size": [14, 5, 6], "inflate": 0.025, "uv": [184, 146]} + {"origin": [-34.5, 32, -13], "size": [14, 5, 6], "inflate": 0.025, "uv": [83, 103]} ] }, { @@ -177,7 +176,7 @@ "pivot": [-34.5, 32, -10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [-53.5, 32, -12], "size": [19, 4, 4], "uv": [164, 57]} + {"origin": [-53.5, 32, -12], "size": [19, 4, 4], "uv": [97, 20]} ] }, { @@ -186,8 +185,8 @@ "pivot": [-53.5, 32, -10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [-67.5, 30, -11], "size": [14, 2, 2], "inflate": 0.025, "uv": [164, 65]}, - {"origin": [-76.5, 30, -10], "size": [9, 2, 0], "uv": [146, 121]} + {"origin": [-67.5, 30, -11], "size": [14, 2, 2], "inflate": 0.025, "uv": [97, 28]}, + {"origin": [-76.5, 30, -10], "size": [9, 2, 0], "uv": [97, 32]} ] }, { @@ -195,7 +194,7 @@ "parent": "root", "pivot": [11.5, 37, -10], "cubes": [ - {"origin": [11.5, 33, -12], "size": [9, 4, 4], "uv": [142, 196]} + {"origin": [11.5, 33, -12], "size": [9, 4, 4], "uv": [83, 120]} ] }, { @@ -204,7 +203,7 @@ "pivot": [20.5, 37, -10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [20.5, 32, -13], "size": [14, 5, 6], "inflate": 0.025, "uv": [184, 146]} + {"origin": [20.5, 32, -13], "size": [14, 5, 6], "inflate": 0.025, "uv": [83, 103]} ] }, { @@ -213,7 +212,7 @@ "pivot": [34.5, 32, -10], "rotation": [0, 0, -90], "cubes": [ - {"origin": [34.5, 32, -12], "size": [19, 4, 4], "uv": [164, 57]} + {"origin": [34.5, 32, -12], "size": [19, 4, 4], "uv": [97, 20]} ] }, { @@ -222,8 +221,8 @@ "pivot": [53.5, 32, -10], "rotation": [0, 0, 90], "cubes": [ - {"origin": [53.5, 30, -11], "size": [14, 2, 2], "inflate": 0.025, "uv": [164, 65]}, - {"origin": [67.5, 30, -10], "size": [9, 2, 0], "uv": [146, 121], "mirror": true} + {"origin": [53.5, 30, -11], "size": [14, 2, 2], "inflate": 0.025, "uv": [97, 28]}, + {"origin": [67.5, 30, -10], "size": [9, 2, 0], "uv": [97, 32], "mirror": true} ] } ] diff --git a/common/src/main/resources/assets/antarchy/models/block/brutalfly_cocoon_spawner.json b/common/src/main/resources/assets/antarchy/models/block/brutalfly_cocoon_spawner.json new file mode 100644 index 00000000..0ca69bbc --- /dev/null +++ b/common/src/main/resources/assets/antarchy/models/block/brutalfly_cocoon_spawner.json @@ -0,0 +1,5 @@ +{ + "textures": { + "particle": "minecraft:block/oak_log" + } +} diff --git a/common/src/main/resources/assets/antarchy/textures/entity/lurking_terror.png b/common/src/main/resources/assets/antarchy/textures/entity/lurking_terror.png index 78b4ae0d..ce78a925 100644 Binary files a/common/src/main/resources/assets/antarchy/textures/entity/lurking_terror.png and b/common/src/main/resources/assets/antarchy/textures/entity/lurking_terror.png differ diff --git a/common/src/main/resources/assets/antarchy/textures/entity/scorpion.png b/common/src/main/resources/assets/antarchy/textures/entity/scorpion.png index cce310d1..b2a66d43 100644 Binary files a/common/src/main/resources/assets/antarchy/textures/entity/scorpion.png and b/common/src/main/resources/assets/antarchy/textures/entity/scorpion.png differ diff --git a/common/src/main/resources/assets/antarchy/textures/entity/spit_bug.png b/common/src/main/resources/assets/antarchy/textures/entity/spit_bug.png index 37a59cb9..895cd975 100644 Binary files a/common/src/main/resources/assets/antarchy/textures/entity/spit_bug.png and b/common/src/main/resources/assets/antarchy/textures/entity/spit_bug.png differ diff --git a/common/src/main/resources/assets/antarchy/textures/entity/triffid.png b/common/src/main/resources/assets/antarchy/textures/entity/triffid.png index 568f54a7..00ee04a0 100644 Binary files a/common/src/main/resources/assets/antarchy/textures/entity/triffid.png and b/common/src/main/resources/assets/antarchy/textures/entity/triffid.png differ diff --git a/common/src/main/resources/data/antarchy/dimension/elythia.json b/common/src/main/resources/data/antarchy/dimension/elythia.json index 34edaa91..dc015266 100644 --- a/common/src/main/resources/data/antarchy/dimension/elythia.json +++ b/common/src/main/resources/data/antarchy/dimension/elythia.json @@ -8,7 +8,7 @@ "moleworm_caves_max_y": 30, "surface_biome_sample_y": 160, "ocean_max_y": 62, - "sea_level": 65, + "sea_level": 60, "biomes": [ { "biome": "antarchy:moleworm_caves", diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_lush_caves.json b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_lush_caves.json index e36bbaf5..48be0038 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_lush_caves.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_lush_caves.json @@ -16,10 +16,9 @@ "type": "minecraft:spore_blossom_air" } }, - "ambient_sound": "minecraft:ambient.cave", "mood_sound": { "sound": "minecraft:ambient.cave", - "tick_delay": 6000, + "tick_delay": 60000, "block_search_extent": 8, "offset": 2.0 } diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json index bb192d49..ae92b86f 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_meadow.json @@ -124,8 +124,18 @@ ], "axolotls": [], "underground_water_creature": [], - "water_creature": [], - "water_ambient": [], + "water_creature": [ + { + "type": "antarchy:octopus_bomb", + "weight": 2, + "minCount": 1, + "maxCount": 1 + } + ], + "water_ambient": [ + { "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 }, + { "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 } + ], "misc": [] } } diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_ocean.json b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_ocean.json index cd075092..d8ffd3cf 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/elythia_ocean.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/elythia_ocean.json @@ -60,17 +60,18 @@ "creature_spawn_probability": 0.15, "spawners": { "monster": [ - { "type": "antarchy:missile_squid", "weight": 12, "minCount": 1, "maxCount": 3 }, - { "type": "antarchy:octopus_bomb", "weight": 4, "minCount": 1, "maxCount": 2 } + { "type": "antarchy:missile_squid", "weight": 12, "minCount": 1, "maxCount": 3 } ], "creature": [ - { "type": "minecraft:turtle", "weight": 5, "minCount": 1, "maxCount": 2 } ], "ambient": [], "axolotls": [], "underground_water_creature": [], - "water_creature": [], + "water_creature": [ + { "type": "minecraft:turtle", "weight": 5, "minCount": 1, "maxCount": 2 }, + { "type": "antarchy:octopus_bomb", "weight": 4, "minCount": 1, "maxCount": 2 }], "water_ambient": [ + { "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 }, { "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 } ], "misc": [] diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json b/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json index a099d855..62235ae6 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/ouranwood_forest.json @@ -101,8 +101,16 @@ ], "axolotls": [], "underground_water_creature": [], - "water_creature": [], - "water_ambient": [], + "water_creature": [ + { + "type": "antarchy:octopus_bomb", + "weight": 2, + "minCount": 1, + "maxCount": 1 + }], + "water_ambient": [ + { "type": "antarchy:cheep", "weight": 20, "minCount": 4, "maxCount": 8 }, + { "type": "minecraft:tropical_fish", "weight": 20, "minCount": 4, "maxCount": 8 }], "misc": [] } } diff --git a/common/src/main/resources/data/antarchy/worldgen/density_function/elythia_surface.json b/common/src/main/resources/data/antarchy/worldgen/density_function/elythia_surface.json index 869221e0..b7d6ac21 100644 --- a/common/src/main/resources/data/antarchy/worldgen/density_function/elythia_surface.json +++ b/common/src/main/resources/data/antarchy/worldgen/density_function/elythia_surface.json @@ -70,7 +70,7 @@ }, "argument2": { "type": "minecraft:mul", - "argument1": 0.55, + "argument1": 0.58, "argument2": "minecraft:overworld/continents" } } diff --git a/common/src/main/resources/data/antarchy/worldgen/noise_settings/elythia.json b/common/src/main/resources/data/antarchy/worldgen/noise_settings/elythia.json index 9a4a7d46..067e562c 100644 --- a/common/src/main/resources/data/antarchy/worldgen/noise_settings/elythia.json +++ b/common/src/main/resources/data/antarchy/worldgen/noise_settings/elythia.json @@ -1,5 +1,5 @@ { - "sea_level": 65, + "sea_level": 60, "disable_mob_generation": false, "aquifers_enabled": true, "ore_veins_enabled": false, @@ -128,11 +128,7 @@ "when_in_range": { "type": "minecraft:min", "argument1": "antarchy:elythia_surface", - "argument2": { - "type": "minecraft:mul", - "argument1": 5.0, - "argument2": "minecraft:overworld/caves/entrances" - } + "argument2": 1000000.0 }, "when_out_of_range": { "type": "minecraft:max", @@ -188,13 +184,9 @@ } } }, - "argument2": "minecraft:overworld/caves/entrances" + "argument2": 1000000.0 }, - "argument2": { - "type": "minecraft:add", - "argument1": "minecraft:overworld/caves/spaghetti_2d", - "argument2": "minecraft:overworld/caves/spaghetti_roughness_function" - } + "argument2": 1000000.0 }, "argument2": { "type": "minecraft:range_choice", @@ -216,7 +208,7 @@ } } }, - "argument2": "minecraft:overworld/caves/noodle" + "argument2": 1000000.0 }, "fluid_level_floodedness": { "type": "minecraft:noise", diff --git a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_large_tuff_boulders.json b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_large_tuff_boulders.json index b77b27fd..7e25c5aa 100644 --- a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_large_tuff_boulders.json +++ b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_large_tuff_boulders.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 24 + "chance": 34 }, { "type": "minecraft:in_square" diff --git a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_tuff_boulders.json b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_tuff_boulders.json index 19494229..004e9bec 100644 --- a/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_tuff_boulders.json +++ b/common/src/main/resources/data/antarchy/worldgen/placed_feature/elythia_tuff_boulders.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 6 + "chance": 9 }, { "type": "minecraft:in_square" diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java index 65637c05..3ed3ad6d 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java @@ -516,13 +516,13 @@ public final class AntarchyFabricContent { () -> new TorchflowerBushBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY) .lightLevel(state -> AntarchySettings.glowingTorchflowers() ? 15 : 0))); public static final DeferredBlock OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", - () -> new net.minecraft.world.level.block.StandingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); + () -> new net.minecraft.world.level.block.StandingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); public static final DeferredBlock OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", - () -> new net.minecraft.world.level.block.WallSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_SIGN))); + () -> new net.minecraft.world.level.block.WallSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_SIGN))); public static final DeferredBlock OURANWOOD_HANGING_SIGN = BLOCKS.register("ouranwood_hanging_sign", - () -> new net.minecraft.world.level.block.CeilingHangingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_HANGING_SIGN))); + () -> new net.minecraft.world.level.block.CeilingHangingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_HANGING_SIGN))); public static final DeferredBlock OURANWOOD_WALL_HANGING_SIGN = BLOCKS.register("ouranwood_wall_hanging_sign", - () -> new net.minecraft.world.level.block.WallHangingSignBlock(net.minecraft.world.level.block.state.properties.WoodType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_HANGING_SIGN))); + () -> new net.minecraft.world.level.block.WallHangingSignBlock(OuranwoodWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_WALL_HANGING_SIGN))); public static final DeferredBlock DUPLICATOR_SAPLING = BLOCKS.register("duplicator_sapling", () -> new DuplicatorSaplingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); public static final DeferredBlock DUCT_TAPE = BLOCKS.register("duct_tape", @@ -701,6 +701,8 @@ public final class AntarchyFabricContent { () -> new WaspNestBlock(AntarchyFabricContent::waspNestBlockEntityType, BlockBehaviour.Properties.ofFullCopy(Blocks.BEE_NEST))); public static final DeferredBlock OURANWOOD_SQUIRREL_NEST = BLOCKS.register("ouranwood_squirrel_nest", () -> new com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COARSE_DIRT).noLootTable())); + public static final DeferredBlock BRUTALFLY_COCOON_SPAWNER = BLOCKS.register("brutalfly_cocoon_spawner", + () -> new com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock(BlockBehaviour.Properties.of().noCollission().instabreak().noLootTable())); public static final DeferredBlock HUSHWEED = BLOCKS.register("hushweed", () -> new HushweedBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.AZALEA).noCollission().noOcclusion())); public static final DeferredHolder DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new); @@ -1717,11 +1719,11 @@ public final class AntarchyFabricContent { public static final DeferredItem TERMITE_SPAWN_EGG = ITEMS.register("termite_spawn_egg", () -> new DeferredSpawnEggItem(TERMITE, 0xD4B96A, 0xFF6B1A, new Item.Properties())); public static final DeferredItem MOLEWORM_SPAWN_EGG = ITEMS.register("moleworm_spawn_egg", - () -> new DeferredSpawnEggItem(MOLEWORM, 0x7A6150, 0xD2B8A3, new Item.Properties())); + () -> new DeferredSpawnEggItem(MOLEWORM, 0xB8B8B8, 0x8A623A, new Item.Properties())); public static final DeferredItem MANTIS_SPAWN_EGG = ITEMS.register("mantis_spawn_egg", () -> new DeferredSpawnEggItem(MANTIS, 0xF8F8F2, 0x63B44A, new Item.Properties())); public static final DeferredItem MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg", - () -> new DeferredSpawnEggItem(MOLEVORE, 0x3E2E24, 0xB67B4F, new Item.Properties().rarity(Rarity.UNCOMMON))); + () -> new DeferredSpawnEggItem(MOLEVORE, 0x4A4A4A, 0x6B4A2B, new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem TRIFFID_SPAWN_EGG = ITEMS.register("triffid_spawn_egg", () -> new DeferredSpawnEggItem(TRIFFID, 0x4C8F3A, 0xFF2FB3, new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem APPLE_COW_SPAWN_EGG = ITEMS.register("apple_cow_spawn_egg", @@ -2578,6 +2580,7 @@ public final class AntarchyFabricContent { () -> WASP_NEST.get(), () -> HUSHWEED.get(), () -> OURANWOOD_SQUIRREL_NEST.get(), + () -> BRUTALFLY_COCOON_SPAWNER.get(), () -> ANT_NEST_BLOCK_ENTITY.get(), () -> DREAM_CAMPFIRE_BLOCK_ENTITY.get(), () -> WASP_NEST_BLOCK_ENTITY.get(), diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/OuranwoodWoodTypes.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/OuranwoodWoodTypes.java new file mode 100644 index 00000000..86217123 --- /dev/null +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/OuranwoodWoodTypes.java @@ -0,0 +1,17 @@ +package com.craisinlord.antarchy.fabric; + +import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.fabric.mixin.WoodTypeInvoker; +import net.minecraft.world.level.block.state.properties.BlockSetType; +import net.minecraft.world.level.block.state.properties.WoodType; + +public final class OuranwoodWoodTypes { + public static final WoodType OURANWOOD = register("ouranwood"); + + private OuranwoodWoodTypes() { + } + + private static WoodType register(String name) { + return WoodTypeInvoker.antarchy$register(new WoodType(Antarchy.MODID + ":" + name, BlockSetType.JUNGLE)); + } +} diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/WoodTypeInvoker.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/WoodTypeInvoker.java new file mode 100644 index 00000000..9b7ff6c3 --- /dev/null +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/WoodTypeInvoker.java @@ -0,0 +1,13 @@ +package com.craisinlord.antarchy.fabric.mixin; + +import net.minecraft.world.level.block.state.properties.WoodType; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +@Mixin(WoodType.class) +public interface WoodTypeInvoker { + @Invoker("register") + static WoodType antarchy$register(WoodType woodType) { + throw new AssertionError(); + } +} diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/CameraShakeMixin.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/CameraShakeMixin.java index d5d3ec70..212cc276 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/CameraShakeMixin.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/CameraShakeMixin.java @@ -1,61 +1,45 @@ package com.craisinlord.antarchy.fabric.mixin.client; -import com.craisinlord.antarchy.content.entity.ToreterrorEntity; -import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity; +import com.craisinlord.antarchy.content.client.CameraShakeClientState; import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState; +import com.craisinlord.antarchy.content.item.BigBerthaItem; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Axis; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GameRenderer; import net.minecraft.util.Mth; -import net.minecraft.world.phys.Vec3; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import net.minecraft.client.renderer.GameRenderer; @Mixin(GameRenderer.class) public abstract class CameraShakeMixin { - private static final double MAX_SHAKE_RANGE = 48.0D; private static final int TORETERROR_SHAKE_TICKS = 25; - private static final double NIGHTMARE_SHAKE_RANGE = 32.0D; @Shadow @Final private Minecraft minecraft; @Inject(method = "bobView", at = @At("TAIL")) private void applyCameraShake(PoseStack poseStack, float partialTick, CallbackInfo ci) { - if (minecraft.level == null || minecraft.player == null) return; - - Vec3 cameraPos = minecraft.gameRenderer.getMainCamera().getPosition(); - float shakeStrength = 0.0F; - - for (ToreterrorEntity toreterror : minecraft.level.getEntitiesOfClass( - ToreterrorEntity.class, - minecraft.player.getBoundingBox().inflate(MAX_SHAKE_RANGE), - t -> t.isAlive() && t.isJumpShaking() - )) { - double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0))); - if (distance > MAX_SHAKE_RANGE) continue; - shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 1.0F); + if (minecraft.level == null || minecraft.player == null) { + CameraShakeClientState.clear(); + return; } - for (NightmareEntity nightmare : minecraft.level.getEntitiesOfClass( - NightmareEntity.class, - minecraft.player.getBoundingBox().inflate(NIGHTMARE_SHAKE_RANGE), - entity -> entity.isAlive() && entity.isRoaring() - )) { - double distance = Math.sqrt(cameraPos.distanceToSqr(nightmare.position().add(0.0D, nightmare.getBbHeight() * 0.5D, 0.0D))); - if (distance > NIGHTMARE_SHAKE_RANGE) continue; - shakeStrength += (float) ((1.0D - distance / NIGHTMARE_SHAKE_RANGE) * 1.35D); - } + float shakeStrength = CameraShakeClientState.getStrength(minecraft.gameRenderer.getMainCamera().getPosition()); int beetleShakeTicks = HerculesBeetleImpactShakeClientState.getTicks(); if (beetleShakeTicks > 0) { shakeStrength += (float) beetleShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F; } + int bigBerthaShakeTicks = BigBerthaItem.clientShakeTicks; + if (bigBerthaShakeTicks > 0) { + shakeStrength += (float) bigBerthaShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F; + } + if (shakeStrength <= 0.0F) return; float time = (float) (minecraft.player.tickCount + partialTick); diff --git a/fabric/src/main/resources/antarchy-fabric.mixins.json b/fabric/src/main/resources/antarchy-fabric.mixins.json index 24133392..c4066f37 100644 --- a/fabric/src/main/resources/antarchy-fabric.mixins.json +++ b/fabric/src/main/resources/antarchy-fabric.mixins.json @@ -15,11 +15,11 @@ "BloodglassRespawnMixin", "DreamCampfireBlockEntityMixin", "JumpyBootsFallDamageMixin", + "WoodTypeInvoker", "infinity.RandomSpringMixin", "infinity.PortalCreatorMixin" ], "client": [ - "client.NightmareCameraShakeMixin", "client.CameraShakeMixin", "client.DuctTapeInputMixin", "client.AntiwaterFogMixin", diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java index 4bfac523..2f27acd1 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java @@ -258,6 +258,7 @@ public class AntarchyNeoforge { () -> AntarchyNeoforgeBlocks.WASP_NEST.get(), () -> AntarchyNeoforgeBlocks.HUSHWEED.get(), () -> AntarchyNeoforgeBlocks.OURANWOOD_SQUIRREL_NEST.get(), + () -> AntarchyNeoforgeBlocks.BRUTALFLY_COCOON_SPAWNER.get(), () -> AntarchyNeoforgeBlocks.ANT_NEST_BLOCK_ENTITY.get(), () -> AntarchyNeoforgeBlocks.DREAM_CAMPFIRE_BLOCK_ENTITY.get(), () -> AntarchyNeoforgeBlocks.WASP_NEST_BLOCK_ENTITY.get(), diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java index 8306063a..5fe047eb 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java @@ -336,14 +336,14 @@ public final class AntarchyToolsConfig { "Base attack damage. Also the minimum damage at full health.", "Formula: damage = baseDamage * (1 + missingHealthFraction * scalingFactor)" ) - .defineInRange("baseDamage", 30.0D, 0.0D, 1024.0D); + .defineInRange("baseDamage", 15.0D, 0.0D, 1024.0D); NIGHTMARE_SWORD_ATTACK_SPEED = b.comment("Attack speed of the Nightmare Sword.").defineInRange("attackSpeed", -2.4D, -10.0D, 10.0D); NIGHTMARE_SWORD_SCALING_FACTOR = b .comment( "How much damage scales with missing health.", "At 1.0 and 0 HP remaining: damage doubles. At full health: always baseDamage." ) - .defineInRange("scalingFactor", 1.0D, 0.0D, 100.0D); + .defineInRange("scalingFactor", 1.5D, 0.0D, 100.0D); b.pop(); b.push("fallenKingCrown"); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/CameraShakeHandler.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/CameraShakeHandler.java index 75eb6c87..12daca96 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/CameraShakeHandler.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/CameraShakeHandler.java @@ -1,12 +1,11 @@ package com.craisinlord.antarchy.neoforge.client; import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.content.client.CameraShakeClientState; import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState; -import com.craisinlord.antarchy.content.entity.ToreterrorEntity; -import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity; +import com.craisinlord.antarchy.content.item.BigBerthaItem; import net.minecraft.client.Minecraft; import net.minecraft.util.Mth; -import net.minecraft.world.phys.Vec3; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; @@ -14,9 +13,7 @@ import net.neoforged.neoforge.client.event.ViewportEvent; @EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT) public final class CameraShakeHandler { - private static final double MAX_SHAKE_RANGE = 48.0D; private static final int TORETERROR_SHAKE_TICKS = 25; - private static final double NIGHTMARE_SHAKE_RANGE = 32.0D; private CameraShakeHandler() { } @@ -24,36 +21,23 @@ public final class CameraShakeHandler { @SubscribeEvent public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) { Minecraft mc = Minecraft.getInstance(); - if (mc.level == null || mc.player == null) return; - - Vec3 cameraPos = event.getCamera().getPosition(); - float shakeStrength = 0.0F; - - for (ToreterrorEntity toreterror : mc.level.getEntitiesOfClass( - ToreterrorEntity.class, - mc.player.getBoundingBox().inflate(MAX_SHAKE_RANGE), - t -> t.isAlive() && t.isJumpShaking() - )) { - double distance = Math.sqrt(cameraPos.distanceToSqr(toreterror.position().add(0, toreterror.getBbHeight() * 0.5, 0))); - if (distance > MAX_SHAKE_RANGE) continue; - shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 1.0D); + if (mc.level == null || mc.player == null) { + CameraShakeClientState.clear(); + return; } - for (NightmareEntity nightmare : mc.level.getEntitiesOfClass( - NightmareEntity.class, - mc.player.getBoundingBox().inflate(NIGHTMARE_SHAKE_RANGE), - entity -> entity.isAlive() && entity.isRoaring() - )) { - double distance = Math.sqrt(cameraPos.distanceToSqr(nightmare.position().add(0.0D, nightmare.getBbHeight() * 0.5D, 0.0D))); - if (distance > NIGHTMARE_SHAKE_RANGE) continue; - shakeStrength += (float) ((1.0D - distance / NIGHTMARE_SHAKE_RANGE) * 1.35D); - } + float shakeStrength = CameraShakeClientState.getStrength(event.getCamera().getPosition()); int beetleShakeTicks = HerculesBeetleImpactShakeClientState.getTicks(); if (beetleShakeTicks > 0) { shakeStrength += (float) beetleShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F; } + int bigBerthaShakeTicks = BigBerthaItem.clientShakeTicks; + if (bigBerthaShakeTicks > 0) { + shakeStrength += (float) bigBerthaShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F; + } + if (shakeStrength <= 0.0F) return; float time = (float) (mc.player.tickCount + event.getPartialTick()); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/NightmareCameraShakeHandler.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/NightmareCameraShakeHandler.java deleted file mode 100644 index beae8706..00000000 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/NightmareCameraShakeHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.craisinlord.antarchy.neoforge.client; - -import com.craisinlord.antarchy.Antarchy; -import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity; -import net.minecraft.client.Minecraft; -import net.minecraft.util.Mth; -import net.minecraft.world.phys.Vec3; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.bus.api.SubscribeEvent; -import net.neoforged.fml.common.EventBusSubscriber; -import net.neoforged.neoforge.client.event.ViewportEvent; - -@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT) -public final class NightmareCameraShakeHandler { - private static final double MAX_SHAKE_RANGE = 32.0D; - - private NightmareCameraShakeHandler() { - } - - @SubscribeEvent - public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) { - Minecraft minecraft = Minecraft.getInstance(); - if (minecraft.level == null || minecraft.player == null) { - return; - } - - Vec3 cameraPos = event.getCamera().getPosition(); - float shakeStrength = 0.0F; - - for (NightmareEntity nightmare : minecraft.level.getEntitiesOfClass( - NightmareEntity.class, - minecraft.player.getBoundingBox().inflate(MAX_SHAKE_RANGE), - nightmare -> nightmare.isAlive() && nightmare.isRoaring() - )) { - double distance = Math.sqrt(cameraPos.distanceToSqr(nightmare.position().add(0.0D, nightmare.getBbHeight() * 0.5D, 0.0D))); - if (distance > MAX_SHAKE_RANGE) { - continue; - } - - shakeStrength += (float) ((1.0D - distance / MAX_SHAKE_RANGE) * 1.35D); - } - - if (shakeStrength <= 0.0F) { - return; - } - - float time = (float) (minecraft.player.tickCount + event.getPartialTick()); - event.setYaw(event.getYaw() + Mth.sin(time * 1.85F) * shakeStrength * 1.8F); - event.setPitch(event.getPitch() + Mth.cos(time * 2.15F) * shakeStrength * 1.45F); - event.setRoll(event.getRoll() + Mth.sin(time * 2.65F) * shakeStrength * 1.05F); - } -} diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java index 56b0feb1..dc087556 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java @@ -229,6 +229,8 @@ public final class AntarchyNeoforgeBlocks { () -> new WaspNestBlock(AntarchyNeoforgeItems::waspNestBlockEntityType, BlockBehaviour.Properties.ofFullCopy(Blocks.BEE_NEST))); public static final DeferredBlock OURANWOOD_SQUIRREL_NEST = BLOCKS.register("ouranwood_squirrel_nest", () -> new com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COARSE_DIRT).noLootTable())); + public static final DeferredBlock BRUTALFLY_COCOON_SPAWNER = BLOCKS.register("brutalfly_cocoon_spawner", + () -> new com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock(BlockBehaviour.Properties.of().noCollission().instabreak().noLootTable())); public static final DeferredBlock HUSHWEED = BLOCKS.register("hushweed", () -> new HushweedBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.AZALEA).noCollission().noOcclusion())); public static final DeferredBlock BILE_BLOCK = BLOCKS.register("bile", diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java index 4b20c614..03125724 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java @@ -516,11 +516,11 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem TERMITE_SPAWN_EGG = ITEMS.register("termite_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.TERMITE, 0xD4B96A, 0xFF6B1A, new Item.Properties())); public static final DeferredItem MOLEWORM_SPAWN_EGG = ITEMS.register("moleworm_spawn_egg", - () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEWORM, 0x7A6150, 0xD2B8A3, new Item.Properties())); + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEWORM, 0xB8B8B8, 0x8A623A, new Item.Properties())); public static final DeferredItem MANTIS_SPAWN_EGG = ITEMS.register("mantis_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MANTIS, 0xF8F8F2, 0x63B44A, new Item.Properties())); public static final DeferredItem MOLEVORE_SPAWN_EGG = ITEMS.register("molevore_spawn_egg", - () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEVORE, 0x3E2E24, 0xB67B4F, new Item.Properties().rarity(Rarity.UNCOMMON))); + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MOLEVORE, 0x4A4A4A, 0x6B4A2B, new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem TRIFFID_SPAWN_EGG = ITEMS.register("triffid_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.TRIFFID, 0x4C8F3A, 0xFF2FB3, new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem APPLE_COW_SPAWN_EGG = ITEMS.register("apple_cow_spawn_egg", diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java index d6ade634..fbb6a581 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java @@ -1,6 +1,7 @@ package com.craisinlord.antarchy.neoforge.registry; import com.craisinlord.antarchy.content.entity.*; +import net.minecraft.world.entity.animal.AbstractFish; import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity; import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity; import com.craisinlord.antarchy.content.entity.flying_squirrel.FlyingSquirrelEntity; @@ -51,5 +52,6 @@ public class AntarchyNeoforgeSpawnPlacements { event.register(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR); + event.register(AntarchyNeoforgeEntites.CHEEP.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, RegisterSpawnPlacementsEvent.Operation.OR); } }