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 d0f14021..ab6761e5 100644 --- a/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java +++ b/common/src/main/java/com/craisinlord/antarchy/config/AntarchySettings.java @@ -141,8 +141,8 @@ public final class AntarchySettings { private static double gravityGunBlastStrength = 1.4D; private static double gravityGunCooldownSeconds = 0.35D; private static double gravityGunMaxHoldDistance = 10.0D; - private static double critterCageMaxCapturableWidth = 1.15D; - private static double critterCageMaxCapturableHeight = 1.15D; + private static double critterCageMaxCapturableWidth = 1.65D; + private static double critterCageMaxCapturableHeight = 1.65D; private static boolean minersDreamEnabled = true; private static int minersDreamMinimumRange = 48; private static int minersDreamMaximumRange = 96; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/CreativeTabOrder.java b/common/src/main/java/com/craisinlord/antarchy/content/CreativeTabOrder.java index 60b97f39..1ef2eff5 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/CreativeTabOrder.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/CreativeTabOrder.java @@ -67,10 +67,9 @@ public final class CreativeTabOrder { case "dream_torch", "dream_lantern", "dream_campfire", "dream_fire", "dream_fire_ceiling", "lumen_froglight", "roseate_froglight" -> 12; case "antimetal_scaffolding" -> 13; - case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg", - "creeping_horror_egg", "lurking_terror_egg" -> 14; + case "infested_rooted_dirt", "infested_coarse_dirt", "bed_bug_egg" -> 14; case "ultimate_pickaxe", "ultimate_axe", "ultimate_shovel", "ultimate_hoe", - "duct_tape", "diamond_minecart", "gravity_sculk_sensor", "miners_dream" -> 15; + "duct_tape", "diamond_minecart", "critter_cage", "gravity_sculk_sensor", "miners_dream" -> 15; case "bile_bucket", "ichor_bucket", "antiwater_bucket", "cloud_bucket", "lumen_bucket" -> 16; case "moggles", "brutalfly_elytra", "fallen_king_crown", "jumpy_boots" -> 17; case "battle_axe", "basilisk_dagger", "squidzooka", "rpo_launcher", "shrink_ray", "growth_ray", @@ -230,16 +229,15 @@ public final class CreativeTabOrder { case "infested_rooted_dirt" -> 0; case "infested_coarse_dirt" -> 1; case "bed_bug_egg" -> 2; - case "creeping_horror_egg" -> 3; - case "lurking_terror_egg" -> 4; case "ultimate_pickaxe" -> 0; case "ultimate_axe" -> 1; case "ultimate_shovel" -> 2; case "ultimate_hoe" -> 3; case "duct_tape" -> 4; case "diamond_minecart" -> 5; - case "gravity_sculk_sensor" -> 6; - case "miners_dream" -> 7; + case "critter_cage" -> 6; + case "gravity_sculk_sensor" -> 7; + case "miners_dream" -> 8; case "bile_bucket" -> 0; case "ichor_bucket" -> 1; case "antiwater_bucket" -> 2; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/CritterCageBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/CritterCageBlock.java index 140f26e8..f4ba338a 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/CritterCageBlock.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/CritterCageBlock.java @@ -15,8 +15,13 @@ import net.minecraft.world.level.block.entity.BlockEntity; 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.BlockGetter; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; public class CritterCageBlock extends BaseEntityBlock { + private static final VoxelShape SHAPE = Block.box(1.0D, 1.0D, 1.0D, 15.0D, 15.0D, 15.0D); + private final MapCodec codec; public CritterCageBlock(BlockBehaviour.Properties properties) { @@ -34,6 +39,11 @@ public class CritterCageBlock extends BaseEntityBlock { return RenderShape.MODEL; } + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return SHAPE; + } + @Override public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return new CritterCageBlockEntity(pos, state); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/PotentNyxiteBlock.java b/common/src/main/java/com/craisinlord/antarchy/content/block/PotentNyxiteBlock.java index 75fe9911..414fa23d 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/PotentNyxiteBlock.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/PotentNyxiteBlock.java @@ -269,7 +269,7 @@ public class PotentNyxiteBlock extends BaseEntityBlock { BlockPos.MutableBlockPos cursor = pos.relative(direction).mutable(); while (true) { FluidState fluidState = level.getFluidState(cursor); - if (!fluidState.isSource() || !isAntiwater(fluidState)) { + if (!isAntiwater(fluidState)) { break; } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/CritterCageBlockEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/CritterCageBlockEntity.java index 6c8d400d..0ed8ed5b 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/CritterCageBlockEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/CritterCageBlockEntity.java @@ -10,6 +10,9 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ClientGamePacketListener; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -18,6 +21,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.component.CustomData; import net.minecraft.world.level.Level; import org.jetbrains.annotations.Nullable; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; @@ -53,6 +57,10 @@ public class CritterCageBlockEntity extends BlockEntity { this.dataVersion++; this.clientDisplayEntity = null; this.setChanged(); + if (this.level != null) { + BlockState state = this.getBlockState(); + this.level.sendBlockUpdated(this.worldPosition, state, state, Block.UPDATE_CLIENTS); + } } public ItemStack toItemStack() { @@ -150,6 +158,16 @@ public class CritterCageBlockEntity extends BlockEntity { } } + @Override + public CompoundTag getUpdateTag(HolderLookup.Provider registries) { + return this.saveCustomOnly(registries); + } + + @Override + public Packet getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); + } + @Override protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { super.loadAdditional(tag, registries); diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/PotentNyxiteBlockEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/PotentNyxiteBlockEntity.java index 6c26f48f..fcfce0f4 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/PotentNyxiteBlockEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/PotentNyxiteBlockEntity.java @@ -380,7 +380,7 @@ public class PotentNyxiteBlockEntity extends BlockEntity { FluidState fluidState = level.getFluidState(cursor); BlockState blockState = level.getBlockState(cursor); - if (fluidState.isSource() && isHypnoticGasFluid(fluidState) && isGeyserPassableBlock(level, cursor)) { + if (isHypnoticGasFluid(fluidState) && isGeyserPassableBlock(level, cursor)) { cursor.move(direction); continue; } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/SeashellBlockEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/SeashellBlockEntity.java index 36bb3af5..773d9f01 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/block/entity/SeashellBlockEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/block/entity/SeashellBlockEntity.java @@ -113,6 +113,7 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity } public boolean hasAnyContents() { + this.generateLootIfNeeded(null); return this.items.stream().anyMatch(stack -> !stack.isEmpty()); } @@ -128,6 +129,9 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity this.redstonePowered = powered; boolean isOpen = this.isEffectivelyOpen(); if (wasOpen != isOpen) { + if (isOpen) { + this.generateLootIfNeeded(null); + } this.beginTransition(isOpen); } @@ -141,6 +145,7 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity } this.manuallyOpened = true; + this.generateLootIfNeeded(null); this.beginTransition(true); this.setChangedAndSync(); return true; @@ -249,7 +254,9 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity @Override protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { super.saveAdditional(tag, registries); - net.minecraft.world.ContainerHelper.saveAllItems(tag, this.items, registries); + if (!this.trySaveLootTable(tag)) { + net.minecraft.world.ContainerHelper.saveAllItems(tag, this.items, registries); + } tag.putBoolean("VisualOpen", this.visualOpen); tag.putBoolean("VisualInitialized", this.initializedVisualState); tag.putBoolean("ManuallyOpened", this.manuallyOpened); @@ -270,7 +277,8 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity @Override protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { super.loadAdditional(tag, registries); - if (tag.contains("Items")) { + this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); + if (!this.tryLoadLootTable(tag) && tag.contains("Items")) { net.minecraft.world.ContainerHelper.loadAllItems(tag, this.items, registries); } this.visualOpen = tag.getBoolean("VisualOpen"); @@ -288,6 +296,12 @@ public final class SeashellBlockEntity extends RandomizableContainerBlockEntity } } + private void generateLootIfNeeded(@Nullable Player player) { + if (this.level instanceof ServerLevel) { + this.unpackLootTable(player); + } + } + private int getFirstEmptySlot() { for (int i = 0; i < this.items.size(); i++) { if (this.items.get(i).isEmpty()) { diff --git a/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/CritterCageRenderer.java b/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/CritterCageRenderer.java index f6bbf25e..176909e5 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/CritterCageRenderer.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/client/renderer/CritterCageRenderer.java @@ -29,7 +29,7 @@ public class CritterCageRenderer implements BlockEntityRenderer QUIRK_TICKS = SynchedEntityData.defineId(DorrieEntity.class, EntityDataSerializers.INT); - private static final int MAX_CHARGE_TICKS = 90; + private static final int MAX_CHARGE_TICKS = 22; private static final float WATER_RIDE_SPEED = 0.42F; private static final float LAND_BEACH_SPEED = 0.07F; private static final double ASCEND_SPEED = 0.06D; @@ -365,6 +365,9 @@ public class DorrieEntity extends Animal implements GeoEntity { if (wasInAir && !inAirNow && isLeaping) { isLeaping = false; landAnimTicks = 12; + if (this.isInWater()) { + this.playSound(SoundEvents.DOLPHIN_SPLASH, 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + } } wasInAir = inAirNow; } @@ -398,8 +401,10 @@ public class DorrieEntity extends Animal implements GeoEntity { Vec3 riddenInput = this.getRiddenInput(rider, travelVector); this.setSpeed(this.getRiddenSpeed(rider)); - if (this.isLeaping) { - super.travel(travelVector); + if (!this.isInWater() && !this.isInLava() && !this.onGround()) { + Vec3 mov = this.getDeltaMovement(); + this.setDeltaMovement(mov.x * 0.91D, mov.y - 0.08D, mov.z * 0.91D); + this.move(net.minecraft.world.entity.MoverType.SELF, this.getDeltaMovement()); return; } @@ -428,18 +433,35 @@ public class DorrieEntity extends Animal implements GeoEntity { super.travel(travelVector); } + public void applyJumpImpulseClient() { + float power = this.getJumpCharge() / 100f; + if (power > 0.05f) { + Vec3 look = this.getLookAngle(); + Vec3 flatLook = new Vec3(look.x, 0.0D, look.z).normalize(); + Vec3 current = this.getDeltaMovement(); + double forwardAdd = 0.15D + power * 0.45D; + double vertical = 0.55D + power * 0.80D; + this.setDeltaMovement( + current.x + flatLook.x * forwardAdd, + vertical, + current.z + flatLook.z * forwardAdd + ); + } + } + public void releaseJump() { if (!this.level().isClientSide && isCharging) { float power = chargeTicks / (float) MAX_CHARGE_TICKS; if (power > 0.05F) { Vec3 look = this.getLookAngle(); + Vec3 flatLook = new Vec3(look.x, 0.0D, look.z).normalize(); Vec3 current = this.getDeltaMovement(); - double forwardAdd = 0.18D + power * 0.42D; - double vertical = 0.85D + power * 1.35D; + double forwardAdd = 0.15D + power * 0.45D; + double vertical = 0.55D + power * 0.80D; this.setDeltaMovement( - current.x + look.x * forwardAdd, - current.y + vertical, - current.z + look.z * forwardAdd + current.x + flatLook.x * forwardAdd, + vertical, + current.z + flatLook.z * forwardAdd ); this.hasImpulse = true; isLeaping = true; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java index 93ffbfed..b30b012b 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/entity/nightmare/NightmareEntity.java @@ -297,6 +297,19 @@ public class NightmareEntity extends Monster implements GeoEntity { public void lavaHurt() { } + @Override + public boolean isInvulnerableTo(DamageSource source) { + return source.is(net.minecraft.world.damagesource.DamageTypes.DROWN) || super.isInvulnerableTo(source); + } + + @Override + public boolean canBeAffected(MobEffectInstance effectInstance) { + if (effectInstance.getEffect() == MobEffects.WITHER) { + return false; + } + return super.canBeAffected(effectInstance); + } + @Override protected void checkFallDamage(double y, boolean onGround, net.minecraft.world.level.block.state.BlockState state, BlockPos pos) { } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/item/BigBerthaItem.java b/common/src/main/java/com/craisinlord/antarchy/content/item/BigBerthaItem.java index e280010f..7a4cd0c2 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/item/BigBerthaItem.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/item/BigBerthaItem.java @@ -321,6 +321,7 @@ public class BigBerthaItem extends SwordItem implements GeoItem { target.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, AntarchySettings.bigBerthaKrakenSlowTicks(), 1)); level.sendParticles(ParticleTypes.SPLASH, target.getX(), target.getY(0.7D), target.getZ(), 16, 0.35D, 0.3D, 0.35D, 0.08D); level.sendParticles(ParticleTypes.ELECTRIC_SPARK, target.getX(), target.getY(0.7D), target.getZ(), 10, 0.25D, 0.25D, 0.25D, 0.02D); + com.craisinlord.antarchy.content.entity.kraken.TentacleEntity.spawnAt(level, target.position(), attacker); } private void cycleMode(Level level, Player player, ItemStack stack) { diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/GiantLilyPadPatchFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/GiantLilyPadPatchFeature.java index 86524980..87ef7512 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/GiantLilyPadPatchFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/elythia/GiantLilyPadPatchFeature.java @@ -1,10 +1,10 @@ package com.craisinlord.antarchy.content.worldgen.elythia; import com.craisinlord.antarchy.content.AntarchyObjects; +import com.craisinlord.antarchy.content.AntarchyTags; import com.craisinlord.antarchy.content.block.GiantLilyPadBlock; import com.mojang.serialization.Codec; import net.minecraft.core.BlockPos; -import net.minecraft.tags.FluidTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.block.Block; @@ -31,7 +31,7 @@ public final class GiantLilyPadPatchFeature extends Feature { return state.isFaceSturdy(level, pos, Direction.UP); } + protected void setBlock(WorldGenLevel level, BlockPos pos, BlockState state) { + if (canWriteAt(level, pos)) { + setBlock((LevelWriter) level, pos, state); + } + } + + protected static boolean canWriteAt(WorldGenLevel level, BlockPos pos) { + return !(level instanceof WorldGenRegion region) || region.ensureCanWrite(pos); + } + protected static boolean canReplace(WorldGenLevel level, BlockPos pos) { BlockState state = level.getBlockState(pos); return state.isAir() || state.canBeReplaced() || state.getBlock() instanceof LeavesBlock; diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/SeashellFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/SeashellFeature.java index e0a83d83..43a003bf 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/SeashellFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/SeashellFeature.java @@ -56,6 +56,7 @@ public final class SeashellFeature extends Feature { level.setBlock(shellPos, state, 2); if (level.getBlockEntity(shellPos) instanceof SeashellBlockEntity seashell) { seashell.setLootTable(LOOT_TABLE, random.nextLong()); + seashell.setChanged(); } placedAny = true; } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/StarCoralPatchFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/StarCoralPatchFeature.java index 36845b66..f405ee72 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/StarCoralPatchFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/ocean/StarCoralPatchFeature.java @@ -2,7 +2,11 @@ package com.craisinlord.antarchy.content.worldgen.ocean; import com.craisinlord.antarchy.content.AntarchyObjects; import com.mojang.serialization.Codec; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.tags.FluidTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.WorldGenLevel; @@ -34,41 +38,81 @@ public final class StarCoralPatchFeature extends Feature 0; } + + private void growCoralStructure(WorldGenLevel level, RandomSource random, BlockPos basePos, Block solidBlock, Block plantBlock, Block fanBlock) { + BlockPos pos = basePos; + int trunkHeight = 1 + random.nextInt(3); + for (int i = 0; i < trunkHeight; i++) { + if (!tryPlaceSolid(level, pos, solidBlock)) { + return; + } + pos = pos.above(); + } + + List directions = new ArrayList<>(List.of(Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST)); + Collections.shuffle(directions, new java.util.Random(random.nextLong())); + + int branchCount = Math.min(directions.size(), 2 + random.nextInt(3)); + for (int b = 0; b < branchCount; b++) { + Direction direction = directions.get(b); + BlockPos branchPos = pos; + int branchLength = 2 + random.nextInt(4); + boolean grew = false; + for (int step = 0; step < branchLength; step++) { + branchPos = branchPos.relative(direction); + if (step > 0 && random.nextInt(3) == 0) { + branchPos = branchPos.above(); + } + if (!tryPlaceSolid(level, branchPos, solidBlock)) { + break; + } + grew = true; + } + + if (grew) { + BlockState tip = random.nextBoolean() ? plantBlock.defaultBlockState() : fanBlock.defaultBlockState(); + tryPlaceState(level, branchPos.above(), tip); + } + } + } + + private boolean tryPlaceSolid(WorldGenLevel level, BlockPos pos, Block block) { + return tryPlaceState(level, pos, block.defaultBlockState()); + } + + private boolean tryPlaceState(WorldGenLevel level, BlockPos pos, BlockState state) { + if (!level.getFluidState(pos).is(FluidTags.WATER) || !level.getBlockState(pos).canBeReplaced()) { + return false; + } + + level.setBlock(pos, state, 2); + return true; + } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugNestFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugNestFeature.java index fe231f4a..26794162 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugNestFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugNestFeature.java @@ -185,7 +185,9 @@ public final class BedBugNestFeature extends Feature { BlockState headState = level.getBlockState(mutable.above()); BlockState floorState = level.getBlockState(mutable.below()); if (feetState.canBeReplaced() + && feetState.getFluidState().isEmpty() && headState.canBeReplaced() + && headState.getFluidState().isEmpty() && floorState.blocksMotion() && floorState.isFaceSturdy(level, mutable.below(), Direction.UP) && floorState.getFluidState().isEmpty()) { @@ -205,6 +207,6 @@ public final class BedBugNestFeature extends Feature { } private static boolean isOpen(BlockState state) { - return state.isAir() || state.canBeReplaced() || !state.blocksMotion(); + return state.getFluidState().isEmpty() && (state.isAir() || state.canBeReplaced() || !state.blocksMotion()); } } diff --git a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugSurfaceClusterFeature.java b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugSurfaceClusterFeature.java index c8590bd4..e65207c8 100644 --- a/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugSurfaceClusterFeature.java +++ b/common/src/main/java/com/craisinlord/antarchy/content/worldgen/thoraxis/BedBugSurfaceClusterFeature.java @@ -72,7 +72,9 @@ public final class BedBugSurfaceClusterFeature extends Feature HAS_RARE_SEASHELL = TagKey.create( + Registries.BIOME, + ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "has_rare_seashell") + ); private static final ResourceKey SEASHELL_PATCH = ResourceKey.create( Registries.PLACED_FEATURE, ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "seashell_patch") ); + private static final ResourceKey SEASHELL_PATCH_RARE = ResourceKey.create( + Registries.PLACED_FEATURE, + ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "seashell_patch_rare") + ); + private static final TagKey HAS_STAR_CORAL = TagKey.create( + Registries.BIOME, + ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "has_star_coral") + ); + private static final ResourceKey STAR_CORAL_PATCH = ResourceKey.create( + Registries.PLACED_FEATURE, + ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "star_coral_patch") + ); @Override public void onInitialize() { AntarchyFabricNetworking.register(); @@ -226,6 +242,16 @@ public final class AntarchyFabric implements ModInitializer { GenerationStep.Decoration.VEGETAL_DECORATION, SEASHELL_PATCH ); + BiomeModifications.addFeature( + BiomeSelectors.tag(HAS_RARE_SEASHELL), + GenerationStep.Decoration.VEGETAL_DECORATION, + SEASHELL_PATCH_RARE + ); + BiomeModifications.addFeature( + BiomeSelectors.tag(HAS_STAR_CORAL), + GenerationStep.Decoration.VEGETAL_DECORATION, + STAR_CORAL_PATCH + ); BiomeModifications.addSpawn( BiomeSelectors.tag(APPLE_COW_SPAWN_BIOMES), net.minecraft.world.entity.MobCategory.CREATURE, 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 4d88145d..e5fb5345 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 @@ -155,6 +155,12 @@ public final class AntarchyFabricClientBootstrap { : net.minecraft.world.level.GrassColor.getDefaultColor(), AntarchyFabricBlocks.SPIDER_LILY.get() ); + ColorProviderRegistry.BLOCK.register( + (state, level, pos, tintIndex) -> level != null && pos != null + ? BiomeColors.getAverageGrassColor(level, pos) + : net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyFabricBlocks.POTTED_SPIDER_LILY.get() + ); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> FoliageColor.getDefaultColor(), AntarchyFabricItems.OURANWOOD_LEAVES_ITEM.get()); ColorProviderRegistry.ITEM.register( (stack, tintIndex) -> tintIndex == 0 ? net.minecraft.world.level.GrassColor.getDefaultColor() : -1, @@ -266,11 +272,13 @@ public final class AntarchyFabricClientBootstrap { BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.OURANWOOD_DOOR.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.OURANWOOD_TRAPDOOR.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.OURANWOOD_ACORN_BLOCK.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.POTTED_OURANWOOD_ACORN.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PEACH_LEAVES.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PEACH_HANGING_PEACH.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PEACH_DOOR.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PEACH_TRAPDOOR.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PEACH_SAPLING.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.POTTED_PEACH_SAPLING.get(), RenderType.cutout()); // BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.OURANWOOD_VINE.get(), RenderType.cutout()); // BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.OURANWOOD_VINE_PLANT.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.DUPLICATOR_SAPLING.get(), RenderType.cutout()); @@ -278,7 +286,9 @@ public final class AntarchyFabricClientBootstrap { BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.PINK_MILKWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.CAMELLIA.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.SPIDER_LILY.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.POTTED_SPIDER_LILY.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.LOTUS.get(), RenderType.cutout()); + BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.POTTED_LOTUS.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.GIANT_LILY_PAD.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.HUSHWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricBlocks.CRITTER_CAGE_BLOCK.get(), RenderType.cutout()); diff --git a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/DorrieJumpClientHandler.java b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/DorrieJumpClientHandler.java index 75f9c640..5e469b65 100644 --- a/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/DorrieJumpClientHandler.java +++ b/fabric/src/main/java/com/craisinlord/antarchy/fabric/client/DorrieJumpClientHandler.java @@ -38,6 +38,9 @@ public final class DorrieJumpClientHandler { boolean pressingCharge = AntarchyKeyBindings.isDorrieChargeJumpPressed(); if (pressingCharge != wasPressingCharge) { ClientPlayNetworking.send(new DorrieChargeJumpPayload(pressingCharge)); + if (!pressingCharge && player.getVehicle() instanceof DorrieEntity dorrie) { + dorrie.applyJumpImpulseClient(); + } wasPressingCharge = pressingCharge; } } 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 7361be8f..c289196d 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 @@ -335,6 +335,8 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock OURANWOOD_ACORN_BLOCK = BLOCKS.register("ouranwood_acorn", () -> new OuranwoodAcornBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); + public static final DeferredBlock POTTED_OURANWOOD_ACORN = BLOCKS.register("potted_ouranwood_acorn", + () -> new net.minecraft.world.level.block.FlowerPotBlock(OURANWOOD_ACORN_BLOCK.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock ORANGE_MILKWEED = BLOCKS.register("orange_milkweed", @@ -351,12 +353,16 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock SPIDER_LILY = BLOCKS.register("spider_lily", () -> new com.craisinlord.antarchy.content.block.SpiderLilyBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.POPPY))); + public static final DeferredBlock POTTED_SPIDER_LILY = BLOCKS.register("potted_spider_lily", + () -> new net.minecraft.world.level.block.FlowerPotBlock(SPIDER_LILY.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock GIANT_LILY_PAD = BLOCKS.register("giant_lily_pad", () -> new GiantLilyPadBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.LILY_PAD))); public static final DeferredBlock LOTUS = BLOCKS.register("lotus", () -> new com.craisinlord.antarchy.content.block.LotusBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SPORE_BLOSSOM))); + public static final DeferredBlock POTTED_LOTUS = BLOCKS.register("potted_lotus", + () -> new net.minecraft.world.level.block.FlowerPotBlock(LOTUS.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock SEASHELL = BLOCKS.register("seashell", () -> new SeashellBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG).noOcclusion())); public static final DeferredBlock CRITTER_CAGE_BLOCK = BLOCKS.register("critter_cage_block", @@ -441,6 +447,8 @@ public final class AntarchyFabricBlocks { public static final DeferredBlock PEACH_SAPLING = BLOCKS.register("peach_sapling", () -> new com.craisinlord.antarchy.content.block.PeachSaplingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); + public static final DeferredBlock POTTED_PEACH_SAPLING = BLOCKS.register("potted_peach_sapling", + () -> new net.minecraft.world.level.block.FlowerPotBlock(PEACH_SAPLING.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock PEACH_SIGN = BLOCKS.register("peach_sign", 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 7d4495c4..26b62fbe 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 @@ -409,7 +409,7 @@ public final class AntarchyFabricEntities { public static final DeferredHolder, EntityType> BUTTERFLY = ENTITY_TYPES.register("butterfly", () -> EntityType.Builder.of(ButterflyEntity::new, MobCategory.AMBIENT) - .sized(1.125F, 1.375F) + .sized(1.125F, 0.6875F) .clientTrackingRange(8) .build("butterfly")); 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 833bc155..0def34c2 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/AntarchyToolsConfig.java @@ -479,8 +479,8 @@ public final class AntarchyToolsConfig { // Critter Cage b.push("critterCage"); - CRITTER_CAGE_MAX_CAPTURABLE_WIDTH = b.comment("Maximum capturable entity width/depth based on the live hitbox, in blocks.").defineInRange("maxCapturableWidth", 1.15D, 0.1D, 64.0D); - CRITTER_CAGE_MAX_CAPTURABLE_HEIGHT = b.comment("Maximum capturable entity height based on the live hitbox, in blocks.").defineInRange("maxCapturableHeight", 1.15D, 0.1D, 64.0D); + CRITTER_CAGE_MAX_CAPTURABLE_WIDTH = b.comment("Maximum capturable entity width/depth based on the live hitbox, in blocks.").defineInRange("maxCapturableWidth", 1.65D, 0.1D, 64.0D); + CRITTER_CAGE_MAX_CAPTURABLE_HEIGHT = b.comment("Maximum capturable entity height based on the live hitbox, in blocks.").defineInRange("maxCapturableHeight", 1.65D, 0.1D, 64.0D); b.pop(); 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 5db9ece6..3e8f315a 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 @@ -210,6 +210,12 @@ public final class AntarchyNeoForgeClient { : net.minecraft.world.level.GrassColor.getDefaultColor(), AntarchyNeoforgeBlocks.SPIDER_LILY.get() ); + event.register( + (state, level, pos, tintIndex) -> level != null && pos != null + ? BiomeColors.getAverageGrassColor(level, pos) + : net.minecraft.world.level.GrassColor.getDefaultColor(), + AntarchyNeoforgeBlocks.POTTED_SPIDER_LILY.get() + ); } @SubscribeEvent @@ -505,11 +511,13 @@ public final class AntarchyNeoForgeClient { ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.OURANWOOD_DOOR.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.OURANWOOD_TRAPDOOR.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.OURANWOOD_ACORN_BLOCK.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.POTTED_OURANWOOD_ACORN.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PEACH_LEAVES.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PEACH_HANGING_PEACH.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PEACH_DOOR.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PEACH_TRAPDOOR.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PEACH_SAPLING.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.POTTED_PEACH_SAPLING.get(), RenderType.cutout()); // ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.OURANWOOD_VINE.get(), RenderType.cutout()); // ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.OURANWOOD_VINE_PLANT.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.DUPLICATOR_SAPLING.get(), RenderType.cutout()); @@ -517,7 +525,9 @@ public final class AntarchyNeoForgeClient { ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.PINK_MILKWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CAMELLIA.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.SPIDER_LILY.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.POTTED_SPIDER_LILY.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.LOTUS.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.POTTED_LOTUS.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.GIANT_LILY_PAD.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.HUSHWEED.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK.get(), RenderType.cutout()); diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/DorrieJumpClientHandler.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/DorrieJumpClientHandler.java index 66f95787..d0386426 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/DorrieJumpClientHandler.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/client/DorrieJumpClientHandler.java @@ -43,6 +43,9 @@ public final class DorrieJumpClientHandler { boolean pressingCharge = AntarchyKeyBindings.DORRIE_CHARGE_JUMP.isDown(); if (pressingCharge != wasPressingCharge) { PacketDistributor.sendToServer(new DorrieChargeJumpPayload(pressingCharge)); + if (!pressingCharge && player.getVehicle() instanceof DorrieEntity dorrie) { + dorrie.applyJumpImpulseClient(); + } wasPressingCharge = pressingCharge; } } diff --git a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java index 0f3854bc..fd31d377 100644 --- a/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java +++ b/neoforge/src/main/java/com/craisinlord/antarchy/neoforge/registry/AntarchyNeoForgeEvents.java @@ -49,6 +49,10 @@ import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; import net.neoforged.neoforge.common.ItemAbilities; import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.common.NeoForgeMod; +import net.minecraft.world.entity.npc.VillagerProfession; +import net.minecraft.world.entity.npc.VillagerTrades; +import net.minecraft.world.item.trading.ItemCost; +import net.minecraft.world.item.trading.MerchantOffer; import net.neoforged.neoforge.event.AddReloadListenerEvent; import net.neoforged.neoforge.event.brewing.RegisterBrewingRecipesEvent; import net.neoforged.neoforge.event.entity.EntityAttributeModificationEvent; @@ -58,6 +62,8 @@ import net.neoforged.neoforge.event.entity.player.PlayerEvent; import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; import net.neoforged.neoforge.event.level.BlockEvent; import net.neoforged.neoforge.event.tick.EntityTickEvent; +import net.neoforged.neoforge.event.village.VillagerTradesEvent; +import net.neoforged.neoforge.event.village.WandererTradesEvent; import net.neoforged.neoforge.event.tick.PlayerTickEvent; import net.neoforged.neoforge.event.tick.ServerTickEvent; import com.craisinlord.antarchy.content.item.MinersDreamExcavationManager; @@ -118,6 +124,28 @@ public final class AntarchyNeoForgeEvents { NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleStartTracking); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::handleDreamSandLogout); NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::registerReloadListeners); + NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::onVillagerTrades); + NeoForge.EVENT_BUS.addListener(AntarchyNeoForgeEvents::onWandererTrades); + } + + static void onVillagerTrades(VillagerTradesEvent event) { + if (event.getType() == VillagerProfession.FARMER) { + event.getTrades().get(1).add(emeraldForItems(AntarchyObjects.CORN.get(), 20, 16, 2)); + } else if (event.getType() == VillagerProfession.BUTCHER) { + event.getTrades().get(1).add(emeraldForItems(AntarchyObjects.COOKED_CORNDOG.get(), 5, 16, 2)); + } + } + + static void onWandererTrades(WandererTradesEvent event) { + event.getGenericTrades().add(itemsForEmerald(AntarchyObjects.CORN_SEEDS.get(), 1, 3, 12, 2)); + } + + private static VillagerTrades.ItemListing emeraldForItems(Item item, int count, int maxUses, int villagerXp) { + return (trader, random) -> new MerchantOffer(new ItemCost(item, count), new ItemStack(Items.EMERALD), maxUses, villagerXp, 0.05F); + } + + private static VillagerTrades.ItemListing itemsForEmerald(Item item, int emeraldCost, int count, int maxUses, int villagerXp) { + return (trader, random) -> new MerchantOffer(new ItemCost(Items.EMERALD, emeraldCost), new ItemStack(item, count), maxUses, villagerXp, 0.05F); } public static void onMissileSquidDeath(LivingDeathEvent event) { 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 a0f97b5b..7bae9663 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 @@ -79,6 +79,8 @@ public final class AntarchyNeoforgeBlocks { () -> new OuranwoodLeavesBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_LEAVES).randomTicks())); public static final DeferredBlock OURANWOOD_ACORN_BLOCK = BLOCKS.register("ouranwood_acorn", () -> new OuranwoodAcornBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); + public static final DeferredBlock POTTED_OURANWOOD_ACORN = BLOCKS.register("potted_ouranwood_acorn", + () -> new FlowerPotBlock(OURANWOOD_ACORN_BLOCK.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); // public static final DeferredBlock OURANWOOD_VINE = BLOCKS.register("ouranwood_vine", // () -> OURANWOOD_VINE_INSTANCE); // public static final DeferredBlock OURANWOOD_VINE_PLANT = BLOCKS.register("ouranwood_vine_plant", @@ -91,10 +93,14 @@ public final class AntarchyNeoforgeBlocks { () -> new com.craisinlord.antarchy.content.block.CamelliaBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.PEONY))); public static final DeferredBlock SPIDER_LILY = BLOCKS.register("spider_lily", () -> new com.craisinlord.antarchy.content.block.SpiderLilyBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.POPPY))); + public static final DeferredBlock POTTED_SPIDER_LILY = BLOCKS.register("potted_spider_lily", + () -> new FlowerPotBlock(SPIDER_LILY.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock GIANT_LILY_PAD = BLOCKS.register("giant_lily_pad", () -> new GiantLilyPadBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.LILY_PAD))); public static final DeferredBlock LOTUS = BLOCKS.register("lotus", () -> new com.craisinlord.antarchy.content.block.LotusBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SPORE_BLOSSOM))); + public static final DeferredBlock POTTED_LOTUS = BLOCKS.register("potted_lotus", + () -> new FlowerPotBlock(LOTUS.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock SEASHELL = BLOCKS.register("seashell", () -> new SeashellBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.TURTLE_EGG).noOcclusion())); public static final DeferredBlock CRITTER_CAGE_BLOCK = BLOCKS.register("critter_cage_block", @@ -139,6 +145,8 @@ public final class AntarchyNeoforgeBlocks { () -> new HangingPeachBlock(BlockBehaviour.Properties.of().noOcclusion().instabreak())); public static final DeferredBlock PEACH_SAPLING = BLOCKS.register("peach_sapling", () -> new com.craisinlord.antarchy.content.block.PeachSaplingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SAPLING).randomTicks().noCollission())); + public static final DeferredBlock POTTED_PEACH_SAPLING = BLOCKS.register("potted_peach_sapling", + () -> new FlowerPotBlock(PEACH_SAPLING.get(), BlockBehaviour.Properties.ofFullCopy(Blocks.POTTED_DANDELION))); public static final DeferredBlock PEACH_SIGN = BLOCKS.register("peach_sign", () -> new StandingSignBlock(AntarchyWoodTypes.PEACH, BlockBehaviour.Properties.ofFullCopy(Blocks.JUNGLE_SIGN))); public static final DeferredBlock PEACH_WALL_SIGN = BLOCKS.register("peach_wall_sign", 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 6245ef58..9417dc19 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 @@ -134,6 +134,8 @@ public class AntarchyNeoforgeCreativeModeTabs { event.accept(AntarchyNeoforgeItems.LUMEN_BUCKET.get()); event.accept(AntarchyNeoforgeItems.CLOUD_BUCKET.get()); event.accept(AntarchyNeoforgeItems.REVERIE_BOTTLE.get()); + event.accept(AntarchyNeoforgeItems.GLIMMER_BOTTLE.get()); + event.accept(AntarchyNeoforgeItems.CRITTER_CAGE.get()); event.accept(AntarchyNeoforgeItems.ULTIMATE_PICKAXE.get()); event.accept(AntarchyNeoforgeItems.ULTIMATE_AXE.get()); event.accept(AntarchyNeoforgeItems.ULTIMATE_SHOVEL.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 936cac14..502821b2 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 @@ -193,7 +193,7 @@ public final class AntarchyNeoforgeEntites { .build("caterpillar")); public static final DeferredHolder, EntityType> BUTTERFLY = ENTITY_TYPES.register("butterfly", () -> EntityType.Builder.of(ButterflyEntity::new, MobCategory.AMBIENT) - .sized(1.125F, 1.375F) + .sized(1.125F, 0.6875F) .clientTrackingRange(8) .build("butterfly")); public static final DeferredHolder, EntityType> REVERIE = ENTITY_TYPES.register("reverie", 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 e6b006a9..32c5a18f 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 @@ -711,11 +711,6 @@ public final class AntarchyNeoforgeItems { .nutrition(2) .saturationModifier(0.1F) .build()))); - public static final DeferredItem CREEPING_HORROR_EGG_ITEM = ITEMS.register("creeping_horror_egg", - () -> new MobComingSoonTooltipItem(new Item.Properties().rarity(Rarity.RARE))); - public static final DeferredItem LURKING_TERROR_EGG_ITEM = ITEMS.register("lurking_terror_egg", - () -> new MobComingSoonTooltipItem(new Item.Properties().rarity(Rarity.RARE))); - private AntarchyNeoforgeItems() {} public static Collection> getItemEntries() { diff --git a/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/seashell_in_warm_oceans.json b/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/seashell_in_warm_oceans.json new file mode 100644 index 00000000..660adf03 --- /dev/null +++ b/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/seashell_in_warm_oceans.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "#antarchy:has_rare_seashell", + "features": ["antarchy:seashell_patch_rare"], + "step": "vegetal_decoration" +} diff --git a/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/star_coral_in_oceans.json b/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/star_coral_in_oceans.json new file mode 100644 index 00000000..281f4a35 --- /dev/null +++ b/neoforge/src/main/resources/data/antarchy/neoforge/biome_modifier/star_coral_in_oceans.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "#antarchy:has_star_coral", + "features": ["antarchy:star_coral_patch"], + "step": "vegetal_decoration" +}