diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java index 6dbb378d..c9947dec 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java @@ -231,6 +231,19 @@ public final class AntarchySettings { private static int royalGuardianShieldDurability = 1008; private static double royalBoltDamage = 6.0D; private static int royalEggHatchChance = 3; + private static double kingHealth = 6000.0D; + private static double queenHealth = 6000.0D; + private static double kingAttackDamage = 50.0D; + private static double queenAttackDamage = 45.0D; + private static double royalBossArmor = 20.0D; + private static double royalBossFollowRange = 128.0D; + private static double royalBossMovementSpeed = 0.22D; + private static double royalBossKnockbackResistance = 1.0D; + private static double royalBossStepHeight = 3.0D; + private static double royalBossMaxSingleHitDamage = 250.0D; + private static double royalBossBiteReach = 10.0D; + private static double royalBossBiteDamageMultiplier = 1.6D; + private static int royalBossBiteCooldownTicks = 45; private static boolean basiliskPetrifyingGazeEnabled = true; private static int basiliskSpawnMaxLightLevel = 5; private static double basiliskHealth = 320.0D; @@ -261,7 +274,7 @@ public final class AntarchySettings { private static double diamondMinecartCoastDeceleration = 0.02D; private static boolean diamondMinecartMobDamageEnabled = false; private static double diamondMinecartMaxMobDamage = 4.0D; - private static double hoverboardMaxSpeed = 3.0D; + private static double hoverboardMaxSpeed = 6.0D; private static double hoverboardAcceleration = 0.05D; private static boolean dreadHallucinationSoundsEnabled = true; private static double dreadHallucinationSoundMinInterval = 3.0D; @@ -386,18 +399,18 @@ public final class AntarchySettings { private static int eyeOfTheStormSurgeCooldownTicks = 70; private static double eyeOfTheStormSurgeRange = 16.0D; private static int eyeOfTheStormSurgeDurationTicks = 300; - private static double eyeOfTheStormSurgeRadius = 3.5D; - private static double eyeOfTheStormSurgeHeight = 5.0D; - private static double eyeOfTheStormSurgePullStrength = 0.45D; + private static double eyeOfTheStormSurgeRadius = 4.0D; + private static double eyeOfTheStormSurgeHeight = 6.0D; + private static double eyeOfTheStormSurgePullStrength = 0.85D; private static double eyeOfTheStormSurgeReturnStrength = 1.4D; private static float eyeOfTheStormSurgeDamage = 5.0F; private static double vortexLensMinRadius = 1.5D; private static double vortexLensMaxRadius = 10.0D; private static double vortexLensMinHeight = 3.0D; private static double vortexLensMaxHeight = 20.0D; - private static double vortexLensPullStrength = 0.42D; - private static double vortexLensPushStrength = 0.38D; - private static double vortexLensLaunchStrength = 1.15D; + private static double vortexLensPullStrength = 0.65D; + private static double vortexLensPushStrength = 0.65D; + private static double vortexLensLaunchStrength = 1.4D; private static double missileSquidHealth = 60.0D; private static double missileSquidAttackDamage = 9.0D; private static double missileSquidMovementSpeed = 0.84D; @@ -496,6 +509,10 @@ public final class AntarchySettings { private static double creepingHorrorAttackDamage = 6.0D; private static double lurkingTerrorHealth = 15.0D; private static double lurkingTerrorAttackDamage = 6.0D; + private static double manticoreHealth = 40.0D; + private static double manticoreAttackDamage = 7.0D; + private static int manticoreStingPoisonTicks = 100; + private static int queenManticoreCap = 15; private static double jerryInfantHealth = 20.0D; private static double jerryInfantAttackDamage = 2.0D; private static double jerryMatureHealth = 40.0D; @@ -1914,6 +1931,45 @@ public final class AntarchySettings { public static int royalEggHatchChance() { return royalEggHatchChance; } public static void setRoyalEggHatchChance(int v) { royalEggHatchChance = v; } + public static double kingHealth() { return kingHealth; } + public static void setKingHealth(double v) { kingHealth = v; } + + public static double queenHealth() { return queenHealth; } + public static void setQueenHealth(double v) { queenHealth = v; } + + public static double kingAttackDamage() { return kingAttackDamage; } + public static void setKingAttackDamage(double v) { kingAttackDamage = v; } + + public static double queenAttackDamage() { return queenAttackDamage; } + public static void setQueenAttackDamage(double v) { queenAttackDamage = v; } + + public static double royalBossArmor() { return royalBossArmor; } + public static void setRoyalBossArmor(double v) { royalBossArmor = v; } + + public static double royalBossFollowRange() { return royalBossFollowRange; } + public static void setRoyalBossFollowRange(double v) { royalBossFollowRange = v; } + + public static double royalBossMovementSpeed() { return royalBossMovementSpeed; } + public static void setRoyalBossMovementSpeed(double v) { royalBossMovementSpeed = v; } + + public static double royalBossKnockbackResistance() { return royalBossKnockbackResistance; } + public static void setRoyalBossKnockbackResistance(double v) { royalBossKnockbackResistance = v; } + + public static double royalBossStepHeight() { return royalBossStepHeight; } + public static void setRoyalBossStepHeight(double v) { royalBossStepHeight = v; } + + public static double royalBossMaxSingleHitDamage() { return royalBossMaxSingleHitDamage; } + public static void setRoyalBossMaxSingleHitDamage(double v) { royalBossMaxSingleHitDamage = v; } + + public static double royalBossBiteReach() { return royalBossBiteReach; } + public static void setRoyalBossBiteReach(double v) { royalBossBiteReach = v; } + + public static double royalBossBiteDamageMultiplier() { return royalBossBiteDamageMultiplier; } + public static void setRoyalBossBiteDamageMultiplier(double v) { royalBossBiteDamageMultiplier = v; } + + public static int royalBossBiteCooldownTicks() { return royalBossBiteCooldownTicks; } + public static void setRoyalBossBiteCooldownTicks(int v) { royalBossBiteCooldownTicks = v; } + public static double nightmareSwordBaseDamage() { return nightmareSwordBaseDamage; } public static void setNightmareSwordBaseDamage(double v) { nightmareSwordBaseDamage = v; } @@ -2685,6 +2741,14 @@ public final class AntarchySettings { public static void setLurkingTerrorHealth(double v) { lurkingTerrorHealth = v; } public static double lurkingTerrorAttackDamage() { return lurkingTerrorAttackDamage; } public static void setLurkingTerrorAttackDamage(double v) { lurkingTerrorAttackDamage = v; } + public static double manticoreHealth() { return manticoreHealth; } + public static void setManticoreHealth(double v) { manticoreHealth = v; } + public static double manticoreAttackDamage() { return manticoreAttackDamage; } + public static void setManticoreAttackDamage(double v) { manticoreAttackDamage = v; } + public static int manticoreStingPoisonTicks() { return manticoreStingPoisonTicks; } + public static void setManticoreStingPoisonTicks(int v) { manticoreStingPoisonTicks = v; } + public static int queenManticoreCap() { return queenManticoreCap; } + public static void setQueenManticoreCap(int v) { queenManticoreCap = v; } public static double jerryInfantHealth() { return jerryInfantHealth; } public static void setJerryInfantHealth(double v) { jerryInfantHealth = v; } public static double jerryInfantAttackDamage() { return jerryInfantAttackDamage; } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java index 6ec2d2dc..4a2e8bcc 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchyObjects.java @@ -32,6 +32,7 @@ import com.craisinlord.antarchy.content.entity.lucid.LucidEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexChargeProjectileEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexEntity; import com.craisinlord.antarchy.content.entity.vortex.WindVortexEntity; +import com.craisinlord.antarchy.content.time.TimeDilationFieldEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmareBiteEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmarePortalEntity; @@ -81,6 +82,11 @@ public final class AntarchyObjects { @SuppressWarnings("unchecked") public static Supplier> DIMENSIONAL_TEAR = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") + public static Supplier DIMENSIONAL_TEAR_MARKER = (Supplier) UNBOUND; + @SuppressWarnings("unchecked") + public static Supplier> DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY = + (Supplier>) UNBOUND; + @SuppressWarnings("unchecked") public static Supplier> NIGHTMARE_BITE = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") public static Supplier> LUCID = (Supplier>) UNBOUND; @@ -91,6 +97,8 @@ public final class AntarchyObjects { @SuppressWarnings("unchecked") public static Supplier> VORTEX_CHARGE_PROJECTILE = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") + public static Supplier> TIME_DILATION_FIELD = (Supplier>) UNBOUND; + @SuppressWarnings("unchecked") public static Supplier VORTEX_LENS = (Supplier) UNBOUND; @SuppressWarnings("unchecked") public static Supplier> VORTEX_LENS_BLOCK_ENTITY = (Supplier>) UNBOUND; @@ -129,6 +137,8 @@ public final class AntarchyObjects { @SuppressWarnings("unchecked") public static Supplier> LURKING_TERROR = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") + public static Supplier> MANTICORE = (Supplier>) UNBOUND; + @SuppressWarnings("unchecked") public static Supplier> STINK_BUG = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") public static Supplier> ROLLY_POLLY = (Supplier>) UNBOUND; @@ -145,6 +155,10 @@ public final class AntarchyObjects { @SuppressWarnings("unchecked") public static Supplier> ROYAL_BOLT = (Supplier>) UNBOUND; @SuppressWarnings("unchecked") + public static Supplier> KING = (Supplier>) UNBOUND; + @SuppressWarnings("unchecked") + public static Supplier> QUEEN = (Supplier>) UNBOUND; + @SuppressWarnings("unchecked") public static Supplier PRINCE_EGG = (Supplier) UNBOUND; @SuppressWarnings("unchecked") public static Supplier PRINCESS_EGG = (Supplier) UNBOUND; @@ -625,6 +639,16 @@ public final class AntarchyObjects { DIMENSIONAL_TEAR = supplier; } + public static void setDimensionalTearMarker(Supplier supplier) { + DIMENSIONAL_TEAR_MARKER = supplier; + } + + public static void setDimensionalTearMarkerBlockEntity( + Supplier> supplier + ) { + DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY = supplier; + } + public static void setNightmare(Supplier> supplier) { NIGHTMARE = supplier; } @@ -649,6 +673,10 @@ public final class AntarchyObjects { VORTEX_CHARGE_PROJECTILE = supplier; } + public static void setTimeDilationField(Supplier> supplier) { + TIME_DILATION_FIELD = supplier; + } + public static void setVortexLens(Supplier supplier) { VORTEX_LENS = supplier; } @@ -689,6 +717,18 @@ public final class AntarchyObjects { ROYAL_BOLT = supplier; } + public static void setKing(Supplier> supplier) { + KING = supplier; + } + + public static void setManticore(Supplier> supplier) { + MANTICORE = supplier; + } + + public static void setQueen(Supplier> supplier) { + QUEEN = supplier; + } + public static void setPrinceEgg(Supplier supplier) { PRINCE_EGG = supplier; } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java index c9edec41..4b12b5d7 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java @@ -178,6 +178,14 @@ public final class AntarchySoundEvents { public static Supplier BLOOD_CRYSTAL_ARMOR_EQUIP = (Supplier) UNBOUND; public static Supplier BLOODGLASS_WARD_HEART_BREAK = (Supplier) UNBOUND; public static Supplier BLOODGLASS_WARD_HEART_REGEN = (Supplier) UNBOUND; + public static Supplier KING_IDLE = (Supplier) UNBOUND; + public static Supplier KING_HURT = (Supplier) UNBOUND; + public static Supplier KING_DEATH = (Supplier) UNBOUND; + public static Supplier KING_BITE = (Supplier) UNBOUND; + public static Supplier QUEEN_IDLE = (Supplier) UNBOUND; + public static Supplier QUEEN_HURT = (Supplier) UNBOUND; + public static Supplier QUEEN_DEATH = (Supplier) UNBOUND; + public static Supplier QUEEN_BITE = (Supplier) UNBOUND; private AntarchySoundEvents() { } @@ -351,7 +359,15 @@ public final class AntarchySoundEvents { Supplier bloodCrystalKatanaDash, Supplier bloodCrystalArmorEquip, Supplier bloodglassWardHeartBreak, - Supplier bloodglassWardHeartRegen + Supplier bloodglassWardHeartRegen, + Supplier kingIdle, + Supplier kingHurt, + Supplier kingDeath, + Supplier kingBite, + Supplier queenIdle, + Supplier queenHurt, + Supplier queenDeath, + Supplier queenBite ) { SQUIDZOOKA_FIRE = squidzookaFire; SHRINK_RAY_CHARGE = shrinkRayCharge; @@ -522,5 +538,13 @@ public final class AntarchySoundEvents { BLOOD_CRYSTAL_ARMOR_EQUIP = bloodCrystalArmorEquip; BLOODGLASS_WARD_HEART_BREAK = bloodglassWardHeartBreak; BLOODGLASS_WARD_HEART_REGEN = bloodglassWardHeartRegen; + KING_IDLE = kingIdle; + KING_HURT = kingHurt; + KING_DEATH = kingDeath; + KING_BITE = kingBite; + QUEEN_IDLE = queenIdle; + QUEEN_HURT = queenHurt; + QUEEN_DEATH = queenDeath; + QUEEN_BITE = queenBite; } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/DimensionalTearMarkerBlock.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/DimensionalTearMarkerBlock.java new file mode 100644 index 00000000..a31ed325 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/DimensionalTearMarkerBlock.java @@ -0,0 +1,69 @@ +package com.craisinlord.antarchy.content.block; + +import com.craisinlord.antarchy.content.block.entity.DimensionalTearMarkerBlockEntity; +import com.mojang.serialization.MapCodec; +import java.util.function.Supplier; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +public class DimensionalTearMarkerBlock extends BaseEntityBlock { + private static final VoxelShape EMPTY = Shapes.empty(); + private final Supplier> blockEntityTypeSupplier; + private final MapCodec codec; + + public DimensionalTearMarkerBlock(Supplier> blockEntityTypeSupplier, BlockBehaviour.Properties properties) { + super(properties); + this.blockEntityTypeSupplier = blockEntityTypeSupplier; + this.codec = Block.simpleCodec(ignored -> this); + } + + @Override + public MapCodec codec() { + return this.codec; + } + + @Override + protected RenderShape getRenderShape(BlockState state) { + return RenderShape.INVISIBLE; + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return EMPTY; + } + + @Override + protected VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return EMPTY; + } + + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new DimensionalTearMarkerBlockEntity(pos, state, this.blockEntityTypeSupplier); + } + + @Override + public BlockEntityTicker getTicker(Level level, BlockState state, BlockEntityType blockEntityType) { + if (level.isClientSide) { + return null; + } + return createTickerHelper(blockEntityType, this.blockEntityTypeSupplier.get(), (tickLevel, tickPos, tickState, blockEntity) -> { + if (tickLevel instanceof ServerLevel serverLevel) { + DimensionalTearMarkerBlockEntity.serverTick(serverLevel, tickPos, tickState, blockEntity); + } + }); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/NadirVeilBlock.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/NadirVeilBlock.java new file mode 100644 index 00000000..b013d3da --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/NadirVeilBlock.java @@ -0,0 +1,40 @@ +package com.craisinlord.antarchy.content.block; + +import com.mojang.serialization.MapCodec; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.DustParticleOptions; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import org.joml.Vector3f; + +public class NadirVeilBlock extends Block { + public static final MapCodec CODEC = simpleCodec(NadirVeilBlock::new); + + private static final int GLOW_LIGHT_LEVEL = 6; + private static final DustParticleOptions DRIP_PARTICLE = + new DustParticleOptions(new Vector3f(0.63F, 0.26F, 0.92F), 1.0F); + + public NadirVeilBlock(BlockBehaviour.Properties properties) { + super(properties.lightLevel(state -> GLOW_LIGHT_LEVEL)); + } + + @Override + protected MapCodec codec() { + return CODEC; + } + + @Override + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (random.nextInt(6) != 0) { + return; + } + + double x = pos.getX() + 0.5D + (random.nextDouble() - 0.5D) * 0.7D; + double y = pos.getY() + 0.15D + random.nextDouble() * 0.4D; + double z = pos.getZ() + 0.5D + (random.nextDouble() - 0.5D) * 0.7D; + level.addParticle(DRIP_PARTICLE, x, y, z, 0.0D, 0.02D + random.nextDouble() * 0.02D, 0.0D); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/RoyalEggBlock.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/RoyalEggBlock.java index cc072455..d9f38170 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/RoyalEggBlock.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/RoyalEggBlock.java @@ -5,7 +5,9 @@ import com.craisinlord.antarchy.content.block.entity.RoyalEggBlockEntity; import com.craisinlord.antarchy.content.entity.royal.RoyalMountEntity; import java.util.UUID; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; @@ -17,20 +19,35 @@ import net.minecraft.world.entity.MobSpawnType; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import net.minecraft.world.entity.item.FallingBlockEntity; +import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.FallingBlock; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.IntegerProperty; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; public abstract class RoyalEggBlock extends BaseEntityBlock { public static final IntegerProperty HATCH = BlockStateProperties.HATCH; private static final int MAX_HATCH = 2; + private static final int FALL_DELAY = 2; + + private static final VoxelShape SHAPE = Shapes.or( + Block.box(3.0D, 0.0D, 3.0D, 13.0D, 13.0D, 13.0D), + Block.box(2.0D, 1.0D, 2.0D, 14.0D, 11.0D, 14.0D), + Block.box(4.0D, 13.0D, 4.0D, 12.0D, 14.0D, 12.0D), + Block.box(5.0D, 14.0D, 5.0D, 11.0D, 15.0D, 11.0D), + Block.box(6.0D, 15.0D, 6.0D, 10.0D, 16.0D, 10.0D)); protected RoyalEggBlock(Properties properties) { super(properties); @@ -49,6 +66,11 @@ public abstract class RoyalEggBlock extends BaseEntityBlock { return RenderShape.MODEL; } + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return SHAPE; + } + @Nullable @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @@ -94,6 +116,31 @@ public abstract class RoyalEggBlock extends BaseEntityBlock { } } + @Override + protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) { + level.scheduleTick(pos, this, FALL_DELAY); + } + + @Override + protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor level, BlockPos pos, BlockPos neighborPos) { + level.scheduleTick(pos, this, FALL_DELAY); + return super.updateShape(state, direction, neighborState, level, pos, neighborPos); + } + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (!FallingBlock.isFree(level.getBlockState(pos.below())) || pos.getY() < level.getMinBuildHeight()) { + return; + } + CompoundTag blockData = level.getBlockEntity(pos) instanceof RoyalEggBlockEntity egg + ? egg.saveWithoutMetadata(level.registryAccess()) + : null; + FallingBlockEntity falling = FallingBlockEntity.fall(level, pos, state); + if (blockData != null && !blockData.isEmpty()) { + falling.blockData = blockData; + } + } + @Override protected boolean isRandomlyTicking(BlockState state) { return true; diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/VortexLensBlock.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/VortexLensBlock.java index c4f9e806..595fc559 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/VortexLensBlock.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/VortexLensBlock.java @@ -26,6 +26,7 @@ import org.jetbrains.annotations.Nullable; public class VortexLensBlock extends BaseEntityBlock { public static final DirectionProperty FACING = BlockStateProperties.FACING; public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + public static final BooleanProperty PUSHING = BooleanProperty.create("pushing"); private final Supplier> blockEntityTypeSupplier; private final MapCodec codec; @@ -35,7 +36,8 @@ public class VortexLensBlock extends BaseEntityBlock { super(properties); this.blockEntityTypeSupplier = blockEntityTypeSupplier; this.codec = Block.simpleCodec(ignored -> this); - this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.UP).setValue(POWERED, false)); + this.registerDefaultState(this.stateDefinition.any() + .setValue(FACING, Direction.UP).setValue(POWERED, false).setValue(PUSHING, false)); } @Override @@ -45,14 +47,18 @@ public class VortexLensBlock extends BaseEntityBlock { @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(FACING, POWERED); + builder.add(FACING, POWERED, PUSHING); } @Override public BlockState getStateForPlacement(BlockPlaceContext context) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + boolean bluestone = BluestoneSignalHelper.getBestNeighborSignal(level, pos) > 0; return this.defaultBlockState() .setValue(FACING, context.getClickedFace()) - .setValue(POWERED, hasAnySignal(context.getLevel(), context.getClickedPos())); + .setValue(POWERED, hasAnySignal(level, pos)) + .setValue(PUSHING, bluestone); } @Override diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/DimensionalTearMarkerBlockEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/DimensionalTearMarkerBlockEntity.java new file mode 100644 index 00000000..882a0014 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/DimensionalTearMarkerBlockEntity.java @@ -0,0 +1,130 @@ +package com.craisinlord.antarchy.content.block.entity; + +import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.entity.portal.DimensionalTearEntity; +import java.util.function.Supplier; +import net.minecraft.core.BlockPos; +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; + +public class DimensionalTearMarkerBlockEntity extends BlockEntity { + private static final int MAX_ATTEMPT_TICKS = 100; + private static final int MIN_LINK_RANGE = 50; + private static final int MAX_LINK_RANGE = 500; + private static final int PARTNER_ORIGIN_ATTEMPTS = 12; + private static final int PARTNER_SEARCH_ATTEMPTS = 48; + private static final int LOCAL_SEARCH_ATTEMPTS = 18; + + private int attemptTicks; + + public DimensionalTearMarkerBlockEntity( + BlockPos pos, + BlockState blockState, + Supplier> blockEntityTypeSupplier + ) { + super(blockEntityTypeSupplier.get(), pos, blockState); + } + + public static void serverTick(ServerLevel level, BlockPos pos, BlockState state, DimensionalTearMarkerBlockEntity blockEntity) { + blockEntity.attemptTicks++; + boolean spawned = blockEntity.trySpawnLinkedPair(level, pos); + if (spawned || blockEntity.attemptTicks >= MAX_ATTEMPT_TICKS) { + level.removeBlock(pos, false); + } + } + + private boolean trySpawnLinkedPair(ServerLevel level, BlockPos origin) { + RandomSource random = level.getRandom(); + BlockPos first = findOpenPocket(level, origin, random, LOCAL_SEARCH_ATTEMPTS); + if (first == null) { + return false; + } + + BlockPos second = null; + for (int i = 0; i < PARTNER_ORIGIN_ATTEMPTS && second == null; i++) { + second = findOpenPocket(level, linkedOrigin(first, random), random, PARTNER_SEARCH_ATTEMPTS); + } + if (second == null) { + return false; + } + + int lifetime = Math.max(1200, AntarchySettings.dimensionalTearLifetimeTicks()); + float yawA = random.nextFloat() * 360.0F; + float yawB = Mth.wrapDegrees(yawA + 140.0F + random.nextFloat() * 80.0F); + DimensionalTearEntity tearA = DimensionalTearEntity.create(level, center(first), yawA, lifetime); + DimensionalTearEntity tearB = DimensionalTearEntity.create(level, center(second), yawB, lifetime); + tearA.linkTo(tearB); + tearB.linkTo(tearA); + level.addFreshEntity(tearA); + level.addFreshEntity(tearB); + return true; + } + + private static BlockPos linkedOrigin(BlockPos first, RandomSource random) { + double angle = random.nextDouble() * Math.PI * 2.0D; + int distance = Mth.nextInt(random, MIN_LINK_RANGE, MAX_LINK_RANGE); + int dx = Mth.floor(Math.cos(angle) * distance); + int dz = Mth.floor(Math.sin(angle) * distance); + int dy = Mth.nextInt(random, -36, 36); + return first.offset(dx, dy, dz); + } + + @Nullable + private static BlockPos findOpenPocket(ServerLevel level, BlockPos origin, RandomSource random, int attempts) { + int minY = level.getMinBuildHeight() + 8; + int maxY = level.getMaxBuildHeight() - 8; + for (int i = 0; i < attempts; i++) { + BlockPos candidate = origin.offset( + Mth.nextInt(random, -16, 16), + Mth.nextInt(random, -24, 24), + Mth.nextInt(random, -16, 16) + ); + candidate = new BlockPos(candidate.getX(), Mth.clamp(candidate.getY(), minY, maxY), candidate.getZ()); + if (isUsablePocket(level, candidate)) { + return candidate; + } + } + return null; + } + + private static boolean isUsablePocket(ServerLevel level, BlockPos pos) { + for (int dx = -2; dx <= 2; dx++) { + for (int dy = -2; dy <= 3; dy++) { + for (int dz = -4; dz <= 4; dz++) { + BlockPos checkPos = pos.offset(dx, dy, dz); + if (!level.isLoaded(checkPos)) { + return false; + } + if (!level.getBlockState(checkPos).getCollisionShape(level, checkPos).isEmpty()) { + return false; + } + } + } + } + return true; + } + + private static Vec3 center(BlockPos pos) { + return new Vec3(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D); + } + + @Override + protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { + super.saveAdditional(tag, registries); + tag.putInt("attempt_ticks", this.attemptTicks); + } + + @Override + protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { + super.loadAdditional(tag, registries); + this.attemptTicks = tag.getInt("attempt_ticks"); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/VortexLensBlockEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/VortexLensBlockEntity.java index b5ab18bf..6acc837e 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/VortexLensBlockEntity.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/block/entity/VortexLensBlockEntity.java @@ -66,7 +66,7 @@ public class VortexLensBlockEntity extends BlockEntity { if (signal <= 0) { this.removeActiveVortex(); - this.updatePoweredState(level, pos, state, false); + this.updateBlockState(level, pos, state, false, false); return; } @@ -93,7 +93,7 @@ public class VortexLensBlockEntity extends BlockEntity { vortex.resetVortexAge(); vortex.setVortexStrengths(strength, AntarchySettings.vortexLensLaunchStrength()); vortex.setDamaging(false); - this.updatePoweredState(level, pos, state, true); + this.updateBlockState(level, pos, state, true, pushMode); } @Nullable @@ -131,9 +131,14 @@ public class VortexLensBlockEntity extends BlockEntity { return null; } - private void updatePoweredState(ServerLevel level, BlockPos pos, BlockState state, boolean powered) { - if (state.getBlock() instanceof VortexLensBlock && state.getValue(VortexLensBlock.POWERED) != powered) { - level.setBlock(pos, state.setValue(VortexLensBlock.POWERED, powered), Block.UPDATE_CLIENTS); + private void updateBlockState(ServerLevel level, BlockPos pos, BlockState state, boolean powered, boolean pushing) { + if (!(state.getBlock() instanceof VortexLensBlock)) { + return; + } + if (state.getValue(VortexLensBlock.POWERED) != powered || state.getValue(VortexLensBlock.PUSHING) != pushing) { + level.setBlock(pos, + state.setValue(VortexLensBlock.POWERED, powered).setValue(VortexLensBlock.PUSHING, pushing), + Block.UPDATE_CLIENTS); } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/ClientTimeDilationTicker.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/ClientTimeDilationTicker.java new file mode 100644 index 00000000..2f08963f --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/ClientTimeDilationTicker.java @@ -0,0 +1,75 @@ +package com.craisinlord.antarchy.content.client; + +import com.craisinlord.antarchy.content.time.TimeDilationEntityAccess; +import com.craisinlord.antarchy.content.time.TimeDilationFieldEntity; +import com.craisinlord.antarchy.content.time.TimeDilationFieldSampler; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.WeakHashMap; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.entity.Entity; + +public final class ClientTimeDilationTicker { + private static boolean hadFields; + private static volatile List activeFields = List.of(); + private static final Map ANIM_OFFSETS = new WeakHashMap<>(); + + private ClientTimeDilationTicker() { + } + + public static void tick(ClientLevel level) { + List fields = new ArrayList<>(); + for (Entity entity : level.entitiesForRendering()) { + if (entity instanceof TimeDilationFieldEntity field && field.isAlive()) { + fields.add(field); + } + } + activeFields = fields; + + if (fields.isEmpty()) { + if (hadFields) { + resetRates(level); + hadFields = false; + } + return; + } + hadFields = true; + + for (Entity entity : level.entitiesForRendering()) { + if (!(entity instanceof TimeDilationEntityAccess access) || entity instanceof TimeDilationFieldEntity) { + continue; + } + double rate = TimeDilationFieldSampler.sample(fields, entity.position()); + access.antarchy$setTimeDilationRate(rate); + if (rate < TimeDilationMath.NORMAL_RATE) { + ANIM_OFFSETS.merge(entity, rate - TimeDilationMath.NORMAL_RATE, Double::sum); + } + } + } + + public static float dilateAnimationTime(Entity entity, float vanillaTime) { + Double offset = ANIM_OFFSETS.get(entity); + return offset == null ? vanillaTime : (float) (vanillaTime + offset); + } + + public static double rateAt(double x, double y, double z) { + List fields = activeFields; + if (fields.isEmpty()) { + return TimeDilationMath.NORMAL_RATE; + } + return TimeDilationFieldSampler.sample(fields, x, y, z); + } + + private static void resetRates(ClientLevel level) { + for (Entity entity : level.entitiesForRendering()) { + if (!(entity instanceof TimeDilationEntityAccess access) || entity instanceof TimeDilationFieldEntity) { + continue; + } + if (access.antarchy$getTimeDilationRate() < TimeDilationMath.NORMAL_RATE) { + access.antarchy$setTimeDilationRate(TimeDilationMath.NORMAL_RATE); + } + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/HoverboardTrailSystem.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/HoverboardTrailSystem.java index 4cb76871..c697f187 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/HoverboardTrailSystem.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/HoverboardTrailSystem.java @@ -256,7 +256,24 @@ public final class HoverboardTrailSystem { if (color == null) { return DEFAULT_COLOR; } - return rgb(color.getTextureDiffuseColor()); + return switch (color) { + case PURPLE -> rgb(0x00FF3C); + case WHITE -> rgb(0xFF1919); + case ORANGE -> rgb(0x33CCFF); + case LIGHT_BLUE -> rgb(0xFF8A00); + case YELLOW -> rgb(0xB026FF); + case PINK -> rgb(0x66E0FF); + case LIME -> rgb(0xFF00E6); + case GRAY -> rgb(0xFF9F4D); + case LIGHT_GRAY -> rgb(0x9BFF1A); + case BLUE -> rgb(0x2ED9A0); + case BROWN -> rgb(0x66C6FF); + case GREEN -> rgb(0xFF3B1F); + case RED -> rgb(0xFF7A00); + case BLACK -> rgb(0xFFFFFF); + case MAGENTA -> rgb(0x00E5FF); + case CYAN -> rgb(0xFF3DDB); + }; } private static float[] rgb(int color) { diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/hud/CustomBossBarRenderer.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/hud/CustomBossBarRenderer.java index acfa82f9..ed4c6a83 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/hud/CustomBossBarRenderer.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/hud/CustomBossBarRenderer.java @@ -7,6 +7,8 @@ import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity; import com.craisinlord.antarchy.content.entity.ToreterrorEntity; import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity; import com.craisinlord.antarchy.content.entity.kraken.KrakenEntity; +import com.craisinlord.antarchy.content.entity.royal.KingEntity; +import com.craisinlord.antarchy.content.entity.royal.QueenEntity; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -29,7 +31,9 @@ public final class CustomBossBarRenderer { AlphaMantisEntity.class, textures("green", "alpha_mantis", 205, 49, 6), BrutalflyEntity.class, textures("brutalfly", "brutalfly", 198, 38, 3), HerculesBeetleEntity.class, textures("beetle", "hercules_beetle", 194, 33, 1), - EmperorScorpionEntity.class, textures("purple", "scorpion", 218, 34, -2) + EmperorScorpionEntity.class, textures("purple", "scorpion", 218, 34, -2), + KingEntity.class, textures("king", "king", 256, 67, 4), + QueenEntity.class, textures("queen", "queen", 253, 50, 6) ); private static final Map BY_LOCALIZED_NAME_AND_COLOR = Map.of( key(Component.translatable("entity.antarchy.kraken").getString(), BossEvent.BossBarColor.BLUE), BY_ENTITY_CLASS.get(KrakenEntity.class), @@ -37,7 +41,9 @@ public final class CustomBossBarRenderer { key(Component.translatable("entity.antarchy.alpha_mantis").getString(), BossEvent.BossBarColor.GREEN), BY_ENTITY_CLASS.get(AlphaMantisEntity.class), key(Component.translatable("entity.antarchy.brutalfly").getString(), BossEvent.BossBarColor.YELLOW), BY_ENTITY_CLASS.get(BrutalflyEntity.class), key(Component.translatable("entity.antarchy.hercules_beetle").getString(), BossEvent.BossBarColor.RED), BY_ENTITY_CLASS.get(HerculesBeetleEntity.class), - key(Component.translatable("entity.antarchy.emperor_scorpion").getString(), BossEvent.BossBarColor.PURPLE), BY_ENTITY_CLASS.get(EmperorScorpionEntity.class) + key(Component.translatable("entity.antarchy.emperor_scorpion").getString(), BossEvent.BossBarColor.PURPLE), BY_ENTITY_CLASS.get(EmperorScorpionEntity.class), + key(Component.translatable("entity.antarchy.king").getString(), BossEvent.BossBarColor.YELLOW), BY_ENTITY_CLASS.get(KingEntity.class), + key(Component.translatable("entity.antarchy.queen").getString(), BossEvent.BossBarColor.PURPLE), BY_ENTITY_CLASS.get(QueenEntity.class) ); private CustomBossBarRenderer() { diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/ManticoreModel.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/ManticoreModel.java new file mode 100644 index 00000000..e7384324 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/ManticoreModel.java @@ -0,0 +1,23 @@ +package com.craisinlord.antarchy.content.client.model; + +import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.content.entity.ManticoreEntity; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib.model.GeoModel; + +public class ManticoreModel extends GeoModel { + @Override + public ResourceLocation getModelResource(ManticoreEntity animatable) { + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/manticore.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(ManticoreEntity animatable) { + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/manticore.png"); + } + + @Override + public ResourceLocation getAnimationResource(ManticoreEntity animatable) { + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/manticore.animation.json"); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/RoyalBossModel.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/RoyalBossModel.java new file mode 100644 index 00000000..bd9cc236 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/model/RoyalBossModel.java @@ -0,0 +1,24 @@ +package com.craisinlord.antarchy.content.client.model; + +import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib.model.GeoModel; + +public class RoyalBossModel extends GeoModel { + @Override + public ResourceLocation getModelResource(RoyalBossEntity animatable) { + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "geo/" + animatable.geoNameForRender() + ".geo.json"); + } + + @Override + public ResourceLocation getTextureResource(RoyalBossEntity animatable) { + String name = animatable.geoNameForRender(); + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/" + name + "/" + name + ".png"); + } + + @Override + public ResourceLocation getAnimationResource(RoyalBossEntity animatable) { + return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "animations/" + animatable.geoNameForRender() + ".animation.json"); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/ManticoreRenderer.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/ManticoreRenderer.java new file mode 100644 index 00000000..ec88dc39 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/ManticoreRenderer.java @@ -0,0 +1,13 @@ +package com.craisinlord.antarchy.content.client.renderer; + +import com.craisinlord.antarchy.content.client.model.ManticoreModel; +import com.craisinlord.antarchy.content.entity.ManticoreEntity; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import software.bernie.geckolib.renderer.GeoEntityRenderer; + +public class ManticoreRenderer extends GeoEntityRenderer { + public ManticoreRenderer(EntityRendererProvider.Context context) { + super(context, new ManticoreModel()); + this.shadowRadius = 0.9F; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/RoyalBossRenderer.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/RoyalBossRenderer.java new file mode 100644 index 00000000..4125a103 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/RoyalBossRenderer.java @@ -0,0 +1,33 @@ +package com.craisinlord.antarchy.content.client.renderer; + +import com.craisinlord.antarchy.content.client.model.RoyalBossModel; +import com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.Nullable; +import software.bernie.geckolib.cache.object.BakedGeoModel; +import software.bernie.geckolib.renderer.GeoEntityRenderer; + +public class RoyalBossRenderer extends GeoEntityRenderer { + public RoyalBossRenderer(EntityRendererProvider.Context context) { + super(context, new RoyalBossModel()); + this.shadowRadius = 8.0F; + } + + @Override + public RenderType getRenderType(RoyalBossEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) { + return RenderType.entityCutoutNoCull(texture); + } + + @Override + public void preRender(PoseStack poseStack, RoyalBossEntity animatable, BakedGeoModel model, @Nullable MultiBufferSource bufferSource, + @Nullable VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int colour) { + super.preRender(poseStack, animatable, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, colour); + poseStack.scale(RoyalBossEntity.MODEL_RENDER_SCALE, RoyalBossEntity.MODEL_RENDER_SCALE, RoyalBossEntity.MODEL_RENDER_SCALE); + this.shadowRadius = 8.0F * RoyalBossEntity.MODEL_RENDER_SCALE; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/TimeDilationFieldRenderer.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/TimeDilationFieldRenderer.java new file mode 100644 index 00000000..b3b81d29 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/client/renderer/TimeDilationFieldRenderer.java @@ -0,0 +1,25 @@ +package com.craisinlord.antarchy.content.client.renderer; + +import com.craisinlord.antarchy.content.time.TimeDilationFieldEntity; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.entity.EntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import net.minecraft.resources.ResourceLocation; + +public class TimeDilationFieldRenderer extends EntityRenderer { + public TimeDilationFieldRenderer(EntityRendererProvider.Context context) { + super(context); + this.shadowRadius = 0.0F; + } + + @Override + public void render(TimeDilationFieldEntity entity, float entityYaw, float partialTick, PoseStack poseStack, + MultiBufferSource bufferSource, int packedLight) { + } + + @Override + public ResourceLocation getTextureLocation(TimeDilationFieldEntity entity) { + return ResourceLocation.withDefaultNamespace("textures/misc/unknown_pack.png"); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/creative/CreativeTabContents.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/creative/CreativeTabContents.java index f5a9df45..efa30bf1 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/creative/CreativeTabContents.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/creative/CreativeTabContents.java @@ -406,7 +406,7 @@ public final class CreativeTabContents { entry("shrink_ray", "combat"), entry("growth_ray", "combat"), entry("gravity_gun", "combat"), - entry("portal_gun", "combat"), + // entry("portal_gun", "combat"), // deferred — out of scope for 2.0 entry("eye_of_the_storm", "combat"), entry("water_cannon", "combat"), entry("attitude_adjuster", "combat"), @@ -436,8 +436,13 @@ public final class CreativeTabContents { entry("royal_assailant_chestplate", "combat"), entry("royal_assailant_leggings", "combat"), entry("royal_assailant_boots", "combat"), - entry("prince_egg", "spawn_eggs"), - entry("princess_egg", "spawn_eggs"), + entry("prince_egg", "functional_blocks"), + entry("princess_egg", "functional_blocks"), + entry("king_spawn_egg", "spawn_eggs"), + entry("queen_spawn_egg", "spawn_eggs"), + entry("manticore_spawn_egg", "spawn_eggs"), + entry("prince_spawn_egg", "spawn_eggs"), + entry("princess_spawn_egg", "spawn_eggs"), entry("tigers_eye_helmet", "combat"), entry("tigers_eye_chestplate", "combat"), entry("tigers_eye_leggings", "combat"), diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/dispenser/EyeOfTheStormDispenseBehavior.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/dispenser/EyeOfTheStormDispenseBehavior.java new file mode 100644 index 00000000..8fd2b1ab --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/dispenser/EyeOfTheStormDispenseBehavior.java @@ -0,0 +1,37 @@ +package com.craisinlord.antarchy.content.dispenser; + +import com.craisinlord.antarchy.content.item.EyeOfTheStormItem; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.dispenser.BlockSource; +import net.minecraft.core.dispenser.DefaultDispenseItemBehavior; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.DispenserBlock; +import net.minecraft.world.phys.Vec3; + +public class EyeOfTheStormDispenseBehavior extends DefaultDispenseItemBehavior { + @Override + protected ItemStack execute(BlockSource source, ItemStack stack) { + ServerLevel level = source.level(); + Direction direction = source.state().getValue(DispenserBlock.FACING); + BlockPos pos = source.pos().relative(direction); + Vec3 origin = new Vec3(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D); + Vec3 aim = new Vec3(direction.getStepX(), direction.getStepY(), direction.getStepZ()); + + EyeOfTheStormItem.launchStormVortex(level, origin, aim, null); + + if (stack.isDamageableItem()) { + stack.setDamageValue(stack.getDamageValue() + 1); + if (stack.getDamageValue() >= stack.getMaxDamage()) { + stack.shrink(1); + } + } + return stack; + } + + @Override + protected void playSound(BlockSource source) { + source.level().levelEvent(1002, source.pos(), 0); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/HoverboardEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/HoverboardEntity.java index 4d878725..c91e8272 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/HoverboardEntity.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/HoverboardEntity.java @@ -51,7 +51,7 @@ public class HoverboardEntity extends PathfinderMob implements GeoEntity { private static final RawAnimation MOVE_ANIM = RawAnimation.begin().thenLoop("move"); private static final double MAX_HOVER_HEIGHT = 5.0D; - private static final double ASCEND_SPEED = 0.15D; + private static final double ASCEND_SPEED = 0.2D; private static final double SETTLE_DESCEND_SPEED = 0.08D; private static final double FAST_DESCEND_SPEED = 0.9D; private static final double FAST_DESCEND_RAMP = 0.2D; diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java new file mode 100644 index 00000000..1eb52b97 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/ManticoreEntity.java @@ -0,0 +1,367 @@ +package com.craisinlord.antarchy.content.entity; + +import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.entity.royal.QueenEntity; +import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi; +import java.util.List; +import java.util.UUID; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.Difficulty; +import net.minecraft.world.DifficultyInstance; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.MobSpawnType; +import net.minecraft.world.entity.SpawnGroupData; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.control.FlyingMoveControl; +import net.minecraft.world.entity.ai.goal.FloatGoal; +import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; +import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; +import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; +import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; +import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation; +import net.minecraft.world.entity.ai.navigation.PathNavigation; +import net.minecraft.world.entity.monster.Monster; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; +import software.bernie.geckolib.animatable.GeoEntity; +import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; +import software.bernie.geckolib.animation.AnimatableManager; +import software.bernie.geckolib.animation.AnimationController; +import software.bernie.geckolib.animation.AnimationState; +import software.bernie.geckolib.animation.PlayState; +import software.bernie.geckolib.animation.RawAnimation; +import software.bernie.geckolib.util.GeckoLibUtil; + +public class ManticoreEntity extends Monster implements GeoEntity { + private static final String SUMMONER_KEY = "QueenSummoner"; + private static final int LOST_SUMMONER_GRACE_TICKS = 200; + private static final int TAKEOFF_COOLDOWN_TICKS = 40; + private static final int STING_COOLDOWN_TICKS = 60; + private static final float STING_CHANCE = 0.35F; + private static final int SWARM_RETARGET_INTERVAL = 40; + + private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); + private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); + private static final RawAnimation FLY_ANIM = RawAnimation.begin().thenLoop("fly"); + private static final RawAnimation BITE_ANIM = RawAnimation.begin().thenPlay("bite"); + private static final RawAnimation FLY_BITE_ANIM = RawAnimation.begin().thenPlay("fly_bite"); + private static final RawAnimation STING_ANIM = RawAnimation.begin().thenPlay("sting"); + private static final RawAnimation FLY_START_ANIM = RawAnimation.begin().thenPlay("fly_start"); + private static final RawAnimation FLY_LAND_ANIM = RawAnimation.begin().thenPlay("fly_land"); + + private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); + + @Nullable + private UUID summonerId; + private int lostSummonerTicks; + private int takeoffCooldown; + private int stingCooldown; + private boolean wasFlyingLastTick; + + public ManticoreEntity(EntityType type, Level level) { + super(type, level); + this.moveControl = new FlyingMoveControl(this, 10, true); + this.xpReward = 12; + } + + public static AttributeSupplier.Builder createAttributes() { + return Mob.createMobAttributes() + .add(Attributes.MAX_HEALTH, AntarchySettings.manticoreHealth()) + .add(Attributes.MOVEMENT_SPEED, 0.3D) + .add(Attributes.FLYING_SPEED, 0.6D) + .add(Attributes.ATTACK_DAMAGE, AntarchySettings.manticoreAttackDamage()) + .add(Attributes.FOLLOW_RANGE, 28.0D) + .add(Attributes.KNOCKBACK_RESISTANCE, 0.2D); + } + + public static boolean canSpawn(EntityType type, ServerLevelAccessor level, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { + if (spawnReason == MobSpawnType.SPAWN_EGG || spawnReason == MobSpawnType.SPAWNER || spawnReason == MobSpawnType.COMMAND) { + return true; + } + BlockState below = level.getBlockState(pos.below()); + BlockState above = level.getBlockState(pos.above()); + boolean floorSupport = !below.is(Blocks.BEDROCK) && below.isFaceSturdy(level, pos.below(), Direction.UP); + boolean ceilingSupport = !above.is(Blocks.BEDROCK) && above.isFaceSturdy(level, pos.above(), Direction.DOWN); + return level.getDifficulty() != Difficulty.PEACEFUL + && (floorSupport || ceilingSupport) + && level.isEmptyBlock(pos) + && Monster.checkMonsterSpawnRules(type, level, spawnReason, pos, random); + } + + @Override + protected PathNavigation createNavigation(Level level) { + FlyingPathNavigation navigation = new FlyingPathNavigation(this, level); + navigation.setCanOpenDoors(false); + navigation.setCanFloat(true); + navigation.setCanPassDoors(true); + return navigation; + } + + @Override + protected void registerGoals() { + this.goalSelector.addGoal(0, new FloatGoal(this)); + this.goalSelector.addGoal(1, new ManticoreAttackGoal(this)); + this.goalSelector.addGoal(3, new WaterAvoidingRandomStrollGoal(this, 0.9D)); + this.goalSelector.addGoal(4, new LookAtPlayerGoal(this, Player.class, 10.0F)); + this.goalSelector.addGoal(5, new RandomLookAroundGoal(this)); + this.targetSelector.addGoal(1, new HurtByTargetGoal(this)); + this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); + } + + @Override + public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData spawnData) { + ConfiguredMobSpawnUtil.applyConfiguredHealth(this, AntarchySettings.manticoreHealth()); + return super.finalizeSpawn(level, difficulty, spawnReason, spawnData); + } + + public void markQueenSummoned(UUID queenId) { + this.summonerId = queenId; + this.lostSummonerTicks = 0; + this.setPersistenceRequired(); + } + + public boolean isSummonedBy(UUID queenId) { + return queenId.equals(this.summonerId); + } + + public boolean isQueenSummoned() { + return this.summonerId != null; + } + + public static int countSummonedBy(ServerLevel level, UUID queenId) { + int count = 0; + for (Entity entity : level.getAllEntities()) { + if (entity instanceof ManticoreEntity manticore && manticore.isAlive() && manticore.isSummonedBy(queenId)) { + count++; + } + } + return count; + } + + @Override + public boolean removeWhenFarAway(double distanceToClosestPlayer) { + return this.summonerId == null && super.removeWhenFarAway(distanceToClosestPlayer); + } + + @Override + public boolean requiresCustomPersistence() { + return this.summonerId != null || super.requiresCustomPersistence(); + } + + @Override + public void tick() { + super.tick(); + if (this.level().isClientSide) { + return; + } + + boolean flying = !this.onGround(); + if (flying != this.wasFlyingLastTick) { + this.triggerAnim("controller", flying ? "fly_start" : "fly_land"); + this.wasFlyingLastTick = flying; + } + + if (this.takeoffCooldown > 0) { + this.takeoffCooldown--; + } + if (this.stingCooldown > 0) { + this.stingCooldown--; + } + + this.tickQueenSummonCleanup(); + + LivingEntity target = this.getTarget(); + if (target != null && target.isAlive()) { + if (this.onGround() && this.takeoffCooldown <= 0 && this.distanceToSqr(target) > 6.0D) { + this.takeoff(); + } + if (this.tickCount % SWARM_RETARGET_INTERVAL == 0) { + this.spreadSwarmTarget(target); + } + } + } + + private void tickQueenSummonCleanup() { + if (this.summonerId == null || !(this.level() instanceof ServerLevel serverLevel)) { + return; + } + Entity summoner = serverLevel.getEntity(this.summonerId); + if (summoner instanceof QueenEntity queen && queen.isAlive()) { + this.lostSummonerTicks = 0; + return; + } + if (++this.lostSummonerTicks > LOST_SUMMONER_GRACE_TICKS) { + this.discard(); + } + } + + private void takeoff() { + this.takeoffCooldown = TAKEOFF_COOLDOWN_TICKS; + this.setDeltaMovement(this.getDeltaMovement().add(0.0D, 0.55D, 0.0D)); + this.hasImpulse = true; + LivingEntity target = this.getTarget(); + if (target != null) { + Vec3 above = target.position().add(oppositeGravity(this).scale(3.0D)); + this.getMoveControl().setWantedPosition(above.x, above.y, above.z, 1.2D); + } + } + + private void spreadSwarmTarget(LivingEntity currentTarget) { + List nearbyPlayers = this.level().getEntitiesOfClass( + Player.class, + this.getBoundingBox().inflate(this.getAttributeValue(Attributes.FOLLOW_RANGE)), + player -> player.isAlive() && this.canAttack(player)); + if (nearbyPlayers.size() < 2) { + return; + } + + List swarm = this.level().getEntitiesOfClass( + ManticoreEntity.class, + this.getBoundingBox().inflate(32.0D), + manticore -> manticore != this && manticore.isAlive()); + + Player bestPlayer = null; + int bestLoad = Integer.MAX_VALUE; + for (Player player : nearbyPlayers) { + int load = 0; + for (ManticoreEntity manticore : swarm) { + if (manticore.getTarget() == player) { + load++; + } + } + if (load < bestLoad) { + bestLoad = load; + bestPlayer = player; + } + } + + int currentLoad = 0; + for (ManticoreEntity manticore : swarm) { + if (manticore.getTarget() == currentTarget) { + currentLoad++; + } + } + if (bestPlayer != null && bestPlayer != currentTarget && currentLoad - bestLoad >= 2) { + this.setTarget(bestPlayer); + } + } + + private static Vec3 oppositeGravity(Entity entity) { + return AntarchyGravityApi.isGravityInverted(entity) ? new Vec3(0.0D, -1.0D, 0.0D) : new Vec3(0.0D, 1.0D, 0.0D); + } + + void performSting(LivingEntity enemy) { + this.swing(InteractionHand.MAIN_HAND); + if (enemy.hurt(this.damageSources().mobAttack(this), (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE))) { + enemy.addEffect(new MobEffectInstance(MobEffects.POISON, AntarchySettings.manticoreStingPoisonTicks(), 0), this); + } + this.stingCooldown = STING_COOLDOWN_TICKS; + this.triggerAnim("controller", "sting"); + } + + boolean stingReady() { + return this.stingCooldown <= 0; + } + + @Override + public boolean doHurtTarget(Entity target) { + boolean hurt = super.doHurtTarget(target); + if (hurt) { + this.triggerAnim("controller", this.onGround() ? "bite" : "fly_bite"); + } + return hurt; + } + + @Override + public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) { + return false; + } + + @Override + public boolean isInWall() { + return false; + } + + @Override + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + if (this.summonerId != null) { + tag.putUUID(SUMMONER_KEY, this.summonerId); + } + } + + @Override + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.summonerId = tag.hasUUID(SUMMONER_KEY) ? tag.getUUID(SUMMONER_KEY) : null; + this.lostSummonerTicks = 0; + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { + controllers.add(new AnimationController<>(this, "controller", 3, this::locomotionPredicate) + .triggerableAnim("bite", BITE_ANIM) + .triggerableAnim("fly_bite", FLY_BITE_ANIM) + .triggerableAnim("sting", STING_ANIM) + .triggerableAnim("fly_start", FLY_START_ANIM) + .triggerableAnim("fly_land", FLY_LAND_ANIM)); + } + + private PlayState locomotionPredicate(AnimationState state) { + if (!this.onGround()) { + return state.setAndContinue(FLY_ANIM); + } + if (state.isMoving()) { + return state.setAndContinue(WALK_ANIM); + } + return state.setAndContinue(IDLE_ANIM); + } + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return this.geoCache; + } + + private static class ManticoreAttackGoal extends MeleeAttackGoal { + private final ManticoreEntity manticore; + + ManticoreAttackGoal(ManticoreEntity manticore) { + super(manticore, 1.1D, true); + this.manticore = manticore; + } + + @Override + protected void checkAndPerformAttack(LivingEntity enemy) { + if (this.canPerformAttack(enemy) && this.isTimeToAttack()) { + this.resetAttackCooldown(); + if (this.manticore.onGround() && this.manticore.stingReady() && this.manticore.getRandom().nextFloat() < STING_CHANCE) { + this.manticore.performSting(enemy); + return; + } + this.manticore.swing(InteractionHand.MAIN_HAND); + this.manticore.doHurtTarget(enemy); + return; + } + super.checkAndPerformAttack(enemy); + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/KingEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/KingEntity.java new file mode 100644 index 00000000..9e801da6 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/KingEntity.java @@ -0,0 +1,54 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.AntarchySoundEvents; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.BossEvent; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.level.Level; + +public class KingEntity extends RoyalBossEntity { + public KingEntity(EntityType entityType, Level level) { + super(entityType, level); + } + + public static AttributeSupplier.Builder createAttributes() { + return createBaseAttributes(AntarchySettings.kingHealth(), AntarchySettings.kingAttackDamage()); + } + + @Override + protected String geoName() { + return "king"; + } + + @Override + protected boolean isFlyingBoss() { + return true; + } + + @Override + protected BossEvent.BossBarColor bossBarColor() { + return BossEvent.BossBarColor.YELLOW; + } + + @Override + protected SoundEvent royalIdleSound() { + return AntarchySoundEvents.KING_IDLE.get(); + } + + @Override + protected SoundEvent royalHurtSound() { + return AntarchySoundEvents.KING_HURT.get(); + } + + @Override + protected SoundEvent royalDeathSound() { + return AntarchySoundEvents.KING_DEATH.get(); + } + + @Override + protected SoundEvent royalBiteSound() { + return AntarchySoundEvents.KING_BITE.get(); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/QueenEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/QueenEntity.java new file mode 100644 index 00000000..562fb454 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/QueenEntity.java @@ -0,0 +1,54 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.AntarchySoundEvents; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.BossEvent; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.level.Level; + +public class QueenEntity extends RoyalBossEntity { + public QueenEntity(EntityType entityType, Level level) { + super(entityType, level); + } + + public static AttributeSupplier.Builder createAttributes() { + return createBaseAttributes(AntarchySettings.queenHealth(), AntarchySettings.queenAttackDamage()); + } + + @Override + protected String geoName() { + return "queen"; + } + + @Override + protected boolean isFlyingBoss() { + return false; + } + + @Override + protected BossEvent.BossBarColor bossBarColor() { + return BossEvent.BossBarColor.PURPLE; + } + + @Override + protected SoundEvent royalIdleSound() { + return AntarchySoundEvents.QUEEN_IDLE.get(); + } + + @Override + protected SoundEvent royalHurtSound() { + return AntarchySoundEvents.QUEEN_HURT.get(); + } + + @Override + protected SoundEvent royalDeathSound() { + return AntarchySoundEvents.QUEEN_DEATH.get(); + } + + @Override + protected SoundEvent royalBiteSound() { + return AntarchySoundEvents.QUEEN_BITE.get(); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBlockDestruction.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBlockDestruction.java new file mode 100644 index 00000000..b8956c42 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBlockDestruction.java @@ -0,0 +1,69 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.GameRules; +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.phys.Vec3; + +public final class RoyalBlockDestruction { + private RoyalBlockDestruction() { + } + + public static int destroySphere( + ServerLevel level, + Entity source, + Vec3 center, + double radius, + int maxBlocks, + double maxResistance, + float dropChance + ) { + if (maxBlocks <= 0 || radius <= 0.0D || !level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + return 0; + } + + int minX = net.minecraft.util.Mth.floor(center.x - radius); + int minY = net.minecraft.util.Mth.floor(center.y - radius); + int minZ = net.minecraft.util.Mth.floor(center.z - radius); + int maxX = net.minecraft.util.Mth.floor(center.x + radius); + int maxY = net.minecraft.util.Mth.floor(center.y + radius); + int maxZ = net.minecraft.util.Mth.floor(center.z + radius); + double radiusSqr = radius * radius; + + int destroyed = 0; + for (BlockPos cursor : BlockPos.betweenClosed(minX, minY, minZ, maxX, maxY, maxZ)) { + if (destroyed >= maxBlocks) { + break; + } + if (cursor.distToCenterSqr(center.x, center.y, center.z) > radiusSqr + || cursor.getY() < level.getMinBuildHeight() + || cursor.getY() >= level.getMaxBuildHeight() + || !level.getWorldBorder().isWithinBounds(cursor)) { + continue; + } + + BlockPos pos = cursor.immutable(); + BlockState existing = level.getBlockState(pos); + if (existing.isAir() + || level.getBlockEntity(pos) != null + || existing.getDestroySpeed(level, pos) < 0.0F + || existing.getBlock().getExplosionResistance() > maxResistance + || existing.getCollisionShape(level, pos).isEmpty()) { + continue; + } + + if (source.getRandom().nextFloat() <= dropChance) { + level.destroyBlock(pos, true, source); + } else { + level.levelEvent(2001, pos, Block.getId(existing)); + level.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); + } + destroyed++; + } + return destroyed; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossEntity.java new file mode 100644 index 00000000..ac650648 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossEntity.java @@ -0,0 +1,568 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner; +import com.craisinlord.antarchy.content.entity.multipart.MultipartLayout; +import com.craisinlord.antarchy.content.entity.multipart.MultipartPartDefinition; +import com.craisinlord.antarchy.content.entity.royal.beam.RoyalBeamController; +import java.util.List; +import net.minecraft.network.chat.Component; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.server.level.ServerBossEvent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.util.Mth; +import net.minecraft.world.BossEvent; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.MoverType; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.control.FlyingMoveControl; +import net.minecraft.world.entity.ai.goal.FloatGoal; +import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; +import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; +import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; +import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; +import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation; +import net.minecraft.world.entity.ai.navigation.PathNavigation; +import net.minecraft.world.entity.monster.Monster; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; +import software.bernie.geckolib.animatable.GeoEntity; +import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; +import software.bernie.geckolib.animation.AnimatableManager; +import software.bernie.geckolib.animation.AnimationController; +import software.bernie.geckolib.animation.AnimationState; +import software.bernie.geckolib.animation.PlayState; +import software.bernie.geckolib.animation.RawAnimation; +import software.bernie.geckolib.util.GeckoLibUtil; + +public abstract class RoyalBossEntity extends Monster implements GeoEntity, MultipartEntityOwner { + public static final float MODEL_RENDER_SCALE = 2.0F; + public static final float GAMEPLAY_WIDTH = 30.0F; + public static final float GAMEPLAY_HEIGHT = 30.0F; + + public enum Phase { + ONE(1, 1.00F), + TWO(2, 0.72F), + THREE(3, 0.48F); + + private final int maxConcurrentHeadAttacks; + private final float cooldownScale; + + Phase(int maxConcurrentHeadAttacks, float cooldownScale) { + this.maxConcurrentHeadAttacks = maxConcurrentHeadAttacks; + this.cooldownScale = cooldownScale; + } + + public int maxConcurrentHeadAttacks() { + return this.maxConcurrentHeadAttacks; + } + + public float cooldownScale() { + return this.cooldownScale; + } + } + + private static final float PHASE_TWO_THRESHOLD = 0.70F; + private static final float PHASE_THREE_THRESHOLD = 0.35F; + + private static final int BITE_DURATION_TICKS = 16; + private static final int BITE_HIT_TICK = 6; + private static final int DEATH_TICKS = 60; + private static final double CRUSH_RADIUS = 3.5D; + private static final int CRUSH_MAX_BLOCKS = 24; + private static final double CRUSH_MAX_RESISTANCE = 60.0D; + private static final float CRUSH_DROP_CHANCE = 0.1F; + + private static final EntityDataAccessor FIRING = + SynchedEntityData.defineId(RoyalBossEntity.class, EntityDataSerializers.BOOLEAN); + private static final EntityDataAccessor HAS_BEAM_END = + SynchedEntityData.defineId(RoyalBossEntity.class, EntityDataSerializers.BOOLEAN); + private static final EntityDataAccessor BEAM_END_X = + SynchedEntityData.defineId(RoyalBossEntity.class, EntityDataSerializers.FLOAT); + private static final EntityDataAccessor BEAM_END_Y = + SynchedEntityData.defineId(RoyalBossEntity.class, EntityDataSerializers.FLOAT); + private static final EntityDataAccessor BEAM_END_Z = + SynchedEntityData.defineId(RoyalBossEntity.class, EntityDataSerializers.FLOAT); + + private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); + private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); + private static final RawAnimation FLY_ANIM = RawAnimation.begin().thenLoop("fly"); + private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlayAndHold("death"); + + private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); + protected final RoyalBeamController beamController = new RoyalBeamController(this); + private final ServerBossEvent bossEvent; + private final RoyalHead[] heads = { + new RoyalHead(RoyalHead.Slot.LEFT), + new RoyalHead(RoyalHead.Slot.CENTER), + new RoyalHead(RoyalHead.Slot.RIGHT) + }; + + @Nullable + private Entity[] multipartParts; + + protected RoyalBossEntity(EntityType entityType, Level level) { + super(entityType, level); + this.xpReward = 500; + if (this.isFlyingBoss()) { + this.moveControl = new FlyingMoveControl(this, 20, true); + } + this.bossEvent = new com.craisinlord.antarchy.content.boss.EntityLinkedServerBossEvent( + this.getUUID(), + Component.translatable(entityType.getDescriptionId()), + this.bossBarColor(), + BossEvent.BossBarOverlay.PROGRESS); + } + + protected abstract BossEvent.BossBarColor bossBarColor(); + + protected abstract SoundEvent royalIdleSound(); + + protected abstract SoundEvent royalHurtSound(); + + protected abstract SoundEvent royalDeathSound(); + + protected abstract SoundEvent royalBiteSound(); + + public static AttributeSupplier.Builder createBaseAttributes(double health, double attackDamage) { + return Mob.createMobAttributes() + .add(Attributes.MAX_HEALTH, health) + .add(Attributes.ATTACK_DAMAGE, attackDamage) + .add(Attributes.ARMOR, AntarchySettings.royalBossArmor()) + .add(Attributes.FOLLOW_RANGE, AntarchySettings.royalBossFollowRange()) + .add(Attributes.MOVEMENT_SPEED, AntarchySettings.royalBossMovementSpeed()) + .add(Attributes.FLYING_SPEED, AntarchySettings.royalBossMovementSpeed()) + .add(Attributes.KNOCKBACK_RESISTANCE, AntarchySettings.royalBossKnockbackResistance()) + .add(Attributes.STEP_HEIGHT, AntarchySettings.royalBossStepHeight()); + } + + protected abstract String geoName(); + + protected abstract boolean isFlyingBoss(); + + public String geoNameForRender() { + return this.geoName(); + } + + @Override + public MultipartLayout antarchy$getMultipartLayout() { + return RoyalBossMultipartLayout.INSTANCE; + } + + @Override + @Nullable + public Entity[] antarchy$getMultipartParts() { + return this.multipartParts; + } + + @Override + public void antarchy$setMultipartParts(@Nullable Entity[] parts) { + this.multipartParts = parts; + } + + @Override + protected PathNavigation createNavigation(Level level) { + if (this.isFlyingBoss()) { + FlyingPathNavigation navigation = new FlyingPathNavigation(this, level); + navigation.setCanOpenDoors(false); + navigation.setCanFloat(true); + return navigation; + } + return super.createNavigation(level); + } + + @Override + protected void registerGoals() { + this.goalSelector.addGoal(0, new FloatGoal(this)); + this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 48.0F)); + this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); + this.targetSelector.addGoal(1, new HurtByTargetGoal(this)); + this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); + } + + @Override + protected void defineSynchedData(SynchedEntityData.Builder builder) { + super.defineSynchedData(builder); + builder.define(FIRING, false); + builder.define(HAS_BEAM_END, false); + builder.define(BEAM_END_X, 0.0F); + builder.define(BEAM_END_Y, 0.0F); + builder.define(BEAM_END_Z, 0.0F); + } + + @Override + public boolean removeWhenFarAway(double distanceToClosestPlayer) { + return false; + } + + @Override + public void checkDespawn() { + } + + @Override + protected SoundEvent getAmbientSound() { + return this.royalIdleSound(); + } + + @Override + protected SoundEvent getHurtSound(DamageSource damageSource) { + return this.royalHurtSound(); + } + + @Override + protected SoundEvent getDeathSound() { + return this.royalDeathSound(); + } + + @Override + protected float getSoundVolume() { + return 2.5F; + } + + @Override + public void travel(Vec3 travelVector) { + if (this.isFlyingBoss() && this.isEffectiveAi()) { + this.moveRelative(this.getSpeed(), travelVector); + this.move(MoverType.SELF, this.getDeltaMovement()); + this.setDeltaMovement(this.getDeltaMovement().scale(0.91D)); + return; + } + super.travel(travelVector); + } + + @Override + public void tick() { + super.tick(); + if (this.isFlyingBoss()) { + this.setNoGravity(true); + } + if (this.level().isClientSide) { + return; + } + + this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); + + for (RoyalHead head : this.heads) { + head.tick(); + } + + if (this.isDeadOrDying()) { + return; + } + + LivingEntity primaryTarget = this.getTarget(); + if (primaryTarget == null || !primaryTarget.isAlive() || !this.canAttack(primaryTarget)) { + for (RoyalHead head : this.heads) { + head.setTarget(null); + } + return; + } + + this.getLookControl().setLookAt(primaryTarget, 30.0F, 30.0F); + this.assignHeadTargets(primaryTarget); + this.steerTowardTarget(primaryTarget); + this.tickBodyCrush(); + + for (RoyalHead head : this.heads) { + if (head.tickBiteHit()) { + this.applyBiteHit(head); + } + } + + Phase phase = this.phase(); + int activeHeadAttacks = 0; + for (RoyalHead head : this.heads) { + if (head.busy()) { + activeHeadAttacks++; + } + } + + for (RoyalHead head : this.heads) { + if (activeHeadAttacks >= phase.maxConcurrentHeadAttacks()) { + break; + } + if (!head.readyToAttack()) { + continue; + } + LivingEntity headTarget = head.target(this.level()); + if (headTarget != null && this.headWithinBiteReach(head, headTarget)) { + this.startBite(head, phase); + activeHeadAttacks++; + } + } + } + + public Phase phase() { + float fraction = this.getMaxHealth() <= 0.0F ? 1.0F : this.getHealth() / this.getMaxHealth(); + if (fraction > PHASE_TWO_THRESHOLD) { + return Phase.ONE; + } + if (fraction > PHASE_THREE_THRESHOLD) { + return Phase.TWO; + } + return Phase.THREE; + } + + private void assignHeadTargets(LivingEntity fallback) { + List candidates = this.level().getEntitiesOfClass( + Player.class, + this.getBoundingBox().inflate(AntarchySettings.royalBossFollowRange()), + player -> player.isAlive() && this.canAttack(player)); + if (candidates.isEmpty()) { + for (RoyalHead head : this.heads) { + head.setTarget(fallback); + } + return; + } + + int[] assignedCounts = new int[candidates.size()]; + for (RoyalHead head : this.heads) { + Vec3 anchor = this.headAnchor(head); + int bestIndex = 0; + int bestCount = Integer.MAX_VALUE; + double bestDistance = Double.MAX_VALUE; + for (int i = 0; i < candidates.size(); i++) { + double distance = candidates.get(i).position().distanceToSqr(anchor); + if (assignedCounts[i] < bestCount || (assignedCounts[i] == bestCount && distance < bestDistance)) { + bestIndex = i; + bestCount = assignedCounts[i]; + bestDistance = distance; + } + } + assignedCounts[bestIndex]++; + head.setTarget(candidates.get(bestIndex)); + } + } + + private void steerTowardTarget(LivingEntity target) { + double reach = this.getBbWidth() * 0.5D + this.biteReach() * 0.5D; + double dx = target.getX() - this.getX(); + double dz = target.getZ() - this.getZ(); + if ((dx * dx + dz * dz) > reach * reach) { + double wantedY = this.isFlyingBoss() ? target.getY() + 3.0D : target.getY(); + this.getMoveControl().setWantedPosition(target.getX(), wantedY, target.getZ(), this.isFlyingBoss() ? 1.1D : 1.0D); + } else { + this.getNavigation().stop(); + } + } + + private void tickBodyCrush() { + if (!(this.level() instanceof ServerLevel serverLevel) || this.tickCount % 10 != 0) { + return; + } + if (this.getDeltaMovement().horizontalDistanceSqr() < 0.0016D) { + return; + } + double yaw = this.yBodyRot * Mth.DEG_TO_RAD; + Vec3 forward = new Vec3(-Math.sin(yaw), 0.0D, Math.cos(yaw)); + Vec3 center = new Vec3( + this.getX() + forward.x * (this.getBbWidth() * 0.45D), + this.getY() + (this.isFlyingBoss() ? 0.0D : 1.0D), + this.getZ() + forward.z * (this.getBbWidth() * 0.45D)); + RoyalBlockDestruction.destroySphere(serverLevel, this, center, CRUSH_RADIUS, CRUSH_MAX_BLOCKS, CRUSH_MAX_RESISTANCE, CRUSH_DROP_CHANCE); + } + + private void startBite(RoyalHead head, Phase phase) { + int cooldown = Math.max(10, Mth.floor(AntarchySettings.royalBossBiteCooldownTicks() * phase.cooldownScale())); + head.startBite(BITE_DURATION_TICKS, BITE_HIT_TICK, cooldown); + this.triggerAnim(head.slot().controllerName(), "bite"); + this.playSound(this.royalBiteSound(), 3.0F, 0.9F + this.random.nextFloat() * 0.2F); + } + + private void applyBiteHit(RoyalHead head) { + if (this.level().isClientSide) { + return; + } + Vec3 anchor = this.headAnchor(head); + double reach = this.biteReach(); + float damage = (float) (this.getAttributeValue(Attributes.ATTACK_DAMAGE) * AntarchySettings.royalBossBiteDamageMultiplier()); + DamageSource damageSource = this.damageSources().mobAttack(this); + AABB box = new AABB(anchor, anchor).inflate(reach); + for (LivingEntity living : this.level().getEntitiesOfClass(LivingEntity.class, box, entity -> entity.isAlive() && entity != this)) { + if (living instanceof RoyalBossEntity || living.getType() == this.getType()) { + continue; + } + if (living.position().distanceToSqr(anchor) > reach * reach) { + continue; + } + if (living.hurt(damageSource, damage)) { + Vec3 push = living.position().subtract(anchor).multiply(1.0D, 0.0D, 1.0D); + if (push.lengthSqr() < 1.0E-4D) { + push = this.getViewVector(1.0F).multiply(1.0D, 0.0D, 1.0D); + } + push = push.normalize().scale(1.4D); + living.push(push.x, 0.42D, push.z); + living.hurtMarked = true; + } + } + } + + private boolean headWithinBiteReach(RoyalHead head, LivingEntity target) { + Vec3 anchor = this.headAnchor(head); + double reach = this.biteReach() + target.getBbWidth(); + return target.position().distanceToSqr(anchor) <= reach * reach; + } + + private double biteReach() { + return AntarchySettings.royalBossBiteReach(); + } + + private Vec3 headAnchor(RoyalHead head) { + int partIndex = head.slot().partIndex(); + Entity[] parts = this.multipartParts; + if (parts != null && partIndex < parts.length && parts[partIndex] != null) { + Entity part = parts[partIndex]; + return part.position().add(0.0D, part.getBbHeight() * 0.5D, 0.0D); + } + + MultipartPartDefinition spec = RoyalBossMultipartLayout.INSTANCE.parts()[partIndex]; + double yaw = this.yBodyRot * Mth.DEG_TO_RAD; + Vec3 forward = new Vec3(-Math.sin(yaw), 0.0D, Math.cos(yaw)); + Vec3 right = new Vec3(forward.z, 0.0D, -forward.x); + return new Vec3( + this.getX() + forward.x * spec.forwardOffset() + right.x * spec.lateralOffset(), + this.getY() + spec.yOffset(), + this.getZ() + forward.z * spec.forwardOffset() + right.z * spec.lateralOffset()); + } + + @Override + public void die(DamageSource damageSource) { + if (!this.level().isClientSide) { + for (RoyalHead head : this.heads) { + head.reset(); + } + this.beamController.stop(); + this.setFiringRoyalBeam(false); + this.setRoyalBeamEndPosition(null); + this.getNavigation().stop(); + this.setDeltaMovement(Vec3.ZERO); + } + super.die(damageSource); + } + + @Override + protected void tickDeath() { + this.deathTime++; + if (this.deathTime == 20 && !this.level().isClientSide()) { + this.level().broadcastEntityEvent(this, (byte) 60); + } + if (this.deathTime >= DEATH_TICKS) { + this.remove(RemovalReason.KILLED); + this.dropExperience(this); + } + } + + @Override + public void startSeenByPlayer(ServerPlayer player) { + super.startSeenByPlayer(player); + this.bossEvent.addPlayer(player); + } + + @Override + public void stopSeenByPlayer(ServerPlayer player) { + super.stopSeenByPlayer(player); + this.bossEvent.removePlayer(player); + } + + @Override + public boolean hurt(DamageSource source, float amount) { + float cappedAmount = (float) Math.min(amount, AntarchySettings.royalBossMaxSingleHitDamage()); + return super.hurt(source, cappedAmount); + } + + public boolean isFiringRoyalBeam() { + return this.entityData.get(FIRING); + } + + public void setFiringRoyalBeam(boolean firing) { + this.entityData.set(FIRING, firing); + } + + public RoyalBeamController beamController() { + return this.beamController; + } + + public void setRoyalBeamEndPosition(@Nullable Vec3 position) { + this.entityData.set(HAS_BEAM_END, position != null); + if (position != null) { + this.entityData.set(BEAM_END_X, (float) position.x); + this.entityData.set(BEAM_END_Y, (float) position.y); + this.entityData.set(BEAM_END_Z, (float) position.z); + } + } + + @Nullable + public Vec3 getRoyalBeamEndPosition() { + if (!this.entityData.get(HAS_BEAM_END)) { + return null; + } + return new Vec3(this.entityData.get(BEAM_END_X), this.entityData.get(BEAM_END_Y), this.entityData.get(BEAM_END_Z)); + } + + public Vec3 getRoyalBeamShootFrom(float partialTicks) { + double x = Mth.lerp(partialTicks, this.xo, this.getX()); + double y = Mth.lerp(partialTicks, this.yo, this.getY()) + this.getBbHeight() * 0.72D; + double z = Mth.lerp(partialTicks, this.zo, this.getZ()); + return new Vec3(x, y, z); + } + + @Override + public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { + controllers.add(new AnimationController<>(this, "locomotion", 4, this::locomotionPredicate)); + controllers.add(new AnimationController<>(this, "head_left", 0, RoyalBossEntity::headIdle) + .triggerableAnim("bite", RawAnimation.begin().thenPlay("bite_1")) + .triggerableAnim("shoot", RawAnimation.begin().thenLoop("shoot_1"))); + controllers.add(new AnimationController<>(this, "head_center", 0, RoyalBossEntity::headIdle) + .triggerableAnim("bite", RawAnimation.begin().thenPlay("bite_2")) + .triggerableAnim("shoot", RawAnimation.begin().thenLoop("shoot_2"))); + controllers.add(new AnimationController<>(this, "head_right", 0, RoyalBossEntity::headIdle) + .triggerableAnim("bite", RawAnimation.begin().thenPlay("bite_3")) + .triggerableAnim("shoot", RawAnimation.begin().thenLoop("shoot_3"))); + controllers.add(new AnimationController<>(this, "body_action", 0, this::bodyActionPredicate) + .triggerableAnim("stomp", RawAnimation.begin().thenPlay("stomp")) + .triggerableAnim("wing_gust", RawAnimation.begin().thenPlay("wing_gust")) + .triggerableAnim("minion_spawn", RawAnimation.begin().thenPlay("minion_spawn"))); + } + + private PlayState locomotionPredicate(AnimationState state) { + if (this.isDeadOrDying()) { + return PlayState.STOP; + } + if (this.isFlyingBoss()) { + state.setAndContinue(FLY_ANIM); + } else if (state.isMoving()) { + state.setAndContinue(WALK_ANIM); + } else { + state.setAndContinue(IDLE_ANIM); + } + return PlayState.CONTINUE; + } + + private PlayState bodyActionPredicate(AnimationState state) { + if (this.isDeadOrDying()) { + return state.setAndContinue(DEATH_ANIM); + } + return PlayState.STOP; + } + + private static PlayState headIdle(AnimationState state) { + return PlayState.STOP; + } + + @Override + public AnimatableInstanceCache getAnimatableInstanceCache() { + return this.geoCache; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossMultipartLayout.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossMultipartLayout.java new file mode 100644 index 00000000..35e78069 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalBossMultipartLayout.java @@ -0,0 +1,38 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import com.craisinlord.antarchy.content.entity.multipart.MultipartLayout; +import com.craisinlord.antarchy.content.entity.multipart.MultipartPartDefinition; + +public final class RoyalBossMultipartLayout implements MultipartLayout { + public static final RoyalBossMultipartLayout INSTANCE = new RoyalBossMultipartLayout(); + + public static final MultipartPartDefinition BODY = new MultipartPartDefinition( + "body", 20.0F, 24.0F, 1.00F, 0.0D, 3.0D, 0.0D, true); + public static final MultipartPartDefinition LEFT_HEAD = new MultipartPartDefinition( + "left_head", 8.0F, 8.0F, 1.30F, 12.0D, 20.0D, -7.0D, true); + public static final MultipartPartDefinition CENTER_HEAD = new MultipartPartDefinition( + "center_head", 9.0F, 9.0F, 1.20F, 13.0D, 22.0D, 0.0D, true); + public static final MultipartPartDefinition RIGHT_HEAD = new MultipartPartDefinition( + "right_head", 8.0F, 8.0F, 1.30F, 12.0D, 20.0D, 7.0D, true); + public static final MultipartPartDefinition LEFT_WING = new MultipartPartDefinition( + "left_wing", 14.0F, 16.0F, 0.85F, -2.0D, 14.0D, -13.0D, true); + public static final MultipartPartDefinition RIGHT_WING = new MultipartPartDefinition( + "right_wing", 14.0F, 16.0F, 0.85F, -2.0D, 14.0D, 13.0D, true); + + private static final MultipartPartDefinition[] PARTS = { + BODY, + LEFT_HEAD, + CENTER_HEAD, + RIGHT_HEAD, + LEFT_WING, + RIGHT_WING + }; + + private RoyalBossMultipartLayout() { + } + + @Override + public MultipartPartDefinition[] parts() { + return PARTS; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalHead.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalHead.java new file mode 100644 index 00000000..269db19d --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/RoyalHead.java @@ -0,0 +1,126 @@ +package com.craisinlord.antarchy.content.entity.royal; + +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; + +public final class RoyalHead { + public enum Slot { + LEFT(1, "head_left", "bite_1", "shoot_1"), + CENTER(2, "head_center", "bite_2", "shoot_2"), + RIGHT(3, "head_right", "bite_3", "shoot_3"); + + private final int partIndex; + private final String controllerName; + private final String biteAnimation; + private final String shootAnimation; + + Slot(int partIndex, String controllerName, String biteAnimation, String shootAnimation) { + this.partIndex = partIndex; + this.controllerName = controllerName; + this.biteAnimation = biteAnimation; + this.shootAnimation = shootAnimation; + } + + public int partIndex() { + return this.partIndex; + } + + public String controllerName() { + return this.controllerName; + } + + public String biteAnimation() { + return this.biteAnimation; + } + + public String shootAnimation() { + return this.shootAnimation; + } + } + + private final Slot slot; + private int targetId = -1; + private int attackCooldown; + private int biteTicks; + private int biteHitTick = -1; + private int shootTicks; + private boolean beamActive; + + public RoyalHead(Slot slot) { + this.slot = slot; + } + + public Slot slot() { + return this.slot; + } + + @Nullable + public LivingEntity target(Level level) { + if (this.targetId < 0) { + return null; + } + return level.getEntity(this.targetId) instanceof LivingEntity living && living.isAlive() ? living : null; + } + + public void setTarget(@Nullable LivingEntity target) { + this.targetId = target == null ? -1 : target.getId(); + } + + public boolean busy() { + return this.biteTicks > 0 || this.shootTicks > 0 || this.beamActive; + } + + public boolean readyToAttack() { + return !this.busy() && this.attackCooldown <= 0; + } + + public void startBite(int durationTicks, int hitTick, int cooldownTicks) { + this.biteTicks = durationTicks; + this.biteHitTick = hitTick; + this.attackCooldown = cooldownTicks; + } + + public void startShoot(int durationTicks, int cooldownTicks) { + this.shootTicks = durationTicks; + this.attackCooldown = cooldownTicks; + } + + public void setBeamActive(boolean beamActive) { + this.beamActive = beamActive; + } + + public boolean beamActive() { + return this.beamActive; + } + + public boolean tickBiteHit() { + if (this.biteTicks <= 0) { + return false; + } + this.biteTicks--; + boolean hit = this.biteTicks == this.biteHitTick; + if (hit) { + this.biteHitTick = -1; + } + return hit; + } + + public void tick() { + if (this.attackCooldown > 0) { + this.attackCooldown--; + } + if (this.shootTicks > 0) { + this.shootTicks--; + } + } + + public void reset() { + this.targetId = -1; + this.attackCooldown = 0; + this.biteTicks = 0; + this.biteHitTick = -1; + this.shootTicks = 0; + this.beamActive = false; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamController.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamController.java new file mode 100644 index 00000000..0c045d26 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamController.java @@ -0,0 +1,295 @@ +package com.craisinlord.antarchy.content.entity.royal.beam; + +import java.util.List; +import java.util.function.Consumer; +import net.minecraft.core.BlockPos; +import net.minecraft.util.Mth; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntitySelector; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.GameRules; +import net.minecraft.world.level.Level; +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.phys.AABB; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.Nullable; + +public final class RoyalBeamController { + private final Mob owner; + private Vec3 serverTarget; + private Vec3 beamEndPosition; + private int beamTicks; + private int terrainMutationsThisTick; + + public RoyalBeamController(Mob owner) { + this.owner = owner; + } + + public boolean isFiring() { + return this.beamTicks > 0; + } + + public int beamTicks() { + return this.beamTicks; + } + + @Nullable + public Vec3 beamEndPosition() { + return this.beamEndPosition; + } + + public void start(Vec3 shootFrom, Vec3 target, int durationTicks) { + this.serverTarget = target; + this.beamEndPosition = target; + this.beamTicks = Math.max(1, durationTicks); + } + + public void stop() { + this.serverTarget = null; + this.beamEndPosition = null; + this.beamTicks = 0; + } + + public void tick( + Vec3 shootFrom, + @Nullable LivingEntity target, + RoyalBeamSettings settings, + RoyalBeamTerrainMode terrainMode, + Consumer<@Nullable Vec3> syncedEndPosition + ) { + if (this.beamTicks <= 0) { + syncedEndPosition.accept(null); + return; + } + + this.beamTicks--; + this.terrainMutationsThisTick = 0; + if (target != null && target.isAlive()) { + Vec3 targetEye = target.getEyePosition(); + this.serverTarget = this.serverTarget == null + ? targetEye + : this.serverTarget.add(targetEye.subtract(this.serverTarget).scale(settings.targetTracking())); + } + if (this.serverTarget == null) { + this.stop(); + syncedEndPosition.accept(null); + return; + } + + Vec3 direction = this.serverTarget.subtract(shootFrom).normalize(); + if (direction.lengthSqr() < 1.0E-7D) { + direction = this.owner.getLookAngle(); + } + Vec3 clipEnd = shootFrom.add(direction.scale(settings.range())); + HitResult hit = this.owner.level().clip(new ClipContext( + shootFrom, + clipEnd, + ClipContext.Block.COLLIDER, + ClipContext.Fluid.NONE, + this.owner + )); + this.beamEndPosition = hit.getLocation(); + syncedEndPosition.accept(this.beamEndPosition); + + if (!this.owner.level().isClientSide && this.beamEndPosition != null) { + marchDamageAndTerrain(shootFrom, this.beamEndPosition, settings, terrainMode); + } + + if (this.beamTicks <= 0) { + this.stop(); + syncedEndPosition.accept(null); + } + } + + private void marchDamageAndTerrain( + Vec3 shootFrom, + Vec3 beamEnd, + RoyalBeamSettings settings, + RoyalBeamTerrainMode terrainMode + ) { + Vec3 direction = beamEnd.subtract(shootFrom).normalize(); + double distance = shootFrom.distanceTo(beamEnd); + DamageSource damageSource = this.owner.damageSources().mobAttack(this.owner); + for (double walked = settings.pathStep(); walked < Math.min(distance, settings.range()); walked += settings.pathStep()) { + Vec3 sample = shootFrom.add(direction.scale(walked)); + hurtEntitiesAround(sample, settings.pathDamageRadius(), settings.damage(), settings.knockback(), damageSource, settings.requireLineOfSightForDamage()); + if (shouldMutateTerrain(settings, walked)) { + mutateTerrainAround(sample, settings.pathTerrainRadius(), settings, terrainMode); + } + } + + hurtEntitiesAround(beamEnd, settings.impactDamageRadius(), settings.damage(), settings.knockback(), damageSource, settings.requireLineOfSightForDamage()); + if (shouldMutateTerrain(settings, shootFrom.distanceTo(beamEnd))) { + mutateTerrainAround(beamEnd, settings.impactTerrainRadius(), settings, terrainMode); + } + } + + private boolean shouldMutateTerrain(RoyalBeamSettings settings, double distanceFromOwner) { + return settings.terrainEnabled() + && settings.maxTerrainMutationsPerTick() > 0 + && this.beamTicks % settings.terrainIntervalTicks() == 0 + && distanceFromOwner <= settings.maxTerrainDistance() + && this.owner.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); + } + + private boolean hurtEntitiesAround( + Vec3 center, + float radius, + float damageAmount, + float knockbackAmount, + DamageSource damageSource, + boolean requireLineOfSight + ) { + if (radius <= 0.0F || damageAmount <= 0.0F) { + return false; + } + + AABB aabb = new AABB(center.subtract(radius, radius, radius), center.add(radius, radius, radius)); + List entities = this.owner.level().getEntitiesOfClass( + LivingEntity.class, + aabb, + EntitySelector.NO_CREATIVE_OR_SPECTATOR + ); + boolean hurtAny = false; + for (LivingEntity living : entities) { + if (living.is(this.owner) + || this.owner.isAlliedTo(living) + || living.getType() == this.owner.getType() + || living.distanceToSqr(center) > radius * radius + || requireLineOfSight && !canEntityBeHurtFrom(center, living)) { + continue; + } + if (living.hurt(damageSource, damageAmount)) { + hurtAny = true; + knockbackTarget(living, knockbackAmount); + } + } + return hurtAny; + } + + private boolean canEntityBeHurtFrom(Vec3 center, LivingEntity living) { + Vec3 targetCenter = living.position().add(0.0D, living.getBbHeight() * 0.5D, 0.0D); + return this.owner.level().clip(new ClipContext( + center, + targetCenter, + ClipContext.Block.COLLIDER, + ClipContext.Fluid.NONE, + this.owner + )).getType() == HitResult.Type.MISS; + } + + private void knockbackTarget(Entity target, double strength) { + if (strength <= 0.0D) { + return; + } + + double resistance = target instanceof LivingEntity living + ? living.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE) + : 0.0D; + double appliedStrength = strength * Math.max(0.0D, 1.0D - resistance); + if (appliedStrength <= 0.0D) { + return; + } + + Vec3 push = target.position().subtract(this.owner.position()).multiply(1.0D, 0.0D, 1.0D).normalize().scale(appliedStrength); + Vec3 movement = target.getDeltaMovement(); + target.setDeltaMovement( + movement.x * 0.5D + push.x, + Math.min(0.4D, movement.y * 0.5D + appliedStrength), + movement.z * 0.5D + push.z + ); + target.hasImpulse = true; + } + + private void mutateTerrainAround( + Vec3 center, + float radius, + RoyalBeamSettings settings, + RoyalBeamTerrainMode terrainMode + ) { + if (terrainMode == RoyalBeamTerrainMode.NONE || radius <= 0.0F) { + return; + } + + Level level = this.owner.level(); + int minX = Mth.floor(center.x - radius); + int minY = Mth.floor(center.y - radius); + int minZ = Mth.floor(center.z - radius); + int maxX = Mth.floor(center.x + radius); + int maxY = Mth.floor(center.y + radius); + int maxZ = Mth.floor(center.z + radius); + float radiusSqr = radius * radius; + + for (BlockPos cursor : BlockPos.betweenClosed(minX, minY, minZ, maxX, maxY, maxZ)) { + if (this.terrainMutationsThisTick >= settings.maxTerrainMutationsPerTick()) { + return; + } + BlockPos pos = cursor.immutable(); + if (pos.distToCenterSqr(center.x, center.y, center.z) > radiusSqr + || this.owner.getRandom().nextFloat() > settings.terrainMutationChance() + || pos.getY() < level.getMinBuildHeight() + || pos.getY() >= level.getMaxBuildHeight() + || !level.getWorldBorder().isWithinBounds(pos)) { + continue; + } + + BlockState existing = level.getBlockState(pos); + if (terrainMode == RoyalBeamTerrainMode.DESTROY) { + destroyBeamBlock(level, pos, existing, settings); + } else if (terrainMode == RoyalBeamTerrainMode.BUILD_ICE) { + buildIceBlock(level, pos, existing, settings); + } + } + } + + private void destroyBeamBlock(Level level, BlockPos pos, BlockState existing, RoyalBeamSettings settings) { + if (existing.isAir() + || level.getBlockEntity(pos) != null + || existing.getDestroySpeed(level, pos) < 0.0F + || existing.getBlock().getExplosionResistance() > settings.maxTerrainResistance() + || existing.getCollisionShape(level, pos).isEmpty()) { + return; + } + + if (this.owner.getRandom().nextFloat() <= settings.terrainDropChance()) { + level.destroyBlock(pos, true, this.owner); + } else { + level.levelEvent(2001, pos, Block.getId(existing)); + level.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); + } + this.terrainMutationsThisTick++; + } + + private void buildIceBlock(Level level, BlockPos pos, BlockState existing, RoyalBeamSettings settings) { + boolean softTarget = existing.isAir() + || existing.canBeReplaced() + || !existing.getFluidState().isEmpty() + || existing.getBlock().getExplosionResistance() <= settings.maxTerrainResistance() + && existing.getDestroySpeed(level, pos) >= 0.0F + && level.getBlockEntity(pos) == null; + if (!softTarget) { + return; + } + + level.levelEvent(2001, pos, Block.getId(existing)); + level.setBlock(pos, randomIceBlock().defaultBlockState(), Block.UPDATE_ALL); + this.terrainMutationsThisTick++; + } + + private Block randomIceBlock() { + return switch (this.owner.getRandom().nextInt(5)) { + case 0 -> Blocks.BLUE_ICE; + case 1 -> Blocks.PACKED_ICE; + case 2 -> Blocks.FROSTED_ICE; + case 3 -> Blocks.SNOW_BLOCK; + default -> Blocks.ICE; + }; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamSettings.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamSettings.java new file mode 100644 index 00000000..ba437f57 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamSettings.java @@ -0,0 +1,61 @@ +package com.craisinlord.antarchy.content.entity.royal.beam; + +public record RoyalBeamSettings( + double range, + double targetTracking, + double pathStep, + float pathDamageRadius, + float impactDamageRadius, + float damage, + float knockback, + int terrainIntervalTicks, + double maxTerrainDistance, + float pathTerrainRadius, + float impactTerrainRadius, + int maxTerrainMutationsPerTick, + float terrainMutationChance, + float terrainDropChance, + float maxTerrainResistance, + boolean terrainEnabled, + boolean requireLineOfSightForDamage +) { + public static RoyalBeamSettings tremorzillaLike(float damage, boolean terrainEnabled) { + return new RoyalBeamSettings( + 100.0D, + 0.1D, + 7.5D, + 6.0F, + 6.0F, + damage, + 1.0F, + 3, + 100.0D, + 5.0F, + 4.0F, + 192, + 1.0F, + 0.08F, + 15.0F, + terrainEnabled, + true + ); + } + + public RoyalBeamSettings { + range = Math.max(1.0D, range); + targetTracking = Math.clamp(targetTracking, 0.0D, 1.0D); + pathStep = Math.max(1.0D, pathStep); + pathDamageRadius = Math.max(0.0F, pathDamageRadius); + impactDamageRadius = Math.max(0.0F, impactDamageRadius); + damage = Math.max(0.0F, damage); + knockback = Math.max(0.0F, knockback); + terrainIntervalTicks = Math.max(1, terrainIntervalTicks); + maxTerrainDistance = Math.max(0.0D, maxTerrainDistance); + pathTerrainRadius = Math.max(0.0F, pathTerrainRadius); + impactTerrainRadius = Math.max(0.0F, impactTerrainRadius); + maxTerrainMutationsPerTick = Math.max(0, maxTerrainMutationsPerTick); + terrainMutationChance = Math.clamp(terrainMutationChance, 0.0F, 1.0F); + terrainDropChance = Math.clamp(terrainDropChance, 0.0F, 1.0F); + maxTerrainResistance = Math.max(0.0F, maxTerrainResistance); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamTerrainMode.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamTerrainMode.java new file mode 100644 index 00000000..4d848e8a --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/royal/beam/RoyalBeamTerrainMode.java @@ -0,0 +1,7 @@ +package com.craisinlord.antarchy.content.entity.royal.beam; + +public enum RoyalBeamTerrainMode { + NONE, + DESTROY, + BUILD_ICE +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java index d1d67a6b..8daff363 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/entity/vortex/WindVortexEntity.java @@ -62,6 +62,7 @@ public class WindVortexEntity extends Entity { private static final String TRAVEL_Y_KEY = "TravelY"; private static final String TRAVEL_Z_KEY = "TravelZ"; private static final String TRAVELLING_KEY = "Travelling"; + private static final String HOMING_KEY = "Homing"; private static final double BASE_RADIUS = 0.35D; private static final double DRIFT_FRICTION = 0.96D; @@ -80,6 +81,7 @@ public class WindVortexEntity extends Entity { private float damageOverride = -1.0F; private Vec3 travelVelocity = Vec3.ZERO; private boolean travelling = false; + private boolean homing = false; private final Map carriedProgress = new HashMap<>(); @Nullable private UUID ownerUuid; @@ -139,6 +141,9 @@ public class WindVortexEntity extends Entity { } if (this.travelling) { + if (this.homing) { + this.steerTowardPrey(); + } Vec3 from = this.position(); Vec3 to = from.add(this.travelVelocity); HitResult blockHit = this.level().clip( @@ -160,6 +165,40 @@ public class WindVortexEntity extends Entity { } } + private void steerTowardPrey() { + double speed = this.travelVelocity.length(); + if (speed < 1.0E-4D) { + return; + } + AABB seekArea = this.getBoundingBox().inflate(12.0D); + Entity best = null; + double bestDistSqr = Double.MAX_VALUE; + for (Entity candidate : this.level().getEntities(this, seekArea, this::isSeekTarget)) { + double distSqr = candidate.distanceToSqr(this); + if (distSqr < bestDistSqr) { + bestDistSqr = distSqr; + best = candidate; + } + } + if (best == null) { + return; + } + Vec3 desired = best.getBoundingBox().getCenter().subtract(this.position()); + if (desired.lengthSqr() < 1.0E-6D) { + return; + } + Vec3 steered = this.travelVelocity.normalize().lerp(desired.normalize(), 0.18D); + if (steered.lengthSqr() < 1.0E-6D) { + return; + } + this.travelVelocity = steered.normalize().scale(speed); + } + + private boolean isSeekTarget(Entity entity) { + return entity instanceof LivingEntity && !(entity instanceof Player) && !this.isOwnedBy(entity) + && this.canAffectEntity(entity); + } + private boolean isInsideSolidBlock() { BlockPos pos = this.blockPosition(); BlockState state = this.level().getBlockState(pos); @@ -191,7 +230,7 @@ public class WindVortexEntity extends Entity { for (Entity entity : this.level().getEntities(this, area, this::canAffectEntity)) { Vec3 relative = entity.position().subtract(this.position()); double axisDistance = relative.dot(basis.axis); - if (axisDistance < -0.25D || axisDistance > height + 0.75D) { + if (axisDistance < -1.0D || axisDistance > height + 2.0D) { continue; } double along = Mth.clamp(axisDistance, 0.0D, height); @@ -201,9 +240,11 @@ public class WindVortexEntity extends Entity { double radius = this.radiusAt(shapeProgress); Vec3 axisPoint = basis.axis.scale(axisDistance); Vec3 radialVector = relative.subtract(axisPoint); - double captureRadius = radius + (entity instanceof Player ? 1.0D : 0.35D); + double captureRadius = radius * 1.35D + (entity instanceof Player ? 1.5D : 1.75D); + boolean requireLos = !this.travelling && mode == VortexMode.GATHER_RETURN; - if (radialVector.lengthSqr() > captureRadius * captureRadius || !this.hasClearPathTo(entity)) { + if (radialVector.lengthSqr() > captureRadius * captureRadius + || (requireLos && !this.hasClearPathTo(entity))) { continue; } @@ -226,6 +267,9 @@ public class WindVortexEntity extends Entity { double progress = entry.getValue(); double direction = mode == VortexMode.LENS_PULL ? -1.0D : 1.0D; progress += direction * 0.055D; + if (this.travelling) { + progress = Math.min(progress, 0.85D); + } if (mode == VortexMode.LENS_PULL && progress <= 0.0D) { iterator.remove(); continue; @@ -237,7 +281,7 @@ public class WindVortexEntity extends Entity { continue; } - if (mode == VortexMode.UPWARD && progress >= 0.92D) { + if (mode == VortexMode.UPWARD && progress >= 0.92D && !this.travelling) { this.launch(entity, this.radialVectorAt(entity, progress, basis), progress, basis); iterator.remove(); continue; @@ -274,9 +318,6 @@ public class WindVortexEntity extends Entity { if (!entity.isAlive() || entity.isSpectator() || entity.noPhysics || entity.getType().is(AntarchyTags.Entities.WIND_VORTEX_IMMUNE)) { return false; } - if (entity instanceof Player player && player.isCreative()) { - return false; - } return true; } @@ -295,7 +336,9 @@ public class WindVortexEntity extends Entity { ? Math.max(0.05D, radius * 0.18D) : Mth.lerp(shapeProgress, BASE_RADIUS, radius * 0.82D); double radialError = targetRadius - horizontal; - double playerScale = entity instanceof Player ? 1.8D : 1.0D; + boolean lensMode = mode == VortexMode.LENS_PULL || mode == VortexMode.LENS_PUSH; + double lensLivingBoost = lensMode && entity instanceof LivingEntity ? 1.6D : 1.0D; + double playerScale = (entity instanceof Player ? 1.8D : 1.35D) * lensLivingBoost; double pull = this.pullStrength * playerScale * (entity.isShiftKeyDown() ? 0.5D : 1.0D); double massScale = Mth.clamp(1.35D / Math.max(0.35D, entity.getBbWidth() * entity.getBbHeight()), 0.28D, 1.0D); double spin = (0.24D + progress * 0.34D) * massScale * playerScale; @@ -305,8 +348,8 @@ public class WindVortexEntity extends Entity { case UPWARD -> (0.13D + progress * 0.16D) * massScale; case GATHER_RETURN -> (0.05D + progress * 0.08D) * massScale; } * playerScale; - if (mode == VortexMode.UPWARD && entity instanceof Player && entity.onGround()) { - axialSpeed = Math.max(axialSpeed, 0.38D); + if (mode == VortexMode.UPWARD && entity.onGround()) { + axialSpeed = Math.max(axialSpeed, entity instanceof Player ? 0.38D : 0.3D); } Vec3 wanted = radial.scale(radialError * pull) @@ -318,8 +361,16 @@ public class WindVortexEntity extends Entity { Mth.lerp(0.58D, current.y, wanted.y), Mth.lerp(0.72D, current.z, wanted.z) ); - if (mode == VortexMode.UPWARD && entity instanceof Player && entity.onGround()) { - updatedMovement = new Vec3(updatedMovement.x, Math.max(updatedMovement.y, 0.38D), updatedMovement.z); + if (this.travelling) { + updatedMovement = updatedMovement.add(this.travelVelocity.x * 0.8D, 0.0D, this.travelVelocity.z * 0.8D); + } + if (mode == VortexMode.UPWARD && entity.onGround()) { + double minRise = entity instanceof Player ? 0.38D : 0.3D; + updatedMovement = new Vec3(updatedMovement.x, Math.max(updatedMovement.y, minRise), updatedMovement.z); + entity.setOnGround(false); + } + if (entity instanceof Player) { + entity.move(net.minecraft.world.entity.MoverType.SELF, wanted.scale(0.65D)); entity.setOnGround(false); } entity.setDeltaMovement(updatedMovement); @@ -455,6 +506,10 @@ public class WindVortexEntity extends Entity { this.noPhysics = true; } + public void setHoming(boolean homing) { + this.homing = homing; + } + public void setVortexStrengths(double pullStrength, double launchStrength) { this.pullStrength = Math.max(0.0D, pullStrength); this.launchStrength = Math.max(0.0D, launchStrength); @@ -491,6 +546,7 @@ public class WindVortexEntity extends Entity { this.setMode(VortexMode.values()[Mth.clamp(tag.getInt(MODE_KEY), 0, VortexMode.values().length - 1)]); this.setAxis(new Vec3(tag.getFloat(AXIS_X_KEY), tag.getFloat(AXIS_Y_KEY), tag.getFloat(AXIS_Z_KEY))); this.travelling = tag.getBoolean(TRAVELLING_KEY); + this.homing = tag.getBoolean(HOMING_KEY); this.travelVelocity = new Vec3(tag.getDouble(TRAVEL_X_KEY), tag.getDouble(TRAVEL_Y_KEY), tag.getDouble(TRAVEL_Z_KEY)); if (this.travelling) { this.noPhysics = true; @@ -514,6 +570,7 @@ public class WindVortexEntity extends Entity { tag.putFloat(AXIS_Y_KEY, (float) this.getAxis().y); tag.putFloat(AXIS_Z_KEY, (float) this.getAxis().z); tag.putBoolean(TRAVELLING_KEY, this.travelling); + tag.putBoolean(HOMING_KEY, this.homing); tag.putDouble(TRAVEL_X_KEY, this.travelVelocity.x); tag.putDouble(TRAVEL_Y_KEY, this.travelVelocity.y); tag.putDouble(TRAVEL_Z_KEY, this.travelVelocity.z); diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/EyeOfTheStormItem.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/EyeOfTheStormItem.java index 0133bdb5..e07ea583 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/EyeOfTheStormItem.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/EyeOfTheStormItem.java @@ -23,7 +23,9 @@ import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; +import org.jetbrains.annotations.Nullable; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; @@ -45,8 +47,7 @@ public class EyeOfTheStormItem extends Item implements GeoItem { private static final String IDLE_CONTROLLER = "idle_controller"; private static final String IDLE_ANIMATION = "spinning_idle"; private static final Map LAST_UPDRAFT_TICK = new ConcurrentHashMap<>(); - private static final Map LAST_SURGE_TICK = new ConcurrentHashMap<>(); - private static final float SURGE_PROJECTILE_SPEED = 0.9F; + private static final float SURGE_PROJECTILE_SPEED = 0.65F; private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this); @@ -107,22 +108,25 @@ public class EyeOfTheStormItem extends Item implements GeoItem { return; } - long now = level.getGameTime(); - Long last = LAST_SURGE_TICK.get(player.getUUID()); - if (last != null && now - last < AntarchySettings.eyeOfTheStormSurgeCooldownTicks()) { + Vec3 look = player.getViewVector(1.0F); + launchStormVortex(level, player.getEyePosition().add(look), look, player); + + player.awardStat(Stats.ITEM_USED.get(this)); + stack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND); + } + + public static void launchStormVortex(ServerLevel level, Vec3 origin, Vec3 direction, @Nullable LivingEntity owner) { + if (!AntarchySettings.eyeOfTheStormEnabled()) { return; } - LAST_SURGE_TICK.put(player.getUUID(), now); - - Vec3 look = player.getViewVector(1.0F); - Vec3 spawn = player.getEyePosition().add(look); + Vec3 dir = direction.lengthSqr() < 1.0E-6D ? new Vec3(0.0D, 0.0D, 1.0D) : direction.normalize(); WindVortexEntity vortex = WindVortexEntity.create( level, AntarchyObjects.WIND_VORTEX.get(), - spawn, + origin, Vec3.ZERO, - player, + owner, true ); vortex.setMode(WindVortexEntity.VortexMode.UPWARD); @@ -131,14 +135,12 @@ public class EyeOfTheStormItem extends Item implements GeoItem { vortex.setVortexDurationTicks(AntarchySettings.eyeOfTheStormSurgeDurationTicks()); vortex.setVortexStrengths(AntarchySettings.eyeOfTheStormSurgePullStrength(), AntarchySettings.eyeOfTheStormSurgeReturnStrength()); vortex.setDamageOverride(AntarchySettings.eyeOfTheStormSurgeDamage()); - vortex.setTravel(look.scale(SURGE_PROJECTILE_SPEED)); + vortex.setTravel(dir.scale(SURGE_PROJECTILE_SPEED)); + vortex.setHoming(true); level.addFreshEntity(vortex); - level.playSound(null, spawn.x, spawn.y, spawn.z, + level.playSound(null, origin.x, origin.y, origin.z, SoundEvents.BREEZE_WIND_CHARGE_BURST, SoundSource.PLAYERS, 1.0F, 0.8F); - - player.awardStat(Stats.ITEM_USED.get(this)); - stack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND); } @Override @@ -148,8 +150,8 @@ public class EyeOfTheStormItem extends Item implements GeoItem { @Override public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { - tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.updraft").withStyle(ChatFormatting.AQUA)); - tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.surge").withStyle(ChatFormatting.AQUA)); + tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.updraft").withStyle(ChatFormatting.DARK_AQUA)); + tooltipComponents.add(Component.translatable("tooltip.antarchy.eye_of_the_storm.surge").withStyle(ChatFormatting.DARK_AQUA)); super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/RoyalGuardianShieldItem.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/RoyalGuardianShieldItem.java index 649f5c28..8d8cc62e 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/RoyalGuardianShieldItem.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/RoyalGuardianShieldItem.java @@ -1,14 +1,10 @@ package com.craisinlord.antarchy.content.item; import com.craisinlord.antarchy.config.AntarchySettings; -import java.util.List; import java.util.function.Supplier; -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.Component; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ShieldItem; -import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.crafting.Ingredient; public class RoyalGuardianShieldItem extends ShieldItem { @@ -28,10 +24,4 @@ public class RoyalGuardianShieldItem extends ShieldItem { public int getEnchantmentValue() { return AntarchySettings.royalWeaponEnchantability(); } - - @Override - public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { - tooltipComponents.add(Component.translatable("tooltip.antarchy.royal_guardian_shield").withStyle(ChatFormatting.GOLD)); - super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); - } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/VortexLensBlockItem.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/VortexLensBlockItem.java new file mode 100644 index 00000000..879f33bf --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/item/VortexLensBlockItem.java @@ -0,0 +1,22 @@ +package com.craisinlord.antarchy.content.item; + +import java.util.List; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.block.Block; + +public class VortexLensBlockItem extends BlockItem { + public VortexLensBlockItem(Block block, Properties properties) { + super(block, properties); + } + + @Override + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + tooltipComponents.add(Component.translatable("tooltip.antarchy.vortex_lens").withStyle(ChatFormatting.DARK_AQUA)); + super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/network/TimeDilationRatePayload.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/network/TimeDilationRatePayload.java new file mode 100644 index 00000000..dc649deb --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/network/TimeDilationRatePayload.java @@ -0,0 +1,25 @@ +package com.craisinlord.antarchy.content.network; + +import com.craisinlord.antarchy.Antarchy; +import io.netty.buffer.ByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; + +public record TimeDilationRatePayload(int entityId, double rate) implements CustomPacketPayload { + public static final Type TYPE = + new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "time_dilation_rate")); + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + ByteBufCodecs.VAR_INT, + TimeDilationRatePayload::entityId, + ByteBufCodecs.DOUBLE, + TimeDilationRatePayload::rate, + TimeDilationRatePayload::new + ); + + @Override + public Type type() { + return TYPE; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationApi.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationApi.java new file mode 100644 index 00000000..8a9d6844 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationApi.java @@ -0,0 +1,67 @@ +package com.craisinlord.antarchy.content.time; + +import java.util.function.BiConsumer; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.phys.Vec3; + +public final class TimeDilationApi { + private static BiConsumer syncDispatcher = (player, rate) -> { + }; + + private TimeDilationApi() { + } + + public static void setSyncDispatcher(BiConsumer dispatcher) { + syncDispatcher = dispatcher != null ? dispatcher : (player, rate) -> { + }; + } + + public static TimeDilationFieldEntity createField(ServerLevel level, Vec3 center, double radius, double rate, int durationTicks) { + TimeDilationFieldEntity field = TimeDilationFieldEntity.create(level, center, radius, rate, durationTicks); + level.addFreshEntity(field); + return field; + } + + public static double getRate(Entity entity) { + if (entity instanceof TimeDilationEntityAccess access) { + return access.antarchy$getTimeDilationRate(); + } + return TimeDilationMath.NORMAL_RATE; + } + + public static boolean isDilated(Entity entity) { + return getRate(entity) < TimeDilationMath.NORMAL_RATE; + } + + public static void applySyncedRate(Entity entity, double rate) { + if (entity instanceof TimeDilationEntityAccess access) { + access.antarchy$setTimeDilationRate(rate); + } + } + + public static void syncPlayerRate(ServerPlayer player, double rate) { + syncDispatcher.accept(player, TimeDilationMath.clampRate(rate)); + } + + public static boolean consumeTick(Entity entity, String timerKey) { + if (entity instanceof Player) { + return true; + } + double rate = getRate(entity); + if (rate >= TimeDilationMath.NORMAL_RATE || !(entity instanceof TimeDilationEntityAccess access)) { + return true; + } + return access.antarchy$consumeTimeDilationTick(timerKey, rate); + } + + public static int scaleCooldownTicks(Entity entity, int ticks) { + double rate = getRate(entity); + if (ticks <= 0 || rate >= TimeDilationMath.NORMAL_RATE) { + return ticks; + } + return (int) Math.ceil(ticks / Math.max(TimeDilationMath.MIN_RATE, rate)); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationCommand.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationCommand.java new file mode 100644 index 00000000..891c5258 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationCommand.java @@ -0,0 +1,101 @@ +package com.craisinlord.antarchy.content.time; + +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.arguments.DoubleArgumentType; +import com.mojang.brigadier.arguments.IntegerArgumentType; +import com.mojang.brigadier.context.CommandContext; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; +import net.minecraft.commands.arguments.coordinates.Vec3Argument; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.phys.Vec3; + +public final class TimeDilationCommand { + private TimeDilationCommand() { + } + + public static void register(CommandDispatcher dispatcher) { + dispatcher.register( + Commands.literal("timedilation") + .requires(source -> source.hasPermission(2)) + .then(Commands.literal("create") + .then(Commands.argument("center", Vec3Argument.vec3()) + .then(Commands.argument("radius", DoubleArgumentType.doubleArg(0.5D, 128.0D)) + .then(Commands.argument("rate", DoubleArgumentType.doubleArg(TimeDilationMath.MIN_RATE, 1.0D)) + .then(Commands.argument("durationTicks", IntegerArgumentType.integer(-1)) + .executes(TimeDilationCommand::create)))))) + .then(Commands.literal("create_here") + .then(Commands.argument("radius", DoubleArgumentType.doubleArg(0.5D, 128.0D)) + .then(Commands.argument("rate", DoubleArgumentType.doubleArg(TimeDilationMath.MIN_RATE, 1.0D)) + .then(Commands.argument("durationTicks", IntegerArgumentType.integer(-1)) + .executes(TimeDilationCommand::createHere))))) + .then(Commands.literal("list").executes(TimeDilationCommand::list)) + .then(Commands.literal("clear").executes(TimeDilationCommand::clear)) + ); + } + + private static int create(CommandContext context) { + return createField(context, Vec3Argument.getVec3(context, "center")); + } + + private static int createHere(CommandContext context) { + return createField(context, context.getSource().getPosition()); + } + + private static int createField(CommandContext context, Vec3 center) { + ServerLevel level = context.getSource().getLevel(); + double radius = DoubleArgumentType.getDouble(context, "radius"); + double rate = DoubleArgumentType.getDouble(context, "rate"); + int durationTicks = IntegerArgumentType.getInteger(context, "durationTicks"); + TimeDilationFieldEntity field = TimeDilationApi.createField(level, center, radius, rate, durationTicks); + context.getSource().sendSuccess( + () -> Component.literal("Created time dilation field " + field.getUUID() + " radius=" + radius + + " rate=" + rate + " durationTicks=" + durationTicks), + true + ); + return 1; + } + + private static int list(CommandContext context) { + int count = 0; + for (ServerLevel level : context.getSource().getServer().getAllLevels()) { + for (Entity entity : level.getAllEntities()) { + if (!(entity instanceof TimeDilationFieldEntity field)) { + continue; + } + count++; + context.getSource().sendSuccess( + () -> Component.literal(field.getUUID() + " " + level.dimension().location() + " @ " + + format(field.position()) + " radius=" + field.fieldRadius() + " rate=" + field.fieldRate() + + " age=" + field.fieldAge() + + (field.isInfinite() ? " duration=infinite" : " duration=" + field.fieldDurationTicks())), + false + ); + } + } + return count; + } + + private static int clear(CommandContext context) { + List fields = new ArrayList<>(); + for (ServerLevel level : context.getSource().getServer().getAllLevels()) { + for (Entity entity : level.getAllEntities()) { + if (entity instanceof TimeDilationFieldEntity field) { + fields.add(field); + } + } + } + fields.forEach(Entity::discard); + int count = fields.size(); + context.getSource().sendSuccess(() -> Component.literal("Cleared " + count + " time dilation field(s)"), true); + return count; + } + + private static String format(Vec3 vec) { + return String.format(java.util.Locale.ROOT, "%.2f %.2f %.2f", vec.x, vec.y, vec.z); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationEntityAccess.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationEntityAccess.java new file mode 100644 index 00000000..3ecae3cd --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationEntityAccess.java @@ -0,0 +1,13 @@ +package com.craisinlord.antarchy.content.time; + +public interface TimeDilationEntityAccess { + double antarchy$getTimeDilationRate(); + + void antarchy$setTimeDilationRate(double rate); + + boolean antarchy$consumeTimeDilationTick(String timerKey, double rate); + + boolean antarchy$isInTimeDilationMove(); + + void antarchy$setInTimeDilationMove(boolean inMove); +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldEntity.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldEntity.java new file mode 100644 index 00000000..b8814456 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldEntity.java @@ -0,0 +1,113 @@ +package com.craisinlord.antarchy.content.time; + +import com.craisinlord.antarchy.content.AntarchyObjects; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; + +public class TimeDilationFieldEntity extends Entity { + private static final EntityDataAccessor RADIUS = + SynchedEntityData.defineId(TimeDilationFieldEntity.class, EntityDataSerializers.FLOAT); + private static final EntityDataAccessor RATE = + SynchedEntityData.defineId(TimeDilationFieldEntity.class, EntityDataSerializers.FLOAT); + + private static final String RADIUS_KEY = "Radius"; + private static final String RATE_KEY = "Rate"; + private static final String DURATION_KEY = "DurationTicks"; + private static final String AGE_KEY = "Age"; + + private int durationTicks = -1; + private int age; + + public TimeDilationFieldEntity(EntityType entityType, Level level) { + super(entityType, level); + this.noPhysics = true; + this.noCulling = true; + } + + public static TimeDilationFieldEntity create(Level level, Vec3 center, double radius, double rate, int durationTicks) { + TimeDilationFieldEntity field = new TimeDilationFieldEntity(AntarchyObjects.TIME_DILATION_FIELD.get(), level); + field.setPos(center.x, center.y, center.z); + field.setFieldRadius(radius); + field.setFieldRate(rate); + field.durationTicks = durationTicks; + return field; + } + + @Override + protected void defineSynchedData(SynchedEntityData.Builder builder) { + builder.define(RADIUS, 8.0F); + builder.define(RATE, (float) TimeDilationMath.NORMAL_RATE); + } + + @Override + public void tick() { + super.tick(); + if (this.level().isClientSide) { + return; + } + this.age++; + if (this.durationTicks >= 0 && this.age >= this.durationTicks) { + this.discard(); + } + } + + public void setFieldRadius(double radius) { + this.entityData.set(RADIUS, (float) Math.max(0.5D, radius)); + } + + public double fieldRadius() { + return this.entityData.get(RADIUS); + } + + public double fieldRadiusSqr() { + double radius = this.fieldRadius(); + return radius * radius; + } + + public void setFieldRate(double rate) { + this.entityData.set(RATE, (float) TimeDilationMath.clampRate(rate)); + } + + public double fieldRate() { + return TimeDilationMath.clampRate(this.entityData.get(RATE)); + } + + public int fieldDurationTicks() { + return this.durationTicks; + } + + public int fieldAge() { + return this.age; + } + + public boolean isInfinite() { + return this.durationTicks < 0; + } + + @Override + public boolean isIgnoringBlockTriggers() { + return true; + } + + @Override + protected void readAdditionalSaveData(CompoundTag tag) { + this.setFieldRadius(tag.getDouble(RADIUS_KEY)); + this.setFieldRate(tag.getDouble(RATE_KEY)); + this.durationTicks = tag.contains(DURATION_KEY) ? tag.getInt(DURATION_KEY) : -1; + this.age = tag.getInt(AGE_KEY); + } + + @Override + protected void addAdditionalSaveData(CompoundTag tag) { + tag.putDouble(RADIUS_KEY, this.fieldRadius()); + tag.putDouble(RATE_KEY, this.fieldRate()); + tag.putInt(DURATION_KEY, this.durationTicks); + tag.putInt(AGE_KEY, this.age); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldSampler.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldSampler.java new file mode 100644 index 00000000..abd67e99 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationFieldSampler.java @@ -0,0 +1,30 @@ +package com.craisinlord.antarchy.content.time; + +import java.util.List; +import net.minecraft.world.phys.Vec3; + +public final class TimeDilationFieldSampler { + private TimeDilationFieldSampler() { + } + + public static double sample(List fields, Vec3 position) { + return sample(fields, position.x, position.y, position.z); + } + + public static double sample(List fields, double x, double y, double z) { + double combinedRate = TimeDilationMath.NORMAL_RATE; + for (TimeDilationFieldEntity field : fields) { + Vec3 center = field.position(); + double dx = center.x - x; + double dy = center.y - y; + double dz = center.z - z; + double distanceSqr = dx * dx + dy * dy + dz * dz; + if (distanceSqr >= field.fieldRadiusSqr()) { + continue; + } + double falloff = TimeDilationMath.gaussianFalloff(Math.sqrt(distanceSqr), field.fieldRadius()); + combinedRate *= TimeDilationMath.localFieldRate(field.fieldRate(), falloff); + } + return TimeDilationMath.clampRate(combinedRate); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationManager.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationManager.java new file mode 100644 index 00000000..50cf9368 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationManager.java @@ -0,0 +1,73 @@ +package com.craisinlord.antarchy.content.time; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import net.minecraft.resources.ResourceKey; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.Level; + +public final class TimeDilationManager { + private static final Set> DILATED_LEVELS = new HashSet<>(); + + private TimeDilationManager() { + } + + public static void tickServer(MinecraftServer server) { + for (ServerLevel level : server.getAllLevels()) { + List fields = collectFields(level); + if (fields.isEmpty()) { + if (DILATED_LEVELS.remove(level.dimension())) { + resetRates(level); + } + continue; + } + DILATED_LEVELS.add(level.dimension()); + updateEntities(level, fields); + TimeDilationParticles.spawnFieldBorders(level, fields); + } + } + + private static List collectFields(ServerLevel level) { + List fields = new ArrayList<>(); + for (Entity entity : level.getAllEntities()) { + if (entity instanceof TimeDilationFieldEntity field && field.isAlive()) { + fields.add(field); + } + } + return fields; + } + + private static void updateEntities(ServerLevel level, List fields) { + for (Entity entity : level.getAllEntities()) { + if (!(entity instanceof TimeDilationEntityAccess access) || entity instanceof TimeDilationFieldEntity) { + continue; + } + double previousRate = access.antarchy$getTimeDilationRate(); + double rate = TimeDilationFieldSampler.sample(fields, entity.position()); + access.antarchy$setTimeDilationRate(rate); + if (entity instanceof ServerPlayer player && Math.abs(previousRate - rate) > 0.001D) { + TimeDilationApi.syncPlayerRate(player, rate); + } + } + } + + private static void resetRates(ServerLevel level) { + for (Entity entity : level.getAllEntities()) { + if (!(entity instanceof TimeDilationEntityAccess access) || entity instanceof TimeDilationFieldEntity) { + continue; + } + if (access.antarchy$getTimeDilationRate() >= TimeDilationMath.NORMAL_RATE) { + continue; + } + access.antarchy$setTimeDilationRate(TimeDilationMath.NORMAL_RATE); + if (entity instanceof ServerPlayer player) { + TimeDilationApi.syncPlayerRate(player, TimeDilationMath.NORMAL_RATE); + } + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationMath.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationMath.java new file mode 100644 index 00000000..6a5cf1cf --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationMath.java @@ -0,0 +1,34 @@ +package com.craisinlord.antarchy.content.time; + +public final class TimeDilationMath { + public static final double MIN_RATE = 0.05D; + public static final double NORMAL_RATE = 1.0D; + private static final double GAUSSIAN_EDGE_EXPONENT = -4.5D; + + private TimeDilationMath() { + } + + public static double clampRate(double rate) { + if (Double.isNaN(rate) || Double.isInfinite(rate)) { + return NORMAL_RATE; + } + return Math.max(MIN_RATE, Math.min(NORMAL_RATE, rate)); + } + + public static double gaussianFalloff(double distance, double radius) { + if (distance < 0.0D || distance >= radius || radius <= 0.0D) { + return 0.0D; + } + double normalized = distance / radius; + return Math.exp(GAUSSIAN_EDGE_EXPONENT * normalized * normalized); + } + + public static double localFieldRate(double fieldRate, double falloff) { + double clampedRate = clampRate(fieldRate); + double clampedFalloff = Math.max(0.0D, Math.min(1.0D, falloff)); + if (clampedRate <= 0.0D) { + return 0.0D; + } + return Math.pow(clampedRate, clampedFalloff); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationParticles.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationParticles.java new file mode 100644 index 00000000..7bbee5c5 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/time/TimeDilationParticles.java @@ -0,0 +1,49 @@ +package com.craisinlord.antarchy.content.time; + +import java.util.List; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.phys.Vec3; + +public final class TimeDilationParticles { + private static final int PARTICLE_INTERVAL_TICKS = 4; + private static final int MAX_RING_POINTS = 96; + + private TimeDilationParticles() { + } + + public static void spawnFieldBorders(ServerLevel level, List fields) { + if (level.getGameTime() % PARTICLE_INTERVAL_TICKS != 0L) { + return; + } + for (TimeDilationFieldEntity field : fields) { + spawnBorder(level, field.position(), field.fieldRadius()); + } + } + + private static void spawnBorder(ServerLevel level, Vec3 center, double radius) { + int points = Mth.clamp((int) Math.ceil(radius * 10.0D), 24, MAX_RING_POINTS); + double phase = (level.getGameTime() % 80L) * 0.07853981633974483D; + + for (int i = 0; i < points; i++) { + double angle = phase + (Math.PI * 2.0D * i / points); + double x = center.x + Math.cos(angle) * radius; + double z = center.z + Math.sin(angle) * radius; + spawnParticle(level, x, center.y, z); + + if (i % 4 == 0) { + spawnParticle(level, x, center.y + radius * 0.5D, z); + spawnParticle(level, x, center.y - radius * 0.5D, z); + } + if (i % 8 == 0) { + spawnParticle(level, center.x + Math.cos(angle) * radius * 0.7D, center.y + Math.sin(angle) * radius, center.z); + spawnParticle(level, center.x, center.y + Math.sin(angle) * radius, center.z + Math.cos(angle) * radius * 0.7D); + } + } + } + + private static void spawnParticle(ServerLevel level, double x, double y, double z) { + level.sendParticles(ParticleTypes.REVERSE_PORTAL, x, y, z, 1, 0.02D, 0.02D, 0.02D, 0.0D); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/DimensionalTearFeature.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/DimensionalTearFeature.java index 4100efde..c61e2eff 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/DimensionalTearFeature.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/DimensionalTearFeature.java @@ -1,10 +1,8 @@ package com.craisinlord.antarchy.content.worldgen.thoraxis; -import com.craisinlord.antarchy.config.AntarchySettings; -import com.craisinlord.antarchy.content.entity.portal.DimensionalTearEntity; +import com.craisinlord.antarchy.content.AntarchyObjects; 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.util.Mth; import net.minecraft.util.RandomSource; @@ -13,15 +11,10 @@ import net.minecraft.world.level.WorldGenLevel; 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 net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; public final class DimensionalTearFeature extends Feature { - private static final int MIN_LINK_RANGE = 50; - private static final int MAX_LINK_RANGE = 500; private static final int LOCAL_SEARCH_ATTEMPTS = 18; - private static final int PARTNER_ORIGIN_ATTEMPTS = 12; - private static final int PARTNER_SEARCH_ATTEMPTS = 48; public DimensionalTearFeature(Codec codec) { super(codec); @@ -30,46 +23,20 @@ public final class DimensionalTearFeature extends Feature context) { WorldGenLevel level = context.level(); - if (!(level instanceof ServerLevelAccessor serverLevelAccessor)) { + if (!(level instanceof ServerLevelAccessor)) { return false; } RandomSource random = context.random(); - BlockPos first = findOpenPocket(level, context.origin(), random, LOCAL_SEARCH_ATTEMPTS); - if (first == null) { + BlockPos anchor = findOpenPocket(level, context.origin(), random, LOCAL_SEARCH_ATTEMPTS); + if (anchor == null || !canAccess(level, anchor)) { return false; } - BlockPos second = null; - for (int i = 0; i < PARTNER_ORIGIN_ATTEMPTS && second == null; i++) { - second = findOpenPocket(level, linkedOrigin(first, random), random, PARTNER_SEARCH_ATTEMPTS); - } - if (second == null) { - return false; - } - - ServerLevel serverLevel = serverLevelAccessor.getLevel(); - int lifetime = Math.max(1200, AntarchySettings.dimensionalTearLifetimeTicks()); - float yawA = random.nextFloat() * 360.0F; - float yawB = Mth.wrapDegrees(yawA + 140.0F + random.nextFloat() * 80.0F); - DimensionalTearEntity tearA = DimensionalTearEntity.create(serverLevel, center(first), yawA, lifetime); - DimensionalTearEntity tearB = DimensionalTearEntity.create(serverLevel, center(second), yawB, lifetime); - tearA.linkTo(tearB); - tearB.linkTo(tearA); - serverLevel.addFreshEntity(tearA); - serverLevel.addFreshEntity(tearB); + level.setBlock(anchor, AntarchyObjects.DIMENSIONAL_TEAR_MARKER.get().defaultBlockState(), 2); return true; } - private static BlockPos linkedOrigin(BlockPos first, RandomSource random) { - double angle = random.nextDouble() * Math.PI * 2.0D; - int distance = Mth.nextInt(random, MIN_LINK_RANGE, MAX_LINK_RANGE); - int dx = Mth.floor(Math.cos(angle) * distance); - int dz = Mth.floor(Math.sin(angle) * distance); - int dy = Mth.nextInt(random, -36, 36); - return first.offset(dx, dy, dz); - } - @Nullable private static BlockPos findOpenPocket(WorldGenLevel level, BlockPos origin, RandomSource random, int attempts) { int minY = level.getMinBuildHeight() + 8; @@ -105,8 +72,4 @@ public final class DimensionalTearFeature extends Feature { Map logs = new LinkedHashMap<>(); Set foliage = new LinkedHashSet<>(); - placeTrunk(spine, bottomRadius, logs, random); + int tierCount = Mth.clamp(2 + branchCount / 2, 3, 5); + int outerRadius = 4 + bottomRadius + random.nextInt(3); + + placeTrunk(spine, logs, random); placeRootWaves(spine, bottomRadius, logs, foliage, random, veilRadius); - placeBranches(spine, branchCount, branchLength, logs, foliage, random, veilRadius); + placeChandelierTiers(spine, tierCount, outerRadius, logs, foliage, random, veilRadius); + placeBranches(spine, Math.max(1, branchCount / 2), branchLength, logs, foliage, random, veilRadius); placeVeilCurtains(spine, foliage, random, veilRadius); if (logs.isEmpty()) { @@ -114,38 +118,27 @@ public class NadirTreeFeature extends Feature { return spine; } - private void placeTrunk(List spine, int bottomRadius, Map logs, RandomSource random) { + private void placeTrunk(List spine, Map logs, RandomSource random) { for (int index = 0; index < spine.size(); index++) { - BlockPos center = spine.get(index); - float progress = spine.size() == 1 ? 1.0F : index / (float) (spine.size() - 1); - float wave = Mth.sin(progress * Mth.PI * 2.75F) * 0.55F + Mth.sin(progress * Mth.PI * 5.5F) * 0.25F; - int radius = Mth.clamp(Math.round((0.45F + progress * 0.3F + wave * 0.22F) * bottomRadius), 0, Math.max(1, bottomRadius - 1)); - if (index < 2) { - radius = Math.max(radius, 1); - } - fillTrunkLayer(center, radius, logs, random); + fillTrunkLayer(spine.get(index), index < 2, logs, random); } } - private void fillTrunkLayer(BlockPos center, int radius, Map logs, RandomSource random) { - if (radius <= 0) { - putLog(logs, center, Direction.Axis.Y); - return; - } - - int radiusSq = radius * radius; - for (int dx = -radius; dx <= radius; dx++) { - for (int dz = -radius; dz <= radius; dz++) { - int dist = dx * dx + dz * dz; - if (dist > radiusSq + 1) { - continue; - } - if (dist > radiusSq - radius && random.nextFloat() < 0.48F) { - continue; - } + private void fillTrunkLayer(BlockPos center, boolean flare, Map logs, RandomSource random) { + for (int dx = 0; dx <= 1; dx++) { + for (int dz = 0; dz <= 1; dz++) { putLog(logs, center.offset(dx, 0, dz), Direction.Axis.Y); } } + if (flare) { + for (int dx = -1; dx <= 2; dx++) { + for (int dz = -1; dz <= 2; dz++) { + if ((dx == -1 || dx == 2 || dz == -1 || dz == 2) && random.nextFloat() < 0.5F) { + putLog(logs, center.offset(dx, 0, dz), Direction.Axis.Y); + } + } + } + } } private void placeRootWaves( @@ -231,6 +224,67 @@ public class NadirTreeFeature extends Feature { } } + private void placeChandelierTiers( + List spine, + int tierCount, + int outerRadius, + Map logs, + Set foliage, + RandomSource random, + int veilRadius + ) { + int top = Math.max(2, spine.size() / 5); + int bottom = Math.max(top + 1, spine.size() - 2); + for (int tier = 0; tier < tierCount; tier++) { + float progress = tierCount == 1 ? 0.0F : tier / (float) (tierCount - 1); + int index = Mth.clamp(Math.round(Mth.lerp(progress, top, bottom)), 0, spine.size() - 1); + BlockPos hub = spine.get(index); + int radius = Math.max(2, Math.round(Mth.lerp(progress, outerRadius, 2.0F)) + random.nextInt(2)); + int droop = 1 + random.nextInt(2); + BlockPos ringCenter = hub.below(droop); + + placeTierRing(ringCenter, radius, logs, random); + placeTierSpokes(hub, ringCenter, radius, logs); + + for (Direction spoke : Direction.Plane.HORIZONTAL) { + BlockPos rim = ringCenter.relative(spoke, radius); + Direction tangent = spoke.getClockWise(); + placeVeilRibbon(foliage, rim, tangent, Math.max(2, veilRadius + random.nextInt(2)), random); + } + } + } + + private void placeTierRing(BlockPos center, int radius, Map logs, RandomSource random) { + int outerSq = (radius + 1) * (radius + 1); + int innerSq = (radius - 1) * (radius - 1); + for (int dx = -radius - 1; dx <= radius + 1; dx++) { + for (int dz = -radius - 1; dz <= radius + 1; dz++) { + int distSq = dx * dx + dz * dz; + if (distSq > outerSq || distSq < innerSq) { + continue; + } + if (random.nextFloat() < 0.12F) { + continue; + } + Direction.Axis axis = Math.abs(dx) >= Math.abs(dz) ? Direction.Axis.X : Direction.Axis.Z; + putLog(logs, center.offset(dx, 0, dz), axis); + } + } + } + + private void placeTierSpokes(BlockPos hub, BlockPos ringCenter, int radius, Map logs) { + for (Direction spoke : Direction.Plane.HORIZONTAL) { + BlockPos previous = hub; + for (int step = 1; step <= radius; step++) { + float t = step / (float) radius; + int y = Math.round(Mth.lerp(t, hub.getY(), ringCenter.getY())); + BlockPos next = new BlockPos(hub.getX() + spoke.getStepX() * step, y, hub.getZ() + spoke.getStepZ() * step); + putLog(logs, next, axisForSegment(previous, next)); + previous = next; + } + } + } + private void placeVeilCurtains(List spine, Set foliage, RandomSource random, int veilRadius) { for (int index = 1; index < spine.size(); index++) { if (random.nextFloat() > 0.24F) { @@ -244,23 +298,22 @@ public class NadirTreeFeature extends Feature { private void placeVeilRibbon(Set foliage, BlockPos start, Direction flow, int length, RandomSource random) { Direction side = random.nextBoolean() ? flow.getClockWise() : flow.getCounterClockWise(); - BlockPos cursor = start; - for (int step = 0; step < length; step++) { - foliage.add(cursor); - if (random.nextFloat() < 0.34F) { - foliage.add(cursor.relative(side)); - } - if (random.nextFloat() < 0.18F) { - foliage.add(cursor.relative(side.getOpposite())); - } - cursor = cursor.below(); - if (step > 0 && random.nextFloat() < 0.4F) { - cursor = cursor.relative(random.nextBoolean() ? side : side.getOpposite()); - } - if (random.nextFloat() < 0.18F) { - BlockPos drift = cursor.relative(flow); - if (random.nextBoolean()) { - foliage.add(drift); + int span = Math.max(4, length + 2); + int bands = 1 + random.nextInt(2); + float phase = random.nextFloat() * Mth.PI * 2.0F; + float frequency = 0.55F + random.nextFloat() * 0.45F; + for (int band = 0; band < bands; band++) { + BlockPos rowAnchor = start.relative(side, band); + float bandPhase = phase + band * 1.7F; + for (int step = 0; step < span; step++) { + float wave = Mth.sin(step * frequency + bandPhase); + int lift = Math.round(wave * 1.5F); + BlockPos top = rowAnchor.relative(flow, step).offset(0, lift, 0); + int strand = Math.max(2, 3 + Math.round((wave + 1.0F) * 2.0F) + random.nextInt(2) - (1 + random.nextInt(3))); + BlockPos cursor = top; + for (int drop = 0; drop < strand; drop++) { + foliage.add(cursor); + cursor = cursor.below(); } } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisUndersideManager.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisUndersideManager.java index a2c32c01..46655401 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisUndersideManager.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisUndersideManager.java @@ -26,18 +26,22 @@ public final class ThoraxisUndersideManager { private static final ResourceLocation THORAXIS_DIMENSION = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "thoraxis"); private static final AntarchyGravityTransition TRANSITION = new AntarchyGravityTransition(12); private static final int EFFECT_DURATION_TICKS = 40; + private static final int MAX_FLIPS_PER_TICK = 8; private static final Set UNDERSIDE_APPLIED_EFFECT = new HashSet<>(); private static final Set UNDERSIDE_FORCED_GRAVITY = new HashSet<>(); + private static final Set ACTIVE_ITEMS_SCRATCH = new HashSet<>(); private ThoraxisUndersideManager() { } public static void tick(ServerLevel level) { - if (!isThoraxis(level)) { + if (!isThoraxis(level) || level.players().isEmpty()) { return; } - Set activeThisTick = new HashSet<>(); + Set activeThisTick = ACTIVE_ITEMS_SCRATCH; + activeThisTick.clear(); + int flipsRemaining = MAX_FLIPS_PER_TICK; for (Entity entity : level.getAllEntities()) { if (!entity.isAlive() || entity.isSpectator()) { continue; @@ -48,6 +52,14 @@ public final class ThoraxisUndersideManager { if (entity instanceof LivingEntity living) { UUID uuid = entity.getUUID(); if (inUnderside) { + boolean needsFlip = AntarchyGravityApi.getGravityDirection(living) != AntarchyGravityDirection.UP + || !AntarchyGravityApi.isGravityForced(living); + if (needsFlip && flipsRemaining <= 0) { + continue; + } + if (needsFlip) { + flipsRemaining--; + } applyUndersideInversion(living); } else if (UNDERSIDE_APPLIED_EFFECT.remove(uuid)) { if (living.hasEffect(AntarchyObjects.INVERTED_EFFECT.get())) { @@ -67,10 +79,15 @@ public final class ThoraxisUndersideManager { UUID uuid = entity.getUUID(); if (inUnderside) { + boolean needsFlip = AntarchyGravityApi.getGravityDirection(entity) != AntarchyGravityDirection.UP + || !AntarchyGravityApi.isGravityForced(entity); + if (needsFlip && flipsRemaining <= 0) { + continue; + } activeThisTick.add(uuid); UNDERSIDE_FORCED_GRAVITY.add(uuid); - if (AntarchyGravityApi.getGravityDirection(entity) != AntarchyGravityDirection.UP - || !AntarchyGravityApi.isGravityForced(entity)) { + if (needsFlip) { + flipsRemaining--; AntarchyGravityApi.setForcedGravityDirection(entity, AntarchyGravityDirection.UP, TRANSITION); } continue; diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/client/CustomBossBarMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/client/CustomBossBarMixin.java index 02939a73..47a9b1c7 100644 --- a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/client/CustomBossBarMixin.java +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/client/CustomBossBarMixin.java @@ -38,6 +38,6 @@ public abstract class CustomBossBarMixin { @ModifyConstant(method = "render", constant = @Constant(intValue = 9, ordinal = 1)) private int antarchy$doubleGapForCustomBossBar(int original, @Local LerpingBossEvent bossEvent) { - return CustomBossBarRenderer.isCustomBoss(bossEvent) ? original + 19 : original; + return CustomBossBarRenderer.isCustomBoss(bossEvent) ? original + 30 : original; } } diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityDeltaMovementTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityDeltaMovementTimeDilationMixin.java new file mode 100644 index 00000000..0720cc14 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityDeltaMovementTimeDilationMixin.java @@ -0,0 +1,38 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.craisinlord.antarchy.content.time.TimeDilationEntityAccess; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.phys.Vec3; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyVariable; + +@Mixin(Entity.class) +public abstract class EntityDeltaMovementTimeDilationMixin { + @ModifyVariable(method = "setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V", at = @At("HEAD"), argsOnly = true, ordinal = 0) + private Vec3 antarchy$scaleTimeDilatedVelocityChange(Vec3 nextMovement) { + Entity entity = (Entity) (Object) this; + if (!(entity instanceof TimeDilationEntityAccess access) + || access.antarchy$isInTimeDilationMove()) { + return nextMovement; + } + + double rate = TimeDilationApi.getRate(entity); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return nextMovement; + } + + Vec3 currentMovement = entity.getDeltaMovement(); + double y = currentMovement.y + (nextMovement.y - currentMovement.y) * rate; + if (nextMovement.y > currentMovement.y && nextMovement.y > 0.0D && (entity.onGround() || currentMovement.y <= 0.0D)) { + y = nextMovement.y; + } + return new Vec3( + currentMovement.x + (nextMovement.x - currentMovement.x) * rate, + y, + currentMovement.z + (nextMovement.z - currentMovement.z) * rate + ); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityMoveTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityMoveTimeDilationMixin.java new file mode 100644 index 00000000..e109cbd3 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityMoveTimeDilationMixin.java @@ -0,0 +1,40 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.craisinlord.antarchy.content.time.TimeDilationEntityAccess; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.MoverType; +import net.minecraft.world.phys.Vec3; +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.ModifyVariable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Entity.class) +public abstract class EntityMoveTimeDilationMixin { + @Inject(method = "move", at = @At("HEAD")) + private void antarchy$beginTimeDilationMove(MoverType moverType, Vec3 movement, CallbackInfo ci) { + if (this instanceof TimeDilationEntityAccess access) { + access.antarchy$setInTimeDilationMove(true); + } + } + + @Inject(method = "move", at = @At("RETURN")) + private void antarchy$endTimeDilationMove(MoverType moverType, Vec3 movement, CallbackInfo ci) { + if (this instanceof TimeDilationEntityAccess access) { + access.antarchy$setInTimeDilationMove(false); + } + } + + @ModifyVariable(method = "move", at = @At("HEAD"), argsOnly = true, ordinal = 0) + private Vec3 antarchy$scaleTimeDilatedMovement(Vec3 movement) { + Entity entity = (Entity) (Object) this; + double rate = TimeDilationApi.getRate(entity); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return movement; + } + return movement.scale(rate); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityTimeDilationStateMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityTimeDilationStateMixin.java new file mode 100644 index 00000000..bc170b3d --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/EntityTimeDilationStateMixin.java @@ -0,0 +1,60 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationEntityAccess; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import java.util.HashMap; +import java.util.Map; +import net.minecraft.world.entity.Entity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; + +@Mixin(Entity.class) +public abstract class EntityTimeDilationStateMixin implements TimeDilationEntityAccess { + @Unique + private double antarchy$timeDilationRate = TimeDilationMath.NORMAL_RATE; + @Unique + private final Map antarchy$timeDilationTimerProgress = new HashMap<>(); + @Unique + private boolean antarchy$inTimeDilationMove; + + @Override + public double antarchy$getTimeDilationRate() { + return this.antarchy$timeDilationRate; + } + + @Override + public void antarchy$setTimeDilationRate(double rate) { + this.antarchy$timeDilationRate = TimeDilationMath.clampRate(rate); + if (this.antarchy$timeDilationRate >= TimeDilationMath.NORMAL_RATE) { + this.antarchy$timeDilationTimerProgress.clear(); + } + } + + @Override + public boolean antarchy$consumeTimeDilationTick(String timerKey, double rate) { + double clampedRate = TimeDilationMath.clampRate(rate); + if (clampedRate >= TimeDilationMath.NORMAL_RATE) { + return true; + } + + double progress = this.antarchy$timeDilationTimerProgress.getOrDefault(timerKey, 0.0D) + clampedRate; + int wholeTicks = (int) Math.floor(progress + 1.0E-9D); + if (wholeTicks <= 0) { + this.antarchy$timeDilationTimerProgress.put(timerKey, progress); + return false; + } + + this.antarchy$timeDilationTimerProgress.put(timerKey, progress - wholeTicks); + return true; + } + + @Override + public boolean antarchy$isInTimeDilationMove() { + return this.antarchy$inTimeDilationMove; + } + + @Override + public void antarchy$setInTimeDilationMove(boolean inMove) { + this.antarchy$inTimeDilationMove = inMove; + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityRendererAnimationTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityRendererAnimationTimeDilationMixin.java new file mode 100644 index 00000000..01a279aa --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityRendererAnimationTimeDilationMixin.java @@ -0,0 +1,16 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.client.ClientTimeDilationTicker; +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import net.minecraft.client.renderer.entity.LivingEntityRenderer; +import net.minecraft.world.entity.LivingEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(LivingEntityRenderer.class) +public abstract class LivingEntityRendererAnimationTimeDilationMixin { + @ModifyReturnValue(method = "getBob", at = @At("RETURN")) + private float antarchy$slowIdleAnimation(float bob, LivingEntity entity, float partialTick) { + return ClientTimeDilationTicker.dilateAnimationTime(entity, bob); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityTimeDilationMixin.java new file mode 100644 index 00000000..052544c3 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LivingEntityTimeDilationMixin.java @@ -0,0 +1,54 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +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(LivingEntity.class) +public abstract class LivingEntityTimeDilationMixin { + @Inject(method = "updateSwingTime", at = @At("HEAD"), cancellable = true) + private void antarchy$slowSwingTime(CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (!TimeDilationApi.consumeTick(entity, "living_swing")) { + ci.cancel(); + } + } + + @Inject(method = "tickEffects", at = @At("HEAD"), cancellable = true) + private void antarchy$slowEffectTicks(CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (!TimeDilationApi.consumeTick(entity, "living_effects")) { + ci.cancel(); + } + } + + @Inject(method = "updatingUsingItem", at = @At("HEAD"), cancellable = true) + private void antarchy$slowUsingItem(CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (!TimeDilationApi.consumeTick(entity, "living_using_item")) { + ci.cancel(); + } + } + + @Inject(method = "swing(Lnet/minecraft/world/InteractionHand;Z)V", at = @At("HEAD"), cancellable = true) + private void antarchy$slowSwingStart(InteractionHand hand, boolean updateSelf, CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (!TimeDilationApi.consumeTick(entity, "living_swing_start")) { + ci.cancel(); + } + } + + @Inject(method = "updateUsingItem", at = @At("HEAD"), cancellable = true) + private void antarchy$slowItemUseProgress(ItemStack stack, CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (!TimeDilationApi.consumeTick(entity, "living_item_use_progress")) { + ci.cancel(); + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LookControlTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LookControlTimeDilationMixin.java new file mode 100644 index 00000000..a45e7459 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/LookControlTimeDilationMixin.java @@ -0,0 +1,26 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.ai.control.LookControl; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(LookControl.class) +public abstract class LookControlTimeDilationMixin { + @Shadow + protected Mob mob; + + @ModifyReturnValue(method = "rotateTowards", at = @At("RETURN")) + private float antarchy$slowLookTurn(float result, float from, float to, float maxAngle) { + double rate = TimeDilationApi.getRate(this.mob); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return result; + } + return from + (float) (Mth.wrapDegrees(result - from) * rate); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MeleeAttackGoalTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MeleeAttackGoalTimeDilationMixin.java new file mode 100644 index 00000000..91464218 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MeleeAttackGoalTimeDilationMixin.java @@ -0,0 +1,26 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.minecraft.world.entity.PathfinderMob; +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; +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; + +@Mixin(MeleeAttackGoal.class) +public abstract class MeleeAttackGoalTimeDilationMixin { + @Shadow + @Final + protected PathfinderMob mob; + + @Shadow + private int ticksUntilNextAttack; + + @Inject(method = "resetAttackCooldown", at = @At("RETURN")) + private void antarchy$scaleMeleeCooldown(CallbackInfo ci) { + this.ticksUntilNextAttack = TimeDilationApi.scaleCooldownTicks(this.mob, this.ticksUntilNextAttack); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MobAttackTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MobAttackTimeDilationMixin.java new file mode 100644 index 00000000..70c04436 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/MobAttackTimeDilationMixin.java @@ -0,0 +1,35 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.Mob; +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(Mob.class) +public abstract class MobAttackTimeDilationMixin { + @Unique + private long antarchy$nextAttackTick = Long.MIN_VALUE; + + @Inject(method = "doHurtTarget", at = @At("HEAD"), cancellable = true) + private void antarchy$rateLimitAttack(Entity target, CallbackInfoReturnable cir) { + Mob mob = (Mob) (Object) this; + if (mob.level().isClientSide) { + return; + } + double rate = TimeDilationApi.getRate(mob); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return; + } + long now = mob.level().getGameTime(); + if (now < this.antarchy$nextAttackTick) { + cir.setReturnValue(false); + return; + } + this.antarchy$nextAttackTick = now + TimeDilationApi.scaleCooldownTicks(mob, 20); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ParticleTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ParticleTimeDilationMixin.java new file mode 100644 index 00000000..c1630961 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ParticleTimeDilationMixin.java @@ -0,0 +1,64 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.client.ClientTimeDilationTicker; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import net.minecraft.client.particle.Particle; +import org.objectweb.asm.Opcodes; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArgs; +import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.invoke.arg.Args; + +@Mixin(Particle.class) +public abstract class ParticleTimeDilationMixin { + @Shadow + protected int age; + @Shadow + protected double x; + @Shadow + protected double y; + @Shadow + protected double z; + + @Unique + private double antarchy$ageProgress; + + @Unique + private double antarchy$sampleRate() { + return ClientTimeDilationTicker.rateAt(this.x, this.y, this.z); + } + + @ModifyArgs( + method = "tick", + at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/Particle;move(DDD)V") + ) + private void antarchy$slowParticleMovement(Args args) { + double rate = this.antarchy$sampleRate(); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return; + } + args.set(0, (Double) args.get(0) * rate); + args.set(1, (Double) args.get(1) * rate); + args.set(2, (Double) args.get(2) * rate); + } + + @Redirect( + method = "tick", + at = @At(value = "FIELD", target = "Lnet/minecraft/client/particle/Particle;age:I", opcode = Opcodes.PUTFIELD) + ) + private void antarchy$slowParticleAge(Particle self, int nextAge) { + double rate = this.antarchy$sampleRate(); + if (rate >= TimeDilationMath.NORMAL_RATE) { + this.age = nextAge; + return; + } + this.antarchy$ageProgress += rate; + if (this.antarchy$ageProgress >= 1.0D) { + this.antarchy$ageProgress -= 1.0D; + this.age = nextAge; + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/PrimedTntTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/PrimedTntTimeDilationMixin.java new file mode 100644 index 00000000..cd680d01 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/PrimedTntTimeDilationMixin.java @@ -0,0 +1,21 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.minecraft.world.entity.item.PrimedTnt; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(PrimedTnt.class) +public abstract class PrimedTntTimeDilationMixin { + @WrapOperation( + method = "tick", + at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/item/PrimedTnt;setFuse(I)V") + ) + private void antarchy$slowFuse(PrimedTnt tnt, int fuse, Operation original) { + if (TimeDilationApi.consumeTick(tnt, "primed_tnt_fuse")) { + original.call(tnt, fuse); + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ProjectileMovementTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ProjectileMovementTimeDilationMixin.java new file mode 100644 index 00000000..90a3dd7d --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/ProjectileMovementTimeDilationMixin.java @@ -0,0 +1,65 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.projectile.AbstractArrow; +import net.minecraft.world.entity.projectile.AbstractHurtingProjectile; +import net.minecraft.world.entity.projectile.ThrowableProjectile; +import net.minecraft.world.phys.Vec3; +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.CallbackInfo; + +@Mixin({AbstractArrow.class, ThrowableProjectile.class, AbstractHurtingProjectile.class}) +public abstract class ProjectileMovementTimeDilationMixin { + @Unique + private Vec3 antarchy$preTickPos; + @Unique + private Vec3 antarchy$preTickDelta; + + @Inject(method = "tick", at = @At("HEAD")) + private void antarchy$recordPreTickMotion(CallbackInfo ci) { + Entity entity = (Entity) (Object) this; + if (TimeDilationApi.getRate(entity) < TimeDilationMath.NORMAL_RATE) { + this.antarchy$preTickPos = entity.position(); + this.antarchy$preTickDelta = entity.getDeltaMovement(); + } else { + this.antarchy$preTickPos = null; + this.antarchy$preTickDelta = null; + } + } + + @Inject(method = "tick", at = @At("RETURN")) + private void antarchy$scaleTickDisplacement(CallbackInfo ci) { + Vec3 pre = this.antarchy$preTickPos; + Vec3 preDelta = this.antarchy$preTickDelta; + this.antarchy$preTickPos = null; + this.antarchy$preTickDelta = null; + if (pre == null) { + return; + } + + Entity entity = (Entity) (Object) this; + if (entity.isRemoved()) { + return; + } + double rate = TimeDilationApi.getRate(entity); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return; + } + + Vec3 actual = entity.position().subtract(pre); + if (actual.lengthSqr() < 1.0E-12D) { + return; + } + if (preDelta != null && actual.lengthSqr() + 1.0E-9D < preDelta.lengthSqr()) { + return; + } + + Vec3 lerped = pre.add(actual.scale(rate)); + entity.setPos(lerped.x, lerped.y, lerped.z); + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedAttackGoalTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedAttackGoalTimeDilationMixin.java new file mode 100644 index 00000000..1a237829 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedAttackGoalTimeDilationMixin.java @@ -0,0 +1,25 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.ai.goal.RangedAttackGoal; +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; + +@Mixin(RangedAttackGoal.class) +public abstract class RangedAttackGoalTimeDilationMixin { + @Shadow + @Final + private Mob mob; + + @Inject(method = "tick", at = @At("HEAD"), cancellable = true) + private void antarchy$slowRangedGoalTick(CallbackInfo ci) { + if (!TimeDilationApi.consumeTick(this.mob, "ranged_goal_tick")) { + ci.cancel(); + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedBowAttackGoalTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedBowAttackGoalTimeDilationMixin.java new file mode 100644 index 00000000..191bacff --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/RangedBowAttackGoalTimeDilationMixin.java @@ -0,0 +1,29 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.minecraft.world.entity.Mob; +import net.minecraft.world.entity.ai.goal.RangedBowAttackGoal; +import net.minecraft.world.entity.monster.Monster; +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.CallbackInfo; + +@Mixin(RangedBowAttackGoal.class) +public abstract class RangedBowAttackGoalTimeDilationMixin { + @Unique + private Mob antarchy$timeDilationMob; + + @Inject(method = "(Lnet/minecraft/world/entity/monster/Monster;DIF)V", at = @At("RETURN")) + private void antarchy$captureMob(Monster mob, double speedModifier, int attackIntervalMin, float attackRadius, CallbackInfo ci) { + this.antarchy$timeDilationMob = mob; + } + + @Inject(method = "tick", at = @At("HEAD"), cancellable = true) + private void antarchy$slowRangedBowGoalTick(CallbackInfo ci) { + if (this.antarchy$timeDilationMob != null && !TimeDilationApi.consumeTick(this.antarchy$timeDilationMob, "ranged_bow_goal_tick")) { + ci.cancel(); + } + } +} diff --git a/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/SoundEngineTimeDilationMixin.java b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/SoundEngineTimeDilationMixin.java new file mode 100644 index 00000000..2a01eeb2 --- /dev/null +++ b/common-1.21.1/src/main/java/com/craisinlord/antarchy/mixins/time/SoundEngineTimeDilationMixin.java @@ -0,0 +1,21 @@ +package com.craisinlord.antarchy.mixins.time; + +import com.craisinlord.antarchy.content.client.ClientTimeDilationTicker; +import com.craisinlord.antarchy.content.time.TimeDilationMath; +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import net.minecraft.client.resources.sounds.SoundInstance; +import net.minecraft.client.sounds.SoundEngine; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(SoundEngine.class) +public abstract class SoundEngineTimeDilationMixin { + @ModifyReturnValue(method = "calculatePitch", at = @At("RETURN")) + private float antarchy$dilatePitch(float pitch, SoundInstance sound) { + double rate = ClientTimeDilationTicker.rateAt(sound.getX(), sound.getY(), sound.getZ()); + if (rate >= TimeDilationMath.NORMAL_RATE) { + return pitch; + } + return (float) (pitch * Math.max(TimeDilationMath.MIN_RATE, rate)); + } +} diff --git a/common-1.21.1/src/main/resources/antarchy-common.mixins.json b/common-1.21.1/src/main/resources/antarchy-common.mixins.json index a61735ff..1ada941d 100644 --- a/common-1.21.1/src/main/resources/antarchy-common.mixins.json +++ b/common-1.21.1/src/main/resources/antarchy-common.mixins.json @@ -78,7 +78,18 @@ "gravity.ServerPlayerGravityMixin", "gravity.ThrowableProjectileGravityMixin", "gravity.TrackedEntityAccessor", - "multipart.EntityMultipartLifecycleMixin" + "multipart.EntityMultipartLifecycleMixin", + "time.EntityDeltaMovementTimeDilationMixin", + "time.EntityMoveTimeDilationMixin", + "time.EntityTimeDilationStateMixin", + "time.LivingEntityTimeDilationMixin", + "time.LookControlTimeDilationMixin", + "time.MeleeAttackGoalTimeDilationMixin", + "time.MobAttackTimeDilationMixin", + "time.PrimedTntTimeDilationMixin", + "time.ProjectileMovementTimeDilationMixin", + "time.RangedAttackGoalTimeDilationMixin", + "time.RangedBowAttackGoalTimeDilationMixin" ], "client": [ "client.AbstractMinecartRendererMixin", @@ -110,7 +121,10 @@ "gravity.client.CameraGravityMixin", "gravity.client.ClientPacketListenerGravityMixin", "gravity.client.EntityRenderDispatcherGravityMixin", - "gravity.client.FallingBlockRendererBlockEntityMixin" + "gravity.client.FallingBlockRendererBlockEntityMixin", + "time.LivingEntityRendererAnimationTimeDilationMixin", + "time.ParticleTimeDilationMixin", + "time.SoundEngineTimeDilationMixin" ], "injectors": { "defaultRequire": 1 diff --git a/common-1.21.1/src/main/resources/assets/antarchy/animations/manticore.animation.json b/common-1.21.1/src/main/resources/assets/antarchy/animations/manticore.animation.json new file mode 100644 index 00000000..7daa57bb --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/animations/manticore.animation.json @@ -0,0 +1,3903 @@ +{ + "format_version": "1.8.0", + "animations": { + "render": { + "loop": true, + "bones": { + "jaw": { + "rotation": { + "vector": [57.5, 0, 0] + } + }, + "head": { + "rotation": { + "vector": [-15, 0, 0] + } + }, + "torso": { + "rotation": { + "vector": [7.5, 0, 0] + } + }, + "left_leg": { + "rotation": { + "vector": [0, 0, -10] + }, + "position": { + "vector": [0, 0, 0] + } + }, + "right_leg": { + "rotation": { + "vector": [0, 0, 10] + }, + "position": { + "vector": [0, 0, 0] + } + }, + "back_leg_right": { + "rotation": { + "vector": [0, 0, 5] + } + }, + "right_wing": { + "rotation": { + "vector": [-13.43688, 8.68889, -19.62342] + } + }, + "right_wing2": { + "rotation": { + "vector": [25, 0, 0] + } + }, + "right_wing3": { + "rotation": { + "vector": [0, -55, 0] + } + }, + "left_wing": { + "rotation": { + "vector": [-13.43688, -8.68889, 19.62342] + } + }, + "left_wing2": { + "rotation": { + "vector": [25, 0, 0] + } + }, + "left_wing3": { + "rotation": { + "vector": [0, 55, 0] + } + }, + "back_leg_left": { + "rotation": { + "vector": [0, 0, -5] + } + }, + "tail": { + "rotation": { + "vector": [12.5, 0, 0] + } + }, + "tail2": { + "rotation": { + "vector": [40, 0, 0] + } + }, + "tail3": { + "rotation": { + "vector": [60, 0, 0] + } + } + } + }, + "idle": { + "loop": true, + "animation_length": 2, + "bones": { + "torso": { + "rotation": { + "0.0": { + "post": { + "vector": [-0.21, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [-1, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [1, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [-0.21, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [0.29, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [2.5, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [-2.5, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0.29, 0, -5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -1, -0.75] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [0, -1, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [0.29, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [2.5, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [-2.5, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0.29, 0, 5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -1, -0.75] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [0, -1, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "post": { + "vector": [0.29, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [2.5, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [-2.5, 0, 5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0.29, 0, 5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -1, -0.75] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [0, -1, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [-2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.5": { + "post": { + "vector": [0, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, -1.84] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [0, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, 0, -1.84] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [-2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.5": { + "post": { + "vector": [0, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing2": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 1.84] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "post": { + "vector": [0, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, 0, 1.84] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "post": { + "vector": [0.29, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [2.5, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [-2.5, 0, -5] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0.29, 0, -5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -1, -0.75] + }, + "lerp_mode": "catmullrom" + }, + "1.4583": { + "post": { + "vector": [0, -1, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "2.0": { + "post": { + "vector": [0, -1, -0.06] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "vector": [30, 0, 0] + } + }, + "tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [41.25, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.75": { + "vector": [42.5, 0, 0] + }, + "2.0": { + "vector": [41.25, 0, 0] + } + } + }, + "tail3": { + "rotation": { + "vector": [52.5, 0, 0] + } + } + } + }, + "walk": { + "loop": true, + "animation_length": 1, + "bones": { + "head": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 1.02, -3.06] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, 2.5, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [0, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, -2.5, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.9167": { + "post": { + "vector": [0, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 1.02, -3.06] + }, + "lerp_mode": "catmullrom" + } + } + }, + "torso": { + "rotation": { + "0.0": { + "post": { + "vector": [2.5, -2.5, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-2.5, 0, 2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [2.5, 2.5, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [-2.5, 0, -2.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [2.5, -2.5, 2.5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -0.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -0.5, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "vector": [-20, 0, 0] + }, + "0.5": { + "vector": [20, 0, 0] + }, + "0.7083": { + "pre": { + "vector": [13.33, 0, 0] + }, + "post": { + "vector": [13.33, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [-20, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, -1, -5] + }, + "0.125": { + "vector": [0, -0.25, -2.5] + }, + "0.25": { + "vector": [0, 0, 0] + }, + "0.375": { + "vector": [0, -0.25, 2.5] + }, + "0.5": { + "vector": [0, -1, 5] + }, + "0.625": { + "pre": { + "vector": [0, 1.25, 4.12] + }, + "post": { + "vector": [0, 1.25, 4.12] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [0, 4, -3.67] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, -1, -5] + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "vector": [20, 0, 0] + }, + "0.2083": { + "pre": { + "vector": [13.33, 0, 0] + }, + "post": { + "vector": [13.33, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [-20, 0, 0] + }, + "1.0": { + "vector": [20, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, -1, 5] + }, + "0.125": { + "pre": { + "vector": [0, 1.25, 4.12] + }, + "post": { + "vector": [0, 1.25, 4.12] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 4, -3.67] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, -1, -5] + }, + "0.625": { + "vector": [0, -0.25, -2.5] + }, + "0.75": { + "vector": [0, 0, 0] + }, + "0.875": { + "vector": [0, -0.25, 2.5] + }, + "1.0": { + "vector": [0, -1, 5] + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "post": { + "vector": [3.61, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "vector": [-20, 0, 0] + }, + "0.7083": { + "vector": [20, 0, 0] + }, + "0.9167": { + "pre": { + "vector": [13.33, 0, 0] + }, + "post": { + "vector": [13.33, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [3.61, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 3.94, -2.41] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [0, 4, -3.67] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "vector": [0, -1, -5] + }, + "0.3333": { + "vector": [0, -0.25, -2.5] + }, + "0.4583": { + "vector": [0, 0, 0] + }, + "0.5833": { + "vector": [0, -0.25, 2.5] + }, + "0.7083": { + "vector": [0, -1, 5] + }, + "0.8333": { + "pre": { + "vector": [0, 1.25, 4.12] + }, + "post": { + "vector": [0, 1.25, 4.12] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 3.94, -2.41] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [32.5, 0, -12.5] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [32.5, 0, -17.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [32.5, 0, -12.5] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing2": { + "rotation": { + "vector": [0, 32.5, -22.5] + } + }, + "right_wing3": { + "rotation": { + "vector": [0, -27.5, 0] + } + }, + "left_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [32.5, 0, 17.5] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [32.5, 0, 12.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [32.5, 0, 17.5] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing2": { + "rotation": { + "vector": [0, -32.5, 22.5] + } + }, + "left_wing3": { + "rotation": { + "vector": [0, 27.5, 0] + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "vector": [3.33, 0, 0] + }, + "0.2083": { + "vector": [20, 0, 0] + }, + "0.4167": { + "pre": { + "vector": [13.33, 0, 0] + }, + "post": { + "vector": [13.33, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [3.61, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [-20, 0, 0] + }, + "1.0": { + "vector": [3.33, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, -0.08, 0.83] + }, + "0.0833": { + "vector": [0, -0.25, 2.5] + }, + "0.2083": { + "vector": [0, -1, 5] + }, + "0.3333": { + "pre": { + "vector": [0, 1.25, 4.12] + }, + "post": { + "vector": [0, 1.25, 4.12] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 3.94, -2.41] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [0, 4, -3.67] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, -1, -5] + }, + "0.8333": { + "vector": [0, -0.25, -2.5] + }, + "0.9583": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -0.08, 0.83] + } + } + }, + "tail": { + "rotation": { + "vector": [30, 0, 0] + } + }, + "tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [41.25, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail3": { + "rotation": { + "vector": [52.5, 0, 0] + } + } + } + }, + "bite": { + "animation_length": 0.5, + "bones": { + "jaw": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [50, 0, 0] + }, + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "head": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [12.5, 0, 0] + }, + "post": { + "vector": [12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + }, + "torso": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.125": { + "pre": { + "vector": [-5, 0, 0] + }, + "post": { + "vector": [-5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "body": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [-2.5, 0, 0] + }, + "post": { + "vector": [-2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, 1, -5] + }, + "post": { + "vector": [0, 1, -5] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, -7] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, -0.07, -5.76] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [10, 0, 0] + }, + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -0.5, 0.25] + }, + "post": { + "vector": [0, -0.5, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -2, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, -3, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [10, 0, 0] + }, + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -0.5, 0.25] + }, + "post": { + "vector": [0, -0.5, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -2, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, -3, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [10, 0, 0] + }, + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -0.5, 0.25] + }, + "post": { + "vector": [0, -0.5, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -2, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, -3, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [10, 0, 0] + }, + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -0.5, 0.25] + }, + "post": { + "vector": [0, -0.5, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -2, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, -3, 0.25] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, -2.5, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "vector": [0, 0, 0] + } + } + } + } + }, + "fly_bite": { + "animation_length": 0.875, + "bones": { + "jaw": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "vector": [0, 0, 0] + }, + "0.3333": { + "pre": { + "vector": [52.5, 0, 0] + }, + "post": { + "vector": [52.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [52.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "body": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [-10, 0, 0] + }, + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-10.63, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, 1, 9] + }, + "post": { + "vector": [0, 1, 9] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 2.06, 11.56] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 3, 7] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 1, -24] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0.32, -22.04] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, -7.5, -35] + }, + "post": { + "vector": [0, -7.5, -35] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 10, -35] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 20, 32.5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -7.5, -25] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, -7.5, -25] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "right_wing2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "pre": { + "vector": [0, -27.5, 0] + }, + "post": { + "vector": [0, -27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, 40, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [0, -27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [0, -7.97, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "right_wing3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, 47.5, 0] + }, + "post": { + "vector": [0, 47.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, -37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, 57.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [0, -35, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "left_wing": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, 7.5, 35] + }, + "post": { + "vector": [0, 7.5, 35] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -10, 35] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -20, -32.5] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, 7.5, 25] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 7.5, 25] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "left_wing2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.2083": { + "pre": { + "vector": [0, 27.5, 0] + }, + "post": { + "vector": [0, 27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -40, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [0, 27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [0, 7.97, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + }, + "left_wing3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -47.5, 0] + }, + "post": { + "vector": [0, -47.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, -57.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [0, 35, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "vector": [0, 0, 0] + } + } + } + } + }, + "sting": { + "animation_length": 0.6667, + "bones": { + "head": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.1667": { + "pre": { + "vector": [-10, 0, 0] + }, + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [-10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + }, + "torso": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [10, 0, 0] + }, + "post": { + "vector": [10, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [4.86, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, -3, 0.75] + }, + "post": { + "vector": [0, -3, 0.75] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -4, 3] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, -4, 3] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -1.61, 1.02] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [-12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [-7.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 0, 4] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 2] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [-12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [-7.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 0, 4] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 3, 2] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [-12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [-7.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 0, 4] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 2] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [-12.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [-7.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 0, 4] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [0, 0, 6] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 2] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [-17.5, 0, 0] + }, + "post": { + "vector": [-17.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [77.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [40, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + }, + "tail2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [22.5, 0, 0] + }, + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [5.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [30, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [9.04, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + }, + "tail3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [22.5, 0, 0] + }, + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [-32.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [-38.26, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + }, + "sting": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [22.5, 0, 0] + }, + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-90, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "vector": [0, 0, 0] + } + } + } + } + }, + "fly_start": { + "animation_length": 0.7083, + "bones": { + "head": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [27.5, 0, 0] + }, + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [8.3, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [1.15, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + } + }, + "body": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [-17.5, 0, 0] + }, + "post": { + "vector": [-17.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [-20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [-15.95, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [-8.55, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [-1.94, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "vector": [0, 0, 0] + }, + "0.125": { + "pre": { + "vector": [0, 21, 0] + }, + "post": { + "vector": [0, 21, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 26, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 26, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [0, 21.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [0, 18, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "vector": [0, 0, -5] + }, + "0.0833": { + "pre": { + "vector": [32.5, 0, 0] + }, + "post": { + "vector": [32.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [15, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [21.1, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [37.5, 0, 0] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "vector": [0, 0, 5] + }, + "0.0833": { + "pre": { + "vector": [32.5, 0, 0] + }, + "post": { + "vector": [32.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [15, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [37.5, 0, 0] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "vector": [0, 0, 5] + }, + "0.0833": { + "pre": { + "vector": [22.5, 0, 0] + }, + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [21.25, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5833": { + "post": { + "vector": [25, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [37.5, 0, 0] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [46.25, 12.5, -33.75] + }, + "post": { + "vector": [46.25, 12.5, -33.75] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [52.5, 15, -47.5] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [66.54, 17.33, -44.44] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [72.5, 20, -15] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [72.5, 20, -15] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -7.5, 0] + }, + "post": { + "vector": [0, -7.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, 5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + } + }, + "right_wing3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, 45, 0] + }, + "post": { + "vector": [0, 45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 46.56, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, -37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + } + }, + "left_wing": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [46.25, -12.5, 33.75] + }, + "post": { + "vector": [46.25, -12.5, 33.75] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [52.5, -15, 47.5] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [66.54, -17.33, 44.44] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [72.5, -20, 15] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "post": { + "vector": [72.5, -20, 15] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing2": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, 7.5, 0] + }, + "post": { + "vector": [0, 7.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, -5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + } + }, + "left_wing3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [0, -45, 0] + }, + "post": { + "vector": [0, -45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -46.56, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, 37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 27.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [0, 0, 0] + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "vector": [0, 0, -5] + }, + "0.0417": { + "pre": { + "vector": [22.5, 0, 0] + }, + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.3333": { + "post": { + "vector": [21.25, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [25, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7083": { + "vector": [37.5, 0, 0] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "vector": [30, 0, 0] + } + }, + "tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [41.25, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail3": { + "rotation": { + "vector": [52.5, 0, 0] + } + } + } + }, + "fly": { + "loop": true, + "animation_length": 1, + "bones": { + "head": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5417": { + "post": { + "vector": [-2.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.7917": { + "post": { + "vector": [-5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 18, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 22.44, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4583": { + "post": { + "vector": [0, 23, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.6667": { + "post": { + "vector": [0, 20, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "post": { + "vector": [0, 11.74, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [72.5, 20, -15] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [80, 25, -60] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [62.03, 48.91, -46.72] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [25, 62.5, 17.5] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [25, 32.5, 17.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [72.5, 20, -15] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing2": { + "rotation": { + "0.0": { + "vector": [0, 32.5, 0] + }, + "0.0833": { + "pre": { + "vector": [0, 45, 0] + }, + "post": { + "vector": [0, 45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, 17.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [0, 30, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, 32.5, 0] + } + } + }, + "right_wing3": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 52.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -35, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, -65, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, -30, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "post": { + "vector": [0, 29.38, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, 52.5, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [72.5, -20, 15] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [80, -25, 60] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [62.03, -48.91, 46.72] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [25, -62.5, -17.5] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [25, -32.5, -17.5] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [72.5, -20, 15] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing2": { + "rotation": { + "0.0": { + "vector": [0, -32.5, 0] + }, + "0.0833": { + "pre": { + "vector": [0, -45, 0] + }, + "post": { + "vector": [0, -45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, -17.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 45, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.8333": { + "post": { + "vector": [0, -30, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "vector": [0, -32.5, 0] + } + } + }, + "left_wing3": { + "rotation": { + "0.0": { + "post": { + "vector": [0, -52.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 35, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.5": { + "post": { + "vector": [0, 65, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [0, 30, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.875": { + "post": { + "vector": [0, -29.38, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [0, -52.5, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [27.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.75": { + "post": { + "vector": [50, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "0.0": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [20, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.625": { + "post": { + "vector": [30, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "1.0": { + "post": { + "vector": [22.5, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [41.25, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail3": { + "rotation": { + "vector": [52.5, 0, 0] + } + } + } + }, + "fly_land": { + "animation_length": 0.4167, + "bones": { + "head": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "body": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [15, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2917": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 18, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, -4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_leg": { + "rotation": { + "0.0": { + "vector": [37.5, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [-37.5, 0, 0] + }, + "post": { + "vector": [-37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [-13.44, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, -5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [0, 4, 0] + }, + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [0, 5.41, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_leg": { + "rotation": { + "0.0": { + "vector": [37.5, 0, 0] + }, + "0.0833": { + "pre": { + "vector": [-37.5, 0, 0] + }, + "post": { + "vector": [-37.5, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.1667": { + "post": { + "vector": [-13.44, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [0, 0, 5] + }, + "lerp_mode": "catmullrom" + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.125": { + "pre": { + "vector": [0, 4, 0] + }, + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 5.41, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.4167": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_right": { + "rotation": { + "0.0": { + "vector": [37.5, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [-35, 0, 0] + }, + "post": { + "vector": [-35, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "vector": [0, 0, -5] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 5.52, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [72.5, 20, -15] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [72.5, 15, 40] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [80, 2.5, -25] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [55.47, 0.47, -24.06] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "right_wing2": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "right_wing3": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [0, -52.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, 37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, -10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing": { + "rotation": { + "0.0": { + "post": { + "vector": [72.5, -20, 15] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [72.5, -15, -40] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [80, -2.5, 25] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [55.47, -0.47, 24.06] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "left_wing2": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "left_wing3": { + "rotation": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0417": { + "post": { + "vector": [0, 52.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.0833": { + "post": { + "vector": [0, -37.5, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 10, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "back_leg_left": { + "rotation": { + "0.0": { + "vector": [37.5, 0, 0] + }, + "0.0417": { + "pre": { + "vector": [-35, 0, 0] + }, + "post": { + "vector": [-35, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "vector": [0, 0, -5] + } + }, + "position": { + "0.0": { + "post": { + "vector": [0, 0, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.125": { + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.2083": { + "post": { + "vector": [0, 5.52, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.25": { + "post": { + "vector": [0, 4, 0] + }, + "lerp_mode": "catmullrom" + }, + "0.375": { + "post": { + "vector": [0, -1, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail": { + "rotation": { + "vector": [30, 0, 0] + } + }, + "tail2": { + "rotation": { + "0.0": { + "post": { + "vector": [41.25, 0, 0] + }, + "lerp_mode": "catmullrom" + } + } + }, + "tail3": { + "rotation": { + "vector": [52.5, 0, 0] + } + } + } + } + } +} \ No newline at end of file diff --git a/common-1.21.1/src/main/resources/assets/antarchy/blockstates/vortex_lens.json b/common-1.21.1/src/main/resources/assets/antarchy/blockstates/vortex_lens.json index ea422b3a..c2102b8a 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/blockstates/vortex_lens.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/blockstates/vortex_lens.json @@ -1,16 +1,33 @@ { "variants": { - "facing=up,powered=false": { "model": "antarchy:block/vortex_lens" }, - "facing=up,powered=true": { "model": "antarchy:block/vortex_lens_on" }, - "facing=down,powered=false": { "model": "antarchy:block/vortex_lens", "x": 180 }, - "facing=down,powered=true": { "model": "antarchy:block/vortex_lens_on", "x": 180 }, - "facing=north,powered=false": { "model": "antarchy:block/vortex_lens", "x": 90 }, - "facing=north,powered=true": { "model": "antarchy:block/vortex_lens_on", "x": 90 }, - "facing=south,powered=false": { "model": "antarchy:block/vortex_lens", "x": 270 }, - "facing=south,powered=true": { "model": "antarchy:block/vortex_lens_on", "x": 270 }, - "facing=west,powered=false": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 270 }, - "facing=west,powered=true": { "model": "antarchy:block/vortex_lens_on", "x": 90, "y": 270 }, - "facing=east,powered=false": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 90 }, - "facing=east,powered=true": { "model": "antarchy:block/vortex_lens_on", "x": 90, "y": 90 } + "facing=up,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens" }, + "facing=up,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens" }, + "facing=up,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on" }, + "facing=up,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone" }, + + "facing=down,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens", "x": 180 }, + "facing=down,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens", "x": 180 }, + "facing=down,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on", "x": 180 }, + "facing=down,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone", "x": 180 }, + + "facing=north,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens", "x": 90 }, + "facing=north,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens", "x": 90 }, + "facing=north,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on", "x": 90 }, + "facing=north,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone", "x": 90 }, + + "facing=south,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens", "x": 270 }, + "facing=south,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens", "x": 270 }, + "facing=south,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on", "x": 270 }, + "facing=south,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone", "x": 270 }, + + "facing=west,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 270 }, + "facing=west,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 270 }, + "facing=west,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on", "x": 90, "y": 270 }, + "facing=west,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone", "x": 90, "y": 270 }, + + "facing=east,powered=false,pushing=false": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 90 }, + "facing=east,powered=false,pushing=true": { "model": "antarchy:block/vortex_lens", "x": 90, "y": 90 }, + "facing=east,powered=true,pushing=false": { "model": "antarchy:block/vortex_lens_on", "x": 90, "y": 90 }, + "facing=east,powered=true,pushing=true": { "model": "antarchy:block/vortex_lens_on_bluestone", "x": 90, "y": 90 } } } diff --git a/common-1.21.1/src/main/resources/assets/antarchy/geo/manticore.geo.json b/common-1.21.1/src/main/resources/assets/antarchy/geo/manticore.geo.json new file mode 100644 index 00000000..aead1ae8 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/geo/manticore.geo.json @@ -0,0 +1,177 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 256, + "texture_height": 256, + "visible_bounds_width": 12, + "visible_bounds_height": 5.5, + "visible_bounds_offset": [0, 2.25, 0] + }, + "bones": [ + { + "name": "Menticore", + "pivot": [0, 0, 0] + }, + { + "name": "body", + "parent": "Menticore", + "pivot": [0, 17, 2.7] + }, + { + "name": "back_leg_right", + "parent": "body", + "pivot": [-7.5, 17, 13.75], + "cubes": [ + {"origin": [-11, 10, 7], "size": [7, 11, 5], "uv": [95, 26], "mirror": true}, + {"origin": [-11, 0, 12], "size": [7, 21, 8], "uv": [46, 83], "mirror": true} + ] + }, + { + "name": "back_leg_left", + "parent": "body", + "pivot": [7.5, 17, 13.75], + "cubes": [ + {"origin": [4, 10, 7], "size": [7, 11, 5], "uv": [95, 26]}, + {"origin": [4, 0, 12], "size": [7, 21, 8], "uv": [46, 83]} + ] + }, + { + "name": "left_leg", + "parent": "body", + "pivot": [7.5, 17.5, -9], + "cubes": [ + {"origin": [4, 0, -13], "size": [7, 21, 8], "uv": [16, 83]} + ] + }, + { + "name": "right_leg", + "parent": "body", + "pivot": [-7.5, 17.5, -9], + "cubes": [ + {"origin": [-11, 0, -13], "size": [7, 21, 8], "uv": [16, 83], "mirror": true} + ] + }, + { + "name": "torso", + "parent": "body", + "pivot": [0, 27, 3], + "cubes": [ + {"origin": [-8.5, 12, -15], "size": [17, 22, 22], "uv": [0, 0]}, + {"origin": [-8.5, 16, 7], "size": [17, 18, 14], "uv": [76, 44]} + ] + }, + { + "name": "head", + "parent": "torso", + "pivot": [0, 27, -7.025], + "cubes": [ + {"origin": [-2.85, 31, -27.025], "size": [1, 1, 0], "uv": [76, 76]}, + {"origin": [-10.5, 18, -9], "size": [21, 22, 6], "uv": [0, 151]}, + {"origin": [-11.5, 17, -22], "size": [23, 24, 15], "uv": [0, 44]}, + {"origin": [-5, 24, -32.5], "size": [10, 6, 6], "uv": [78, 0]}, + {"origin": [-5, 18, -32.25], "size": [2, 6, 3], "uv": [78, 27]}, + {"origin": [3, 18, -32.25], "size": [2, 6, 3], "uv": [0, 83]}, + {"origin": [-7.5, 22, -27], "size": [15, 14, 8], "uv": [76, 76]}, + {"origin": [3.025, 31, -27.025], "size": [1, 1, 0], "uv": [76, 76], "mirror": true}, + {"origin": [-11.499, 17, -7], "size": [0, 24, 2], "uv": [12, 81]}, + {"origin": [11.499, 17, -7], "size": [0, 24, 2], "uv": [12, 81], "mirror": true}, + {"origin": [-11.5, 41, -7], "size": [23, 0, 2], "uv": [76, 42]} + ] + }, + { + "name": "jaw", + "parent": "head", + "pivot": [0, 24, -27], + "cubes": [ + {"origin": [-4, 22, -32], "size": [8, 2, 5], "uv": [78, 12]}, + {"origin": [-3, 19, -32], "size": [6, 3, 5], "uv": [78, 19]} + ] + }, + { + "name": "right_wing", + "parent": "torso", + "pivot": [-8.75, 26.375, -1], + "cubes": [ + {"origin": [-12.5, 25, -3], "size": [4, 17, 4], "uv": [56, 1], "mirror": true} + ] + }, + { + "name": "right_wing2", + "parent": "right_wing", + "pivot": [-12.5, 40.5, -1], + "cubes": [ + {"origin": [-34.5, 25, -1], "size": [22, 39, 0], "uv": [0, 112], "mirror": true} + ] + }, + { + "name": "right_wing3", + "parent": "right_wing2", + "pivot": [-34.5, 44.5, -1], + "cubes": [ + {"origin": [-72.5, 25, -1], "size": [38, 39, 0], "uv": [44, 112], "mirror": true} + ] + }, + { + "name": "left_wing", + "parent": "torso", + "pivot": [8.75, 26.375, -1], + "cubes": [ + {"origin": [8.5, 25, -3], "size": [4, 17, 4], "uv": [56, 1]} + ] + }, + { + "name": "left_wing2", + "parent": "left_wing", + "pivot": [12.5, 40.5, -1], + "cubes": [ + {"origin": [12.5, 25, -1], "size": [22, 39, 0], "uv": [0, 112]} + ] + }, + { + "name": "left_wing3", + "parent": "left_wing2", + "pivot": [34.5, 44.5, -1], + "cubes": [ + {"origin": [34.5, 25, -1], "size": [38, 39, 0], "uv": [44, 112]} + ] + }, + { + "name": "tail", + "parent": "torso", + "pivot": [0, 29, 21], + "cubes": [ + {"origin": [-3.5, 27, 21], "size": [7, 7, 14], "uv": [54, 151]} + ] + }, + { + "name": "tail2", + "parent": "tail", + "pivot": [0, 27, 35], + "cubes": [ + {"origin": [-4.5, 27, 35], "size": [9, 7, 23], "uv": [99, 81]} + ] + }, + { + "name": "tail3", + "parent": "tail2", + "pivot": [0, 27, 58], + "cubes": [ + {"origin": [-3.5, 27, 58], "size": [7, 7, 23], "uv": [114, 0]} + ] + }, + { + "name": "sting", + "parent": "tail3", + "pivot": [0, 34, 75], + "cubes": [ + {"origin": [-3.5, 34, 69], "size": [7, 10, 12], "inflate": 0.01, "uv": [124, 34]}, + {"origin": [-0.5, 44, 69], "size": [0, 10, 6], "uv": [124, 30]} + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/common-1.21.1/src/main/resources/assets/antarchy/lang/en_us.json b/common-1.21.1/src/main/resources/assets/antarchy/lang/en_us.json index 27fd3ee1..3a43397e 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/lang/en_us.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/lang/en_us.json @@ -236,6 +236,7 @@ "block.antarchy.bluestone_ore": "Bluestone Ore", "block.antarchy.bluestone_block": "Bluestone Block", "block.antarchy.vortex_lens": "Vortex Lens", + "tooltip.antarchy.vortex_lens": "Redstone power sucks entities into its beam; Bluestone power blasts them away. Stronger signal, bigger vortex.", "block.antarchy.bluestone_repeater": "Bluestone Repeater", "block.antarchy.bluestone_comparator": "Bluestone Comparator", "block.antarchy.bluestone_torch": "Bluestone Torch", @@ -527,8 +528,8 @@ "tooltip.antarchy.blood_crystal_katana.dash": "Reaches distant targets you look at; a full swing grants brief immunity.", "tooltip.antarchy.blood_crystal_katana.trail": "Leaves a crimson trail behind you.", "item.antarchy.eye_of_the_storm": "Eye of the Storm", - "tooltip.antarchy.eye_of_the_storm.updraft": "Use to summon a vortex beneath you that flings you skyward.", - "tooltip.antarchy.eye_of_the_storm.surge": "Attack to hurl a vortex that gathers foes, batters them, and flings them back at you.", + "tooltip.antarchy.eye_of_the_storm.updraft": "Use to ride a rising vortex skyward.", + "tooltip.antarchy.eye_of_the_storm.surge": "Attack to hurl a homing tornado that scoops up foes and drags them along.", "item.antarchy.royal_guardian_helmet": "Royal Guardian Helmet", "item.antarchy.royal_guardian_chestplate": "Royal Guardian Chestplate", "item.antarchy.royal_guardian_leggings": "Royal Guardian Leggings", @@ -540,7 +541,6 @@ "item.antarchy.royal_assailant_leggings": "Royal Assailant Leggings", "item.antarchy.royal_assailant_boots": "Royal Assailant Boots", "item.antarchy.royal_assailant_battleaxe": "Royal Assailant Battle Axe", - "tooltip.antarchy.royal_guardian_shield": "An upgraded shield fit for a king's guard.", "tooltip.antarchy.royal_assailant_chestplate.invert": "Press the inversion key to toggle inverted gravity on and off.", "tooltip.antarchy.royal_assailant_boots.fall": "Cancels fall damage while falling upward.", "item.antarchy.mantis_claw": "Mantis Claw", @@ -1009,6 +1009,33 @@ "subtitles.antarchy.water_cannon_fire": "Water Cannon fires", "subtitles.antarchy.toreterror_jump_up": "Toreterror jumps", "subtitles.antarchy.toreterror_jump_land": "Toreterror lands", + "subtitles.antarchy.king_idle": "The King rumbles", + "subtitles.antarchy.king_walk": "The King's footfalls", + "subtitles.antarchy.king_fly_loop": "The King's wings beat", + "subtitles.antarchy.king_wing_flap": "The King's wings surge", + "subtitles.antarchy.king_bite": "The King bites", + "subtitles.antarchy.king_stomp": "The King stomps", + "subtitles.antarchy.king_roar": "The King roars", + "subtitles.antarchy.king_hurt": "The King is struck", + "subtitles.antarchy.king_death": "The King falls", + "subtitles.antarchy.king_beam_shoot": "The King fires a beam", + "subtitles.antarchy.king_fireball_shoot": "The King breathes fire", + "subtitles.antarchy.king_decree_cast": "The King pronounces a Decree", + "subtitles.antarchy.queen_idle": "The Queen murmurs", + "subtitles.antarchy.queen_walk": "The Queen's footfalls", + "subtitles.antarchy.queen_fly_loop": "The Queen's wings beat", + "subtitles.antarchy.queen_wing_flap": "The Queen's wings surge", + "subtitles.antarchy.queen_bite": "The Queen bites", + "subtitles.antarchy.queen_stomp": "The Queen stomps", + "subtitles.antarchy.queen_roar": "The Queen roars", + "subtitles.antarchy.queen_hurt": "The Queen is struck", + "subtitles.antarchy.queen_death": "The Queen falls", + "subtitles.antarchy.queen_beam_shoot": "The Queen fires a beam", + "subtitles.antarchy.queen_beam_start": "The Queen's beam charges", + "subtitles.antarchy.queen_beam_loop": "The Queen's beam sweeps", + "subtitles.antarchy.queen_beam_end": "The Queen's beam fades", + "subtitles.antarchy.queen_black_hole_shoot": "The Queen tears open a singularity", + "subtitles.antarchy.queen_cast_shoot": "The Queen casts", "subtitles.antarchy.stinky_fly": "Stinky flies buzz", "item.minecraft.potion.effect.inversion": "Potion of Inversion", "item.minecraft.potion.effect.long_inversion": "Potion of Inversion", @@ -1137,6 +1164,9 @@ "entity.antarchy.hercules_beetle": "Hercules Beetle", "entity.antarchy.prince": "Prince", "entity.antarchy.princess": "Princess", + "entity.antarchy.king": "The King", + "entity.antarchy.queen": "The Queen", + "entity.antarchy.manticore": "Manticore", "entity.antarchy.royal_bolt": "Royal Bolt", "block.antarchy.prince_egg": "Prince Egg", "block.antarchy.princess_egg": "Princess Egg", @@ -1148,6 +1178,11 @@ "item.antarchy.creeping_horror_spawn_egg": "Creeping Horror Spawn Egg", "item.antarchy.lurking_terror_spawn_egg": "Lurking Terror Spawn Egg", "item.antarchy.hercules_beetle_spawn_egg": "Hercules Beetle Spawn Egg", + "item.antarchy.king_spawn_egg": "King Spawn Egg", + "item.antarchy.queen_spawn_egg": "Queen Spawn Egg", + "item.antarchy.manticore_spawn_egg": "Manticore Spawn Egg", + "item.antarchy.prince_spawn_egg": "Prince Spawn Egg", + "item.antarchy.princess_spawn_egg": "Princess Spawn Egg", "item.antarchy.chitin": "Chitin", "block.antarchy.polished_broodstone": "Polished Broodstone", "block.antarchy.chiseled_broodstone": "Chiseled Broodstone", diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens.json b/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens.json index 341ec447..2e97d9f3 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens.json @@ -1,6 +1,7 @@ { "format_version": "1.21.11", "credit": "Made with Blockbench", + "render_type": "translucent", "texture_size": [64, 64], "textures": { "0": "antarchy:block/vortex_lens/vortex_lens_off", diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens_on_bluestone.json b/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens_on_bluestone.json new file mode 100644 index 00000000..60c76dff --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/block/vortex_lens_on_bluestone.json @@ -0,0 +1,7 @@ +{ + "parent": "antarchy:block/vortex_lens", + "textures": { + "0": "antarchy:block/vortex_lens/vortex_lens_on_bluestone", + "particle": "antarchy:block/vortex_lens/vortex_lens_on_bluestone" + } +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/eye_of_the_storm_held_geo.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/eye_of_the_storm_held_geo.json index 5774eca1..e1215b44 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/models/item/eye_of_the_storm_held_geo.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/eye_of_the_storm_held_geo.json @@ -5,7 +5,7 @@ "rotation": [ 0, 0, - -90 + 0 ], "translation": [ -5.25, @@ -22,7 +22,7 @@ "rotation": [ 0, 0, - -90 + 0 ], "translation": [ -5.25, diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/king_spawn_egg.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/king_spawn_egg.json new file mode 100644 index 00000000..ddd15597 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/king_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/manticore_spawn_egg.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/manticore_spawn_egg.json new file mode 100644 index 00000000..ddd15597 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/manticore_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/prince_spawn_egg.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/prince_spawn_egg.json new file mode 100644 index 00000000..ddd15597 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/prince_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/princess_spawn_egg.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/princess_spawn_egg.json new file mode 100644 index 00000000..ddd15597 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/princess_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/queen_spawn_egg.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/queen_spawn_egg.json new file mode 100644 index 00000000..ddd15597 --- /dev/null +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/queen_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/common-1.21.1/src/main/resources/assets/antarchy/models/item/royal_guardian_sword_held.json b/common-1.21.1/src/main/resources/assets/antarchy/models/item/royal_guardian_sword_held.json index fb2f7bd5..902ad1dc 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/models/item/royal_guardian_sword_held.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/models/item/royal_guardian_sword_held.json @@ -629,7 +629,7 @@ { "from": [ 5.5, - -6, + 0, 8 ], "to": [ @@ -706,7 +706,7 @@ { "from": [ 6, - -6, + 0, 7.5 ], "to": [ @@ -937,7 +937,7 @@ { "from": [ 9.5, - -6, + 0, 8 ], "to": [ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds.json b/common-1.21.1/src/main/resources/assets/antarchy/sounds.json index 993749b1..9b18c956 100644 --- a/common-1.21.1/src/main/resources/assets/antarchy/sounds.json +++ b/common-1.21.1/src/main/resources/assets/antarchy/sounds.json @@ -2676,5 +2676,269 @@ "name": "antarchy:mob/jerry/adult_attack3" } ] + }, + "king_idle": { + "subtitle": "subtitles.antarchy.king_idle", + "sounds": [ + { + "name": "antarchy:mob/king/idle_1" + }, + { + "name": "antarchy:mob/king/idle_2" + }, + { + "name": "antarchy:mob/king/idle_3" + } + ] + }, + "king_walk": { + "subtitle": "subtitles.antarchy.king_walk", + "sounds": [ + { + "name": "antarchy:mob/king/walk_1" + }, + { + "name": "antarchy:mob/king/walk_2" + }, + { + "name": "antarchy:mob/king/walk_3" + } + ] + }, + "king_fly_loop": { + "subtitle": "subtitles.antarchy.king_fly_loop", + "sounds": [ + { + "name": "antarchy:mob/king/fly_loop_1" + }, + { + "name": "antarchy:mob/king/fly_loop_2" + } + ] + }, + "king_wing_flap": { + "subtitle": "subtitles.antarchy.king_wing_flap", + "sounds": [ + { + "name": "antarchy:mob/king/wing_flap" + } + ] + }, + "king_bite": { + "subtitle": "subtitles.antarchy.king_bite", + "sounds": [ + { + "name": "antarchy:mob/king/bite_1" + }, + { + "name": "antarchy:mob/king/bite_2" + } + ] + }, + "king_stomp": { + "subtitle": "subtitles.antarchy.king_stomp", + "sounds": [ + { + "name": "antarchy:mob/king/stomp" + } + ] + }, + "king_roar": { + "subtitle": "subtitles.antarchy.king_roar", + "sounds": [ + { + "name": "antarchy:mob/king/roar" + } + ] + }, + "king_hurt": { + "subtitle": "subtitles.antarchy.king_hurt", + "sounds": [ + { + "name": "antarchy:mob/king/hurt_1" + }, + { + "name": "antarchy:mob/king/hurt_2" + }, + { + "name": "antarchy:mob/king/hurt_3" + } + ] + }, + "king_death": { + "subtitle": "subtitles.antarchy.king_death", + "sounds": [ + { + "name": "antarchy:mob/king/death" + } + ] + }, + "king_beam_shoot": { + "subtitle": "subtitles.antarchy.king_beam_shoot", + "sounds": [ + { + "name": "antarchy:mob/king/laser_shoot" + } + ] + }, + "king_fireball_shoot": { + "subtitle": "subtitles.antarchy.king_fireball_shoot", + "sounds": [ + { + "name": "antarchy:mob/king/fireball_shoot" + } + ] + }, + "king_decree_cast": { + "subtitle": "subtitles.antarchy.king_decree_cast", + "sounds": [ + { + "name": "antarchy:mob/king/black_hole_shoot" + } + ] + }, + "queen_idle": { + "subtitle": "subtitles.antarchy.queen_idle", + "sounds": [ + { + "name": "antarchy:mob/queen/idle_1" + }, + { + "name": "antarchy:mob/queen/idle_2" + }, + { + "name": "antarchy:mob/queen/idle_3" + } + ] + }, + "queen_walk": { + "subtitle": "subtitles.antarchy.queen_walk", + "sounds": [ + { + "name": "antarchy:mob/queen/walk_1" + }, + { + "name": "antarchy:mob/queen/walk_2" + }, + { + "name": "antarchy:mob/queen/walk_3" + } + ] + }, + "queen_fly_loop": { + "subtitle": "subtitles.antarchy.queen_fly_loop", + "sounds": [ + { + "name": "antarchy:mob/queen/fly_loop_1" + }, + { + "name": "antarchy:mob/queen/fly_loop_2" + } + ] + }, + "queen_wing_flap": { + "subtitle": "subtitles.antarchy.queen_wing_flap", + "sounds": [ + { + "name": "antarchy:mob/queen/wing_flap" + } + ] + }, + "queen_bite": { + "subtitle": "subtitles.antarchy.queen_bite", + "sounds": [ + { + "name": "antarchy:mob/queen/bite_1" + }, + { + "name": "antarchy:mob/queen/bite_2" + } + ] + }, + "queen_stomp": { + "subtitle": "subtitles.antarchy.queen_stomp", + "sounds": [ + { + "name": "antarchy:mob/queen/stomp" + } + ] + }, + "queen_roar": { + "subtitle": "subtitles.antarchy.queen_roar", + "sounds": [ + { + "name": "antarchy:mob/queen/roar" + } + ] + }, + "queen_hurt": { + "subtitle": "subtitles.antarchy.queen_hurt", + "sounds": [ + { + "name": "antarchy:mob/queen/hurt_1" + }, + { + "name": "antarchy:mob/queen/hurt_2" + }, + { + "name": "antarchy:mob/queen/hurt_3" + } + ] + }, + "queen_death": { + "subtitle": "subtitles.antarchy.queen_death", + "sounds": [ + { + "name": "antarchy:mob/queen/death" + } + ] + }, + "queen_beam_shoot": { + "subtitle": "subtitles.antarchy.queen_beam_shoot", + "sounds": [ + { + "name": "antarchy:mob/queen/laser_shoot" + } + ] + }, + "queen_beam_start": { + "subtitle": "subtitles.antarchy.queen_beam_start", + "sounds": [ + { + "name": "antarchy:mob/queen/queen_beam_start" + } + ] + }, + "queen_beam_loop": { + "subtitle": "subtitles.antarchy.queen_beam_loop", + "sounds": [ + { + "name": "antarchy:mob/queen/queen_beam_loop" + } + ] + }, + "queen_beam_end": { + "subtitle": "subtitles.antarchy.queen_beam_end", + "sounds": [ + { + "name": "antarchy:mob/queen/queen_beam_end" + } + ] + }, + "queen_black_hole_shoot": { + "subtitle": "subtitles.antarchy.queen_black_hole_shoot", + "sounds": [ + { + "name": "antarchy:mob/queen/black_hole_shoot" + } + ] + }, + "queen_cast_shoot": { + "subtitle": "subtitles.antarchy.queen_cast_shoot", + "sounds": [ + { + "name": "antarchy:mob/queen/fireball_shoot" + } + ] } } diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_1.ogg new file mode 100644 index 00000000..fdfe41d3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_2.ogg new file mode 100644 index 00000000..e51a52f3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/bite_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/black_hole_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/black_hole_shoot.ogg new file mode 100644 index 00000000..6fbf0fc5 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/black_hole_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/death.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/death.ogg new file mode 100644 index 00000000..d3a7526a Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/death.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fireball_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fireball_shoot.ogg new file mode 100644 index 00000000..8a3cd9d3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fireball_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_1.ogg new file mode 100644 index 00000000..4c691968 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_2.ogg new file mode 100644 index 00000000..86ef6dfc Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/fly_loop_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_1.ogg new file mode 100644 index 00000000..d5d1495c Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_2.ogg new file mode 100644 index 00000000..0b185acb Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_3.ogg new file mode 100644 index 00000000..3ce39f3a Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/hurt_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_1.ogg new file mode 100644 index 00000000..555e69e8 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_2.ogg new file mode 100644 index 00000000..d5355b08 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_3.ogg new file mode 100644 index 00000000..6dd5e572 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/idle_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/laser_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/laser_shoot.ogg new file mode 100644 index 00000000..0889d9b1 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/laser_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/roar.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/roar.ogg new file mode 100644 index 00000000..ea0b2b87 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/roar.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/stomp.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/stomp.ogg new file mode 100644 index 00000000..a99a4efb Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/stomp.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_1.ogg new file mode 100644 index 00000000..74c80257 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_2.ogg new file mode 100644 index 00000000..e52603a5 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_3.ogg new file mode 100644 index 00000000..861adaff Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/walk_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/wing_flap.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/wing_flap.ogg new file mode 100644 index 00000000..89bd7cd0 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/king/wing_flap.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_1.ogg new file mode 100644 index 00000000..fdfe41d3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_2.ogg new file mode 100644 index 00000000..e51a52f3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/bite_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/black_hole_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/black_hole_shoot.ogg new file mode 100644 index 00000000..6fbf0fc5 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/black_hole_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/death.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/death.ogg new file mode 100644 index 00000000..d3a7526a Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/death.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fireball_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fireball_shoot.ogg new file mode 100644 index 00000000..8a3cd9d3 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fireball_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_1.ogg new file mode 100644 index 00000000..4c691968 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_2.ogg new file mode 100644 index 00000000..86ef6dfc Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/fly_loop_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_1.ogg new file mode 100644 index 00000000..d5d1495c Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_2.ogg new file mode 100644 index 00000000..0b185acb Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_3.ogg new file mode 100644 index 00000000..3ce39f3a Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/hurt_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_1.ogg new file mode 100644 index 00000000..555e69e8 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_2.ogg new file mode 100644 index 00000000..d5355b08 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_3.ogg new file mode 100644 index 00000000..6dd5e572 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/idle_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/laser_shoot.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/laser_shoot.ogg new file mode 100644 index 00000000..0889d9b1 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/laser_shoot.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_end.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_end.ogg new file mode 100644 index 00000000..e65e0b0d Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_end.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_loop.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_loop.ogg new file mode 100644 index 00000000..39d5a606 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_loop.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_start.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_start.ogg new file mode 100644 index 00000000..75bb6463 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/queen_beam_start.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/roar.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/roar.ogg new file mode 100644 index 00000000..ea0b2b87 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/roar.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/stomp.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/stomp.ogg new file mode 100644 index 00000000..a99a4efb Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/stomp.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_1.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_1.ogg new file mode 100644 index 00000000..74c80257 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_1.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_2.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_2.ogg new file mode 100644 index 00000000..e52603a5 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_2.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_3.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_3.ogg new file mode 100644 index 00000000..861adaff Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/walk_3.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/wing_flap.ogg b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/wing_flap.ogg new file mode 100644 index 00000000..89bd7cd0 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/sounds/mob/queen/wing_flap.ogg differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/block/vortex_lens/vortex_lens_on_bluestone.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/block/vortex_lens/vortex_lens_on_bluestone.png new file mode 100644 index 00000000..9b1ac807 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/block/vortex_lens/vortex_lens_on_bluestone.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_1.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_1.png new file mode 100644 index 00000000..8262c0c2 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_1.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_2.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_2.png new file mode 100644 index 00000000..b6877cf9 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_end_2.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_inner.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_inner.png new file mode 100644 index 00000000..04c70a60 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_inner.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_outer.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_outer.png new file mode 100644 index 00000000..0bc2be3a Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/ice_beam_outer.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/king.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/king.png index 76de805a..8e2d262a 100644 Binary files a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/king.png and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/king/king.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/manticore.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/manticore.png new file mode 100644 index 00000000..63794925 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/manticore.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen.png index ff9d0535..cf671104 100644 Binary files a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen.png and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_1.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_1.png new file mode 100644 index 00000000..c3f6118e Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_1.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_2.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_2.png new file mode 100644 index 00000000..f93fca80 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_end_2.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_inner.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_inner.png new file mode 100644 index 00000000..7658c7b8 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_inner.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_outer.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_outer.png new file mode 100644 index 00000000..74143aa6 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/entity/queen/queen_beam_outer.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_background.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_background.png new file mode 100644 index 00000000..63e1f5ee Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_background.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_progress.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_progress.png new file mode 100644 index 00000000..039eb71c Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/king_progress.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_background.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_background.png new file mode 100644 index 00000000..d00943de Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_background.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_progress.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_progress.png new file mode 100644 index 00000000..44d7f25b Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/healthbars/queen_progress.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/king.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/king.png new file mode 100644 index 00000000..e38eec7c Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/king.png differ diff --git a/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/queen.png b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/queen.png new file mode 100644 index 00000000..529ab677 Binary files /dev/null and b/common-1.21.1/src/main/resources/assets/antarchy/textures/gui/boss_bars/queen.png differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/recipe/big_bertha_blade.json b/common-1.21.1/src/main/resources/data/antarchy/recipe/big_bertha_blade.json index b887a7b6..a571bd07 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/recipe/big_bertha_blade.json +++ b/common-1.21.1/src/main/resources/data/antarchy/recipe/big_bertha_blade.json @@ -23,7 +23,7 @@ "item": "antarchy:cloud_shark_fin" }, "F": { - "item": "antarchy:kraken_tentacle" + "item": "antarchy:vortex_charge" }, "G": { "item": "antarchy:kraken_tooth" diff --git a/common-1.21.1/src/main/resources/data/antarchy/recipe/vortex_lens.json b/common-1.21.1/src/main/resources/data/antarchy/recipe/vortex_lens.json new file mode 100644 index 00000000..dcc8bd5f --- /dev/null +++ b/common-1.21.1/src/main/resources/data/antarchy/recipe/vortex_lens.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "TTT", + "TVT", + "SRS" + ], + "key": { + "T": { + "item": "minecraft:tinted_glass" + }, + "V": { + "item": "antarchy:vortex_charge" + }, + "S": { + "item": "minecraft:stone" + }, + "R": { + "item": "minecraft:redstone" + } + }, + "result": { + "id": "antarchy:vortex_lens", + "count": 1 + } +} diff --git a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree1.nbt b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree1.nbt index a0cce133..0428fd2c 100644 Binary files a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree1.nbt and b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree1.nbt differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree2.nbt b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree2.nbt index 85da1adb..d1083259 100644 Binary files a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree2.nbt and b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree2.nbt differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree3.nbt b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree3.nbt index c75e3a6a..3de2728b 100644 Binary files a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree3.nbt and b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree3.nbt differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree4.nbt b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree4.nbt index 48dd2256..6eb3f458 100644 Binary files a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree4.nbt and b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree4.nbt differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree_bottom.nbt b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree_bottom.nbt index 131788a4..d8ef4332 100644 Binary files a/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree_bottom.nbt and b/common-1.21.1/src/main/resources/data/antarchy/structure/kings_tree/kings_tree_bottom.nbt differ diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/critter_cage_blacklist.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/critter_cage_blacklist.json index 5d341ba2..bc3a319e 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/critter_cage_blacklist.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/critter_cage_blacklist.json @@ -1,4 +1,7 @@ { "replace": false, - "values": [] + "values": [ + "antarchy:king", + "antarchy:queen" + ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/frog_glimmer_no_eat.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/frog_glimmer_no_eat.json index abe11627..976b13a2 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/frog_glimmer_no_eat.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/frog_glimmer_no_eat.json @@ -4,6 +4,8 @@ "antarchy:toreterror", "antarchy:emperor_scorpion", "antarchy:alpha_mantis", - "antarchy:brutalfly" + "antarchy:brutalfly", + "antarchy:king", + "antarchy:queen" ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/gravity_gun_blacklist.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/gravity_gun_blacklist.json index 5ec6d6a2..e89c1547 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/gravity_gun_blacklist.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/gravity_gun_blacklist.json @@ -3,6 +3,8 @@ "values": [ "minecraft:wither", "minecraft:ender_dragon", - "antarchy:kraken" + "antarchy:kraken", + "antarchy:king", + "antarchy:queen" ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/lucid_anchor_immune.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/lucid_anchor_immune.json index 5d341ba2..bc3a319e 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/lucid_anchor_immune.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/lucid_anchor_immune.json @@ -1,4 +1,7 @@ { "replace": false, - "values": [] + "values": [ + "antarchy:king", + "antarchy:queen" + ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/scorpion_whip_blacklist.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/scorpion_whip_blacklist.json index 5d341ba2..bc3a319e 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/scorpion_whip_blacklist.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/scorpion_whip_blacklist.json @@ -1,4 +1,7 @@ { "replace": false, - "values": [] + "values": [ + "antarchy:king", + "antarchy:queen" + ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/size_changing_immune.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/size_changing_immune.json index 5d341ba2..bc3a319e 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/size_changing_immune.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/size_changing_immune.json @@ -1,4 +1,7 @@ { "replace": false, - "values": [] + "values": [ + "antarchy:king", + "antarchy:queen" + ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/tiger_eye_detection_immune.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/tiger_eye_detection_immune.json index 6becc3cd..2217668a 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/tiger_eye_detection_immune.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/tiger_eye_detection_immune.json @@ -4,6 +4,8 @@ "antarchy:kraken", "antarchy:nightmare", "antarchy:toreterror", - "antarchy:emperor_scorpion" + "antarchy:emperor_scorpion", + "antarchy:king", + "antarchy:queen" ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/wind_vortex_immune.json b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/wind_vortex_immune.json index 273b51c8..80cd88ae 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/wind_vortex_immune.json +++ b/common-1.21.1/src/main/resources/data/antarchy/tags/entity_type/wind_vortex_immune.json @@ -2,6 +2,8 @@ "replace": false, "values": [ "antarchy:vortex", - "minecraft:breeze" + "minecraft:breeze", + "antarchy:king", + "antarchy:queen" ] } diff --git a/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/nadir_forest.json b/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/nadir_forest.json index 4e41a512..9e7f5018 100644 --- a/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/nadir_forest.json +++ b/common-1.21.1/src/main/resources/data/antarchy/worldgen/biome/nadir_forest.json @@ -56,7 +56,14 @@ ], "creature_spawn_probability": 0.08, "spawners": { - "monster": [], + "monster": [ + { + "type": "antarchy:manticore", + "weight": 12, + "minCount": 1, + "maxCount": 2 + } + ], "creature": [ { "type": "antarchy:bed_bug", diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java index 304f6b26..37d28a6c 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java @@ -125,6 +125,7 @@ public final class AntarchyFabricContent { AntarchyFabricMisc.RECIPE_SERIALIZERS.register(); AntarchyFabricCreativeModeTabs.CREATIVE_MODE_TABS.register(); DispenserBlock.registerBehavior(AntarchyFabricItems.VORTEX_CHARGE.get(), new com.craisinlord.antarchy.content.dispenser.VortexChargeDispenseBehavior()); + DispenserBlock.registerBehavior(AntarchyFabricItems.EYE_OF_THE_STORM.get(), new com.craisinlord.antarchy.content.dispenser.EyeOfTheStormDispenseBehavior()); PermanentPortalType.bindBlocks( () -> AntarchyFabricBlocks.MOSSY_OURANWOOD_WOOD.get(), @@ -304,7 +305,15 @@ public final class AntarchyFabricContent { AntarchyFabricSounds.BLOOD_CRYSTAL_KATANA_DASH, AntarchyFabricSounds.BLOOD_CRYSTAL_ARMOR_EQUIP, AntarchyFabricSounds.BLOODGLASS_WARD_HEART_BREAK, - AntarchyFabricSounds.BLOODGLASS_WARD_HEART_REGEN + AntarchyFabricSounds.BLOODGLASS_WARD_HEART_REGEN, + AntarchyFabricSounds.KING_IDLE, + AntarchyFabricSounds.KING_HURT, + AntarchyFabricSounds.KING_DEATH, + AntarchyFabricSounds.KING_BITE, + AntarchyFabricSounds.QUEEN_IDLE, + AntarchyFabricSounds.QUEEN_HURT, + AntarchyFabricSounds.QUEEN_DEATH, + AntarchyFabricSounds.QUEEN_BITE ); AntarchyObjects.setOctopusBomb(AntarchyFabricEntities.OCTOPUS_BOMB); @@ -316,15 +325,21 @@ public final class AntarchyFabricContent { AntarchyObjects.setLucid(AntarchyFabricEntities.LUCID); AntarchyObjects.setVortex(AntarchyFabricEntities.VORTEX); AntarchyObjects.setWindVortex(() -> AntarchyFabricEntities.WIND_VORTEX.get()); + AntarchyObjects.setTimeDilationField(() -> AntarchyFabricEntities.TIME_DILATION_FIELD.get()); AntarchyObjects.setVortexChargeProjectile(() -> AntarchyFabricEntities.VORTEX_CHARGE_PROJECTILE.get()); AntarchyObjects.setPrince(() -> AntarchyFabricEntities.PRINCE.get()); AntarchyObjects.setPrincess(() -> AntarchyFabricEntities.PRINCESS.get()); + AntarchyObjects.setKing(() -> AntarchyFabricEntities.KING.get()); + AntarchyObjects.setQueen(() -> AntarchyFabricEntities.QUEEN.get()); + AntarchyObjects.setManticore(() -> AntarchyFabricEntities.MANTICORE.get()); AntarchyObjects.setRoyalBolt(() -> AntarchyFabricEntities.ROYAL_BOLT.get()); AntarchyObjects.setPrinceEgg(() -> AntarchyFabricBlocks.PRINCE_EGG.get()); AntarchyObjects.setPrincessEgg(() -> AntarchyFabricBlocks.PRINCESS_EGG.get()); AntarchyObjects.setRoyalEggBlockEntity(() -> AntarchyFabricBlocks.ROYAL_EGG_BLOCK_ENTITY.get()); AntarchyObjects.setVortexLens(() -> AntarchyFabricBlocks.VORTEX_LENS.get()); AntarchyObjects.setVortexLensBlockEntity(() -> AntarchyFabricBlocks.VORTEX_LENS_BLOCK_ENTITY.get()); + AntarchyObjects.setDimensionalTearMarker(() -> AntarchyFabricBlocks.DIMENSIONAL_TEAR_MARKER.get()); + AntarchyObjects.setDimensionalTearMarkerBlockEntity(() -> AntarchyFabricBlocks.DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY.get()); AntarchyObjects.setKrakensGraspTrident(AntarchyFabricEntities.KRAKENS_GRASP_TRIDENT); AntarchyObjects.setLotus(() -> AntarchyFabricBlocks.LOTUS.get()); AntarchyObjects.setKrakenTentacle(() -> AntarchyFabricItems.KRAKEN_TENTACLE.get()); @@ -490,6 +505,9 @@ public final class AntarchyFabricContent { TigerEyeCamouflageSync.setSyncSelfAndTracking(AntarchyFabricNetworking::syncTigerEyeCamouflage); BloodCrystalKatanaItem.setTrailCallback(AntarchyFabricNetworking::syncKatanaTrail); com.craisinlord.antarchy.content.gravity.AntarchyGravityApi.setSyncDispatcher(AntarchyFabricNetworking::syncGravityEntity); + com.craisinlord.antarchy.content.time.TimeDilationApi.setSyncDispatcher( + com.craisinlord.antarchy.fabric.network.AntarchyFabricTimeDilationNetworking::syncRate + ); AntarchyFabricEvents.register(); if (isSupportedInfinityLoaded()) { diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricEvents.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricEvents.java index 0262ce50..7a9c66a0 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricEvents.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricEvents.java @@ -20,6 +20,8 @@ import com.craisinlord.antarchy.content.portal.PermanentPortalManager; import com.craisinlord.antarchy.content.command.CavarynCommand; import com.craisinlord.antarchy.content.command.CaterpillarCommand; import com.craisinlord.antarchy.content.command.GravityCommand; +import com.craisinlord.antarchy.content.time.TimeDilationCommand; +import com.craisinlord.antarchy.content.time.TimeDilationManager; import com.craisinlord.antarchy.content.item.MinersDreamExcavationManager; import com.craisinlord.antarchy.content.item.WormHookTetherManager; import com.craisinlord.antarchy.content.worldgen.thoraxis.ThoraxisUndersideManager; @@ -67,6 +69,7 @@ public final class AntarchyFabricEvents { CavarynCommand.register(dispatcher); GravityCommand.register(dispatcher); CaterpillarCommand.register(dispatcher); + TimeDilationCommand.register(dispatcher); }); DispenserBlock.registerBehavior(AntarchyFabricItems.SQUIDZOOKA.get(), new SquidzookaDispenseBehavior()); @@ -167,6 +170,7 @@ public final class AntarchyFabricEvents { WormHookTetherManager.tick(player); } } + TimeDilationManager.tickServer(server); invertedPlayers.retainAll(activeThisTick); }); } diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java index 86d57b71..642c23e6 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java @@ -145,6 +145,7 @@ public final class AntarchyFabricClientBootstrap { EntityRendererRegistry.register(AntarchyFabricEntities.LUCID_PEARL_PROJECTILE.get(), ThrownItemRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.VORTEX_CHARGE_PROJECTILE.get(), ThrownItemRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.WIND_VORTEX.get(), WindVortexRenderer::new); + EntityRendererRegistry.register(AntarchyFabricEntities.TIME_DILATION_FIELD.get(), TimeDilationFieldRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.CRITTER_CAGE_PROJECTILE.get(), ThrownItemRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.WORM_HOOK_PROJECTILE.get(), ThrownItemRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.HUSH_PROJECTILE.get(), HushProjectileRenderer::new); @@ -163,9 +164,12 @@ public final class AntarchyFabricClientBootstrap { EntityRendererRegistry.register(AntarchyFabricEntities.TERMITE.get(), TermiteRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), CreepingHorrorRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), LurkingTerrorRenderer::new); + EntityRendererRegistry.register(AntarchyFabricEntities.MANTICORE.get(), com.craisinlord.antarchy.content.client.renderer.ManticoreRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), HerculesBeetleRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.PRINCE.get(), com.craisinlord.antarchy.content.client.renderer.RoyalMountRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.PRINCESS.get(), com.craisinlord.antarchy.content.client.renderer.RoyalMountRenderer::new); + EntityRendererRegistry.register(AntarchyFabricEntities.KING.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBossRenderer::new); + EntityRendererRegistry.register(AntarchyFabricEntities.QUEEN.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBossRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.ROYAL_BOLT.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBoltRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.JERRY.get(), JerryRenderer::new); EntityRendererRegistry.register(AntarchyFabricEntities.JUMPY_BUG.get(), JumpyBugRenderer::new); @@ -531,6 +535,9 @@ public final class AntarchyFabricClientBootstrap { HerculesBeetleClientHandler.tick(); RoyalMountClientHandler.tick(); SizeRaySoundHandler.tick(client); + if (client.level != null) { + com.craisinlord.antarchy.content.client.ClientTimeDilationTicker.tick(client.level); + } }); BigBerthaClientHandler.register(); diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricClientNetworking.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricClientNetworking.java index 1702a7bc..640e1533 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricClientNetworking.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricClientNetworking.java @@ -67,5 +67,6 @@ public final class AntarchyFabricClientNetworking { context.client().execute(() -> AntarchyFabricNetworking.triggerImpactShake(payload))); ClientPlayNetworking.registerGlobalReceiver(HordeIntensityPayload.TYPE, (payload, context) -> context.client().execute(() -> HordeClientState.update(payload.intensity()))); + AntarchyFabricTimeDilationNetworking.registerClientReceiver(); } } diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricNetworking.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricNetworking.java index f10b50d9..21486b17 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricNetworking.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricNetworking.java @@ -84,6 +84,7 @@ public final class AntarchyFabricNetworking { PayloadTypeRegistry.playS2C().register(HerculesBeetleImpactShakePayload.TYPE, HerculesBeetleImpactShakePayload.STREAM_CODEC); PayloadTypeRegistry.playS2C().register(ImpactShakePayload.TYPE, ImpactShakePayload.STREAM_CODEC); PayloadTypeRegistry.playS2C().register(HordeIntensityPayload.TYPE, HordeIntensityPayload.STREAM_CODEC); + AntarchyFabricTimeDilationNetworking.registerPayloadTypes(); PayloadTypeRegistry.playC2S().register(GravityGunPrimaryPayload.TYPE, GravityGunPrimaryPayload.STREAM_CODEC); PayloadTypeRegistry.playC2S().register(PortalGunPrimaryPayload.TYPE, PortalGunPrimaryPayload.STREAM_CODEC); diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricTimeDilationNetworking.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricTimeDilationNetworking.java new file mode 100644 index 00000000..987ad980 --- /dev/null +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/network/AntarchyFabricTimeDilationNetworking.java @@ -0,0 +1,37 @@ +package com.craisinlord.antarchy.fabric.network; + +import com.craisinlord.antarchy.content.network.TimeDilationRatePayload; +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; +import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; + +public final class AntarchyFabricTimeDilationNetworking { + private AntarchyFabricTimeDilationNetworking() { + } + + public static void registerPayloadTypes() { + PayloadTypeRegistry.playS2C().register(TimeDilationRatePayload.TYPE, TimeDilationRatePayload.STREAM_CODEC); + } + + public static void registerClientReceiver() { + ClientPlayNetworking.registerGlobalReceiver(TimeDilationRatePayload.TYPE, (payload, context) -> + context.client().execute(() -> handleRate(context.player(), payload))); + } + + public static void syncRate(ServerPlayer player, double rate) { + ServerPlayNetworking.send(player, new TimeDilationRatePayload(player.getId(), rate)); + } + + private static void handleRate(Entity contextPlayer, TimeDilationRatePayload payload) { + Entity entity = contextPlayer.level().getEntity(payload.entityId()); + if (entity == null && contextPlayer.getId() == payload.entityId()) { + entity = contextPlayer; + } + if (entity != null) { + TimeDilationApi.applySyncedRate(entity, payload.rate()); + } + } +} diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java index 31ad67dd..fb0aa267 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java @@ -9,6 +9,8 @@ import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity; import com.craisinlord.antarchy.content.block.entity.DreamCampfireBlockEntity; import com.craisinlord.antarchy.content.block.entity.HushweedBlockEntity; import com.craisinlord.antarchy.content.block.entity.LucidAnchorBlockEntity; +import com.craisinlord.antarchy.content.block.DimensionalTearMarkerBlock; +import com.craisinlord.antarchy.content.block.entity.DimensionalTearMarkerBlockEntity; import com.craisinlord.antarchy.content.block.entity.PortalGunPortalBaseBlockEntity; import com.craisinlord.antarchy.content.block.entity.PortalGunPortalMasterBlockEntity; import com.craisinlord.antarchy.content.block.entity.PotentNyxiteBlockEntity; @@ -163,6 +165,10 @@ public final class AntarchyFabricBlocks { () -> new PortalGunPortalMasterBlock(AntarchyFabricBlocks::portalGunPortalMasterBlockEntityType, portalProperties())); public static final DeferredBlock PORTAL_GUN_PORTAL_BASE = BLOCKS.register("portal_gun_portal_base", () -> new PortalGunPortalBaseBlock(AntarchyFabricBlocks::portalGunPortalBaseBlockEntityType, portalProperties())); + public static final DeferredBlock DIMENSIONAL_TEAR_MARKER = BLOCKS.register("dimensional_tear_marker", + () -> new DimensionalTearMarkerBlock(AntarchyFabricBlocks::dimensionalTearMarkerBlockEntityType, + BlockBehaviour.Properties.of().noCollission().noOcclusion().noLootTable().instabreak() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY))); public static final DeferredBlock OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", @@ -315,8 +321,8 @@ public final class AntarchyFabricBlocks { () -> new net.minecraft.world.level.block.ButtonBlock(net.minecraft.world.level.block.state.properties.BlockSetType.JUNGLE, 30, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_BUTTON))); - public static final DeferredBlock NADIR_VEIL = BLOCKS.register("nadir_veil", - () -> new net.minecraft.world.level.block.Block(BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_LEAVES).sound(net.minecraft.world.level.block.SoundType.SLIME_BLOCK).noOcclusion())); + public static final DeferredBlock NADIR_VEIL = BLOCKS.register("nadir_veil", + () -> new com.craisinlord.antarchy.content.block.NadirVeilBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_LEAVES).sound(net.minecraft.world.level.block.SoundType.SLIME_BLOCK).noOcclusion())); public static final DeferredBlock NADIR_SAPLING = BLOCKS.register("nadir_sapling", @@ -1073,7 +1079,7 @@ public final class AntarchyFabricBlocks { () -> new BluestoneBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.REDSTONE_BLOCK).mapColor(MapColor.COLOR_BLUE))); public static final DeferredBlock VORTEX_LENS = BLOCKS.register("vortex_lens", () -> new VortexLensBlock(AntarchyFabricBlocks::vortexLensBlockEntityType, - BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BLOCK).mapColor(MapColor.COLOR_GREEN).strength(3.0F, 6.0F).requiresCorrectToolForDrops())); + BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BLOCK).mapColor(MapColor.COLOR_GREEN).strength(3.0F, 6.0F).requiresCorrectToolForDrops().noOcclusion())); public static final DeferredBlock BLUESTONE_REPEATER = BLOCKS.register("bluestone_repeater", () -> new BluestoneRepeaterBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.REPEATER).mapColor(MapColor.COLOR_BLUE).noCollission())); public static final DeferredBlock BLUESTONE_COMPARATOR = BLOCKS.register("bluestone_comparator", @@ -1486,6 +1492,11 @@ public final class AntarchyFabricBlocks { (pos, state) -> new PortalGunPortalBaseBlockEntity(pos, state, AntarchyFabricBlocks::portalGunPortalBaseBlockEntityType), PORTAL_GUN_PORTAL_BASE.get() ).build(null)); + public static final DeferredHolder, BlockEntityType> DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("dimensional_tear_marker", + () -> BlockEntityType.Builder.of( + (pos, state) -> new DimensionalTearMarkerBlockEntity(pos, state, AntarchyFabricBlocks::dimensionalTearMarkerBlockEntityType), + DIMENSIONAL_TEAR_MARKER.get() + ).build(null)); @@ -1529,6 +1540,10 @@ public final class AntarchyFabricBlocks { return PORTAL_GUN_PORTAL_BASE_BLOCK_ENTITY.get(); } + private static BlockEntityType dimensionalTearMarkerBlockEntityType() { + return DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY.get(); + } + private static Block smallBloodCrystalBudBlock() { diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java index d4ad6a42..e91dda50 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java @@ -22,6 +22,7 @@ import com.craisinlord.antarchy.content.entity.lucid.LucidEyeProjectileEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexChargeProjectileEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexEntity; import com.craisinlord.antarchy.content.entity.vortex.WindVortexEntity; +import com.craisinlord.antarchy.content.time.TimeDilationFieldEntity; import com.craisinlord.antarchy.content.entity.HushProjectileEntity; import com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity; import com.craisinlord.antarchy.content.entity.WormHookProjectileEntity; @@ -466,6 +467,14 @@ public final class AntarchyFabricEntities { .updateInterval(1) .build("wind_vortex")); + public static final DeferredHolder, EntityType> TIME_DILATION_FIELD = ENTITY_TYPES.register("time_dilation_field", + () -> EntityType.Builder.of(TimeDilationFieldEntity::new, MobCategory.MISC) + .sized(0.5F, 0.5F) + .clientTrackingRange(16) + .updateInterval(20) + .fireImmune() + .build("time_dilation_field")); + public static final DeferredHolder, EntityType> LUCID_BOLT = ENTITY_TYPES.register("lucid_bolt", () -> EntityType.Builder.of(LucidBoltEntity::new, MobCategory.MISC) @@ -590,6 +599,12 @@ public final class AntarchyFabricEntities { .clientTrackingRange(10) .build("lurking_terror")); + public static final DeferredHolder, EntityType> MANTICORE = ENTITY_TYPES.register("manticore", + () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.ManticoreEntity::new, MobCategory.MONSTER) + .sized(1.95F, 2.0F) + .clientTrackingRange(10) + .build("manticore")); + public static final DeferredHolder, EntityType> JERRY = ENTITY_TYPES.register("jerry", () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.JerryEntity::new, MobCategory.MONSTER) @@ -633,6 +648,20 @@ public final class AntarchyFabricEntities { .updateInterval(3) .fireImmune().build("princess")); + public static final DeferredHolder, EntityType> KING = ENTITY_TYPES.register("king", + () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.KingEntity::new, MobCategory.MONSTER) + .sized(com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_WIDTH, com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_HEIGHT) + .clientTrackingRange(16) + .updateInterval(3) + .fireImmune().build("king")); + + public static final DeferredHolder, EntityType> QUEEN = ENTITY_TYPES.register("queen", + () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.QueenEntity::new, MobCategory.MONSTER) + .sized(com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_WIDTH, com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_HEIGHT) + .clientTrackingRange(16) + .updateInterval(3) + .fireImmune().build("queen")); + public static final DeferredHolder, EntityType> ROYAL_BOLT = ENTITY_TYPES.register("royal_bolt", () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity::new, MobCategory.MISC) .sized(0.4F, 0.4F) diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntityAttributes.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntityAttributes.java index 724e9e59..fb93d88c 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntityAttributes.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntityAttributes.java @@ -94,12 +94,15 @@ public final class AntarchyFabricEntityAttributes { FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.TORETERROR.get(), ToreterrorEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CREEPING_HORROR.get(), com.craisinlord.antarchy.content.entity.CreepingHorrorEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.LURKING_TERROR.get(), com.craisinlord.antarchy.content.entity.LurkingTerrorEntity.createAttributes().build()); + FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.MANTICORE.get(), com.craisinlord.antarchy.content.entity.ManticoreEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.JERRY.get(), com.craisinlord.antarchy.content.entity.JerryEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.CHEEP.get(), com.craisinlord.antarchy.content.entity.CheepEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.DORRIE.get(), com.craisinlord.antarchy.content.entity.DorrieEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.HERCULES_BEETLE.get(), com.craisinlord.antarchy.content.entity.HerculesBeetleEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.PRINCE.get(), com.craisinlord.antarchy.content.entity.royal.PrinceEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.PRINCESS.get(), com.craisinlord.antarchy.content.entity.royal.PrincessEntity.createAttributes().build()); + FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.KING.get(), com.craisinlord.antarchy.content.entity.royal.KingEntity.createAttributes().build()); + FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.QUEEN.get(), com.craisinlord.antarchy.content.entity.royal.QueenEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.OURANWOOD_DEER.get(), com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.GLIMMER.get(), com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(AntarchyFabricEntities.ELKA.get(), com.craisinlord.antarchy.content.entity.ElkaEntity.createAttributes().build()); diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java index 273a6f35..2f89fee0 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java @@ -519,7 +519,8 @@ public final class AntarchyFabricItems { () -> new BluestoneDustItem(AntarchyFabricBlocks.BLUESTONE_WIRE.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BLUESTONE_ORE); public static final DeferredItem BLUESTONE_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BLUESTONE_BLOCK); - public static final DeferredItem VORTEX_LENS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.VORTEX_LENS); + public static final DeferredItem VORTEX_LENS_ITEM = ITEMS.register("vortex_lens", + () -> new VortexLensBlockItem(AntarchyFabricBlocks.VORTEX_LENS.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_REPEATER_ITEM = ITEMS.register("bluestone_repeater", () -> new CeilingPlacementTooltipBlockItem(AntarchyFabricBlocks.BLUESTONE_REPEATER.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_COMPARATOR_ITEM = ITEMS.register("bluestone_comparator", @@ -1629,6 +1630,18 @@ public final class AntarchyFabricItems { public static final DeferredItem BRUTALFLY_SPAWN_EGG = ITEMS.register("brutalfly_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyFabricEntities.BRUTALFLY, 0x4A2214, 0xFF8A1D, new Item.Properties().rarity(Rarity.EPIC))); + public static final DeferredItem KING_SPAWN_EGG = ITEMS.register("king_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyFabricEntities.KING, 0xFFFFFF, 0xD4AF37, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + + public static final DeferredItem QUEEN_SPAWN_EGG = ITEMS.register("queen_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyFabricEntities.QUEEN, 0x080608, 0xB11226, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + + public static final DeferredItem PRINCE_SPAWN_EGG = ITEMS.register("prince_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyFabricEntities.PRINCE, 0xFFFFFF, 0xD4AF37, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + + public static final DeferredItem PRINCESS_SPAWN_EGG = ITEMS.register("princess_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyFabricEntities.PRINCESS, 0x3B0A45, 0xB11226, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + public static final DeferredItem RED_ANT_SPAWN_EGG = ITEMS.register("red_ant_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyFabricEntities.RED_ANT, 0xA31818, 0x2B0909, new Item.Properties())); @@ -1793,6 +1806,9 @@ public final class AntarchyFabricItems { public static final DeferredItem LURKING_TERROR_SPAWN_EGG = ITEMS.register("lurking_terror_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyFabricEntities.LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties())); + public static final DeferredItem MANTICORE_SPAWN_EGG = ITEMS.register("manticore_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyFabricEntities.MANTICORE, 0x8A3B1E, 0x2B1B12, new Item.Properties())); + public static final DeferredItem HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyFabricEntities.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE))); diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java index d4cc4309..f546380e 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java @@ -527,6 +527,35 @@ public final class AntarchyFabricSounds { public static final DeferredHolder ANTIMETAL_STEP = registerSoundEvent("antimetal_step"); public static final DeferredHolder ANTIMETAL_SCAFFOLD = registerSoundEvent("antimetal_scaffold"); + public static final DeferredHolder KING_IDLE = registerSoundEvent("king_idle"); + public static final DeferredHolder KING_WALK = registerSoundEvent("king_walk"); + public static final DeferredHolder KING_FLY_LOOP = registerSoundEvent("king_fly_loop"); + public static final DeferredHolder KING_WING_FLAP = registerSoundEvent("king_wing_flap"); + public static final DeferredHolder KING_BITE = registerSoundEvent("king_bite"); + public static final DeferredHolder KING_STOMP = registerSoundEvent("king_stomp"); + public static final DeferredHolder KING_ROAR = registerSoundEvent("king_roar"); + public static final DeferredHolder KING_HURT = registerSoundEvent("king_hurt"); + public static final DeferredHolder KING_DEATH = registerSoundEvent("king_death"); + public static final DeferredHolder KING_BEAM_SHOOT = registerSoundEvent("king_beam_shoot"); + public static final DeferredHolder KING_FIREBALL_SHOOT = registerSoundEvent("king_fireball_shoot"); + public static final DeferredHolder KING_DECREE_CAST = registerSoundEvent("king_decree_cast"); + + public static final DeferredHolder QUEEN_IDLE = registerSoundEvent("queen_idle"); + public static final DeferredHolder QUEEN_WALK = registerSoundEvent("queen_walk"); + public static final DeferredHolder QUEEN_FLY_LOOP = registerSoundEvent("queen_fly_loop"); + public static final DeferredHolder QUEEN_WING_FLAP = registerSoundEvent("queen_wing_flap"); + public static final DeferredHolder QUEEN_BITE = registerSoundEvent("queen_bite"); + public static final DeferredHolder QUEEN_STOMP = registerSoundEvent("queen_stomp"); + public static final DeferredHolder QUEEN_ROAR = registerSoundEvent("queen_roar"); + public static final DeferredHolder QUEEN_HURT = registerSoundEvent("queen_hurt"); + public static final DeferredHolder QUEEN_DEATH = registerSoundEvent("queen_death"); + public static final DeferredHolder QUEEN_BEAM_SHOOT = registerSoundEvent("queen_beam_shoot"); + public static final DeferredHolder QUEEN_BEAM_START = registerSoundEvent("queen_beam_start"); + public static final DeferredHolder QUEEN_BEAM_LOOP = registerSoundEvent("queen_beam_loop"); + public static final DeferredHolder QUEEN_BEAM_END = registerSoundEvent("queen_beam_end"); + public static final DeferredHolder QUEEN_BLACK_HOLE_SHOOT = registerSoundEvent("queen_black_hole_shoot"); + public static final DeferredHolder QUEEN_CAST_SHOOT = registerSoundEvent("queen_cast_shoot"); + diff --git a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSpawnPlacements.java b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSpawnPlacements.java index 3b11a0c2..37d586da 100644 --- a/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSpawnPlacements.java +++ b/fabric-1.21.1/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSpawnPlacements.java @@ -69,6 +69,7 @@ public final class AntarchyFabricSpawnPlacements { SpawnPlacements.register(AntarchyFabricEntities.TORETERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ToreterrorEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.CREEPING_HORROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.CreepingHorrorEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.LURKING_TERROR.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.LurkingTerrorEntity::canSpawn); + SpawnPlacements.register(AntarchyFabricEntities.MANTICORE.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.ManticoreEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.JERRY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.JerryEntity::canSpawn); SpawnPlacements.register(AntarchyFabricEntities.TERMITE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules); SpawnPlacements.register(AntarchyFabricEntities.ROLLY_POLLY.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyConfigModuleNeoforge.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyConfigModuleNeoforge.java index 89952272..c896593b 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyConfigModuleNeoforge.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyConfigModuleNeoforge.java @@ -136,6 +136,20 @@ public final class AntarchyConfigModuleNeoforge { AntarchySettings.setKrakenBossBarRange(AntarchyMobsConfig.krakenBossBarRange()); AntarchySettings.setKrakenLightningDamagePhaseOne(AntarchyMobsConfig.krakenLightningDamagePhaseOne()); + AntarchySettings.setKingHealth(AntarchyMobsConfig.kingHealth()); + AntarchySettings.setQueenHealth(AntarchyMobsConfig.queenHealth()); + AntarchySettings.setKingAttackDamage(AntarchyMobsConfig.kingAttackDamage()); + AntarchySettings.setQueenAttackDamage(AntarchyMobsConfig.queenAttackDamage()); + AntarchySettings.setRoyalBossArmor(AntarchyMobsConfig.royalBossArmor()); + AntarchySettings.setRoyalBossFollowRange(AntarchyMobsConfig.royalBossFollowRange()); + AntarchySettings.setRoyalBossMovementSpeed(AntarchyMobsConfig.royalBossMovementSpeed()); + AntarchySettings.setRoyalBossKnockbackResistance(AntarchyMobsConfig.royalBossKnockbackResistance()); + AntarchySettings.setRoyalBossStepHeight(AntarchyMobsConfig.royalBossStepHeight()); + AntarchySettings.setRoyalBossMaxSingleHitDamage(AntarchyMobsConfig.royalBossMaxSingleHitDamage()); + AntarchySettings.setRoyalBossBiteReach(AntarchyMobsConfig.royalBossBiteReach()); + AntarchySettings.setRoyalBossBiteDamageMultiplier(AntarchyMobsConfig.royalBossBiteDamageMultiplier()); + AntarchySettings.setRoyalBossBiteCooldownTicks(AntarchyMobsConfig.royalBossBiteCooldownTicks()); + AntarchySettings.setBrutalflyHealth(AntarchyMobsConfig.brutalflyHealth()); AntarchySettings.setBrutalflySwipeDamage(AntarchyMobsConfig.brutalflySwipeDamage()); AntarchySettings.setBrutalflySpitDamage(AntarchyMobsConfig.brutalflySpitDamage()); @@ -268,6 +282,10 @@ public final class AntarchyConfigModuleNeoforge { AntarchySettings.setCreepingHorrorAttackDamage(AntarchyMobsConfig.creepingHorrorAttackDamage()); AntarchySettings.setLurkingTerrorHealth(AntarchyMobsConfig.lurkingTerrorHealth()); AntarchySettings.setLurkingTerrorAttackDamage(AntarchyMobsConfig.lurkingTerrorAttackDamage()); + AntarchySettings.setManticoreHealth(AntarchyMobsConfig.manticoreHealth()); + AntarchySettings.setManticoreAttackDamage(AntarchyMobsConfig.manticoreAttackDamage()); + AntarchySettings.setManticoreStingPoisonTicks(AntarchyMobsConfig.manticoreStingPoisonTicks()); + AntarchySettings.setQueenManticoreCap(AntarchyMobsConfig.queenManticoreCap()); AntarchySettings.setJerryInfantHealth(AntarchyMobsConfig.jerryInfantHealth()); AntarchySettings.setJerryInfantAttackDamage(AntarchyMobsConfig.jerryInfantAttackDamage()); AntarchySettings.setJerryMatureHealth(AntarchyMobsConfig.jerryMatureHealth()); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMiscConfig.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMiscConfig.java index c2881269..ebbf6d9d 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMiscConfig.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMiscConfig.java @@ -148,7 +148,7 @@ public final class AntarchyMiscConfig { // Hoverboard b.push("hoverboard"); - HOVERBOARD_MAX_SPEED = b.comment("Maximum hoverboard speed in blocks/tick while moving forward.").defineInRange("maxSpeed", 3.0D, 0.05D, 6.0D); + HOVERBOARD_MAX_SPEED = b.comment("Maximum hoverboard speed in blocks/tick while moving forward.").defineInRange("maxSpeed", 6.0D, 0.05D, 12.0D); HOVERBOARD_ACCELERATION = b.comment("Hoverboard speed gained per tick while moving forward. Lower values take longer to reach top speed.").defineInRange("acceleration", 0.05D, 0.001D, 1.0D); b.pop(); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMobsConfig.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMobsConfig.java index 8d954e21..86d9465c 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMobsConfig.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyMobsConfig.java @@ -109,6 +109,22 @@ public final class AntarchyMobsConfig { private static final ModConfigSpec.DoubleValue KRAKEN_BOSS_BAR_RANGE; private static final ModConfigSpec.DoubleValue KRAKEN_LIGHTNING_DAMAGE_PHASE_ONE; + // Royal Bosses + + private static final ModConfigSpec.DoubleValue KING_HEALTH; + private static final ModConfigSpec.DoubleValue QUEEN_HEALTH; + private static final ModConfigSpec.DoubleValue KING_ATTACK_DAMAGE; + private static final ModConfigSpec.DoubleValue QUEEN_ATTACK_DAMAGE; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_ARMOR; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_FOLLOW_RANGE; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_MOVEMENT_SPEED; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_KNOCKBACK_RESISTANCE; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_STEP_HEIGHT; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_BITE_REACH; + private static final ModConfigSpec.DoubleValue ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER; + private static final ModConfigSpec.IntValue ROYAL_BOSS_BITE_COOLDOWN_TICKS; + // Brutalfly @@ -253,6 +269,10 @@ public final class AntarchyMobsConfig { private static final ModConfigSpec.DoubleValue LURKING_TERROR_HEALTH; private static final ModConfigSpec.DoubleValue LURKING_TERROR_ATTACK_DAMAGE; + private static final ModConfigSpec.DoubleValue MANTICORE_HEALTH; + private static final ModConfigSpec.DoubleValue MANTICORE_ATTACK_DAMAGE; + private static final ModConfigSpec.IntValue MANTICORE_STING_POISON_TICKS; + private static final ModConfigSpec.IntValue QUEEN_MANTICORE_CAP; // Jerry @@ -515,6 +535,22 @@ public final class AntarchyMobsConfig { KRAKEN_LIGHTNING_DAMAGE_PHASE_ONE = b.comment("Lightning strike damage during phase one.").defineInRange("lightningDamagePhaseOne", 6.0D, 0.0D, 1024.0D); b.pop(); + b.push("royalBosses"); + KING_HEALTH = b.comment("Base max health for the King.").defineInRange("kingHealth", 6000.0D, 1.0D, 32768.0D); + QUEEN_HEALTH = b.comment("Base max health for the Queen.").defineInRange("queenHealth", 6000.0D, 1.0D, 32768.0D); + KING_ATTACK_DAMAGE = b.comment("Base attack damage for the King.").defineInRange("kingAttackDamage", 50.0D, 0.0D, 1024.0D); + QUEEN_ATTACK_DAMAGE = b.comment("Base attack damage for the Queen.").defineInRange("queenAttackDamage", 45.0D, 0.0D, 1024.0D); + ROYAL_BOSS_ARMOR = b.comment("Base armor value shared by King and Queen.").defineInRange("armor", 20.0D, 0.0D, 1024.0D); + ROYAL_BOSS_FOLLOW_RANGE = b.comment("Target acquisition range shared by King and Queen.").defineInRange("followRange", 128.0D, 1.0D, 256.0D); + ROYAL_BOSS_MOVEMENT_SPEED = b.comment("Base grounded movement speed shared by King and Queen.").defineInRange("movementSpeed", 0.22D, 0.0D, 10.0D); + ROYAL_BOSS_KNOCKBACK_RESISTANCE = b.comment("Base knockback resistance shared by King and Queen.").defineInRange("knockbackResistance", 1.0D, 0.0D, 1.0D); + ROYAL_BOSS_STEP_HEIGHT = b.comment("Base step height shared by King and Queen.").defineInRange("stepHeight", 3.0D, 0.0D, 32.0D); + ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE = b.comment("Maximum damage a single hit can deal to a Royal boss before later anti-burst systems are added.").defineInRange("maxSingleHitDamage", 250.0D, 1.0D, 32768.0D); + ROYAL_BOSS_BITE_REACH = b.comment("Radius around each head anchor that a King or Queen bite can hit.").defineInRange("biteReach", 10.0D, 1.0D, 64.0D); + ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER = b.comment("Multiplier applied to base attack damage for King and Queen head bites.").defineInRange("biteDamageMultiplier", 1.6D, 0.0D, 32.0D); + ROYAL_BOSS_BITE_COOLDOWN_TICKS = b.comment("Base cooldown in ticks between bites for a single King or Queen head (scaled down at later phases).").defineInRange("biteCooldownTicks", 45, 1, 1200); + b.pop(); + // Brutalfly @@ -731,6 +767,13 @@ public final class AntarchyMobsConfig { LURKING_TERROR_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D); b.pop(); + b.push("manticore"); + MANTICORE_HEALTH = b.comment("Base max health.").defineInRange("health", 40.0D, 1.0D, 32768.0D); + MANTICORE_ATTACK_DAMAGE = b.comment("Base attack damage for bites and stings.").defineInRange("attackDamage", 7.0D, 0.0D, 1024.0D); + MANTICORE_STING_POISON_TICKS = b.comment("Poison duration in ticks applied by a Manticore sting.").defineInRange("stingPoisonTicks", 100, 0, 12000); + QUEEN_MANTICORE_CAP = b.comment("Maximum number of living Manticores a single Queen may keep summoned.").defineInRange("queenSummonCap", 15, 1, 200); + b.pop(); + b.push("jerry"); JERRY_INFANT_HEALTH = b.comment("Infant Jerry max health.").defineInRange("infantHealth", 20.0D, 1.0D, 32768.0D); JERRY_INFANT_ATTACK_DAMAGE = b.comment("Infant Jerry damage per attached damage tick.").defineInRange("infantAttackDamage", 2.0D, 0.0D, 1024.0D); @@ -872,6 +915,20 @@ public final class AntarchyMobsConfig { static double krakenBossBarRange() { return KRAKEN_BOSS_BAR_RANGE.get(); } static float krakenLightningDamagePhaseOne() { return KRAKEN_LIGHTNING_DAMAGE_PHASE_ONE.get().floatValue(); } + static double kingHealth() { return KING_HEALTH.get(); } + static double queenHealth() { return QUEEN_HEALTH.get(); } + static double kingAttackDamage() { return KING_ATTACK_DAMAGE.get(); } + static double queenAttackDamage() { return QUEEN_ATTACK_DAMAGE.get(); } + static double royalBossArmor() { return ROYAL_BOSS_ARMOR.get(); } + static double royalBossFollowRange() { return ROYAL_BOSS_FOLLOW_RANGE.get(); } + static double royalBossMovementSpeed() { return ROYAL_BOSS_MOVEMENT_SPEED.get(); } + static double royalBossKnockbackResistance() { return ROYAL_BOSS_KNOCKBACK_RESISTANCE.get(); } + static double royalBossStepHeight() { return ROYAL_BOSS_STEP_HEIGHT.get(); } + static double royalBossMaxSingleHitDamage() { return ROYAL_BOSS_MAX_SINGLE_HIT_DAMAGE.get(); } + static double royalBossBiteReach() { return ROYAL_BOSS_BITE_REACH.get(); } + static double royalBossBiteDamageMultiplier() { return ROYAL_BOSS_BITE_DAMAGE_MULTIPLIER.get(); } + static int royalBossBiteCooldownTicks() { return ROYAL_BOSS_BITE_COOLDOWN_TICKS.get(); } + static double brutalflyHealth() { return BRUTALFLY_HEALTH.get(); } static double brutalflySwipeDamage() { return BRUTALFLY_SWIPE_DAMAGE.get(); } static double brutalflySpitDamage() { return BRUTALFLY_SPIT_DAMAGE.get(); } @@ -1003,6 +1060,10 @@ public final class AntarchyMobsConfig { static double creepingHorrorAttackDamage() { return CREEPING_HORROR_ATTACK_DAMAGE.get(); } static double lurkingTerrorHealth() { return LURKING_TERROR_HEALTH.get(); } static double lurkingTerrorAttackDamage() { return LURKING_TERROR_ATTACK_DAMAGE.get(); } + static double manticoreHealth() { return MANTICORE_HEALTH.get(); } + static double manticoreAttackDamage() { return MANTICORE_ATTACK_DAMAGE.get(); } + static int manticoreStingPoisonTicks() { return MANTICORE_STING_POISON_TICKS.get(); } + static int queenManticoreCap() { return QUEEN_MANTICORE_CAP.get(); } static double jerryInfantHealth() { return JERRY_INFANT_HEALTH.get(); } static double jerryInfantAttackDamage() { return JERRY_INFANT_ATTACK_DAMAGE.get(); } static double jerryMatureHealth() { return JERRY_MATURE_HEALTH.get(); } diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java index 744400b5..15109c62 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java @@ -200,7 +200,15 @@ public class AntarchyNeoforge { AntarchyNeoforgeSounds.BLOOD_CRYSTAL_KATANA_DASH, AntarchyNeoforgeSounds.BLOOD_CRYSTAL_ARMOR_EQUIP, AntarchyNeoforgeSounds.BLOODGLASS_WARD_HEART_BREAK, - AntarchyNeoforgeSounds.BLOODGLASS_WARD_HEART_REGEN + AntarchyNeoforgeSounds.BLOODGLASS_WARD_HEART_REGEN, + AntarchyNeoforgeSounds.KING_IDLE, + AntarchyNeoforgeSounds.KING_HURT, + AntarchyNeoforgeSounds.KING_DEATH, + AntarchyNeoforgeSounds.KING_BITE, + AntarchyNeoforgeSounds.QUEEN_IDLE, + AntarchyNeoforgeSounds.QUEEN_HURT, + AntarchyNeoforgeSounds.QUEEN_DEATH, + AntarchyNeoforgeSounds.QUEEN_BITE ); bindCommonObjects(); ScorpionWhipTetherSync.setSink((player, targetId) -> PacketDistributor.sendToPlayersTrackingEntityAndSelf( @@ -223,6 +231,9 @@ public class AntarchyNeoforge { TigerEyeCamouflageSync.payload(player) )); com.craisinlord.antarchy.content.gravity.AntarchyGravityApi.setSyncDispatcher(AntarchyGravityNetworking::syncEntity); + com.craisinlord.antarchy.content.time.TimeDilationApi.setSyncDispatcher( + com.craisinlord.antarchy.neoforge.network.AntarchyTimeDilationNetworking::syncRate + ); if (isSupportedInfinityLoaded()) { InfinityCompat.bind(new NeoForgeInfinityCompat()); } @@ -387,15 +398,21 @@ public class AntarchyNeoforge { AntarchyObjects.setLucid(AntarchyNeoforgeEntites.LUCID); AntarchyObjects.setVortex(AntarchyNeoforgeEntites.VORTEX); AntarchyObjects.setWindVortex(() -> AntarchyNeoforgeEntites.WIND_VORTEX.get()); + AntarchyObjects.setTimeDilationField(() -> AntarchyNeoforgeEntites.TIME_DILATION_FIELD.get()); AntarchyObjects.setVortexChargeProjectile(() -> AntarchyNeoforgeEntites.VORTEX_CHARGE_PROJECTILE.get()); AntarchyObjects.setPrince(() -> AntarchyNeoforgeEntites.PRINCE.get()); AntarchyObjects.setPrincess(() -> AntarchyNeoforgeEntites.PRINCESS.get()); + AntarchyObjects.setKing(() -> AntarchyNeoforgeEntites.KING.get()); + AntarchyObjects.setQueen(() -> AntarchyNeoforgeEntites.QUEEN.get()); + AntarchyObjects.setManticore(() -> AntarchyNeoforgeEntites.MANTICORE.get()); AntarchyObjects.setRoyalBolt(() -> AntarchyNeoforgeEntites.ROYAL_BOLT.get()); AntarchyObjects.setPrinceEgg(() -> AntarchyNeoforgeBlocks.PRINCE_EGG.get()); AntarchyObjects.setPrincessEgg(() -> AntarchyNeoforgeBlocks.PRINCESS_EGG.get()); AntarchyObjects.setRoyalEggBlockEntity(() -> AntarchyNeoforgeBlocks.ROYAL_EGG_BLOCK_ENTITY.get()); AntarchyObjects.setVortexLens(() -> AntarchyNeoforgeBlocks.VORTEX_LENS.get()); AntarchyObjects.setVortexLensBlockEntity(() -> AntarchyNeoforgeBlocks.VORTEX_LENS_BLOCK_ENTITY.get()); + AntarchyObjects.setDimensionalTearMarker(() -> AntarchyNeoforgeBlocks.DIMENSIONAL_TEAR_MARKER.get()); + AntarchyObjects.setDimensionalTearMarkerBlockEntity(() -> AntarchyNeoforgeBlocks.DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY.get()); AntarchyObjects.setKrakensGraspTrident(AntarchyNeoforgeEntites.KRAKENS_GRASP_TRIDENT); AntarchyObjects.setLotus(() -> AntarchyNeoforgeBlocks.LOTUS.get()); AntarchyObjects.setKrakenTentacle(() -> AntarchyNeoforgeItems.KRAKEN_TENTACLE.get()); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforgeEvents.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforgeEvents.java index 62933798..7e841bba 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforgeEvents.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforgeEvents.java @@ -4,6 +4,7 @@ import com.craisinlord.antarchy.Antarchy; import com.craisinlord.antarchy.content.command.CavarynCommand; import com.craisinlord.antarchy.content.command.CaterpillarCommand; import com.craisinlord.antarchy.content.command.GravityCommand; +import com.craisinlord.antarchy.content.time.TimeDilationCommand; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.neoforge.event.RegisterCommandsEvent; @@ -18,5 +19,6 @@ public final class AntarchyNeoforgeEvents { CavarynCommand.register(event.getDispatcher()); GravityCommand.register(event.getDispatcher()); CaterpillarCommand.register(event.getDispatcher()); + TimeDilationCommand.register(event.getDispatcher()); } } diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java index b95d23ca..b652a5ae 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java @@ -149,6 +149,7 @@ public final class AntarchyNeoForgeClient { event.registerEntityRenderer(AntarchyNeoforgeEntites.LUCID_PEARL_PROJECTILE.get(), ThrownItemRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.VORTEX_CHARGE_PROJECTILE.get(), ThrownItemRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.WIND_VORTEX.get(), WindVortexRenderer::new); + event.registerEntityRenderer(AntarchyNeoforgeEntites.TIME_DILATION_FIELD.get(), TimeDilationFieldRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.CRITTER_CAGE_PROJECTILE.get(), ThrownItemRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.WORM_HOOK_PROJECTILE.get(), ThrownItemRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.HUSH_PROJECTILE.get(), HushProjectileRenderer::new); @@ -167,9 +168,12 @@ public final class AntarchyNeoForgeClient { event.registerEntityRenderer(AntarchyNeoforgeEntites.TERMITE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.TermiteRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context))); + event.registerEntityRenderer(AntarchyNeoforgeEntites.MANTICORE.get(), com.craisinlord.antarchy.content.client.renderer.ManticoreRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.HERCULES_BEETLE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.HerculesBeetleRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.PRINCE.get(), com.craisinlord.antarchy.content.client.renderer.RoyalMountRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.PRINCESS.get(), com.craisinlord.antarchy.content.client.renderer.RoyalMountRenderer::new); + event.registerEntityRenderer(AntarchyNeoforgeEntites.KING.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBossRenderer::new); + event.registerEntityRenderer(AntarchyNeoforgeEntites.QUEEN.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBossRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.ROYAL_BOLT.get(), com.craisinlord.antarchy.content.client.renderer.RoyalBoltRenderer::new); event.registerEntityRenderer(AntarchyNeoforgeEntites.JERRY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JerryRenderer(context))); event.registerEntityRenderer(AntarchyNeoforgeEntites.JUMPY_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JumpyBugRenderer(context))); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/ClientTimeDilationHandler.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/ClientTimeDilationHandler.java new file mode 100644 index 00000000..7d3aef8a --- /dev/null +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/client/ClientTimeDilationHandler.java @@ -0,0 +1,23 @@ +package com.craisinlord.antarchy.neoforge.client; + +import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.content.client.ClientTimeDilationTicker; +import net.minecraft.client.Minecraft; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.neoforge.client.event.ClientTickEvent; + +@EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT) +public final class ClientTimeDilationHandler { + private ClientTimeDilationHandler() { + } + + @SubscribeEvent + public static void onClientTick(ClientTickEvent.Post event) { + Minecraft mc = Minecraft.getInstance(); + if (mc.level != null) { + ClientTimeDilationTicker.tick(mc.level); + } + } +} diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/network/AntarchyTimeDilationNetworking.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/network/AntarchyTimeDilationNetworking.java new file mode 100644 index 00000000..9f12b17d --- /dev/null +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/network/AntarchyTimeDilationNetworking.java @@ -0,0 +1,38 @@ +package com.craisinlord.antarchy.neoforge.network; + +import com.craisinlord.antarchy.content.network.TimeDilationRatePayload; +import com.craisinlord.antarchy.content.time.TimeDilationApi; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.neoforged.neoforge.network.PacketDistributor; +import net.neoforged.neoforge.network.handling.IPayloadContext; +import net.neoforged.neoforge.network.registration.PayloadRegistrar; + +public final class AntarchyTimeDilationNetworking { + private AntarchyTimeDilationNetworking() { + } + + public static void register(PayloadRegistrar registrar) { + registrar.playToClient( + TimeDilationRatePayload.TYPE, + TimeDilationRatePayload.STREAM_CODEC, + AntarchyTimeDilationNetworking::handleTimeDilationRate + ); + } + + public static void syncRate(ServerPlayer player, double rate) { + PacketDistributor.sendToPlayer(player, new TimeDilationRatePayload(player.getId(), rate)); + } + + private static void handleTimeDilationRate(TimeDilationRatePayload payload, IPayloadContext context) { + context.enqueueWork(() -> { + Entity entity = context.player().level().getEntity(payload.entityId()); + if (entity == null && context.player().getId() == payload.entityId()) { + entity = context.player(); + } + if (entity != null) { + TimeDilationApi.applySyncedRate(entity, payload.rate()); + } + }); + } +} diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java index 9e205b27..1ba97851 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java @@ -30,6 +30,7 @@ import com.craisinlord.antarchy.content.item.ultimate.UltimateGearHelper; import com.craisinlord.antarchy.content.movement.DreamSandLowGravityAccess; import com.craisinlord.antarchy.content.AntarchyTags; import com.craisinlord.antarchy.content.portal.PermanentPortalManager; +import com.craisinlord.antarchy.content.time.TimeDilationManager; import com.craisinlord.antarchy.content.tigereye.TigerEyeCamouflageController; import com.craisinlord.antarchy.content.tigereye.TigerEyeCamouflageSync; import com.craisinlord.antarchy.neoforge.AntarchyNeoForgeFluidTypes; @@ -128,6 +129,7 @@ public final class AntarchyNeoForgeEvents { NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassWardRemoved); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassWardExpired); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickBloodglassRecharge); + NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::tickTimeDilation); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassPlayerDeath); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassRespawn); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleBloodglassLogin); @@ -226,6 +228,10 @@ public final class AntarchyNeoForgeEvents { } } + static void tickTimeDilation(ServerTickEvent.Post event) { + TimeDilationManager.tickServer(event.getServer()); + } + private static int badOmenLevel(Player player) { MobEffectInstance effect = player.getEffect(MobEffects.BAD_OMEN); return effect != null ? effect.getAmplifier() + 1 : 0; @@ -1331,6 +1337,7 @@ public final class AntarchyNeoForgeEvents { DispenserBlock.registerBehavior(AntarchyNeoforgeItems.RPO_LAUNCHER.get(), new RpoLauncherDispenseBehavior()); DispenserBlock.registerBehavior(AntarchyNeoforgeItems.WATER_CANNON.get(), new WaterCannonDispenseBehavior()); DispenserBlock.registerBehavior(AntarchyNeoforgeItems.VORTEX_CHARGE.get(), new com.craisinlord.antarchy.content.dispenser.VortexChargeDispenseBehavior()); + DispenserBlock.registerBehavior(AntarchyNeoforgeItems.EYE_OF_THE_STORM.get(), new com.craisinlord.antarchy.content.dispenser.EyeOfTheStormDispenseBehavior()); AntimetalMinecartDispenseBehavior antimetalMinecartDispenseBehavior = new AntimetalMinecartDispenseBehavior(); DispenserBlock.registerBehavior(Items.MINECART, antimetalMinecartDispenseBehavior); DispenserBlock.registerBehavior(Items.CHEST_MINECART, antimetalMinecartDispenseBehavior); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java index db724180..1be48b19 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java @@ -6,6 +6,7 @@ import com.craisinlord.antarchy.content.AntarchyObjects; import com.craisinlord.antarchy.content.block.*; import com.craisinlord.antarchy.content.block.entity.AntNestBlockEntity; import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity; +import com.craisinlord.antarchy.content.block.entity.DimensionalTearMarkerBlockEntity; import com.craisinlord.antarchy.content.block.entity.DreamCampfireBlockEntity; import com.craisinlord.antarchy.content.block.entity.HushweedBlockEntity; import com.craisinlord.antarchy.content.block.entity.LucidAnchorBlockEntity; @@ -111,6 +112,10 @@ public final class AntarchyNeoforgeBlocks { () -> new PortalGunPortalMasterBlock(AntarchyNeoforgeBlocks::portalGunPortalMasterBlockEntityType, portalProperties())); public static final DeferredBlock PORTAL_GUN_PORTAL_BASE = BLOCKS.register("portal_gun_portal_base", () -> new PortalGunPortalBaseBlock(AntarchyNeoforgeBlocks::portalGunPortalBaseBlockEntityType, portalProperties())); + public static final DeferredBlock DIMENSIONAL_TEAR_MARKER = BLOCKS.register("dimensional_tear_marker", + () -> new DimensionalTearMarkerBlock(AntarchyNeoforgeBlocks::dimensionalTearMarkerBlockEntityType, + BlockBehaviour.Properties.of().noCollission().noOcclusion().noLootTable().instabreak() + .pushReaction(net.minecraft.world.level.material.PushReaction.DESTROY))); public static final DeferredBlock OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign", () -> new StandingSignBlock(AntarchyWoodTypes.OURANWOOD, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); public static final DeferredBlock OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign", @@ -187,8 +192,8 @@ public final class AntarchyNeoforgeBlocks { () -> new PressurePlateBlock(BlockSetType.JUNGLE, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_PRESSURE_PLATE))); public static final DeferredBlock NADIR_BUTTON = BLOCKS.register("nadir_button", () -> new ButtonBlock(BlockSetType.JUNGLE, 30, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_BUTTON))); - public static final DeferredBlock NADIR_VEIL = BLOCKS.register("nadir_veil", - () -> new Block(BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_LEAVES).sound(SoundType.SLIME_BLOCK).noOcclusion())); + public static final DeferredBlock NADIR_VEIL = BLOCKS.register("nadir_veil", + () -> new com.craisinlord.antarchy.content.block.NadirVeilBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_LEAVES).sound(SoundType.SLIME_BLOCK).noOcclusion())); public static final DeferredBlock NADIR_SAPLING = BLOCKS.register("nadir_sapling", () -> new NadirSaplingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); public static final DeferredBlock POTTED_NADIR_SAPLING = BLOCKS.register("potted_nadir_sapling", @@ -628,7 +633,7 @@ public final class AntarchyNeoforgeBlocks { () -> new BluestoneBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.REDSTONE_BLOCK).mapColor(MapColor.COLOR_BLUE))); public static final DeferredBlock VORTEX_LENS = BLOCKS.register("vortex_lens", () -> new VortexLensBlock(AntarchyNeoforgeBlocks::vortexLensBlockEntityType, - BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BLOCK).mapColor(MapColor.COLOR_GREEN).strength(3.0F, 6.0F).requiresCorrectToolForDrops())); + BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BLOCK).mapColor(MapColor.COLOR_GREEN).strength(3.0F, 6.0F).requiresCorrectToolForDrops().noOcclusion())); public static final DeferredBlock BLUESTONE_REPEATER = BLOCKS.register("bluestone_repeater", () -> new BluestoneRepeaterBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.REPEATER).mapColor(MapColor.COLOR_BLUE).noCollission())); public static final DeferredBlock BLUESTONE_COMPARATOR = BLOCKS.register("bluestone_comparator", @@ -908,6 +913,11 @@ public final class AntarchyNeoforgeBlocks { (pos, state) -> new PortalGunPortalBaseBlockEntity(pos, state, AntarchyNeoforgeBlocks::portalGunPortalBaseBlockEntityType), PORTAL_GUN_PORTAL_BASE.get() ).build(null)); + public static final DeferredHolder, BlockEntityType> DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("dimensional_tear_marker", + () -> BlockEntityType.Builder.of( + (pos, state) -> new DimensionalTearMarkerBlockEntity(pos, state, AntarchyNeoforgeBlocks::dimensionalTearMarkerBlockEntityType), + DIMENSIONAL_TEAR_MARKER.get() + ).build(null)); private AntarchyNeoforgeBlocks() {} @@ -1001,6 +1011,10 @@ public final class AntarchyNeoforgeBlocks { return PORTAL_GUN_PORTAL_BASE_BLOCK_ENTITY.get(); } + private static BlockEntityType dimensionalTearMarkerBlockEntityType() { + return DIMENSIONAL_TEAR_MARKER_BLOCK_ENTITY.get(); + } + private static final class SimpleHorizontalFacingBlock extends HorizontalDirectionalBlock { private static final MapCodec CODEC = simpleCodec(SimpleHorizontalFacingBlock::new); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java index 863b6664..ebcc019e 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java @@ -68,6 +68,7 @@ import com.craisinlord.antarchy.content.entity.lucid.LucidEyeProjectileEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexChargeProjectileEntity; import com.craisinlord.antarchy.content.entity.vortex.VortexEntity; import com.craisinlord.antarchy.content.entity.vortex.WindVortexEntity; +import com.craisinlord.antarchy.content.time.TimeDilationFieldEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmarePortalEntity; import com.craisinlord.antarchy.content.entity.nightmare.NightmareBiteEntity; @@ -76,6 +77,7 @@ import com.craisinlord.antarchy.content.entity.CheepEntity; import com.craisinlord.antarchy.content.entity.CreepingHorrorEntity; import com.craisinlord.antarchy.content.entity.DorrieEntity; import com.craisinlord.antarchy.content.entity.LurkingTerrorEntity; +import com.craisinlord.antarchy.content.entity.ManticoreEntity; import com.craisinlord.antarchy.content.entity.ToreterrorEntity; import com.craisinlord.antarchy.content.entity.WaterBombEntity; import com.craisinlord.antarchy.content.portalgun.PortalGunPortalEntity; @@ -382,6 +384,13 @@ public final class AntarchyNeoforgeEntites { .clientTrackingRange(10) .updateInterval(1) .build("wind_vortex")); + public static final DeferredHolder, EntityType> TIME_DILATION_FIELD = ENTITY_TYPES.register("time_dilation_field", + () -> EntityType.Builder.of(TimeDilationFieldEntity::new, MobCategory.MISC) + .sized(0.5F, 0.5F) + .clientTrackingRange(16) + .updateInterval(20) + .fireImmune() + .build("time_dilation_field")); public static final DeferredHolder, EntityType> LUCID_BOLT = ENTITY_TYPES.register("lucid_bolt", () -> EntityType.Builder.of(LucidBoltEntity::new, MobCategory.MISC) .sized(0.3F, 0.3F) @@ -475,6 +484,11 @@ public final class AntarchyNeoforgeEntites { .sized(1.3F, 1.5F) .clientTrackingRange(10) .build("lurking_terror")); + public static final DeferredHolder, EntityType> MANTICORE = ENTITY_TYPES.register("manticore", + () -> EntityType.Builder.of(ManticoreEntity::new, MobCategory.MONSTER) + .sized(1.95F, 2.0F) + .clientTrackingRange(10) + .build("manticore")); public static final DeferredHolder, EntityType> JERRY = ENTITY_TYPES.register("jerry", () -> EntityType.Builder.of(JerryEntity::new, MobCategory.MONSTER) .sized(1.4F, 1.4F) @@ -501,6 +515,20 @@ public final class AntarchyNeoforgeEntites { public static final DeferredHolder, EntityType> PRINCESS = ENTITY_TYPES.register("princess", () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.PrincessEntity::new, MobCategory.CREATURE) .sized(2.2F, 2.2F).clientTrackingRange(10).updateInterval(3).fireImmune().build("princess")); + public static final DeferredHolder, EntityType> KING = ENTITY_TYPES.register("king", + () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.KingEntity::new, MobCategory.MONSTER) + .sized(com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_WIDTH, com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_HEIGHT) + .clientTrackingRange(16) + .updateInterval(3) + .fireImmune() + .build("king")); + public static final DeferredHolder, EntityType> QUEEN = ENTITY_TYPES.register("queen", + () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.QueenEntity::new, MobCategory.MONSTER) + .sized(com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_WIDTH, com.craisinlord.antarchy.content.entity.royal.RoyalBossEntity.GAMEPLAY_HEIGHT) + .clientTrackingRange(16) + .updateInterval(3) + .fireImmune() + .build("queen")); public static final DeferredHolder, EntityType> ROYAL_BOLT = ENTITY_TYPES.register("royal_bolt", () -> EntityType.Builder.of(com.craisinlord.antarchy.content.entity.royal.RoyalBoltEntity::new, MobCategory.MISC) .sized(0.4F, 0.4F).clientTrackingRange(8).updateInterval(1).fireImmune().build("royal_bolt")); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntityAttributes.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntityAttributes.java index 4c1269fa..090e7104 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntityAttributes.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntityAttributes.java @@ -4,6 +4,7 @@ import com.craisinlord.antarchy.config.AntarchySettings; import com.craisinlord.antarchy.content.entity.*; import com.craisinlord.antarchy.content.entity.CreepingHorrorEntity; import com.craisinlord.antarchy.content.entity.LurkingTerrorEntity; +import com.craisinlord.antarchy.content.entity.ManticoreEntity; import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity; import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity; import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity; @@ -71,6 +72,7 @@ public class AntarchyNeoforgeEntityAttributes { event.put(AntarchyNeoforgeEntites.TORETERROR.get(), ToreterrorEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.CREEPING_HORROR.get(), CreepingHorrorEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.LURKING_TERROR.get(), LurkingTerrorEntity.createAttributes().build()); + event.put(AntarchyNeoforgeEntites.MANTICORE.get(), ManticoreEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.JERRY.get(), JerryEntity.createAttributes().build()); AttributeSupplier redAntAttributes = buildAntAttributes(AntarchySettings.redAntHealth(), AntarchySettings.redAntMovementSpeed(), AntarchySettings.redAntAttackDamage()).build(); @@ -87,6 +89,8 @@ public class AntarchyNeoforgeEntityAttributes { event.put(AntarchyNeoforgeEntites.HERCULES_BEETLE.get(), com.craisinlord.antarchy.content.entity.HerculesBeetleEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.PRINCE.get(), com.craisinlord.antarchy.content.entity.royal.PrinceEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.PRINCESS.get(), com.craisinlord.antarchy.content.entity.royal.PrincessEntity.createAttributes().build()); + event.put(AntarchyNeoforgeEntites.KING.get(), com.craisinlord.antarchy.content.entity.royal.KingEntity.createAttributes().build()); + event.put(AntarchyNeoforgeEntites.QUEEN.get(), com.craisinlord.antarchy.content.entity.royal.QueenEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.OURANWOOD_DEER.get(), com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.GLIMMER.get(), com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity.createAttributes().build()); event.put(AntarchyNeoforgeEntites.ELKA.get(), ElkaEntity.createAttributes().build()); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java index ca058d52..6d3df24c 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java @@ -402,8 +402,8 @@ public final class AntarchyNeoforgeItems { () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.BLUESTONE_ORE.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_BLOCK_ITEM = ITEMS.register("bluestone_block", () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.BLUESTONE_BLOCK.get(), new Item.Properties())); - public static final DeferredItem VORTEX_LENS_ITEM = ITEMS.register("vortex_lens", - () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.VORTEX_LENS.get(), new Item.Properties())); + public static final DeferredItem VORTEX_LENS_ITEM = ITEMS.register("vortex_lens", + () -> new VortexLensBlockItem(AntarchyNeoforgeBlocks.VORTEX_LENS.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_REPEATER_ITEM = ITEMS.register("bluestone_repeater", () -> new CeilingPlacementTooltipBlockItem(AntarchyNeoforgeBlocks.BLUESTONE_REPEATER.get(), new Item.Properties())); public static final DeferredItem BLUESTONE_COMPARATOR_ITEM = ITEMS.register("bluestone_comparator", @@ -1066,6 +1066,14 @@ public final class AntarchyNeoforgeItems { () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.REVERIE, 0xF2F2F2, 0xBFC3C7, new Item.Properties())); public static final DeferredItem BRUTALFLY_SPAWN_EGG = ITEMS.register("brutalfly_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.BRUTALFLY, 0x4A2214, 0xFF8A1D, new Item.Properties().rarity(Rarity.EPIC))); + public static final DeferredItem KING_SPAWN_EGG = ITEMS.register("king_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.KING, 0xFFFFFF, 0xD4AF37, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + public static final DeferredItem QUEEN_SPAWN_EGG = ITEMS.register("queen_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.QUEEN, 0x080608, 0xB11226, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + public static final DeferredItem PRINCE_SPAWN_EGG = ITEMS.register("prince_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.PRINCE, 0xFFFFFF, 0xD4AF37, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); + public static final DeferredItem PRINCESS_SPAWN_EGG = ITEMS.register("princess_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.PRINCESS, 0x3B0A45, 0xB11226, new Item.Properties().rarity(Rarity.EPIC).fireResistant())); public static final DeferredItem RED_ANT_SPAWN_EGG = ITEMS.register("red_ant_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.RED_ANT, 0xA31818, 0x2B0909, new Item.Properties())); public static final DeferredItem BROWN_ANT_SPAWN_EGG = ITEMS.register("brown_ant_spawn_egg", @@ -1149,6 +1157,8 @@ public final class AntarchyNeoforgeItems { () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.CREEPING_HORROR, 0x6B3A1F, 0x6B0000, new Item.Properties())); public static final DeferredItem LURKING_TERROR_SPAWN_EGG = ITEMS.register("lurking_terror_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.LURKING_TERROR, 0x2D5A1B, 0x8B0000, new Item.Properties())); + public static final DeferredItem MANTICORE_SPAWN_EGG = ITEMS.register("manticore_spawn_egg", + () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.MANTICORE, 0x8A3B1E, 0x2B1B12, new Item.Properties())); public static final DeferredItem HERCULES_BEETLE_SPAWN_EGG = ITEMS.register("hercules_beetle_spawn_egg", () -> new DeferredSpawnEggItem(AntarchyNeoforgeEntites.HERCULES_BEETLE, 0x6B1F2A, 0xD4AF37, new Item.Properties().rarity(Rarity.RARE))); public static final DeferredItem JERRY_SPAWN_EGG = ITEMS.register("jerry_spawn_egg", diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgePayloadHandlers.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgePayloadHandlers.java index 14e3d78e..2a0365b1 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgePayloadHandlers.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgePayloadHandlers.java @@ -10,6 +10,7 @@ import com.craisinlord.antarchy.neoforge.network.DorrieJumpNetworking; import com.craisinlord.antarchy.neoforge.network.HerculesBeetleNetworking; import com.craisinlord.antarchy.neoforge.network.JumpyBootsNetworking; import com.craisinlord.antarchy.neoforge.network.MultipartNetworking; +import com.craisinlord.antarchy.neoforge.network.AntarchyTimeDilationNetworking; import net.neoforged.bus.api.IEventBus; import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent; @@ -23,6 +24,7 @@ public class AntarchyNeoforgePayloadHandlers { static void registerPayloadHandlers(RegisterPayloadHandlersEvent event) { var registrar = event.registrar("1"); AntarchyGravityNetworking.register(registrar); + AntarchyTimeDilationNetworking.register(registrar); BrutalflyElytraNetworking.register(registrar); JumpyBootsNetworking.register(registrar); DorrieJumpNetworking.register(registrar); diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java index 940b8fb5..bef946c0 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java @@ -206,6 +206,35 @@ public final class AntarchyNeoforgeSounds { public static final DeferredHolder ANTIMETAL_STEP = registerSoundEvent("antimetal_step"); public static final DeferredHolder ANTIMETAL_SCAFFOLD = registerSoundEvent("antimetal_scaffold"); + public static final DeferredHolder KING_IDLE = registerSoundEvent("king_idle"); + public static final DeferredHolder KING_WALK = registerSoundEvent("king_walk"); + public static final DeferredHolder KING_FLY_LOOP = registerSoundEvent("king_fly_loop"); + public static final DeferredHolder KING_WING_FLAP = registerSoundEvent("king_wing_flap"); + public static final DeferredHolder KING_BITE = registerSoundEvent("king_bite"); + public static final DeferredHolder KING_STOMP = registerSoundEvent("king_stomp"); + public static final DeferredHolder KING_ROAR = registerSoundEvent("king_roar"); + public static final DeferredHolder KING_HURT = registerSoundEvent("king_hurt"); + public static final DeferredHolder KING_DEATH = registerSoundEvent("king_death"); + public static final DeferredHolder KING_BEAM_SHOOT = registerSoundEvent("king_beam_shoot"); + public static final DeferredHolder KING_FIREBALL_SHOOT = registerSoundEvent("king_fireball_shoot"); + public static final DeferredHolder KING_DECREE_CAST = registerSoundEvent("king_decree_cast"); + + public static final DeferredHolder QUEEN_IDLE = registerSoundEvent("queen_idle"); + public static final DeferredHolder QUEEN_WALK = registerSoundEvent("queen_walk"); + public static final DeferredHolder QUEEN_FLY_LOOP = registerSoundEvent("queen_fly_loop"); + public static final DeferredHolder QUEEN_WING_FLAP = registerSoundEvent("queen_wing_flap"); + public static final DeferredHolder QUEEN_BITE = registerSoundEvent("queen_bite"); + public static final DeferredHolder QUEEN_STOMP = registerSoundEvent("queen_stomp"); + public static final DeferredHolder QUEEN_ROAR = registerSoundEvent("queen_roar"); + public static final DeferredHolder QUEEN_HURT = registerSoundEvent("queen_hurt"); + public static final DeferredHolder QUEEN_DEATH = registerSoundEvent("queen_death"); + public static final DeferredHolder QUEEN_BEAM_SHOOT = registerSoundEvent("queen_beam_shoot"); + public static final DeferredHolder QUEEN_BEAM_START = registerSoundEvent("queen_beam_start"); + public static final DeferredHolder QUEEN_BEAM_LOOP = registerSoundEvent("queen_beam_loop"); + public static final DeferredHolder QUEEN_BEAM_END = registerSoundEvent("queen_beam_end"); + public static final DeferredHolder QUEEN_BLACK_HOLE_SHOOT = registerSoundEvent("queen_black_hole_shoot"); + public static final DeferredHolder QUEEN_CAST_SHOOT = registerSoundEvent("queen_cast_shoot"); + private AntarchyNeoforgeSounds() {} public static void register(IEventBus modEventBus) { diff --git a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java index c08131a2..47010d6d 100644 --- a/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java +++ b/neoforge-1.21.1/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSpawnPlacements.java @@ -53,6 +53,7 @@ public class AntarchyNeoforgeSpawnPlacements { event.register(AntarchyNeoforgeEntites.EMPEROR_SCORPION.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EmperorScorpionEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); 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.MANTICORE.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.ManticoreEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR); event.register(AntarchyNeoforgeEntites.JERRY.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, JerryEntity::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.ROLLY_POLLY.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, RegisterSpawnPlacementsEvent.Operation.OR);