diff --git a/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java b/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java index e109f2e3..3ef9c91e 100644 --- a/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java +++ b/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java @@ -83,7 +83,7 @@ public final class AntarchySettings { private static double bigBerthaBasiliskCooldownSeconds = 7.0D; private static double bigBerthaLucidInvertedDurationSeconds = 3.0D; private static double bigBerthaLucidInvertedDamageBonusPercent = 25.0D; - private static double potentNyxiteInvertedDurationSeconds = 2.0D; + private static double potentNyxiteInvertedDurationSeconds = 60.0D; private static int ultimateToolEnchantability = 25; private static int ultimateArmorEnchantability = 10; private static int ultimateBowEnchantability = 20; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java b/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java index b2090f4b..86424c80 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/AntarchySoundEvents.java @@ -134,6 +134,7 @@ public final class AntarchySoundEvents { public static Supplier STINKY_FLY = (Supplier) UNBOUND; public static Supplier STINK_BUG_FART = (Supplier) UNBOUND; public static Supplier STINK_BUG_IDLE = (Supplier) UNBOUND; + public static Supplier CAVARYN_HEARTBEAT = (Supplier) UNBOUND; public static Supplier ROLLY_POLLY_IDLE = (Supplier) UNBOUND; public static Supplier CREEPING_HORROR_GROWL = (Supplier) UNBOUND; public static Supplier CREEPING_HORROR_HURT = (Supplier) UNBOUND; @@ -289,6 +290,7 @@ public final class AntarchySoundEvents { Supplier stinkyFly, Supplier stinkBugFart, Supplier stinkBugIdle, + Supplier cavarynHeartbeat, Supplier rollyPollyIdle, Supplier creepingHorrorGrowl, Supplier creepingHorrorHurt, @@ -440,6 +442,7 @@ public final class AntarchySoundEvents { STINKY_FLY = stinkyFly; STINK_BUG_FART = stinkBugFart; STINK_BUG_IDLE = stinkBugIdle; + CAVARYN_HEARTBEAT = cavarynHeartbeat; ROLLY_POLLY_IDLE = rollyPollyIdle; CREEPING_HORROR_GROWL = creepingHorrorGrowl; CREEPING_HORROR_HURT = creepingHorrorHurt; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/GiantLilyPadBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/GiantLilyPadBlock.java index b96f964d..684a8b7a 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/GiantLilyPadBlock.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/GiantLilyPadBlock.java @@ -13,6 +13,8 @@ import net.minecraft.util.RandomSource; import net.minecraft.util.StringRepresentable; import net.minecraft.world.InteractionHand; import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; @@ -31,6 +33,7 @@ import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec2; +import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; @@ -44,6 +47,9 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock private static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 0.5D, 16.0D); private static final ThreadLocal REMOVING_STRUCTURE = ThreadLocal.withInitial(() -> false); private static final Map OFFSETS = createOffsets(); + private static final double BOUNCE_FACTOR = 0.35D; + private static final double FORWARD_BOOST_MULTIPLIER = 1.05D; + private static final double MAX_BOOSTED_HORIZONTAL_SPEED = 0.6D; public GiantLilyPadBlock(BlockBehaviour.Properties properties) { super(properties); @@ -148,6 +154,34 @@ public final class GiantLilyPadBlock extends Block implements BonemealableBlock return ItemInteractionResult.CONSUME; } + @Override + public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { + super.stepOn(level, pos, state, entity); + if (!level.isClientSide) { + Vec3 movement = entity.getDeltaMovement(); + double horizontalSpeed = movement.horizontalDistance(); + if (horizontalSpeed > 0.02D && horizontalSpeed < MAX_BOOSTED_HORIZONTAL_SPEED) { + double boosted = Math.min(horizontalSpeed * FORWARD_BOOST_MULTIPLIER, MAX_BOOSTED_HORIZONTAL_SPEED); + double scale = boosted / horizontalSpeed; + entity.setDeltaMovement(movement.x * scale, movement.y, movement.z * scale); + } + } + } + + @Override + public void updateEntityAfterFallOn(BlockGetter level, Entity entity) { + if (entity.isSuppressingBounce()) { + super.updateEntityAfterFallOn(level, entity); + return; + } + + Vec3 movement = entity.getDeltaMovement(); + if (movement.y < 0.0D) { + double bounce = entity instanceof LivingEntity ? BOUNCE_FACTOR : BOUNCE_FACTOR * 0.7D; + entity.setDeltaMovement(movement.x, -movement.y * bounce, movement.z); + } + } + @Override public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { if (!state.getValue(HAS_LOTUS) || random.nextInt(10) != 0) { diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/JerryEggBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/JerryEggBlock.java index 78ef5040..3a0c37cd 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/JerryEggBlock.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/JerryEggBlock.java @@ -32,7 +32,7 @@ public class JerryEggBlock extends Block { public static final BooleanProperty ROTATED = BooleanProperty.create("rotated"); private static final ResourceLocation JERRY_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "jerry"); private static final int HATCH_CHECK_INTERVAL = 1200; - private static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 0.0D, 15.0D, 16.0D, 16.0D); + private static final VoxelShape SHAPE = Block.box(1.5D, 0.0D, 1.5D, 14.5D, 16.0D, 14.5D); public JerryEggBlock(BlockBehaviour.Properties properties) { super(properties); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/NyxiteSpikeBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/NyxiteSpikeBlock.java index 81a59050..1f207d1a 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/NyxiteSpikeBlock.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/NyxiteSpikeBlock.java @@ -1,6 +1,7 @@ package com.craisinlord.antarchy.content.block; import com.craisinlord.antarchy.content.AntarchyObjects; +import com.craisinlord.antarchy.content.entity.UpwardFallingBlockEntity; import com.mojang.serialization.MapCodec; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -11,7 +12,6 @@ import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.PointedDripstoneBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; @@ -119,8 +119,7 @@ public class NyxiteSpikeBlock extends PointedDripstoneBlock { BlockPos.MutableBlockPos cursor = pos.mutable(); while (isNyxiteSpikeWithDirection(level.getBlockState(cursor), Direction.UP)) { BlockState spikeState = level.getBlockState(cursor); - dropResources(spikeState, level, cursor); - level.removeBlock(cursor, false); + UpwardFallingBlockEntity.fallUp(level, cursor, spikeState); cursor.move(Direction.UP); } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/HordeClientState.java b/common/src/main/java/com/craisinlord/antarchy/content/client/HordeClientState.java index f14c5312..ebd9b5dc 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/client/HordeClientState.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/HordeClientState.java @@ -1,11 +1,13 @@ package com.craisinlord.antarchy.content.client; import com.craisinlord.antarchy.Antarchy; +import com.craisinlord.antarchy.content.AntarchySoundEvents; import net.minecraft.client.Minecraft; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundSource; import net.minecraft.util.Mth; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; @@ -15,14 +17,18 @@ public final class HordeClientState { Registries.DIMENSION, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn") ); + private static final int STALE_SYNC_TICKS = 20 * 15; private static float targetIntensity; private static float intensity; + private static int heartbeatDelayTicks; + private static int ticksSinceSync; private HordeClientState() { } public static void update(float syncedIntensity) { targetIntensity = Mth.clamp(syncedIntensity, 0.0F, 1.0F); + ticksSinceSync = 0; } public static float intensity() { @@ -31,15 +37,21 @@ public final class HordeClientState { public static void tick() { Minecraft minecraft = Minecraft.getInstance(); - if (minecraft.level == null || minecraft.player == null || !minecraft.level.dimension().equals(CAVARYN)) { - targetIntensity = 0.0F; + if (minecraft.level == null || minecraft.player == null || !minecraft.level.dimension().equals(CAVARYN) || !minecraft.player.isAlive()) { + reset(); } intensity += (targetIntensity - intensity) * 0.08F; - if (intensity < 0.01F) { + if (minecraft.level == null || minecraft.player == null || minecraft.isPaused()) { return; } - if (minecraft.level == null || minecraft.player == null || minecraft.isPaused()) { + if (minecraft.level.dimension().equals(CAVARYN)) { + if (++ticksSinceSync >= STALE_SYNC_TICKS) { + targetIntensity = 0.0F; + } + tickHeartbeat(minecraft); + } + if (intensity < 0.01F) { return; } @@ -52,4 +64,34 @@ public final class HordeClientState { minecraft.level.addParticle(ParticleTypes.MYCELIUM, x, y, z, 0.0D, 0.015D + intensity * 0.025D, 0.0D); } } + + private static void reset() { + targetIntensity = 0.0F; + intensity = 0.0F; + heartbeatDelayTicks = 0; + ticksSinceSync = 0; + } + + private static void tickHeartbeat(Minecraft minecraft) { + if (heartbeatDelayTicks > 0) { + heartbeatDelayTicks--; + return; + } + + float soundIntensity = Mth.clamp(intensity, 0.0F, 1.0F); + float scaledIntensity = soundIntensity * soundIntensity; + float volume = 0.08F + scaledIntensity * 1.42F; + float pitch = 0.85F + soundIntensity * 0.45F; + heartbeatDelayTicks = Mth.clamp((int) (150.0F - scaledIntensity * 132.0F), 18, 150); + minecraft.level.playLocalSound( + minecraft.player.getX(), + minecraft.player.getY(), + minecraft.player.getZ(), + AntarchySoundEvents.CAVARYN_HEARTBEAT.get(), + SoundSource.AMBIENT, + volume, + pitch, + false + ); + } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/JerryRenderer.java b/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/JerryRenderer.java index b377b997..6010efad 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/JerryRenderer.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/JerryRenderer.java @@ -17,9 +17,6 @@ public class JerryRenderer extends GeoEntityRenderer { @Override public RenderType getRenderType(JerryEntity animatable, ResourceLocation texture, @Nullable MultiBufferSource bufferSource, float partialTick) { - JerryEntity.Stage stage = animatable.getStage(); - return stage == JerryEntity.Stage.INFANT || stage == JerryEntity.Stage.MATURE - ? RenderType.entityTranslucent(texture) - : RenderType.entityCutoutNoCull(texture); + return RenderType.entityTranslucent(texture); } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/JerryEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/JerryEntity.java index c3686f3c..e48ab971 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/JerryEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/JerryEntity.java @@ -1,11 +1,15 @@ package com.craisinlord.antarchy.content.entity; import com.craisinlord.antarchy.config.AntarchySettings; +import com.craisinlord.antarchy.content.horde.CavarynHordeManager; import net.minecraft.nbt.CompoundTag; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.ByIdMap; import net.minecraft.util.Mth; import net.minecraft.util.StringRepresentable; @@ -71,6 +75,8 @@ public class JerryEntity extends Monster implements GeoEntity { private int stageAgeTicks; private int attachDamageTicks; private int attackCooldownTicks; + private int alphaDiveCooldownTicks; + private boolean attachedToTarget; public JerryEntity(EntityType entityType, Level level) { super(entityType, level); @@ -145,6 +151,9 @@ public class JerryEntity extends Monster implements GeoEntity { if (this.attackCooldownTicks > 0) { this.attackCooldownTicks--; } + if (this.alphaDiveCooldownTicks > 0) { + this.alphaDiveCooldownTicks--; + } Stage stage = this.getStage(); if (stage == Stage.INFANT || stage == Stage.MATURE) { @@ -156,20 +165,43 @@ public class JerryEntity extends Monster implements GeoEntity { private void tickGrowth() { Stage stage = this.getStage(); - if (stage == Stage.ALPHA || stage == Stage.GAMMA) { + if (stage == Stage.GAMMA) { return; } - this.stageAgeTicks++; + this.stageAgeTicks += this.growthTickAmount(); if (this.stageAgeTicks < GROWTH_TICKS) { return; } this.stageAgeTicks = 0; - this.setStage(stage == Stage.INFANT ? Stage.MATURE : (this.random.nextBoolean() ? Stage.ALPHA : Stage.GAMMA)); + this.setStage(switch (stage) { + case INFANT -> Stage.MATURE; + case MATURE -> Stage.ALPHA; + case ALPHA -> Stage.GAMMA; + case GAMMA -> Stage.GAMMA; + }); + } + + private int growthTickAmount() { + if (!(this.level() instanceof ServerLevel serverLevel)) { + return 1; + } + + int hordeLevel = 0; + for (ServerPlayer player : serverLevel.players()) { + if (player.isSpectator() || player.distanceToSqr(this) > 96.0D * 96.0D) { + continue; + } + hordeLevel = Math.max(hordeLevel, CavarynHordeManager.getHordeLevel(player)); + } + + float intensity = Mth.clamp(hordeLevel / (float) CavarynHordeManager.maxHordeLevel(), 0.0F, 1.0F); + return 1 + Math.round(intensity * intensity * 99.0F); } private void tickAttachedForm(Stage stage) { LivingEntity target = this.getTarget(); if (target == null || !target.isAlive()) { + this.attachedToTarget = false; this.drift(); return; } @@ -182,13 +214,18 @@ public class JerryEntity extends Monster implements GeoEntity { this.setDeltaMovement(this.getDeltaMovement().scale(0.55D).add(motion)); } if (distance < 1.15D) { + this.attachedToTarget = true; this.setPos(targetPos.x, targetPos.y, targetPos.z); this.setDeltaMovement(Vec3.ZERO); if (++this.attachDamageTicks >= ATTACH_DAMAGE_INTERVAL) { this.attachDamageTicks = 0; + Vec3 targetMotion = target.getDeltaMovement(); target.hurt(this.damageSources().mobAttack(this), (float) stage.attackDamage()); + target.setDeltaMovement(targetMotion); + target.hurtMarked = true; } } else { + this.attachedToTarget = false; this.attachDamageTicks = 0; } } @@ -201,14 +238,27 @@ public class JerryEntity extends Monster implements GeoEntity { } Stage stage = this.getStage(); - Vec3 targetPos = target.getEyePosition().add(0.0D, -0.35D, 0.0D); + Vec3 targetPos = target.getEyePosition(); + Vec3 hoverPos = targetPos.add(0.0D, 5.0D, 0.0D); + Vec3 toHover = hoverPos.subtract(this.position()); Vec3 toTarget = targetPos.subtract(this.position()); - double distance = toTarget.length(); + double hoverDistance = toHover.length(); + double targetDistance = toTarget.length(); + double horizontalDistance = this.position().subtract(targetPos).horizontalDistance(); this.faceTarget(target); - if (distance > 0.01D) { - this.setDeltaMovement(this.getDeltaMovement().scale(0.65D).add(toTarget.normalize().scale(0.22D))); + if (this.alphaDiveCooldownTicks > 0) { + this.setDeltaMovement(this.getDeltaMovement().scale(0.8D).add(toTarget.normalize().scale(0.28D)).add(0.0D, -0.08D, 0.0D)); + } else if (hoverDistance > 0.01D) { + Vec3 desiredMotion = toHover.normalize().scale(0.20D); + this.setDeltaMovement(this.getDeltaMovement().scale(0.72D).add(desiredMotion)); } - if (distance < 2.1D && this.attackCooldownTicks <= 0) { + + if (this.alphaDiveCooldownTicks <= 0 && targetDistance < 9.0D && horizontalDistance < 7.0D) { + this.alphaDiveCooldownTicks = 30; + this.setDeltaMovement(this.getDeltaMovement().add(0.0D, -0.55D, 0.0D).add(toTarget.normalize().scale(0.42D))); + } + + if (targetDistance < 2.3D && this.attackCooldownTicks <= 0) { this.faceTarget(target); this.attackCooldownTicks = 24; this.entityData.set(ATTACK_ANIM_TICKS, ATTACK_ANIM_DURATION); @@ -252,9 +302,23 @@ public class JerryEntity extends Monster implements GeoEntity { @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); - if (this.isAdultStage() && stack.getItem() instanceof SpawnEggItem spawnEggItem && spawnEggItem.getType(stack) == this.getType()) { + if (stack.is(BuiltInRegistries.ITEM.get(ResourceLocation.fromNamespaceAndPath(com.craisinlord.antarchy.Antarchy.MODID, "jerry_nucleus")))) { + if (!this.level().isClientSide) { + Stage nextStage = this.nextGrowthStage(); + if (nextStage != this.getStage()) { + this.setStage(nextStage); + this.stageAgeTicks = 0; + if (!player.getAbilities().instabuild) { + stack.shrink(1); + } + } + } + return InteractionResult.sidedSuccess(this.level().isClientSide); + } + + if (stack.getItem() instanceof SpawnEggItem spawnEggItem && spawnEggItem.getType(stack) == this.getType()) { if (this.level() instanceof ServerLevel serverLevel && this.getType().create(serverLevel) instanceof JerryEntity infant) { - infant.setStage(Stage.INFANT); + infant.setStage(this.isAdultStage() ? Stage.INFANT : this.randomAdultStage()); infant.moveTo(this.getX(), this.getY(), this.getZ(), this.random.nextFloat() * 360.0F, 0.0F); infant.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(infant.blockPosition()), MobSpawnType.MOB_SUMMONED, null); serverLevel.addFreshEntity(infant); @@ -304,6 +368,24 @@ public class JerryEntity extends Monster implements GeoEntity { return false; } + @Override + public boolean isPushable() { + return !this.isAttachedYoungStage() && super.isPushable(); + } + + @Override + public void push(Entity entity) { + if (this.isAttachedYoungStage()) { + return; + } + super.push(entity); + } + + @Override + public boolean canBeCollidedWith() { + return !this.isAttachedYoungStage() && super.canBeCollidedWith(); + } + @Override protected void checkFallDamage(double y, boolean onGround, BlockState state, net.minecraft.core.BlockPos pos) { } @@ -354,6 +436,24 @@ public class JerryEntity extends Monster implements GeoEntity { return stage == Stage.ALPHA || stage == Stage.GAMMA; } + private Stage nextGrowthStage() { + return switch (this.getStage()) { + case INFANT -> Stage.MATURE; + case MATURE -> Stage.ALPHA; + case ALPHA -> Stage.GAMMA; + case GAMMA -> Stage.GAMMA; + }; + } + + private Stage randomAdultStage() { + return this.random.nextBoolean() ? Stage.ALPHA : Stage.GAMMA; + } + + private boolean isAttachedYoungStage() { + Stage stage = this.getStage(); + return this.attachedToTarget && (stage == Stage.INFANT || stage == Stage.MATURE); + } + private class GammaMeleeGoal extends MeleeAttackGoal { GammaMeleeGoal() { super(JerryEntity.this, 1.35D, false); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/UpwardFallingBlockEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/UpwardFallingBlockEntity.java index 57665291..79e97e33 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/UpwardFallingBlockEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/UpwardFallingBlockEntity.java @@ -21,7 +21,6 @@ import java.util.function.Supplier; public class UpwardFallingBlockEntity extends Entity { - /** Set by the platform registration before any block tick fires. */ public static Supplier> TYPE; private static final EntityDataAccessor DATA_BLOCK_STATE = diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/WaterBombEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/WaterBombEntity.java index dd3a5810..e2de6b7b 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/WaterBombEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/WaterBombEntity.java @@ -124,7 +124,7 @@ public class WaterBombEntity extends ThrowableProjectile { level.removeBlock(hitPos, false); } else if (level.isEmptyBlock(hitPos) && level.getBlockState(hitPos.below()).isSolid()) { level.setBlock(hitPos, Blocks.WATER.defaultBlockState().setValue(LiquidBlock.LEVEL, 1), 3); - level.scheduleTick(hitPos, Fluids.WATER, 2); + level.scheduleTick(hitPos, Fluids.FLOWING_WATER, 2); } } this.discard(); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/glimmer/GlimmerEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/glimmer/GlimmerEntity.java index 2afb0a49..1d4a423a 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/glimmer/GlimmerEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/glimmer/GlimmerEntity.java @@ -22,6 +22,8 @@ import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageTypes; +import net.minecraft.tags.DamageTypeTags; import net.minecraft.world.entity.AgeableMob; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityDimensions; @@ -132,7 +134,7 @@ public class GlimmerEntity extends TamableAnimal implements GeoEntity { @Override public boolean isInvulnerableTo(DamageSource damageSource) { - return true; + return !damageSource.is(DamageTypeTags.BYPASSES_INVULNERABILITY) && !damageSource.is(DamageTypes.GENERIC); } @Override diff --git a/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeDefinitions.java b/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeDefinitions.java index 28faaf6a..3b4d7f06 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeDefinitions.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeDefinitions.java @@ -113,7 +113,7 @@ public final class CavarynHordeDefinitions { for (int i = 0; i < count; i++) { EntityType type = entry.randomType(random); if (type != null) { - choices.add(new SpawnChoice(type, entry.trackCompletion, entry.heavyArrivalEffect)); + choices.add(new SpawnChoice(type, entry.trackCompletion, entry.heavyArrivalEffect, entry.jerryStage)); } } } @@ -137,7 +137,7 @@ public final class CavarynHordeDefinitions { } } - public record SpawnChoice(EntityType type, boolean trackCompletion, boolean heavyArrivalEffect) { + public record SpawnChoice(EntityType type, boolean trackCompletion, boolean heavyArrivalEffect, String jerryStage) { } private static final class Entry { @@ -153,10 +153,11 @@ public final class CavarynHordeDefinitions { private final boolean warning; private final boolean trackCompletion; private final boolean heavyArrivalEffect; + private final String jerryStage; private Entry(TagKey> entityTag, int weight, int baseCount, int highAttentionBaseCount, int perPlayerCount, int perPlayers, int perPlayersCount, int minCount, int maxCount, boolean warning, - boolean trackCompletion, boolean heavyArrivalEffect) { + boolean trackCompletion, boolean heavyArrivalEffect, String jerryStage) { this.entityTag = entityTag; this.weight = Math.max(1, weight); this.baseCount = baseCount; @@ -169,6 +170,7 @@ public final class CavarynHordeDefinitions { this.warning = warning; this.trackCompletion = trackCompletion; this.heavyArrivalEffect = heavyArrivalEffect; + this.jerryStage = jerryStage; } private static Entry fromJson(JsonObject json) { @@ -191,7 +193,8 @@ public final class CavarynHordeDefinitions { getInt(json, "max_count", Integer.MAX_VALUE), getBoolean(json, "warning", false), getBoolean(json, "track_completion", false), - getBoolean(json, "heavy_arrival_effect", false) + getBoolean(json, "heavy_arrival_effect", false), + getString(json, "jerry_stage", "") ); } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeManager.java b/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeManager.java index 98754980..60c54757 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeManager.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/horde/CavarynHordeManager.java @@ -3,6 +3,7 @@ package com.craisinlord.antarchy.content.horde; import com.craisinlord.antarchy.Antarchy; import com.craisinlord.antarchy.content.AntarchySoundEvents; import com.craisinlord.antarchy.content.AntarchyTags; +import com.craisinlord.antarchy.content.entity.JerryEntity; import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakeSync; import com.craisinlord.antarchy.content.network.HordeIntensitySync; import java.util.ArrayList; @@ -38,6 +39,7 @@ import net.minecraft.world.entity.monster.Enemy; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.saveddata.SavedData; import net.minecraft.world.phys.AABB; @@ -48,6 +50,10 @@ public final class CavarynHordeManager { Registries.DIMENSION, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "cavaryn") ); + private static final ResourceKey BIOWART_CAVES = ResourceKey.create( + Registries.BIOME, + ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "biowart_caves") + ); private static final ResourceLocation DORMANT_HORDE = hordeId("dormant"); private static final ResourceLocation AWAKENING_HORDE = hordeId("awakening"); private static final ResourceLocation WAVE_ONE_HORDE = hordeId("wave_1"); @@ -58,6 +64,10 @@ public final class CavarynHordeManager { private static final int GROUP_RADIUS_BLOCKS = 128; private static final int ATTENTION_THRESHOLD = 100; + private static final int HOSTILE_KILL_ATTENTION = 4; + private static final int MOB_KILL_ATTENTION = 3; + private static final int EGG_OR_NEST_BREAK_ATTENTION = 5; + private static final int BLOCK_BREAK_ATTENTION = 1; private static final int STALE_ATTENTION_PRUNE_TICKS = 20 * 60 * 20; private static final int PLAYER_CHECK_INTERVAL = 20; private static final int AREA_ATTENTION_INTERVAL = 20 * 45; @@ -105,7 +115,7 @@ public final class CavarynHordeManager { if (isPlayerInActiveEncounter(level, player)) { return; } - addAttention(level, player, killed instanceof Enemy || killed.getType().getCategory() == MobCategory.MONSTER ? 18 : 8); + addAttention(level, player, scaleActionAttention(level, killed instanceof Enemy || killed.getType().getCategory() == MobCategory.MONSTER ? HOSTILE_KILL_ATTENTION : MOB_KILL_ATTENTION)); } public static void recordBlockBreak(ServerPlayer player, BlockState brokenState, BlockPos pos) { @@ -115,7 +125,7 @@ public final class CavarynHordeManager { if (!isHordeBiome(level, pos) || isPlayerInActiveEncounter(level, player)) { return; } - addAttention(level, player, isEggOrNest(brokenState) ? 22 : 2); + addAttention(level, player, scaleActionAttention(level, isEggOrNest(brokenState) ? EGG_OR_NEST_BREAK_ATTENTION : BLOCK_BREAK_ATTENTION)); } public static boolean isHordeBiome(ServerLevelAccessor level, BlockPos pos) { @@ -207,7 +217,7 @@ public final class CavarynHordeManager { if (encounter == null) { tickDormantPressure(level, data, player, attention, currentArea, gameTime); } - HordeIntensitySync.send(player, encounter != null ? encounter.intensity(gameTime) : attention.attention / (float) ATTENTION_THRESHOLD); + HordeIntensitySync.send(player, attention.attention / (float) ATTENTION_THRESHOLD); } for (Map.Entry entry : data.players.entrySet()) { @@ -272,7 +282,7 @@ public final class CavarynHordeManager { return; } - CavarynHordeDefinitions.Definition definition = CavarynHordeDefinitions.get(level, DORMANT_HORDE); + CavarynHordeDefinitions.Definition definition = CavarynHordeDefinitions.get(level, hordeForPosition(level, player.blockPosition(), DORMANT_HORDE)); int existing = countNearbyDirectHordeMobs(level, player.blockPosition(), 48.0D); if (existing >= definition.resolvedMaxActive(level, scaleSpawnCount(level, MAX_DORMANT_MOBS_PER_AREA))) { data.areaSpawnCooldowns.put(areaKey, gameTime + DORMANT_MIN_SPAWN_INTERVAL); @@ -310,6 +320,15 @@ public final class CavarynHordeManager { data.setDirty(); } + private static int scaleActionAttention(ServerLevel level, int amount) { + float multiplier = switch (level.getDifficulty()) { + case HARD -> 1.5F; + case EASY -> 0.75F; + default -> 1.0F; + }; + return Math.max(1, Math.round(amount * multiplier)); + } + private static void startEncounter(ServerLevel level, HordeData data, ServerPlayer seedPlayer) { Encounter existing = findNearbyEncounter(data, seedPlayer.blockPosition()); if (existing != null) { @@ -336,6 +355,37 @@ public final class CavarynHordeManager { data.setDirty(); } + private static List buildTargetedSpawnList(ServerLevel level, ResourceLocation horde, List targets, int players, boolean highAttention) { + Map> targetsByHorde = new HashMap<>(); + for (ServerPlayer target : targets) { + ResourceLocation targetHorde = hordeForPosition(level, target.blockPosition(), horde); + targetsByHorde.computeIfAbsent(targetHorde, ignored -> new ArrayList<>()).add(target); + } + + List choices = new ArrayList<>(); + for (Map.Entry> entry : targetsByHorde.entrySet()) { + List groupTargets = entry.getValue(); + int groupPlayers = Math.max(1, Math.min(players, groupTargets.size())); + List groupChoices = CavarynHordeDefinitions.get(level, entry.getKey()) + .buildSpawnList(level, groupPlayers, highAttention, level.random); + for (CavarynHordeDefinitions.SpawnChoice choice : groupChoices) { + ServerPlayer target = groupTargets.get(level.random.nextInt(groupTargets.size())); + choices.add(new TargetedSpawnChoice(choice, target)); + } + } + java.util.Collections.shuffle(choices); + return choices; + } + + private static boolean shouldWarnForTargets(ServerLevel level, ResourceLocation horde, List targets) { + for (ServerPlayer target : targets) { + if (CavarynHordeDefinitions.get(level, hordeForPosition(level, target.blockPosition(), horde)).shouldWarn()) { + return true; + } + } + return false; + } + private static void spawnAwakeningSkirmish(ServerLevel level, Encounter encounter, List targets) { if (level.getDifficulty() == Difficulty.PEACEFUL) { return; @@ -346,15 +396,13 @@ public final class CavarynHordeManager { return; } - List choices = CavarynHordeDefinitions.get(level, AWAKENING_HORDE) - .buildSpawnList(level, players, false, level.random); + List choices = buildTargetedSpawnList(level, AWAKENING_HORDE, targets, players, false); int spawned = 0; - for (CavarynHordeDefinitions.SpawnChoice choice : choices) { + for (TargetedSpawnChoice choice : choices) { if (spawned >= capacity) { break; } - ServerPlayer target = targets.get(level.random.nextInt(targets.size())); - if (spawnDirectMob(level, encounter, choice, target)) { + if (spawnDirectMob(level, encounter, choice.choice(), choice.target())) { spawned++; } } @@ -371,19 +419,18 @@ public final class CavarynHordeManager { return; } - CavarynHordeDefinitions.Definition definition = CavarynHordeDefinitions.get(level, hordeForWave(encounter.wave)); - if (definition.shouldWarn()) { - warnHercules(level, encounter.center, targets); + ResourceLocation horde = hordeForWave(encounter.wave); + if (shouldWarnForTargets(level, horde, targets)) { + warnHercules(level, encounter.center, targets); } - List choices = definition.buildSpawnList(level, players, false, level.random); + List choices = buildTargetedSpawnList(level, horde, targets, players, false); int spawned = 0; - for (CavarynHordeDefinitions.SpawnChoice choice : choices) { + for (TargetedSpawnChoice choice : choices) { if (spawned >= capacity) { break; } - ServerPlayer target = targets.get(level.random.nextInt(targets.size())); - if (spawnDirectMob(level, encounter, choice, target)) { + if (spawnDirectMob(level, encounter, choice.choice(), choice.target())) { spawned++; } } @@ -401,6 +448,7 @@ public final class CavarynHordeManager { } mob.moveTo(spawnPos.getX() + 0.5D, spawnPos.getY(), spawnPos.getZ() + 0.5D, level.random.nextFloat() * 360.0F, 0.0F); mob.finalizeSpawn(level, level.getCurrentDifficultyAt(spawnPos), MobSpawnType.EVENT, null); + applyJerryStage(mob, choice.jerryStage(), level.random); if (mob.canAttack(target)) { mob.setTarget(target); } @@ -425,6 +473,27 @@ public final class CavarynHordeManager { return true; } + private static void applyJerryStage(Mob mob, String stageName, RandomSource random) { + if (!(mob instanceof JerryEntity jerry) || stageName == null || stageName.isBlank()) { + return; + } + + JerryEntity.Stage stage = switch (stageName) { + case "random" -> JerryEntity.Stage.values()[random.nextInt(JerryEntity.Stage.values().length)]; + case "random_young" -> random.nextBoolean() ? JerryEntity.Stage.INFANT : JerryEntity.Stage.MATURE; + case "random_adult" -> random.nextBoolean() ? JerryEntity.Stage.ALPHA : JerryEntity.Stage.GAMMA; + default -> JerryEntity.Stage.byName(stageName); + }; + jerry.setStage(stage); + } + + private static ResourceLocation hordeForPosition(ServerLevel level, BlockPos pos, ResourceLocation horde) { + if (level.getBiome(pos).is(BIOWART_CAVES)) { + return ResourceLocation.fromNamespaceAndPath(horde.getNamespace(), "biowart_caves/" + horde.getPath()); + } + return horde; + } + private static int countNearbyDirectHordeMobs(ServerLevel level, BlockPos center, double radius) { AABB box = new AABB(center).inflate(radius); return level.getEntitiesOfClass(Mob.class, box, mob -> CavarynHordeDefinitions.isConfiguredHordeType(level, mob.getType())).size(); @@ -598,6 +667,9 @@ public final class CavarynHordeManager { RECOVERY } + private record TargetedSpawnChoice(CavarynHordeDefinitions.SpawnChoice choice, ServerPlayer target) { + } + public static final class HordeData extends SavedData { private static final String PLAYERS_KEY = "Players"; private static final String ENCOUNTERS_KEY = "Encounters"; @@ -716,14 +788,6 @@ public final class CavarynHordeManager { private final Set hordeMobIds = new HashSet<>(); private final Set herculesIds = new HashSet<>(); - private float intensity(long gameTime) { - return switch (this.phase) { - case AWAKENING -> Mth.clamp((gameTime - this.startedAt) / (float) AWAKENING_TICKS, 0.25F, 1.0F); - case SWARMING, HERCULES -> 1.0F; - case RECOVERY -> Mth.clamp((this.recoveryEndsAt - gameTime) / (float) RECOVERY_TICKS, 0.0F, 0.75F); - }; - } - private CompoundTag save() { CompoundTag tag = new CompoundTag(); tag.putUUID("Id", this.id); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/item/SizeRayItem.java b/common/src/main/java/com/craisinlord/antarchy/content/item/SizeRayItem.java index 2a75c178..aa903223 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/item/SizeRayItem.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/item/SizeRayItem.java @@ -202,6 +202,7 @@ public class SizeRayItem extends ProjectileWeaponItem implements GeoItem { ? "tooltip.antarchy.shrink_ray" : "tooltip.antarchy.growth_ray"; tooltipComponents.add(Component.translatable(tooltipKey).withStyle(ChatFormatting.GRAY)); + tooltipComponents.add(Component.translatable("tooltip.antarchy.size_ray_milk_reset").withStyle(ChatFormatting.GRAY)); } @Override diff --git a/common/src/main/java/com/craisinlord/antarchy/content/item/ultimate/UltimateCrossbowItem.java b/common/src/main/java/com/craisinlord/antarchy/content/item/ultimate/UltimateCrossbowItem.java index 7ab52592..d5bd65b3 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/item/ultimate/UltimateCrossbowItem.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/item/ultimate/UltimateCrossbowItem.java @@ -4,6 +4,9 @@ import com.craisinlord.antarchy.config.AntarchySettings; import net.minecraft.ChatFormatting; import net.minecraft.core.component.DataComponents; import net.minecraft.network.chat.Component; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.Tag; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.util.Mth; @@ -18,6 +21,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.component.ChargedProjectiles; +import net.minecraft.world.item.component.CustomData; import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.item.enchantment.ItemEnchantments; import net.minecraft.world.level.Level; @@ -30,6 +34,8 @@ public class UltimateCrossbowItem extends CrossbowItem { private static final int FIRE_COOLDOWN_TICKS = 5; // 4 shots/sec private static final float SHOOTING_POWER = 3.15F; private static final double VANILLA_CROSSBOW_ARROW_DAMAGE = 7.0D; + private static final String RESERVE_PROJECTILES_TAG = "UltimateCrossbowProjectiles"; + private static final String PROJECTILE_ITEM_TAG = "Item"; public UltimateCrossbowItem(Item.Properties properties) { super(properties); @@ -84,15 +90,14 @@ public class UltimateCrossbowItem extends CrossbowItem { for (int i = 0; i < toLoad; i++) { projectiles.add(ammoType.copyWithCount(1)); } - stack.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(projectiles)); + saveLoadedProjectiles(stack, player.registryAccess(), projectiles); level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.CROSSBOW_LOADING_END.value(), SoundSource.PLAYERS, 1.0F, 1.0F); } private void fireOneShot(Level level, Player player, InteractionHand hand, ItemStack stack) { - ChargedProjectiles charged = stack.getOrDefault(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY); - List all = new ArrayList<>(charged.getItems().stream().filter(s -> !s.isEmpty()).toList()); + List all = getLoadedProjectiles(stack, player.registryAccess()); if (all.isEmpty()) return; ItemStack arrow = all.remove(0); @@ -110,10 +115,7 @@ public class UltimateCrossbowItem extends CrossbowItem { this.performShooting(level, player, hand, stack, SHOOTING_POWER, 1.0F, null); // performShooting clears CHARGED_PROJECTILES; restore remaining valid arrows if any - List remaining = all.stream().filter(s -> !s.isEmpty()).toList(); - if (!remaining.isEmpty()) { - stack.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(remaining)); - } + saveLoadedProjectiles(stack, player.registryAccess(), all); } @Override @@ -139,10 +141,10 @@ public class UltimateCrossbowItem extends CrossbowItem { @Override public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { - ChargedProjectiles charged = stack.getOrDefault(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY); - if (!charged.isEmpty()) { - int count = charged.getItems().size(); - Component arrowName = charged.getItems().get(0).getHoverName(); + List loadedProjectiles = getLoadedProjectiles(stack, context.registries()); + if (!loadedProjectiles.isEmpty()) { + int count = loadedProjectiles.size(); + Component arrowName = loadedProjectiles.get(0).getHoverName(); tooltipComponents.add(Component.translatable("item.antarchy.ultimate_crossbow.arrows_remaining", count, arrowName) .withStyle(ChatFormatting.GRAY)); } @@ -214,4 +216,58 @@ public class UltimateCrossbowItem extends CrossbowItem { public int getEnchantmentValue() { return AntarchySettings.ultimateCrossbowEnchantability(); } + + private static List getLoadedProjectiles(ItemStack crossbow, net.minecraft.core.HolderLookup.Provider registries) { + List projectiles = new ArrayList<>(); + ChargedProjectiles charged = crossbow.getOrDefault(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY); + for (ItemStack projectile : charged.getItems()) { + if (!projectile.isEmpty() && projectiles.size() < MAX_ARROWS) { + projectiles.add(projectile.copyWithCount(1)); + } + } + + CompoundTag customData = crossbow.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag(); + ListTag reserve = customData.getList(RESERVE_PROJECTILES_TAG, Tag.TAG_COMPOUND); + for (int i = 0; i < reserve.size() && projectiles.size() < MAX_ARROWS; i++) { + ItemStack projectile = ItemStack.parseOptional(registries, reserve.getCompound(i).getCompound(PROJECTILE_ITEM_TAG)); + if (!projectile.isEmpty()) { + projectiles.add(projectile.copyWithCount(1)); + } + } + return projectiles; + } + + private static void saveLoadedProjectiles(ItemStack crossbow, net.minecraft.core.HolderLookup.Provider registries, List projectiles) { + List sanitizedProjectiles = projectiles.stream() + .filter(projectile -> !projectile.isEmpty()) + .limit(MAX_ARROWS) + .map(projectile -> projectile.copyWithCount(1)) + .toList(); + + if (sanitizedProjectiles.isEmpty()) { + crossbow.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY); + clearReserveProjectiles(crossbow); + return; + } + + crossbow.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(List.of(sanitizedProjectiles.get(0)))); + ListTag reserve = new ListTag(); + for (int i = 1; i < sanitizedProjectiles.size(); i++) { + CompoundTag entry = new CompoundTag(); + entry.put(PROJECTILE_ITEM_TAG, sanitizedProjectiles.get(i).save(registries)); + reserve.add(entry); + } + + CustomData.update(DataComponents.CUSTOM_DATA, crossbow, tag -> { + if (reserve.isEmpty()) { + tag.remove(RESERVE_PROJECTILES_TAG); + } else { + tag.put(RESERVE_PROJECTILES_TAG, reserve); + } + }); + } + + private static void clearReserveProjectiles(ItemStack crossbow) { + CustomData.update(DataComponents.CUSTOM_DATA, crossbow, tag -> tag.remove(RESERVE_PROJECTILES_TAG)); + } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisBiomeSource.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisBiomeSource.java index f97fb11e..29eb9a45 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisBiomeSource.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/ThoraxisBiomeSource.java @@ -59,11 +59,12 @@ public final class ThoraxisBiomeSource extends BiomeSource { private final int dreamDunesMaxQuartY; private final int umbralHillsMaxQuartY; private final int lucidPoolsMinQuartY; - private final Holder nightmareWastesBiome; - private final Holder dreamDunesBiome; - private final Holder umbralHillsBiome; - private final Holder lucidPoolsBiome; - private final Holder cloudSeaBiome; + private volatile boolean biomesResolved; + private Holder nightmareWastesBiome; + private Holder dreamDunesBiome; + private Holder umbralHillsBiome; + private Holder lucidPoolsBiome; + private Holder cloudSeaBiome; private static final ThreadLocal CLOUD_SEA_CACHE = ThreadLocal.withInitial(() -> new Long2DoubleOpenHashMap(512)); @@ -81,11 +82,23 @@ public final class ThoraxisBiomeSource extends BiomeSource { this.dreamDunesMaxQuartY = QuartPos.fromBlock(dreamDunesMaxY); this.umbralHillsMaxQuartY = QuartPos.fromBlock(umbralHillsMaxY); this.lucidPoolsMinQuartY = QuartPos.fromBlock(lucidPoolsMinY); - this.nightmareWastesBiome = this.findBiome(NIGHTMARE_WASTES); - this.dreamDunesBiome = this.findBiome(DREAM_DUNES); - this.umbralHillsBiome = this.findBiome(UMBRAL_HILLS); - this.lucidPoolsBiome = this.findBiome(LUCID_POOLS); - this.cloudSeaBiome = this.findBiome(CLOUD_SEA); + } + + private void resolveBiomesIfNeeded() { + if (this.biomesResolved) { + return; + } + synchronized (this) { + if (this.biomesResolved) { + return; + } + this.nightmareWastesBiome = this.findBiome(NIGHTMARE_WASTES); + this.dreamDunesBiome = this.findBiome(DREAM_DUNES); + this.umbralHillsBiome = this.findBiome(UMBRAL_HILLS); + this.lucidPoolsBiome = this.findBiome(LUCID_POOLS); + this.cloudSeaBiome = this.findBiome(CLOUD_SEA); + this.biomesResolved = true; + } } private Climate.ParameterList> parameters() { @@ -116,6 +129,7 @@ public final class ThoraxisBiomeSource extends BiomeSource { @Override public Holder getNoiseBiome(int x, int y, int z, Climate.Sampler sampler) { + this.resolveBiomesIfNeeded(); if (this.cloudSeaBiome != null && cachedIsCloudSeaZone(x, z)) { return this.cloudSeaBiome; } diff --git a/common/src/main/java/com/craisinlord/antarchy/mixins/FarChunkSetBlockWarningMixin.java b/common/src/main/java/com/craisinlord/antarchy/mixins/FarChunkSetBlockWarningMixin.java new file mode 100644 index 00000000..42b74700 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/mixins/FarChunkSetBlockWarningMixin.java @@ -0,0 +1,16 @@ +package com.craisinlord.antarchy.mixins; + +import net.minecraft.server.level.WorldGenRegion; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(WorldGenRegion.class) +public abstract class FarChunkSetBlockWarningMixin { + @Redirect( + method = "ensureCanWrite", + at = @At(value = "INVOKE", target = "Lnet/minecraft/Util;logAndPauseIfInIde(Ljava/lang/String;)V") + ) + private void antarchy$suppressFarChunkWarning(String message) { + } +} diff --git a/common/src/main/java/com/craisinlord/antarchy/mixins/MilkBucketSizeResetMixin.java b/common/src/main/java/com/craisinlord/antarchy/mixins/MilkBucketSizeResetMixin.java new file mode 100644 index 00000000..d44ccb05 --- /dev/null +++ b/common/src/main/java/com/craisinlord/antarchy/mixins/MilkBucketSizeResetMixin.java @@ -0,0 +1,26 @@ +package com.craisinlord.antarchy.mixins; + +import com.craisinlord.antarchy.content.entity.SizeRayProjectileEntity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.AttributeInstance; +import net.minecraft.world.entity.ai.attributes.Attributes; +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.CallbackInfoReturnable; + +@Mixin(LivingEntity.class) +public abstract class MilkBucketSizeResetMixin { + @Inject(method = "removeAllEffects", at = @At("TAIL")) + private void antarchy$resetSizeRayScale(CallbackInfoReturnable cir) { + LivingEntity self = (LivingEntity) (Object) this; + if (self.level().isClientSide) { + return; + } + + AttributeInstance scaleAttribute = self.getAttribute(Attributes.SCALE); + if (scaleAttribute != null) { + SizeRayProjectileEntity.writeModifier(scaleAttribute, 0.0D); + } + } +} diff --git a/common/src/main/resources/antarchy-common.mixins.json b/common/src/main/resources/antarchy-common.mixins.json index 837d5aad..899ada7f 100644 --- a/common/src/main/resources/antarchy-common.mixins.json +++ b/common/src/main/resources/antarchy-common.mixins.json @@ -12,6 +12,7 @@ "DreamFireBlockMixin", "DreamSandFallingSpeedMixin", "DreamSandLowGravityMixin", + "FarChunkSetBlockWarningMixin", "FireVisualBaseFireBlockMixin", "FireVisualEntityMixin", "FlintAndSteelPortalIgnitionMixin", @@ -19,6 +20,7 @@ "FrogVariantBootstrapMixin", "GlowSquidLumenSpawnMixin", "GlowVinesUnderLeavesMixin", + "MilkBucketSizeResetMixin", "GoopedStepSoundMixin", "ExperimentalSettingsLevelSummaryMixin", "NightmareSwordDamageMixin", diff --git a/common/src/main/resources/assets/antarchy/blockstates/antiwater.json b/common/src/main/resources/assets/antarchy/blockstates/antiwater.json new file mode 100644 index 00000000..777d6ac3 --- /dev/null +++ b/common/src/main/resources/assets/antarchy/blockstates/antiwater.json @@ -0,0 +1,20 @@ +{ + "variants": { + "level=0": { "model": "minecraft:block/water" }, + "level=1": { "model": "minecraft:block/water" }, + "level=2": { "model": "minecraft:block/water" }, + "level=3": { "model": "minecraft:block/water" }, + "level=4": { "model": "minecraft:block/water" }, + "level=5": { "model": "minecraft:block/water" }, + "level=6": { "model": "minecraft:block/water" }, + "level=7": { "model": "minecraft:block/water" }, + "level=8": { "model": "minecraft:block/water" }, + "level=9": { "model": "minecraft:block/water" }, + "level=10": { "model": "minecraft:block/water" }, + "level=11": { "model": "minecraft:block/water" }, + "level=12": { "model": "minecraft:block/water" }, + "level=13": { "model": "minecraft:block/water" }, + "level=14": { "model": "minecraft:block/water" }, + "level=15": { "model": "minecraft:block/water" } + } +} diff --git a/common/src/main/resources/assets/antarchy/lang/de_de.json b/common/src/main/resources/assets/antarchy/lang/de_de.json index 7ea2f918..170f9ebd 100644 --- a/common/src/main/resources/assets/antarchy/lang/de_de.json +++ b/common/src/main/resources/assets/antarchy/lang/de_de.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "Wachstumsstrahler", "tooltip.antarchy.shrink_ray": "Schrumpft Ziele dauerhaft. Gedrückt halten zum Aufladen.", "tooltip.antarchy.growth_ray": "Vergrößert Ziele dauerhaft. Gedrückt halten zum Aufladen.", + "tooltip.antarchy.size_ray_milk_reset": "Milch trinken setzt diesen Effekt zurück.", "tooltip.antarchy.reverie_bottle.capture": "Rechtsklicke mit einer Glasflasche auf eine Reverie, um sie einzufangen.", "tooltip.antarchy.reverie_bottle.release": "Rechtsklick, um die Reverie freizulassen.", "item.antarchy.gravity_gun": "Gravitationskanone", diff --git a/common/src/main/resources/assets/antarchy/lang/en_us.json b/common/src/main/resources/assets/antarchy/lang/en_us.json index ed0e1e47..07f89612 100644 --- a/common/src/main/resources/assets/antarchy/lang/en_us.json +++ b/common/src/main/resources/assets/antarchy/lang/en_us.json @@ -408,6 +408,7 @@ "item.antarchy.growth_ray": "Growth Ray", "tooltip.antarchy.shrink_ray": "Permanently shrinks targets. Hold down to charge.", "tooltip.antarchy.growth_ray": "Permanently Grows Targets. Hold down to charge.", + "tooltip.antarchy.size_ray_milk_reset": "Drinking milk resets this effect.", "tooltip.antarchy.reverie_bottle.capture": "Right click a Reverie with a glass bottle to store it.", "tooltip.antarchy.reverie_bottle.release": "Right click to release the Reverie.", "item.antarchy.gravity_gun": "Gravity Gun", @@ -567,6 +568,8 @@ "advancements.antarchy.visit_elythia.description": "Use a brown ant to reach Elythia.", "advancements.antarchy.visit_thoraxis.title": "Ant-ger Management", "advancements.antarchy.visit_thoraxis.description": "Use a red ant to reach Thoraxis.", + "advancements.antarchy.visit_cavaryn.title": "Antfestation Problem", + "advancements.antarchy.visit_cavaryn.description": "Enter the infested dimension of Cavaryn.", "advancements.antarchy.fallen_kingdom_castle.title": "I Used to Rule the World...", "advancements.antarchy.fallen_kingdom_castle.description": "Discover the Fallen Kingdom Castle.", "advancements.antarchy.fallen_king_crown.title": "Chunks would load when I gave the word...", @@ -935,6 +938,7 @@ "subtitles.antarchy.lurking_terror_bite": "Lurking Terror bites", "subtitles.antarchy.lurking_terror_fly_loop": "Lurking Terror flies", "subtitles.antarchy.stink_bug_fart": "Stink Bug farts", + "subtitles.antarchy.cavaryn_heartbeat": "Cavaryn pulses", "subtitles.antarchy.stink_bug_idle": "Stink Bug idles", "subtitles.antarchy.rolly_polly_idle": "Rolly Polly idles", "subtitles.antarchy.rolly_polly_wheel_mode": "Rolly Polly curls up", diff --git a/common/src/main/resources/assets/antarchy/lang/es_es.json b/common/src/main/resources/assets/antarchy/lang/es_es.json index 20a0869f..8d98cae7 100644 --- a/common/src/main/resources/assets/antarchy/lang/es_es.json +++ b/common/src/main/resources/assets/antarchy/lang/es_es.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "Rayo de crecimiento", "tooltip.antarchy.shrink_ray": "Encoge permanentemente a los objetivos. Mantén pulsado para cargar.", "tooltip.antarchy.growth_ray": "Aumenta permanentemente a los objetivos. Mantén pulsado para cargar.", + "tooltip.antarchy.size_ray_milk_reset": "Beber leche restablece este efecto.", "tooltip.antarchy.reverie_bottle.capture": "Haz clic derecho en una Reverie con una botella de cristal para guardarla.", "tooltip.antarchy.reverie_bottle.release": "Clic derecho para liberar a la Reverie.", "item.antarchy.gravity_gun": "Pistola gravitatoria", diff --git a/common/src/main/resources/assets/antarchy/lang/fr_fr.json b/common/src/main/resources/assets/antarchy/lang/fr_fr.json index f1ce6514..3bec1a97 100644 --- a/common/src/main/resources/assets/antarchy/lang/fr_fr.json +++ b/common/src/main/resources/assets/antarchy/lang/fr_fr.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "Rayon de croissance", "tooltip.antarchy.shrink_ray": "Rétrécit définitivement les cibles. Maintenez pour charger.", "tooltip.antarchy.growth_ray": "Agrandit définitivement les cibles. Maintenez pour charger.", + "tooltip.antarchy.size_ray_milk_reset": "Boire du lait réinitialise cet effet.", "tooltip.antarchy.reverie_bottle.capture": "Faites un clic droit sur une Reverie avec une fiole en verre pour la capturer.", "tooltip.antarchy.reverie_bottle.release": "Clic droit pour libérer la Reverie.", "item.antarchy.gravity_gun": "Canon à gravité", diff --git a/common/src/main/resources/assets/antarchy/lang/it_it.json b/common/src/main/resources/assets/antarchy/lang/it_it.json index 8f81036a..e8d39feb 100644 --- a/common/src/main/resources/assets/antarchy/lang/it_it.json +++ b/common/src/main/resources/assets/antarchy/lang/it_it.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "Raggio di crescita", "tooltip.antarchy.shrink_ray": "Rimpicciolisce permanentemente i bersagli. Tieni premuto per caricare.", "tooltip.antarchy.growth_ray": "Ingrandisce permanentemente i bersagli. Tieni premuto per caricare.", + "tooltip.antarchy.size_ray_milk_reset": "Bere il latte annulla questo effetto.", "tooltip.antarchy.reverie_bottle.capture": "Fai clic destro su una Reverie con una bottiglia di vetro per catturarla.", "tooltip.antarchy.reverie_bottle.release": "Fai clic destro per liberare la Reverie.", "item.antarchy.gravity_gun": "Cannone gravitazionale", diff --git a/common/src/main/resources/assets/antarchy/lang/ja_jp.json b/common/src/main/resources/assets/antarchy/lang/ja_jp.json index fa29e9fa..64e2d44a 100644 --- a/common/src/main/resources/assets/antarchy/lang/ja_jp.json +++ b/common/src/main/resources/assets/antarchy/lang/ja_jp.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "成長光線銃", "tooltip.antarchy.shrink_ray": "対象を永久に縮小します。長押しでチャージします。", "tooltip.antarchy.growth_ray": "対象を永久に巨大化します。長押しでチャージします。", + "tooltip.antarchy.size_ray_milk_reset": "牛乳を飲むとこの効果はリセットされます。", "tooltip.antarchy.reverie_bottle.capture": "ガラス瓶を持ってレヴェリーを右クリックすると収納できます。", "tooltip.antarchy.reverie_bottle.release": "右クリックでレヴェリーを解放します。", "item.antarchy.gravity_gun": "重力銃", diff --git a/common/src/main/resources/assets/antarchy/lang/ko_kr.json b/common/src/main/resources/assets/antarchy/lang/ko_kr.json index 482c2f4e..3b14981c 100644 --- a/common/src/main/resources/assets/antarchy/lang/ko_kr.json +++ b/common/src/main/resources/assets/antarchy/lang/ko_kr.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "성장 광선총", "tooltip.antarchy.shrink_ray": "대상을 영구적으로 축소합니다. 길게 눌러 충전합니다.", "tooltip.antarchy.growth_ray": "대상을 영구적으로 성장시킵니다. 길게 눌러 충전합니다.", + "tooltip.antarchy.size_ray_milk_reset": "우유를 마시면 이 효과가 초기화됩니다.", "tooltip.antarchy.reverie_bottle.capture": "유리병으로 레버리를 우클릭하여 담습니다.", "tooltip.antarchy.reverie_bottle.release": "우클릭하여 레버리를 풀어줍니다.", "item.antarchy.gravity_gun": "중력총", diff --git a/common/src/main/resources/assets/antarchy/lang/pt_br.json b/common/src/main/resources/assets/antarchy/lang/pt_br.json index ed9225e4..1ab826af 100644 --- a/common/src/main/resources/assets/antarchy/lang/pt_br.json +++ b/common/src/main/resources/assets/antarchy/lang/pt_br.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "Raio de Crescimento", "tooltip.antarchy.shrink_ray": "Encolhe alvos permanentemente. Segure para carregar.", "tooltip.antarchy.growth_ray": "Aumenta alvos permanentemente. Segure para carregar.", + "tooltip.antarchy.size_ray_milk_reset": "Beber leite redefine este efeito.", "tooltip.antarchy.reverie_bottle.capture": "Clique com o botão direito em uma Reverie com um frasco de vidro para guardá-la.", "tooltip.antarchy.reverie_bottle.release": "Clique com o botão direito para soltar a Reverie.", "item.antarchy.gravity_gun": "Arma Gravitacional", diff --git a/common/src/main/resources/assets/antarchy/lang/ru_ru.json b/common/src/main/resources/assets/antarchy/lang/ru_ru.json index a6c378bf..6ceee79f 100644 --- a/common/src/main/resources/assets/antarchy/lang/ru_ru.json +++ b/common/src/main/resources/assets/antarchy/lang/ru_ru.json @@ -382,6 +382,7 @@ "item.antarchy.growth_ray": "Увеличитель", "tooltip.antarchy.shrink_ray": "Навсегда уменьшает цель. Зажмите, чтобы зарядить.", "tooltip.antarchy.growth_ray": "Навсегда увеличивает цель. Зажмите, чтобы зарядить.", + "tooltip.antarchy.size_ray_milk_reset": "Питьё молока сбрасывает этот эффект.", "tooltip.antarchy.reverie_bottle.capture": "Нажмите ПКМ стеклянной бутылочкой по грёзе, чтобы поймать её.", "tooltip.antarchy.reverie_bottle.release": "Нажмите ПКМ, чтобы выпустить грёзу.", "item.antarchy.gravity_gun": "Гравитационная пушка", diff --git a/common/src/main/resources/assets/antarchy/lang/zh_cn.json b/common/src/main/resources/assets/antarchy/lang/zh_cn.json index 6ee17d2c..ff9ccc93 100644 --- a/common/src/main/resources/assets/antarchy/lang/zh_cn.json +++ b/common/src/main/resources/assets/antarchy/lang/zh_cn.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "生长射线枪", "tooltip.antarchy.shrink_ray": "永久缩小目标。按住以蓄力。", "tooltip.antarchy.growth_ray": "永久放大目标。按住以蓄力。", + "tooltip.antarchy.size_ray_milk_reset": "喝牛奶可重置此效果。", "tooltip.antarchy.reverie_bottle.capture": "手持玻璃瓶右键雷弗里即可将其收纳。", "tooltip.antarchy.reverie_bottle.release": "右键释放雷弗里。", "item.antarchy.gravity_gun": "重力枪", diff --git a/common/src/main/resources/assets/antarchy/lang/zh_tw.json b/common/src/main/resources/assets/antarchy/lang/zh_tw.json index 4b28e833..b30ef25d 100644 --- a/common/src/main/resources/assets/antarchy/lang/zh_tw.json +++ b/common/src/main/resources/assets/antarchy/lang/zh_tw.json @@ -406,6 +406,7 @@ "item.antarchy.growth_ray": "生長射線槍", "tooltip.antarchy.shrink_ray": "永久縮小目標。按住以蓄力。", "tooltip.antarchy.growth_ray": "永久放大目標。按住以蓄力。", + "tooltip.antarchy.size_ray_milk_reset": "喝牛奶可重置此效果。", "tooltip.antarchy.reverie_bottle.capture": "手持玻璃瓶右鍵雷弗裡即可將其收納。", "tooltip.antarchy.reverie_bottle.release": "右鍵釋放雷弗裡。", "item.antarchy.gravity_gun": "重力槍", diff --git a/common/src/main/resources/assets/antarchy/models/block/jerry_egg.json b/common/src/main/resources/assets/antarchy/models/block/jerry_egg.json index f73564b1..08d5c1a6 100644 --- a/common/src/main/resources/assets/antarchy/models/block/jerry_egg.json +++ b/common/src/main/resources/assets/antarchy/models/block/jerry_egg.json @@ -4,7 +4,7 @@ "texture_size": [64, 64], "textures": { "1": "antarchy:block/jerry_egg", - "particle": "antarchy:block/biomite" + "particle": "antarchy:block/jerry_egg_break_particle" }, "elements": [ { @@ -56,4 +56,4 @@ } } ] -} \ No newline at end of file +} diff --git a/common/src/main/resources/assets/antarchy/models/block/ouranwood_hanging_sign.json b/common/src/main/resources/assets/antarchy/models/block/ouranwood_hanging_sign.json index 66978fbd..6daa926e 100644 --- a/common/src/main/resources/assets/antarchy/models/block/ouranwood_hanging_sign.json +++ b/common/src/main/resources/assets/antarchy/models/block/ouranwood_hanging_sign.json @@ -1,5 +1,5 @@ { "textures": { - "particle": "antarchy:models/ouranwood/ouranwood_hanging_sign" + "particle": "antarchy:block/ouranwood/ouranwood_planks" } } diff --git a/common/src/main/resources/assets/antarchy/models/block/ouranwood_sign.json b/common/src/main/resources/assets/antarchy/models/block/ouranwood_sign.json index 3da2694c..6daa926e 100644 --- a/common/src/main/resources/assets/antarchy/models/block/ouranwood_sign.json +++ b/common/src/main/resources/assets/antarchy/models/block/ouranwood_sign.json @@ -1,5 +1,5 @@ { "textures": { - "particle": "antarchy:models/ouranwood/ouranwood_sign" + "particle": "antarchy:block/ouranwood/ouranwood_planks" } } diff --git a/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_hanging_sign.json b/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_hanging_sign.json index 66978fbd..6daa926e 100644 --- a/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_hanging_sign.json +++ b/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_hanging_sign.json @@ -1,5 +1,5 @@ { "textures": { - "particle": "antarchy:models/ouranwood/ouranwood_hanging_sign" + "particle": "antarchy:block/ouranwood/ouranwood_planks" } } diff --git a/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_sign.json b/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_sign.json index 3da2694c..6daa926e 100644 --- a/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_sign.json +++ b/common/src/main/resources/assets/antarchy/models/block/ouranwood_wall_sign.json @@ -1,5 +1,5 @@ { "textures": { - "particle": "antarchy:models/ouranwood/ouranwood_sign" + "particle": "antarchy:block/ouranwood/ouranwood_planks" } } diff --git a/common/src/main/resources/assets/antarchy/sounds.json b/common/src/main/resources/assets/antarchy/sounds.json index 03bfe42d..3636e670 100644 --- a/common/src/main/resources/assets/antarchy/sounds.json +++ b/common/src/main/resources/assets/antarchy/sounds.json @@ -1826,6 +1826,14 @@ } ] }, + "cavaryn_heartbeat": { + "subtitle": "subtitles.antarchy.cavaryn_heartbeat", + "sounds": [ + { + "name": "antarchy:ambient/cavaryn/heartbeat" + } + ] + }, "triffid_attack": { "subtitle": "subtitles.antarchy.triffid_attack", "sounds": [ diff --git a/common/src/main/resources/assets/antarchy/sounds/ambient/cavaryn/heartbeat.ogg b/common/src/main/resources/assets/antarchy/sounds/ambient/cavaryn/heartbeat.ogg new file mode 100644 index 00000000..4b73fceb Binary files /dev/null and b/common/src/main/resources/assets/antarchy/sounds/ambient/cavaryn/heartbeat.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/nromal_mode.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/nromal_mode.ogg index 06bb33b5..a4bc0a66 100644 Binary files a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/nromal_mode.ogg and b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/nromal_mode.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/roll1.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/roll1.ogg index d9f41451..cb2bb41b 100644 Binary files a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/roll1.ogg and b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/roll1.ogg differ diff --git a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/wheel_mode.ogg b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/wheel_mode.ogg index 374adaff..746adfb8 100644 Binary files a/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/wheel_mode.ogg and b/common/src/main/resources/assets/antarchy/sounds/mob/rolly_polly/wheel_mode.ogg differ diff --git a/common/src/main/resources/assets/antarchy/textures/block/jerry_egg.png b/common/src/main/resources/assets/antarchy/textures/block/jerry_egg.png index 40102682..a9a3220f 100644 Binary files a/common/src/main/resources/assets/antarchy/textures/block/jerry_egg.png and b/common/src/main/resources/assets/antarchy/textures/block/jerry_egg.png differ diff --git a/common/src/main/resources/assets/antarchy/textures/block/jerry_egg_break_particle.png b/common/src/main/resources/assets/antarchy/textures/block/jerry_egg_break_particle.png new file mode 100644 index 00000000..db2054c4 Binary files /dev/null and b/common/src/main/resources/assets/antarchy/textures/block/jerry_egg_break_particle.png differ diff --git a/common/src/main/resources/data/antarchy/advancement/visit_cavaryn.json b/common/src/main/resources/data/antarchy/advancement/visit_cavaryn.json new file mode 100644 index 00000000..b8e311d0 --- /dev/null +++ b/common/src/main/resources/data/antarchy/advancement/visit_cavaryn.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:adventure/root", + "criteria": { + "entered_cavaryn": { + "conditions": { + "to": "antarchy:cavaryn" + }, + "trigger": "minecraft:changed_dimension" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "advancements.antarchy.visit_cavaryn.description" + }, + "frame": "task", + "icon": { + "count": 1, + "id": "antarchy:myrmite" + }, + "show_toast": true, + "title": { + "translate": "advancements.antarchy.visit_cavaryn.title" + } + }, + "requirements": [ + [ + "entered_cavaryn" + ] + ], + "sends_telemetry_event": true +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/awakening.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/awakening.json new file mode 100644 index 00000000..a191c280 --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/awakening.json @@ -0,0 +1,17 @@ +{ + "entries": [ + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "random_young", + "base_count": 3, + "per_player_count": 1 + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "alpha", + "base_count": 0, + "per_player_count": 1, + "min_count": 1 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/dormant.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/dormant.json new file mode 100644 index 00000000..75a75853 --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/dormant.json @@ -0,0 +1,17 @@ +{ + "max_active": 8, + "entries": [ + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "infant", + "base_count": 1, + "high_attention_base_count": 2 + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "mature", + "base_count": 0, + "high_attention_base_count": 1 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/final.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/final.json new file mode 100644 index 00000000..b6566d5c --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/final.json @@ -0,0 +1,20 @@ +{ + "entries": [ + { + "entity_tag": "antarchy:horde_bosses", + "base_count": 1, + "per_players": 3, + "per_players_count": 1, + "max_count": 3, + "warning": true, + "track_completion": true, + "heavy_arrival_effect": true + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "random", + "base_count": 8, + "per_player_count": 2 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_1.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_1.json new file mode 100644 index 00000000..bcffac46 --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_1.json @@ -0,0 +1,10 @@ +{ + "entries": [ + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "random_young", + "base_count": 12, + "per_player_count": 3 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_2.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_2.json new file mode 100644 index 00000000..4818f30a --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_2.json @@ -0,0 +1,16 @@ +{ + "entries": [ + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "random_young", + "base_count": 12, + "per_player_count": 3 + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "alpha", + "base_count": 3, + "per_player_count": 1 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_3.json b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_3.json new file mode 100644 index 00000000..6967d0ae --- /dev/null +++ b/common/src/main/resources/data/antarchy/cavaryn_hordes/biowart_caves/wave_3.json @@ -0,0 +1,22 @@ +{ + "entries": [ + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "random_young", + "base_count": 12, + "per_player_count": 3 + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "alpha", + "base_count": 4, + "per_player_count": 1 + }, + { + "entity_tag": "antarchy:horde_jerry", + "jerry_stage": "gamma", + "base_count": 2, + "per_player_count": 1 + } + ] +} diff --git a/common/src/main/resources/data/antarchy/tags/entity_type/horde_jerry.json b/common/src/main/resources/data/antarchy/tags/entity_type/horde_jerry.json new file mode 100644 index 00000000..f81b2826 --- /dev/null +++ b/common/src/main/resources/data/antarchy/tags/entity_type/horde_jerry.json @@ -0,0 +1,5 @@ +{ + "values": [ + "antarchy:jerry" + ] +} diff --git a/common/src/main/resources/data/antarchy/tags/item/hercules_beetle_food.json b/common/src/main/resources/data/antarchy/tags/item/hercules_beetle_food.json index 0f2f4352..445d82b1 100644 --- a/common/src/main/resources/data/antarchy/tags/item/hercules_beetle_food.json +++ b/common/src/main/resources/data/antarchy/tags/item/hercules_beetle_food.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "minecraft:glow_berries" + "antarchy:broodfruit" ] } diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/biowart_caves.json b/common/src/main/resources/data/antarchy/worldgen/biome/biowart_caves.json index e9d0741d..62e98d86 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/biowart_caves.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/biowart_caves.json @@ -47,11 +47,13 @@ "antarchy:cavaryn_bile_cysts", "antarchy:termite_nest" ], + [ + "antarchy:jerry_egg_patch" + ], [ "antarchy:biowart_patch", "antarchy:cavaryn_creepvine", - "antarchy:cavaryn_hanging_creeproots", - "antarchy:jerry_egg_patch" + "antarchy:cavaryn_hanging_creeproots" ], [] ], @@ -68,9 +70,9 @@ "creature": [ { "type": "antarchy:stink_bug", - "weight": 12, - "minCount": 1, - "maxCount": 3 + "weight": 35, + "minCount": 2, + "maxCount": 4 } ], "ambient": [], diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/brooding_tunnels.json b/common/src/main/resources/data/antarchy/worldgen/biome/brooding_tunnels.json index 2feef692..eb0eb076 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/brooding_tunnels.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/brooding_tunnels.json @@ -75,9 +75,9 @@ "creature": [ { "type": "antarchy:stink_bug", - "weight": 10, - "minCount": 1, - "maxCount": 3 + "weight": 35, + "minCount": 2, + "maxCount": 4 }], "ambient": [ ], diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/cavaryn.json b/common/src/main/resources/data/antarchy/worldgen/biome/cavaryn.json index 9f5cd675..c5eb239e 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/cavaryn.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/cavaryn.json @@ -65,9 +65,9 @@ "creature": [ { "type": "antarchy:stink_bug", - "weight": 10, - "minCount": 1, - "maxCount": 3 + "weight": 35, + "minCount": 2, + "maxCount": 4 }], "ambient": [ ], diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/glimmering_pools.json b/common/src/main/resources/data/antarchy/worldgen/biome/glimmering_pools.json index f8a325c9..1aab1a79 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/glimmering_pools.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/glimmering_pools.json @@ -66,15 +66,15 @@ ], [] ], - "creature_spawn_probability": 0.4, + "creature_spawn_probability": 0.15, "spawners": { "monster": [], "creature": [ { "type": "antarchy:glimmer", "weight": 36, - "minCount": 3, - "maxCount": 6 + "minCount": 1, + "maxCount": 1 } ], "ambient": [ diff --git a/common/src/main/resources/data/antarchy/worldgen/biome/rolly_caves.json b/common/src/main/resources/data/antarchy/worldgen/biome/rolly_caves.json index cd038b6e..e80afb5c 100644 --- a/common/src/main/resources/data/antarchy/worldgen/biome/rolly_caves.json +++ b/common/src/main/resources/data/antarchy/worldgen/biome/rolly_caves.json @@ -59,7 +59,14 @@ "creature_spawn_probability": 0.08, "spawners": { "monster": [], - "creature": [], + "creature": [ + { + "type": "antarchy:stink_bug", + "weight": 35, + "minCount": 2, + "maxCount": 4 + } + ], "ambient": [], "axolotls": [], "underground_water_creature": [], diff --git a/common/src/main/resources/data/antarchy/worldgen/placed_feature/jerry_egg_patch.json b/common/src/main/resources/data/antarchy/worldgen/placed_feature/jerry_egg_patch.json index 7997b753..5bf3f58e 100644 --- a/common/src/main/resources/data/antarchy/worldgen/placed_feature/jerry_egg_patch.json +++ b/common/src/main/resources/data/antarchy/worldgen/placed_feature/jerry_egg_patch.json @@ -5,8 +5,8 @@ "type": "minecraft:count", "count": { "type": "minecraft:uniform", - "min_inclusive": 1, - "max_inclusive": 3 + "min_inclusive": 2, + "max_inclusive": 5 } }, { diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java index bef466f1..e527a004 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/AntarchyFabricContent.java @@ -249,6 +249,7 @@ public final class AntarchyFabricContent { AntarchyFabricSounds.STINKY_FLY_SOUND, AntarchyFabricSounds.STINK_BUG_FART, AntarchyFabricSounds.STINK_BUG_IDLE, + AntarchyFabricSounds.CAVARYN_HEARTBEAT, AntarchyFabricSounds.ROLLY_POLLY_IDLE, AntarchyFabricSounds.CREEPING_HORROR_GROWL, AntarchyFabricSounds.CREEPING_HORROR_HURT, diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java index 5e58b645..03b06feb 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/AntarchyFabricClientBootstrap.java @@ -474,7 +474,6 @@ public final class AntarchyFabricClientBootstrap { ParalyzedHudRenderer.render(guiGraphics); BrutalflyElytraHudRenderer.render(guiGraphics); JumpyBootsHudRenderer.render(guiGraphics); - BloodglassHudRenderer.render(guiGraphics); TriffidGooHudRenderer.render(guiGraphics); DorrieJumpHudRenderer.render(guiGraphics); }); diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/BrutalflyElytraHudRenderer.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/BrutalflyElytraHudRenderer.java index e3971a64..0040ae65 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/BrutalflyElytraHudRenderer.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/BrutalflyElytraHudRenderer.java @@ -20,7 +20,7 @@ public final class BrutalflyElytraHudRenderer { public static void render(GuiGraphics guiGraphics) { Minecraft minecraft = Minecraft.getInstance(); Player player = minecraft.player; - if (player == null || minecraft.screen != null || player.isDeadOrDying()) { + if (player == null || minecraft.screen != null || player.isDeadOrDying() || minecraft.options.hideGui) { return; } if (!BrutalflyElytraItem.isWearingBrutalflyElytra(player) || !player.isFallFlying()) { diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/JumpyBootsFallDamageMixin.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/JumpyBootsFallDamageMixin.java index da5683cf..3d4fbfcf 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/JumpyBootsFallDamageMixin.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/JumpyBootsFallDamageMixin.java @@ -1,14 +1,38 @@ package com.craisinlord.antarchy.fabric.mixin; +import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi; +import com.craisinlord.antarchy.content.item.BloodCrystalArmorItem; import com.craisinlord.antarchy.content.item.JumpyBootsItem; import com.craisinlord.antarchy.fabric.util.JumpyBootsFabricHelper; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; 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.CallbackInfoReturnable; @Mixin(LivingEntity.class) public abstract class JumpyBootsFallDamageMixin { + @Inject(method = "causeFallDamage", at = @At("HEAD"), cancellable = true) + private void antarchy$cancelBloodCrystalBootsInvertedFallDamage(float fallDistance, float multiplier, DamageSource source, CallbackInfoReturnable cir) { + LivingEntity self = (LivingEntity) (Object) this; + if (!(self instanceof Player player)) { + return; + } + if (!AntarchyGravityApi.isGravityInverted(player)) { + return; + } + if (!(player.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof BloodCrystalArmorItem)) { + return; + } + + player.fallDistance = 0.0F; + cir.setReturnValue(false); + } + @ModifyVariable(method = "causeFallDamage", at = @At("HEAD"), ordinal = 0, argsOnly = true) private float antarchy$reduceJumpyBootsFallDamage(float fallDistance) { LivingEntity self = (LivingEntity) (Object) this; diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BloodglassChatOrderMixin.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BloodglassChatOrderMixin.java new file mode 100644 index 00000000..00db62f9 --- /dev/null +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BloodglassChatOrderMixin.java @@ -0,0 +1,18 @@ +package com.craisinlord.antarchy.fabric.mixin.client; + +import com.craisinlord.antarchy.fabric.client.BloodglassHudRenderer; +import net.minecraft.client.DeltaTracker; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.GuiGraphics; +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(Gui.class) +public abstract class BloodglassChatOrderMixin { + @Inject(method = "renderChat", at = @At("HEAD")) + private void antarchy$renderBloodglassBeforeChat(GuiGraphics guiGraphics, DeltaTracker deltaTracker, CallbackInfo ci) { + BloodglassHudRenderer.render(guiGraphics); + } +} diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BrutalflyElytraExperienceBarMixin.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BrutalflyElytraExperienceBarMixin.java new file mode 100644 index 00000000..e052c9bd --- /dev/null +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/mixin/client/BrutalflyElytraExperienceBarMixin.java @@ -0,0 +1,21 @@ +package com.craisinlord.antarchy.fabric.mixin.client; + +import com.craisinlord.antarchy.content.item.BrutalflyElytraItem; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.player.LocalPlayer; +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.CallbackInfoReturnable; + +@Mixin(Gui.class) +public abstract class BrutalflyElytraExperienceBarMixin { + @Inject(method = "isExperienceBarVisible", at = @At("RETURN"), cancellable = true) + private void antarchy$hideExperienceBarForBrutalfly(CallbackInfoReturnable cir) { + LocalPlayer player = Minecraft.getInstance().player; + if (player != null && BrutalflyElytraItem.isWearingBrutalflyElytra(player) && player.isFallFlying()) { + cir.setReturnValue(false); + } + } +} diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java index 934e546a..b062546b 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricBlocks.java @@ -246,6 +246,7 @@ import net.minecraft.world.level.block.VineBlock; 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.level.material.MapColor; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.biome.BiomeSource; import net.minecraft.world.level.levelgen.DensityFunction; @@ -677,7 +678,7 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore", - () -> createOre(Blocks.COAL_ORE, 0, 2)); + () -> createOre(Blocks.COAL_ORE, 0, 2, MapColor.COLOR_GRAY)); public static final DeferredBlock BROODSTONE = BLOCKS.register("broodstone", @@ -733,11 +734,11 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock BROODSTONE_URANIUM_ORE = BLOCKS.register("broodstone_uranium_ore", - () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock BROODSTONE_TITANIUM_ORE = BLOCKS.register("broodstone_titanium_ore", - () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CHITEN_BLOCK = BLOCKS.register("chiten_block", @@ -911,99 +912,99 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock URANIUM_ORE = BLOCKS.register("uranium_ore", - () -> createOre(Blocks.EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock DEEPSLATE_URANIUM_ORE = BLOCKS.register("deepslate_uranium_ore", - () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock TITANIUM_ORE = BLOCKS.register("titanium_ore", - () -> createOre(Blocks.DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock DEEPSLATE_TITANIUM_ORE = BLOCKS.register("deepslate_titanium_ore", - () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock URANIUM_BLOCK = BLOCKS.register("uranium_block", - () -> createStorageBlock(Blocks.EMERALD_BLOCK)); + () -> createStorageBlock(Blocks.EMERALD_BLOCK, MapColor.COLOR_YELLOW)); public static final DeferredBlock TITANIUM_BLOCK = BLOCKS.register("titanium_block", - () -> createStorageBlock(Blocks.DIAMOND_BLOCK)); + () -> createStorageBlock(Blocks.DIAMOND_BLOCK, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock RAW_URANIUM_BLOCK = BLOCKS.register("raw_uranium_block", - () -> createRawStorageBlock(Blocks.EMERALD_ORE)); + () -> createRawStorageBlock(Blocks.EMERALD_ORE, MapColor.COLOR_YELLOW)); public static final DeferredBlock RAW_TITANIUM_BLOCK = BLOCKS.register("raw_titanium_block", - () -> createRawStorageBlock(Blocks.DIAMOND_ORE)); + () -> createRawStorageBlock(Blocks.DIAMOND_ORE, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CUT_URANIUM = BLOCKS.register("cut_uranium", - () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_YELLOW)); public static final DeferredBlock CUT_TITANIUM = BLOCKS.register("cut_titanium", - () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CUT_URANIUM_SLAB = BLOCKS.register("cut_uranium_slab", - () -> new net.minecraft.world.level.block.SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB))); + () -> new net.minecraft.world.level.block.SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock CUT_TITANIUM_SLAB = BLOCKS.register("cut_titanium_slab", - () -> new net.minecraft.world.level.block.SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB))); + () -> new net.minecraft.world.level.block.SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock CUT_URANIUM_STAIRS = BLOCKS.register("cut_uranium_stairs", - () -> new net.minecraft.world.level.block.StairBlock(CUT_URANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS))); + () -> new net.minecraft.world.level.block.StairBlock(CUT_URANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock CUT_TITANIUM_STAIRS = BLOCKS.register("cut_titanium_stairs", - () -> new net.minecraft.world.level.block.StairBlock(CUT_TITANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS))); + () -> new net.minecraft.world.level.block.StairBlock(CUT_TITANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock CHISELED_URANIUM = BLOCKS.register("chiseled_uranium", - () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER, MapColor.COLOR_YELLOW)); public static final DeferredBlock CHISELED_TITANIUM = BLOCKS.register("chiseled_titanium", - () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock URANIUM_BULB = BLOCKS.register("uranium_bulb", - () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB))); + () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_BULB = BLOCKS.register("titanium_bulb", - () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB))); + () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_DOOR = BLOCKS.register("uranium_door", - () -> new net.minecraft.world.level.block.DoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR))); + () -> new net.minecraft.world.level.block.DoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_DOOR = BLOCKS.register("titanium_door", - () -> new net.minecraft.world.level.block.DoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR))); + () -> new net.minecraft.world.level.block.DoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_TRAPDOOR = BLOCKS.register("uranium_trapdoor", - () -> new net.minecraft.world.level.block.TrapDoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR))); + () -> new net.minecraft.world.level.block.TrapDoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_TRAPDOOR = BLOCKS.register("titanium_trapdoor", - () -> new net.minecraft.world.level.block.TrapDoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR))); + () -> new net.minecraft.world.level.block.TrapDoorBlock(net.minecraft.world.level.block.state.properties.BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_BARS = BLOCKS.register("uranium_bars", - () -> new net.minecraft.world.level.block.IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS))); + () -> new net.minecraft.world.level.block.IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_BARS = BLOCKS.register("titanium_bars", - () -> new net.minecraft.world.level.block.IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS))); + () -> new net.minecraft.world.level.block.IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock ANTIMETAL = BLOCKS.register("antimetal", @@ -1295,26 +1296,26 @@ public final class AntarchyFabricBlocks { - private static Block createOre(Block copyFrom) { - return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createOre(Block copyFrom, MapColor mapColor) { + return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - private static Block createOre(Block copyFrom, int minExperience, int maxExperience) { - return new DropExperienceBlock(UniformInt.of(minExperience, maxExperience), BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createOre(Block copyFrom, int minExperience, int maxExperience, MapColor mapColor) { + return new DropExperienceBlock(UniformInt.of(minExperience, maxExperience), BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - private static Block createStorageBlock(Block copyFrom) { - return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createStorageBlock(Block copyFrom, MapColor mapColor) { + return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - private static Block createHorizontalFacingStorageBlock(Block copyFrom) { - return new SimpleHorizontalFacingBlock(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createHorizontalFacingStorageBlock(Block copyFrom, MapColor mapColor) { + return new SimpleHorizontalFacingBlock(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } @@ -1355,8 +1356,8 @@ public final class AntarchyFabricBlocks { - private static Block createRawStorageBlock(Block copyFrom) { - return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createRawStorageBlock(Block copyFrom, MapColor mapColor) { + return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java index 2c8d33f7..3c81943a 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricEntities.java @@ -360,7 +360,7 @@ public final class AntarchyFabricEntities { public static final DeferredHolder, EntityType> STINK_BUG = ENTITY_TYPES.register("stink_bug", - () -> EntityType.Builder.of(StinkBugEntity::new, MobCategory.AMBIENT) + () -> EntityType.Builder.of(StinkBugEntity::new, MobCategory.CREATURE) .sized(0.35F, 0.2F) .clientTrackingRange(8) .build("stink_bug")); diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java index 1955c584..1c97fcb1 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricItems.java @@ -466,78 +466,78 @@ public final class AntarchyFabricItems { public static final DeferredItem TERMITE_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TERMITE_NEST); - public static final DeferredItem URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_ORE); + public static final DeferredItem URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem DEEPSLATE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.DEEPSLATE_URANIUM_ORE); + public static final DeferredItem DEEPSLATE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.DEEPSLATE_URANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_ORE); + public static final DeferredItem TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem DEEPSLATE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.DEEPSLATE_TITANIUM_ORE); + public static final DeferredItem DEEPSLATE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.DEEPSLATE_TITANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_BLOCK); + public static final DeferredItem URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_BLOCK, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_BLOCK); + public static final DeferredItem TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_BLOCK, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem RAW_URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.RAW_URANIUM_BLOCK); + public static final DeferredItem RAW_URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.RAW_URANIUM_BLOCK, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem RAW_TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.RAW_TITANIUM_BLOCK); + public static final DeferredItem RAW_TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.RAW_TITANIUM_BLOCK, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM); + public static final DeferredItem CUT_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM); + public static final DeferredItem CUT_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_URANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM_SLAB); + public static final DeferredItem CUT_URANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM_SLAB, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_TITANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM_SLAB); + public static final DeferredItem CUT_TITANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM_SLAB, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_URANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM_STAIRS); + public static final DeferredItem CUT_URANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_URANIUM_STAIRS, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CUT_TITANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM_STAIRS); + public static final DeferredItem CUT_TITANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CUT_TITANIUM_STAIRS, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CHISELED_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CHISELED_URANIUM); + public static final DeferredItem CHISELED_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CHISELED_URANIUM, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem CHISELED_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CHISELED_TITANIUM); + public static final DeferredItem CHISELED_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.CHISELED_TITANIUM, new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem URANIUM_BULB_ITEM = ITEMS.register("uranium_bulb", - () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyFabricBlocks.URANIUM_BULB.get(), new Item.Properties())); + () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyFabricBlocks.URANIUM_BULB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem TITANIUM_BULB_ITEM = ITEMS.register("titanium_bulb", - () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyFabricBlocks.TITANIUM_BULB.get(), new Item.Properties())); + () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyFabricBlocks.TITANIUM_BULB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); - public static final DeferredItem URANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_DOOR); + public static final DeferredItem URANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_DOOR, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem TITANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_DOOR); + public static final DeferredItem TITANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_DOOR, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem URANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_TRAPDOOR); + public static final DeferredItem URANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_TRAPDOOR, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem TITANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_TRAPDOOR); + public static final DeferredItem TITANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_TRAPDOOR, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem URANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_BARS); + public static final DeferredItem URANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.URANIUM_BARS, new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem TITANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_BARS); + public static final DeferredItem TITANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.TITANIUM_BARS, new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem ANTIMETAL_ITEM = ITEMS.register("antimetal", @@ -652,8 +652,8 @@ public final class AntarchyFabricItems { public static final DeferredItem BROODSTONE_BRICK_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_BRICK_SLAB); public static final DeferredItem BROODSTONE_BRICK_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_BRICK_WALL); public static final DeferredItem MYRMITE_COAL_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.MYRMITE_COAL_ORE); - public static final DeferredItem BROODSTONE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_URANIUM_ORE); - public static final DeferredItem BROODSTONE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_TITANIUM_ORE); + public static final DeferredItem BROODSTONE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_URANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); + public static final DeferredItem BROODSTONE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.BROODSTONE_TITANIUM_ORE, new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem POLISHED_NYXITE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyFabricBlocks.POLISHED_NYXITE); @@ -887,7 +887,11 @@ public final class AntarchyFabricItems { public static final DeferredItem CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON)); + public static final DeferredItem JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON) + .food(new FoodProperties.Builder() + .nutrition(2) + .saturationModifier(0.1F) + .build())); public static final DeferredItem CARAPACE = ITEMS.registerSimpleItem("carapace", new Item.Properties().rarity(Rarity.UNCOMMON)); @@ -950,8 +954,9 @@ public final class AntarchyFabricItems { public static final DeferredItem RAW_BUG_MEAT = ITEMS.register("raw_bug_meat", () -> new Item(new Item.Properties() .food(new FoodProperties.Builder() - .nutrition(3) - .saturationModifier(0.3F) + .nutrition(4) + .saturationModifier(0.1F) + .effect(new MobEffectInstance(MobEffects.HUNGER, 600), 0.8F) .build()))); public static final DeferredItem COOKED_BUG_MEAT = ITEMS.register("cooked_bug_meat", () -> new Item(new Item.Properties() diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java index 00a1839e..ae94c7d8 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/AntarchyFabricSounds.java @@ -634,6 +634,9 @@ public final class AntarchyFabricSounds { public static final DeferredHolder STINK_BUG_IDLE = registerSoundEvent("stink_bug_idle"); + public static final DeferredHolder CAVARYN_HEARTBEAT = registerSoundEvent("cavaryn_heartbeat"); + + public static final DeferredHolder ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle"); public static final DeferredHolder ROLLY_POLLY_WHEEL_MODE = registerSoundEvent("rolly_polly_wheel_mode"); public static final DeferredHolder ROLLY_POLLY_NORMAL_MODE = registerSoundEvent("rolly_polly_normal_mode"); diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/DeferredRegister.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/DeferredRegister.java index 477addf2..fddebde1 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/DeferredRegister.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/registry/DeferredRegister.java @@ -43,6 +43,10 @@ public class DeferredRegister { public DeferredItem registerSimpleBlockItem(DeferredBlock block) { return this.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties())); } + + public DeferredItem registerSimpleBlockItem(DeferredBlock block, Item.Properties properties) { + return this.register(block.getId().getPath(), () -> new BlockItem(block.get(), properties)); + } } @FunctionalInterface diff --git a/fabric/src/main/resources/antarchy-fabric.mixins.json b/fabric/src/main/resources/antarchy-fabric.mixins.json index acbb192d..a40c15d4 100644 --- a/fabric/src/main/resources/antarchy-fabric.mixins.json +++ b/fabric/src/main/resources/antarchy-fabric.mixins.json @@ -22,6 +22,8 @@ ], "client": [ "client.CameraShakeMixin", + "client.BrutalflyElytraExperienceBarMixin", + "client.BloodglassChatOrderMixin", "client.DuctTapeInputMixin", "client.AntiwaterFogMixin", "client.GravityGunMouseScrollMixin", diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java index 4b3f0739..df8cc612 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyNeoforge.java @@ -152,6 +152,7 @@ public class AntarchyNeoforge { AntarchyNeoforgeSounds.STINKY_FLY, AntarchyNeoforgeSounds.STINK_BUG_FART, AntarchyNeoforgeSounds.STINK_BUG_IDLE, + AntarchyNeoforgeSounds.CAVARYN_HEARTBEAT, AntarchyNeoforgeSounds.ROLLY_POLLY_IDLE, AntarchyNeoforgeSounds.CREEPING_HORROR_GROWL, AntarchyNeoforgeSounds.CREEPING_HORROR_HURT, diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java index 5e48ba93..7c29a83a 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java @@ -513,7 +513,7 @@ public final class AntarchyToolsConfig { b.push("potentNyxite"); POTENT_NYXITE_INVERTED_DURATION_SECONDS = b .comment("How long the Inverted effect from Potent Nyxite eruptions lasts, in seconds.") - .defineInRange("invertedDurationSeconds", 10.0D, 0.0D, 3600.0D); + .defineInRange("invertedDurationSeconds", 60.0D, 0.0D, 3600.0D); b.pop(); b.push("corneaEar"); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java index 721f2d45..e6f4185e 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/AntarchyNeoForgeClient.java @@ -58,6 +58,7 @@ import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent; import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent; import net.neoforged.neoforge.client.event.EntityRenderersEvent; import net.neoforged.neoforge.client.event.RegisterGuiLayersEvent; +import net.neoforged.neoforge.client.gui.VanillaGuiLayers; import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; import net.neoforged.neoforge.client.extensions.common.IClientFluidTypeExtensions; import net.neoforged.neoforge.client.extensions.common.RegisterClientExtensionsEvent; @@ -312,7 +313,8 @@ public final class AntarchyNeoForgeClient { ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "brutalfly_elytra"), (guiGraphics, partialTick) -> BrutalflyElytraHudRenderer.render(guiGraphics) ); - event.registerAboveAll( + event.registerBelow( + VanillaGuiLayers.CHAT, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "bloodglass_hearts"), (guiGraphics, partialTick) -> BloodglassHudRenderer.render(guiGraphics) ); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java index f5c38607..402df618 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeBlocks.java @@ -28,6 +28,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockSetType; +import net.minecraft.world.level.material.MapColor; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.level.material.FlowingFluid; import net.minecraft.world.level.material.FluidState; @@ -257,7 +258,7 @@ public final class AntarchyNeoforgeBlocks { public static final DeferredBlock BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils", () -> new BiowartTendrilsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.MOSS_CARPET).lightLevel(state -> 2).noCollission().noOcclusion())); public static final DeferredBlock MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore", - () -> createOre(Blocks.COAL_ORE, 0, 2)); + () -> createOre(Blocks.COAL_ORE, 0, 2, MapColor.COLOR_GRAY)); public static final DeferredBlock BROODSTONE = BLOCKS.register("broodstone", () -> new Block(broodstoneProperties())); public static final DeferredBlock POLISHED_BROODSTONE = BLOCKS.register("polished_broodstone", @@ -285,9 +286,9 @@ public final class AntarchyNeoforgeBlocks { public static final DeferredBlock BROODSTONE_BRICK_WALL = BLOCKS.register("broodstone_brick_wall", () -> new WallBlock(broodstoneProperties())); public static final DeferredBlock BROODSTONE_URANIUM_ORE = BLOCKS.register("broodstone_uranium_ore", - () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock BROODSTONE_TITANIUM_ORE = BLOCKS.register("broodstone_titanium_ore", - () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CHITEN_BLOCK = BLOCKS.register("chiten_block", () -> new RotatedPillarBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.BONE_BLOCK).requiresCorrectToolForDrops())); public static final DeferredBlock UMBRAL_MOSS_BLOCK = BLOCKS.register("umbral_moss_block", @@ -382,53 +383,53 @@ public final class AntarchyNeoforgeBlocks { public static final DeferredBlock TERMITE_NEST = BLOCKS.register("termite_nest", () -> new AntNestBlock(AntarchyNeoforgeEntites.TERMITE, AntarchyNeoforgeItems::antNestBlockEntityType, BlockBehaviour.Properties.ofFullCopy(Blocks.DIRT).noLootTable())); public static final DeferredBlock URANIUM_ORE = BLOCKS.register("uranium_ore", - () -> createOre(Blocks.EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock DEEPSLATE_URANIUM_ORE = BLOCKS.register("deepslate_uranium_ore", - () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW)); public static final DeferredBlock TITANIUM_ORE = BLOCKS.register("titanium_ore", - () -> createOre(Blocks.DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock DEEPSLATE_TITANIUM_ORE = BLOCKS.register("deepslate_titanium_ore", - () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8)); + () -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock URANIUM_BLOCK = BLOCKS.register("uranium_block", - () -> createStorageBlock(Blocks.EMERALD_BLOCK)); + () -> createStorageBlock(Blocks.EMERALD_BLOCK, MapColor.COLOR_YELLOW)); public static final DeferredBlock TITANIUM_BLOCK = BLOCKS.register("titanium_block", - () -> createStorageBlock(Blocks.DIAMOND_BLOCK)); + () -> createStorageBlock(Blocks.DIAMOND_BLOCK, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock RAW_URANIUM_BLOCK = BLOCKS.register("raw_uranium_block", - () -> createRawStorageBlock(Blocks.EMERALD_ORE)); + () -> createRawStorageBlock(Blocks.EMERALD_ORE, MapColor.COLOR_YELLOW)); public static final DeferredBlock RAW_TITANIUM_BLOCK = BLOCKS.register("raw_titanium_block", - () -> createRawStorageBlock(Blocks.DIAMOND_ORE)); + () -> createRawStorageBlock(Blocks.DIAMOND_ORE, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CUT_URANIUM = BLOCKS.register("cut_uranium", - () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_YELLOW)); public static final DeferredBlock CUT_TITANIUM = BLOCKS.register("cut_titanium", - () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock CUT_URANIUM_SLAB = BLOCKS.register("cut_uranium_slab", - () -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB))); + () -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock CUT_TITANIUM_SLAB = BLOCKS.register("cut_titanium_slab", - () -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB))); + () -> new SlabBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock CUT_URANIUM_STAIRS = BLOCKS.register("cut_uranium_stairs", - () -> new StairBlock(CUT_URANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS))); + () -> new StairBlock(CUT_URANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock CUT_TITANIUM_STAIRS = BLOCKS.register("cut_titanium_stairs", - () -> new StairBlock(CUT_TITANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS))); + () -> new StairBlock(CUT_TITANIUM.get().defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock CHISELED_URANIUM = BLOCKS.register("chiseled_uranium", - () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER, MapColor.COLOR_YELLOW)); public static final DeferredBlock CHISELED_TITANIUM = BLOCKS.register("chiseled_titanium", - () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER)); + () -> createHorizontalFacingStorageBlock(Blocks.CHISELED_COPPER, MapColor.COLOR_LIGHT_BLUE)); public static final DeferredBlock URANIUM_BULB = BLOCKS.register("uranium_bulb", - () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB))); + () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_BULB = BLOCKS.register("titanium_bulb", - () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB))); + () -> new SignalSavingBulbBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.COPPER_BULB).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_DOOR = BLOCKS.register("uranium_door", - () -> new DoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR))); + () -> new DoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_DOOR = BLOCKS.register("titanium_door", - () -> new DoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR))); + () -> new DoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_TRAPDOOR = BLOCKS.register("uranium_trapdoor", - () -> new TrapDoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR))); + () -> new TrapDoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_TRAPDOOR = BLOCKS.register("titanium_trapdoor", - () -> new TrapDoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR))); + () -> new TrapDoorBlock(BlockSetType.IRON, BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock URANIUM_BARS = BLOCKS.register("uranium_bars", - () -> new IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS))); + () -> new IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_YELLOW))); public static final DeferredBlock TITANIUM_BARS = BLOCKS.register("titanium_bars", - () -> new IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS))); + () -> new IronBarsBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_LIGHT_BLUE))); public static final DeferredBlock ANTIMETAL = BLOCKS.register("antimetal", () -> new RotatedPillarBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.BASALT))); public static final DeferredBlock POLISHED_ANTIMETAL = BLOCKS.register("polished_antimetal", @@ -577,20 +578,20 @@ public final class AntarchyNeoforgeBlocks { .isViewBlocking((state, level, pos) -> false); } - private static Block createOre(Block copyFrom, int minExperience, int maxExperience) { - return new DropExperienceBlock(UniformInt.of(minExperience, maxExperience), BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + private static Block createOre(Block copyFrom, int minExperience, int maxExperience, MapColor mapColor) { + return new DropExperienceBlock(UniformInt.of(minExperience, maxExperience), BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - static Block createStorageBlock(Block copyFrom) { - return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + static Block createStorageBlock(Block copyFrom, MapColor mapColor) { + return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - static Block createHorizontalFacingStorageBlock(Block copyFrom) { - return new SimpleHorizontalFacingBlock(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + static Block createHorizontalFacingStorageBlock(Block copyFrom, MapColor mapColor) { + return new SimpleHorizontalFacingBlock(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } - static Block createRawStorageBlock(Block copyFrom) { - return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).requiresCorrectToolForDrops()); + static Block createRawStorageBlock(Block copyFrom, MapColor mapColor) { + return new Block(BlockBehaviour.Properties.ofFullCopy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops()); } private static Block smallBloodCrystalBudBlock() { diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java index 8893e369..9542860f 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeCreativeModeTabs.java @@ -188,6 +188,8 @@ public class AntarchyNeoforgeCreativeModeTabs { event.accept(AntarchyNeoforgeItems.KING_SCALE.get()); event.accept(AntarchyNeoforgeItems.QUEEN_SCALE.get()); event.accept(AntarchyNeoforgeItems.CHITEN.get()); + event.accept(AntarchyNeoforgeItems.JERRY_NUCLEUS.get()); + event.accept(AntarchyNeoforgeItems.CARAPACE.get()); event.accept(AntarchyNeoforgeItems.STINK_BUG.get()); event.accept(AntarchyNeoforgeItems.BRUTALFLY_WING.get()); event.accept(AntarchyNeoforgeItems.PRIMORDIAL_SCUTE.get()); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java index 329c8de6..612f9cce 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeEntites.java @@ -153,7 +153,7 @@ public final class AntarchyNeoforgeEntites { .clientTrackingRange(8) .build("bed_bug")); public static final DeferredHolder, EntityType> STINK_BUG = ENTITY_TYPES.register("stink_bug", - () -> EntityType.Builder.of(StinkBugEntity::new, MobCategory.AMBIENT) + () -> EntityType.Builder.of(StinkBugEntity::new, MobCategory.CREATURE) .sized(0.35F, 0.2F) .clientTrackingRange(8) .build("stink_bug")); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java index 7942d8ea..d49f8d61 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeItems.java @@ -213,32 +213,54 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem BROWN_ANT_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.BROWN_ANT_NEST); public static final DeferredItem RAINBOW_ANT_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.RAINBOW_ANT_NEST); public static final DeferredItem TERMITE_NEST_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TERMITE_NEST); - public static final DeferredItem URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.URANIUM_ORE); - public static final DeferredItem DEEPSLATE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.DEEPSLATE_URANIUM_ORE); - public static final DeferredItem TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TITANIUM_ORE); - public static final DeferredItem DEEPSLATE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.DEEPSLATE_TITANIUM_ORE); - public static final DeferredItem URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.URANIUM_BLOCK); - public static final DeferredItem TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TITANIUM_BLOCK); - public static final DeferredItem RAW_URANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.RAW_URANIUM_BLOCK); - public static final DeferredItem RAW_TITANIUM_BLOCK_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.RAW_TITANIUM_BLOCK); - public static final DeferredItem CUT_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM); - public static final DeferredItem CUT_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM); - public static final DeferredItem CUT_URANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM_SLAB); - public static final DeferredItem CUT_TITANIUM_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM_SLAB); - public static final DeferredItem CUT_URANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM_STAIRS); - public static final DeferredItem CUT_TITANIUM_STAIRS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM_STAIRS); - public static final DeferredItem CHISELED_URANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_URANIUM); - public static final DeferredItem CHISELED_TITANIUM_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_TITANIUM); + public static final DeferredItem URANIUM_ORE_ITEM = ITEMS.register("uranium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.URANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem DEEPSLATE_URANIUM_ORE_ITEM = ITEMS.register("deepslate_uranium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.DEEPSLATE_URANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem TITANIUM_ORE_ITEM = ITEMS.register("titanium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.TITANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem DEEPSLATE_TITANIUM_ORE_ITEM = ITEMS.register("deepslate_titanium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.DEEPSLATE_TITANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem URANIUM_BLOCK_ITEM = ITEMS.register("uranium_block", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.URANIUM_BLOCK.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem TITANIUM_BLOCK_ITEM = ITEMS.register("titanium_block", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.TITANIUM_BLOCK.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem RAW_URANIUM_BLOCK_ITEM = ITEMS.register("raw_uranium_block", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.RAW_URANIUM_BLOCK.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem RAW_TITANIUM_BLOCK_ITEM = ITEMS.register("raw_titanium_block", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.RAW_TITANIUM_BLOCK.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_URANIUM_ITEM = ITEMS.register("cut_uranium", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_TITANIUM_ITEM = ITEMS.register("cut_titanium", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_URANIUM_SLAB_ITEM = ITEMS.register("cut_uranium_slab", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM_SLAB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_TITANIUM_SLAB_ITEM = ITEMS.register("cut_titanium_slab", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM_SLAB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_URANIUM_STAIRS_ITEM = ITEMS.register("cut_uranium_stairs", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_URANIUM_STAIRS.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CUT_TITANIUM_STAIRS_ITEM = ITEMS.register("cut_titanium_stairs", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CUT_TITANIUM_STAIRS.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CHISELED_URANIUM_ITEM = ITEMS.register("chiseled_uranium", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CHISELED_URANIUM.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem CHISELED_TITANIUM_ITEM = ITEMS.register("chiseled_titanium", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.CHISELED_TITANIUM.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem URANIUM_BULB_ITEM = ITEMS.register("uranium_bulb", - () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyNeoforgeBlocks.URANIUM_BULB.get(), new Item.Properties())); + () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyNeoforgeBlocks.URANIUM_BULB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem TITANIUM_BULB_ITEM = ITEMS.register("titanium_bulb", - () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyNeoforgeBlocks.TITANIUM_BULB.get(), new Item.Properties())); - public static final DeferredItem URANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.URANIUM_DOOR); - public static final DeferredItem TITANIUM_DOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TITANIUM_DOOR); - public static final DeferredItem URANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.URANIUM_TRAPDOOR); - public static final DeferredItem TITANIUM_TRAPDOOR_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TITANIUM_TRAPDOOR); - public static final DeferredItem URANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.URANIUM_BARS); - public static final DeferredItem TITANIUM_BARS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.TITANIUM_BARS); + () -> new com.craisinlord.antarchy.content.item.SignalSavingBulbItem(AntarchyNeoforgeBlocks.TITANIUM_BULB.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem URANIUM_DOOR_ITEM = ITEMS.register("uranium_door", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.URANIUM_DOOR.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem TITANIUM_DOOR_ITEM = ITEMS.register("titanium_door", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.TITANIUM_DOOR.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem URANIUM_TRAPDOOR_ITEM = ITEMS.register("uranium_trapdoor", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.URANIUM_TRAPDOOR.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem TITANIUM_TRAPDOOR_ITEM = ITEMS.register("titanium_trapdoor", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.TITANIUM_TRAPDOOR.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem URANIUM_BARS_ITEM = ITEMS.register("uranium_bars", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.URANIUM_BARS.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem TITANIUM_BARS_ITEM = ITEMS.register("titanium_bars", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.TITANIUM_BARS.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem ANTIMETAL_ITEM = ITEMS.register("antimetal", () -> new AntimetalBlockItem(AntarchyNeoforgeBlocks.ANTIMETAL.get(), new Item.Properties())); public static final DeferredItem POLISHED_ANTIMETAL_ITEM = ITEMS.register("polished_antimetal", @@ -293,8 +315,10 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem BROODSTONE_BRICK_SLAB_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.BROODSTONE_BRICK_SLAB); public static final DeferredItem BROODSTONE_BRICK_WALL_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.BROODSTONE_BRICK_WALL); public static final DeferredItem MYRMITE_COAL_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MYRMITE_COAL_ORE); - public static final DeferredItem BROODSTONE_URANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.BROODSTONE_URANIUM_ORE); - public static final DeferredItem BROODSTONE_TITANIUM_ORE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.BROODSTONE_TITANIUM_ORE); + public static final DeferredItem BROODSTONE_URANIUM_ORE_ITEM = ITEMS.register("broodstone_uranium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.BROODSTONE_URANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); + public static final DeferredItem BROODSTONE_TITANIUM_ORE_ITEM = ITEMS.register("broodstone_titanium_ore", + () -> new net.minecraft.world.item.BlockItem(AntarchyNeoforgeBlocks.BROODSTONE_TITANIUM_ORE.get(), new Item.Properties().rarity(Rarity.UNCOMMON))); public static final DeferredItem POLISHED_NYXITE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.POLISHED_NYXITE); public static final DeferredItem CHISELED_NYXITE_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.CHISELED_NYXITE); public static final DeferredItem NYXITE_BRICKS_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.NYXITE_BRICKS); @@ -402,7 +426,11 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem QUEEN_SCALE = ITEMS.register("queen_scale", () -> new MobComingSoonTooltipItem(new Item.Properties().rarity(Rarity.RARE))); public static final DeferredItem CHITEN = ITEMS.registerSimpleItem("chiten", new Item.Properties().rarity(Rarity.UNCOMMON)); - public static final DeferredItem JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON)); + public static final DeferredItem JERRY_NUCLEUS = ITEMS.registerSimpleItem("jerry_nucleus", new Item.Properties().rarity(Rarity.UNCOMMON) + .food(new FoodProperties.Builder() + .nutrition(2) + .saturationModifier(0.1F) + .build())); public static final DeferredItem CARAPACE = ITEMS.registerSimpleItem("carapace", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem STINK_BUG = ITEMS.registerSimpleItem("stink_bug", new Item.Properties().rarity(Rarity.UNCOMMON)); public static final DeferredItem JUMPY_BUG_LEG = ITEMS.registerSimpleItem("jumpy_bug_leg", new Item.Properties().rarity(Rarity.UNCOMMON)); @@ -442,8 +470,9 @@ public final class AntarchyNeoforgeItems { public static final DeferredItem RAW_BUG_MEAT = ITEMS.register("raw_bug_meat", () -> new Item(new Item.Properties() .food(new FoodProperties.Builder() - .nutrition(3) - .saturationModifier(0.3F) + .nutrition(4) + .saturationModifier(0.1F) + .effect(() -> new MobEffectInstance(MobEffects.HUNGER, 600), 0.8F) .build()))); public static final DeferredItem COOKED_BUG_MEAT = ITEMS.register("cooked_bug_meat", () -> new Item(new Item.Properties() diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java index 11675cac..6614e6c6 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoforgeSounds.java @@ -136,6 +136,7 @@ public final class AntarchyNeoforgeSounds { public static final DeferredHolder STINKY_FLY = registerSoundEvent("stinky_fly"); public static final DeferredHolder STINK_BUG_FART = registerSoundEvent("stink_bug_fart"); public static final DeferredHolder STINK_BUG_IDLE = registerSoundEvent("stink_bug_idle"); + public static final DeferredHolder CAVARYN_HEARTBEAT = registerSoundEvent("cavaryn_heartbeat"); public static final DeferredHolder ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle"); public static final DeferredHolder ROLLY_POLLY_WHEEL_MODE = registerSoundEvent("rolly_polly_wheel_mode"); public static final DeferredHolder ROLLY_POLLY_NORMAL_MODE = registerSoundEvent("rolly_polly_normal_mode");