diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstant.java b/common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstants.java similarity index 96% rename from common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstant.java rename to common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstants.java index 0831ecc..51494c0 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstant.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/GenerationConstants.java @@ -8,7 +8,7 @@ import java.util.Optional; -public class GenerationConstant { +public class GenerationConstants { public static final Direction[] HORIZONTALS = new Direction[]{Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST}; public static boolean isFarEnoughFromSpawn(final BlockPos position) { diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnDeathWorm.java b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnDeathWorm.java index bb02f73..eb76d97 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnDeathWorm.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnDeathWorm.java @@ -3,7 +3,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.entity.EntityDeathWorm; import com.iafenvoy.iceandfire.registry.IafEntities; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import net.minecraft.entity.SpawnReason; import net.minecraft.util.math.BlockPos; @@ -26,7 +26,7 @@ public boolean generate(FeatureContext context) { BlockPos position = context.getOrigin(); position = worldIn.getTopPosition(Heightmap.Type.WORLD_SURFACE_WG, position.add(8, 0, 8)); - if (GenerationConstant.isFarEnoughFromSpawn(position)) { + if (GenerationConstants.isFarEnoughFromSpawn(position)) { if (rand.nextDouble() < IafCommonConfig.INSTANCE.deathworm.spawnChance.getValue()) { EntityDeathWorm deathWorm = IafEntities.DEATH_WORM.get().create(worldIn.toServerWorld()); assert deathWorm != null; diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnSeaSerpent.java b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnSeaSerpent.java index 6253209..a971552 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnSeaSerpent.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnSeaSerpent.java @@ -3,7 +3,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.entity.EntitySeaSerpent; import com.iafenvoy.iceandfire.registry.IafEntities; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import net.minecraft.fluid.Fluids; import net.minecraft.util.math.BlockPos; @@ -28,7 +28,7 @@ public boolean generate(FeatureContext context) { position = worldIn.getTopPosition(Heightmap.Type.WORLD_SURFACE_WG, position.add(8, 0, 8)); BlockPos oceanPos = worldIn.getTopPosition(Heightmap.Type.OCEAN_FLOOR_WG, position.add(8, 0, 8)); - if (GenerationConstant.isFarEnoughFromSpawn(position)) { + if (GenerationConstants.isFarEnoughFromSpawn(position)) { if (rand.nextDouble() < IafCommonConfig.INSTANCE.seaSerpent.spawnChance.getValue()) { BlockPos pos = oceanPos.add(rand.nextInt(10) - 5, rand.nextInt(30), rand.nextInt(10) - 5); if (worldIn.getFluidState(pos).getFluid() == Fluids.WATER) { diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnStymphalianBird.java b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnStymphalianBird.java index d53a3df..8673bee 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnStymphalianBird.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnStymphalianBird.java @@ -3,7 +3,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.entity.EntityStymphalianBird; import com.iafenvoy.iceandfire.registry.IafEntities; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; @@ -26,7 +26,7 @@ public boolean generate(FeatureContext context) { position = worldIn.getTopPosition(Heightmap.Type.WORLD_SURFACE_WG, position.add(8, 0, 8)); - if (GenerationConstant.isFarEnoughFromSpawn(position)) { + if (GenerationConstants.isFarEnoughFromSpawn(position)) { if (rand.nextDouble() < IafCommonConfig.INSTANCE.stymphalianBird.spawnChance.getValue()) for (int i = 0; i < 4 + rand.nextInt(4); i++) { BlockPos pos = position.add(rand.nextInt(10) - 5, 0, rand.nextInt(10) - 5); diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnWanderingCyclops.java b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnWanderingCyclops.java index 74d0dbd..7389c6a 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnWanderingCyclops.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/feature/SpawnWanderingCyclops.java @@ -3,7 +3,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.entity.EntityCyclops; import com.iafenvoy.iceandfire.registry.IafEntities; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnReason; @@ -29,7 +29,7 @@ public boolean generate(FeatureContext context) { position = worldIn.getTopPosition(Heightmap.Type.WORLD_SURFACE_WG, position.add(8, 0, 8)); - if (GenerationConstant.isFarEnoughFromSpawn(position)) { + if (GenerationConstants.isFarEnoughFromSpawn(position)) { if (rand.nextDouble() < IafCommonConfig.INSTANCE.cyclops.spawnWanderingChance.getValue() && rand.nextInt(12) == 0) { EntityCyclops cyclops = IafEntities.CYCLOPS.get().create(worldIn.toServerWorld()); assert cyclops != null; diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/CyclopsCaveStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/CyclopsCaveStructure.java index 46282de..657ffe4 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/CyclopsCaveStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/CyclopsCaveStructure.java @@ -7,7 +7,7 @@ import com.iafenvoy.iceandfire.registry.IafEntities; import com.iafenvoy.iceandfire.registry.IafStructurePieces; import com.iafenvoy.iceandfire.registry.IafStructureTypes; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.block.*; @@ -49,7 +49,7 @@ protected CyclopsCaveStructure(Config config) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> collector.addPiece(new CyclopsCavePiece(0, new BlockBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.getX(), blockPos.getY(), blockPos.getZ()))))); } @@ -108,7 +108,7 @@ public void generate(StructureWorldAccess world, StructureAccessor structureAcce world.setBlockState(position.up().south(), IafBlocks.GOLD_PILE.get().getDefaultState().with(BlockGoldPile.LAYERS, 1 + new java.util.Random().nextInt(7)), 3); world.setBlockState(position.up().west(), IafBlocks.GOLD_PILE.get().getDefaultState().with(BlockGoldPile.LAYERS, 1 + new java.util.Random().nextInt(7)), 3); world.setBlockState(position.up().east(), IafBlocks.GOLD_PILE.get().getDefaultState().with(BlockGoldPile.LAYERS, 1 + new java.util.Random().nextInt(7)), 3); - world.setBlockState(position.up(2), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstant.HORIZONTALS[new java.util.Random().nextInt(3)]), 2); + world.setBlockState(position.up(2), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstants.HORIZONTALS[new java.util.Random().nextInt(3)]), 2); if (world.getBlockState(position.up(2)).getBlock() instanceof AbstractChestBlock) { BlockEntity blockEntity = world.getBlockEntity(position.up(2)); @@ -173,7 +173,7 @@ private void generateSheepPen(ServerWorldAccess level, BlockPos position, Random } private void generateSkeleton(WorldAccess level, BlockPos position, Random random, BlockPos origin, float radius) { - Direction direction = GenerationConstant.HORIZONTALS[random.nextInt(3)]; + Direction direction = GenerationConstants.HORIZONTALS[random.nextInt(3)]; Direction.Axis oppositeAxis = direction.getAxis() == Direction.Axis.X ? Direction.Axis.Z : Direction.Axis.X; int maxRibHeight = random.nextInt(2); @@ -209,7 +209,7 @@ private void generateSkeleton(WorldAccess level, BlockPos position, Random rando } private boolean isTouchingAir(WorldAccess level, BlockPos position) { - for (Direction direction : GenerationConstant.HORIZONTALS) + for (Direction direction : GenerationConstants.HORIZONTALS) if (!level.isAir(position.offset(direction))) return false; return true; diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonCaveStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonCaveStructure.java index e4c07d7..4df2480 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonCaveStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonCaveStructure.java @@ -7,7 +7,7 @@ import com.iafenvoy.iceandfire.entity.util.HomePosition; import com.iafenvoy.iceandfire.item.block.BlockGoldPile; import com.iafenvoy.iceandfire.registry.tag.IafBlockTags; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.iafenvoy.uranus.util.ShapeBuilder; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; @@ -49,7 +49,7 @@ protected DragonCaveStructure(Config config) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> this.addPieces(collector, blockPos, context, context.random().nextBoolean()))); } @@ -120,7 +120,7 @@ public void generateCave(WorldAccess worldIn, int radius, int amount, BlockPos c //Get shells //Get hollows for (int i = 0; i < amount + rand.nextInt(2); i++) { - Direction direction = GenerationConstant.HORIZONTALS[rand.nextInt(GenerationConstant.HORIZONTALS.length - 1)]; + Direction direction = GenerationConstants.HORIZONTALS[rand.nextInt(GenerationConstants.HORIZONTALS.length - 1)]; int r = 2 * (int) (radius / 3F) + rand.nextInt(8); BlockPos centerOffset = center.offset(direction, radius - 2); sphereBlocks = Stream.concat(sphereBlocks, ShapeBuilder.start().getAllInCutOffSphereMutable(r, r, centerOffset).toStream(false)); @@ -211,7 +211,7 @@ public void setGoldPile(WorldAccess world, BlockPos pos, Random rand) { boolean generateGold = rand.nextDouble() < IafCommonConfig.INSTANCE.dragon.generateDenGoldChance.getValue() * (this.male ? 1 : 2); world.setBlockState(pos, generateGold ? this.getTreasurePile().with(BlockGoldPile.LAYERS, 1 + rand.nextInt(7)) : Blocks.AIR.getDefaultState(), 3); } else if (chance == 61) { - world.setBlockState(pos, Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstant.HORIZONTALS[rand.nextInt(3)]), Block.NOTIFY_LISTENERS); + world.setBlockState(pos, Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstants.HORIZONTALS[rand.nextInt(3)]), Block.NOTIFY_LISTENERS); if (world.getBlockState(pos).getBlock() instanceof ChestBlock) { BlockEntity blockEntity = world.getBlockEntity(pos); if (blockEntity instanceof ChestBlockEntity chestBlockEntity) diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonRoostStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonRoostStructure.java index ae1e3a8..2d58080 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonRoostStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/DragonRoostStructure.java @@ -5,7 +5,7 @@ import com.iafenvoy.iceandfire.entity.EntityDragonBase; import com.iafenvoy.iceandfire.entity.util.HomePosition; import com.iafenvoy.iceandfire.item.block.BlockGoldPile; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.ChestBlockEntity; @@ -39,7 +39,7 @@ protected DragonRoostStructure(Config config) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> collector.addPiece(this.createPiece(new BlockBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.getX(), blockPos.getY(), blockPos.getZ()), context.random().nextBoolean())))); } @@ -142,7 +142,7 @@ private void generateDecoration(StructureWorldAccess world, BlockPos origin, Ran if (distance < 0.3D && random.nextInt(isMale ? 500 : 700) == 0) { BlockPos surfacePosition = world.getTopPosition(Heightmap.Type.WORLD_SURFACE, position); - boolean wasPlaced = world.setBlockState(surfacePosition, Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstant.HORIZONTALS[random.nextInt(3)]), Block.NOTIFY_LISTENERS); + boolean wasPlaced = world.setBlockState(surfacePosition, Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstants.HORIZONTALS[random.nextInt(3)]), Block.NOTIFY_LISTENERS); if (wasPlaced) { BlockEntity blockEntity = world.getBlockEntity(surfacePosition); @@ -189,7 +189,7 @@ public void generateBoulder(WorldAccess worldIn, Random rand, BlockPos position, private void generateArch(WorldAccess worldIn, Random rand, BlockPos position, Block block) { int height = 3 + rand.nextInt(3); int width = Math.min(3, height - 2); - Direction direction = GenerationConstant.HORIZONTALS[rand.nextInt(GenerationConstant.HORIZONTALS.length - 1)]; + Direction direction = GenerationConstants.HORIZONTALS[rand.nextInt(GenerationConstants.HORIZONTALS.length - 1)]; boolean diagonal = rand.nextBoolean(); for (int i = 0; i < height; i++) worldIn.setBlockState(position.up(i), block.getDefaultState(), 2); diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/GorgonTempleStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/GorgonTempleStructure.java index 6b275bb..7474111 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/GorgonTempleStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/GorgonTempleStructure.java @@ -2,7 +2,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.registry.IafStructureTypes; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.registry.entry.RegistryEntry; @@ -39,7 +39,7 @@ protected Optional getStructurePosition(Context pContext) { return Optional.empty(); ChunkPos pos = pContext.chunkPos(); BlockPos blockpos = pos.getCenterAtY(1); - if (!GenerationConstant.isFarEnoughFromSpawn(blockpos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockpos)) return Optional.empty(); return StructurePoolBasedGenerator.generate( pContext, // Used for JigsawPlacement to get all the proper behaviors done. this.startPool, // The starting pool to use to create the structure layout from diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/HydraCaveStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/HydraCaveStructure.java index f25938a..91accce 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/HydraCaveStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/HydraCaveStructure.java @@ -5,7 +5,7 @@ import com.iafenvoy.iceandfire.registry.IafEntities; import com.iafenvoy.iceandfire.registry.IafStructurePieces; import com.iafenvoy.iceandfire.registry.IafStructureTypes; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.block.Blocks; @@ -47,7 +47,7 @@ protected HydraCaveStructure(Config config) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> collector.addPiece(new HydraCavePiece(0, new BlockBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.getX(), blockPos.getY(), blockPos.getZ()))))); } @@ -116,7 +116,7 @@ public void generate(StructureWorldAccess world, StructureAccessor structureAcce for (BlockPos blockpos : BlockPos.stream(pivot.add(-j, -k, -l), pivot.add(j, k + 8, l)).map(BlockPos::toImmutable).collect(Collectors.toSet())) { if (blockpos.getSquaredDistance(pivot) <= f * f && blockpos.getY() == pivot.getY()) { if (random.nextInt(30) == 0 && this.isTouchingAir(world, blockpos.up())) { - world.setBlockState(blockpos.up(1), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstant.HORIZONTALS[new java.util.Random().nextInt(3)]), 2); + world.setBlockState(blockpos.up(1), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstants.HORIZONTALS[new java.util.Random().nextInt(3)]), 2); if (world.getBlockState(blockpos.up(1)).getBlock() instanceof ChestBlock) if (world.getBlockEntity(blockpos.up(1)) instanceof ChestBlockEntity chest) chest.setLootTable(HYDRA_CHEST, random.nextLong()); @@ -150,7 +150,7 @@ public void generate(StructureWorldAccess world, StructureAccessor structureAcce } private boolean isTouchingAir(WorldAccess worldIn, BlockPos pos) { - for (Direction direction : GenerationConstant.HORIZONTALS) + for (Direction direction : GenerationConstants.HORIZONTALS) if (!worldIn.isAir(pos.offset(direction))) return false; return true; diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/LightningDragonRoostStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/LightningDragonRoostStructure.java index 9ac8940..1635f5b 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/LightningDragonRoostStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/LightningDragonRoostStructure.java @@ -7,7 +7,7 @@ import com.iafenvoy.iceandfire.registry.IafStructurePieces; import com.iafenvoy.iceandfire.registry.IafStructureTypes; import com.iafenvoy.iceandfire.registry.tag.CommonTags; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.block.Block; @@ -95,7 +95,7 @@ protected void handleCustomGeneration(StructureWorldAccess world, BlockPos origi if (distance > 0.05D && random.nextInt(800) == 0) this.generateSpire(world, random, this.getSurfacePosition(world, position)); if (distance > 0.05D && random.nextInt(1000) == 0) - this.generateSpike(world, random, this.getSurfacePosition(world, position), GenerationConstant.HORIZONTALS[random.nextInt(3)]); + this.generateSpike(world, random, this.getSurfacePosition(world, position), GenerationConstants.HORIZONTALS[random.nextInt(3)]); } private void generateSpike(WorldAccess worldIn, Random rand, BlockPos position, Direction direction) { diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MausoleumStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MausoleumStructure.java index c05f388..338c843 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MausoleumStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MausoleumStructure.java @@ -2,7 +2,7 @@ import com.iafenvoy.iceandfire.config.IafCommonConfig; import com.iafenvoy.iceandfire.registry.IafStructureTypes; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.registry.entry.RegistryEntry; @@ -38,7 +38,7 @@ protected Optional getStructurePosition(Context pContext) { return Optional.empty(); ChunkPos pos = pContext.chunkPos(); BlockPos blockpos = pos.getCenterAtY(1); - if (!GenerationConstant.isFarEnoughFromSpawn(blockpos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockpos)) return Optional.empty(); return StructurePoolBasedGenerator.generate( pContext, // Used for JigsawPlacement to get all the proper behaviors done. this.startPool, // The starting pool to use to create the structure layout from diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MyrmexHiveStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MyrmexHiveStructure.java index 70315af..c5dbc87 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MyrmexHiveStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/MyrmexHiveStructure.java @@ -12,7 +12,7 @@ import com.iafenvoy.iceandfire.registry.IafStructurePieces; import com.iafenvoy.iceandfire.registry.IafStructureTypes; import com.iafenvoy.iceandfire.util.RestrictWorldAccess; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.iafenvoy.iceandfire.world.MyrmexWorldData; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; @@ -61,7 +61,7 @@ protected MyrmexHiveStructure(Config config, boolean jungle) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> this.addPieces(collector, blockPos, context))); } @@ -549,7 +549,7 @@ public static void generateGold(WorldAccess worldIn, BlockPos blockpos, BlockPos worldIn.setBlockState(MyrmexHive.getGroundedPos(worldIn, blockpos.west()), gold.with(BlockGoldPile.LAYERS, 1 + Random.create().nextInt(7)), 3); worldIn.setBlockState(MyrmexHive.getGroundedPos(worldIn, blockpos.east()), gold.with(BlockGoldPile.LAYERS, 1 + Random.create().nextInt(7)), 3); if (rand.nextInt(3) == 0) { - worldIn.setBlockState(blockpos.up(), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstant.HORIZONTALS[Random.create().nextInt(3)]), 2); + worldIn.setBlockState(blockpos.up(), Blocks.CHEST.getDefaultState().with(ChestBlock.FACING, GenerationConstants.HORIZONTALS[Random.create().nextInt(3)]), 2); if (worldIn.getBlockState(blockpos.up()).getBlock() instanceof ChestBlock) { BlockEntity tileentity1 = worldIn.getBlockEntity(blockpos.up()); if (tileentity1 instanceof ChestBlockEntity chest) diff --git a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/SirenIslandStructure.java b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/SirenIslandStructure.java index 41f4477..4771774 100644 --- a/common/src/main/java/com/iafenvoy/iceandfire/world/structure/SirenIslandStructure.java +++ b/common/src/main/java/com/iafenvoy/iceandfire/world/structure/SirenIslandStructure.java @@ -4,7 +4,7 @@ import com.iafenvoy.iceandfire.registry.IafEntities; import com.iafenvoy.iceandfire.registry.IafStructurePieces; import com.iafenvoy.iceandfire.registry.IafStructureTypes; -import com.iafenvoy.iceandfire.world.GenerationConstant; +import com.iafenvoy.iceandfire.world.GenerationConstants; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.block.Block; @@ -40,7 +40,7 @@ protected SirenIslandStructure(Config config) { protected Optional getStructurePosition(Context context) { BlockRotation blockRotation = BlockRotation.random(context.random()); BlockPos blockPos = this.getShiftedPos(context, blockRotation); - if (!GenerationConstant.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); + if (!GenerationConstants.isFarEnoughFromSpawn(blockPos)) return Optional.empty(); return Optional.of(new StructurePosition(blockPos, collector -> collector.addPiece(new SirenIslandPiece(0, new BlockBox(blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.getX(), blockPos.getY(), blockPos.getZ()))))); } diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_1.json b/common/src/main/resources/assets/iceandfire/particles/dragon_flame.json similarity index 100% rename from common/src/main/resources/assets/iceandfire/particles/dragon_flame_1.json rename to common/src/main/resources/assets/iceandfire/particles/dragon_flame.json diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_2.json b/common/src/main/resources/assets/iceandfire/particles/dragon_flame_2.json deleted file mode 100644 index 921dc47..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "textures": [ - "iceandfire:dragon_flame" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_3.json b/common/src/main/resources/assets/iceandfire/particles/dragon_flame_3.json deleted file mode 100644 index 921dc47..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "textures": [ - "iceandfire:dragon_flame" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_4.json b/common/src/main/resources/assets/iceandfire/particles/dragon_flame_4.json deleted file mode 100644 index 921dc47..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "textures": [ - "iceandfire:dragon_flame" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_5.json b/common/src/main/resources/assets/iceandfire/particles/dragon_flame_5.json deleted file mode 100644 index 921dc47..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_flame_5.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "textures": [ - "iceandfire:dragon_flame" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_1.json b/common/src/main/resources/assets/iceandfire/particles/dragon_frost.json similarity index 100% rename from common/src/main/resources/assets/iceandfire/particles/dragon_frost_1.json rename to common/src/main/resources/assets/iceandfire/particles/dragon_frost.json diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_2.json b/common/src/main/resources/assets/iceandfire/particles/dragon_frost_2.json deleted file mode 100644 index 8f88129..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "textures": [ - "iceandfire:snowflake_0", - "iceandfire:snowflake_1" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_3.json b/common/src/main/resources/assets/iceandfire/particles/dragon_frost_3.json deleted file mode 100644 index 8f88129..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "textures": [ - "iceandfire:snowflake_0", - "iceandfire:snowflake_1" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_4.json b/common/src/main/resources/assets/iceandfire/particles/dragon_frost_4.json deleted file mode 100644 index 8f88129..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "textures": [ - "iceandfire:snowflake_0", - "iceandfire:snowflake_1" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_5.json b/common/src/main/resources/assets/iceandfire/particles/dragon_frost_5.json deleted file mode 100644 index 8f88129..0000000 --- a/common/src/main/resources/assets/iceandfire/particles/dragon_frost_5.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "textures": [ - "iceandfire:snowflake_0", - "iceandfire:snowflake_1" - ] -} \ No newline at end of file diff --git a/common/src/main/resources/data/c/tags/items/milks.json b/common/src/main/resources/data/c/tags/items/milks.json new file mode 100644 index 0000000..9a912c3 --- /dev/null +++ b/common/src/main/resources/data/c/tags/items/milks.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + { + "id": "forge:milks", + "required": false + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/c/tags/items/stones.json b/common/src/main/resources/data/c/tags/items/stones.json new file mode 100644 index 0000000..48632e0 --- /dev/null +++ b/common/src/main/resources/data/c/tags/items/stones.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + { + "id": "forge:stones", + "required": false + } + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/forge/tags/items/milks.json b/common/src/main/resources/data/forge/tags/items/milks.json new file mode 100644 index 0000000..8146080 --- /dev/null +++ b/common/src/main/resources/data/forge/tags/items/milks.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:milk" + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/iceandfire/recipes/dragonforge_fire_brick.json b/common/src/main/resources/data/iceandfire/recipes/dragonforge_fire_brick.json index 88b17be..ef756fa 100644 --- a/common/src/main/resources/data/iceandfire/recipes/dragonforge_fire_brick.json +++ b/common/src/main/resources/data/iceandfire/recipes/dragonforge_fire_brick.json @@ -6,7 +6,7 @@ "item": "minecraft:stone_bricks" }, "S": { - "tag": "c:storage_blocks/scales/dragon/fire" + "tag": "iceandfire:storage_blocks/scales/dragon/fire" } }, "pattern": [ diff --git a/common/src/main/resources/data/iceandfire/recipes/dragonforge_ice_brick.json b/common/src/main/resources/data/iceandfire/recipes/dragonforge_ice_brick.json index c860969..af96b4d 100644 --- a/common/src/main/resources/data/iceandfire/recipes/dragonforge_ice_brick.json +++ b/common/src/main/resources/data/iceandfire/recipes/dragonforge_ice_brick.json @@ -6,7 +6,7 @@ "item": "minecraft:stone_bricks" }, "S": { - "tag": "c:storage_blocks/scales/dragon/ice" + "tag": "iceandfire:storage_blocks/scales/dragon/ice" } }, "pattern": [ diff --git a/common/src/main/resources/data/iceandfire/recipes/dragonforge_lightning_brick.json b/common/src/main/resources/data/iceandfire/recipes/dragonforge_lightning_brick.json index 4e9533a..fe9fa27 100644 --- a/common/src/main/resources/data/iceandfire/recipes/dragonforge_lightning_brick.json +++ b/common/src/main/resources/data/iceandfire/recipes/dragonforge_lightning_brick.json @@ -6,7 +6,7 @@ "item": "minecraft:stone_bricks" }, "S": { - "tag": "c:storage_blocks/scales/dragon/lightning" + "tag": "iceandfire:storage_blocks/scales/dragon/lightning" } }, "pattern": [ diff --git a/common/src/main/resources/data/iceandfire/recipes/pixie_wand.json b/common/src/main/resources/data/iceandfire/recipes/pixie_wand.json index 907953e..6c520a3 100644 --- a/common/src/main/resources/data/iceandfire/recipes/pixie_wand.json +++ b/common/src/main/resources/data/iceandfire/recipes/pixie_wand.json @@ -7,7 +7,7 @@ ], "key": { "D": { - "tag": "minecraft:diamond" + "item": "minecraft:diamond" }, "B": { "item": "minecraft:blaze_rod" diff --git a/common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/fire.json b/common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/fire.json similarity index 100% rename from common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/fire.json rename to common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/fire.json diff --git a/common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/ice.json b/common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/ice.json similarity index 100% rename from common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/ice.json rename to common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/ice.json diff --git a/common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/lightning.json b/common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/lightning.json similarity index 100% rename from common/src/main/resources/data/c/tags/blocks/storage_blocks/scales/dragon/lightning.json rename to common/src/main/resources/data/iceandfire/tags/blocks/storage_blocks/scales/dragon/lightning.json diff --git a/common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/fire.json b/common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/fire.json similarity index 100% rename from common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/fire.json rename to common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/fire.json diff --git a/common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/ice.json b/common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/ice.json similarity index 100% rename from common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/ice.json rename to common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/ice.json diff --git a/common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/lightning.json b/common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/lightning.json similarity index 100% rename from common/src/main/resources/data/c/tags/items/storage_blocks/scales/dragon/lightning.json rename to common/src/main/resources/data/iceandfire/tags/items/storage_blocks/scales/dragon/lightning.json diff --git a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/bottom_pool.json b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/bottom_pool.json index 3ae3173..a759c53 100644 --- a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/bottom_pool.json +++ b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/bottom_pool.json @@ -4,7 +4,8 @@ "element": { "element_type": "minecraft:single_pool_element", "location": "iceandfire:gorgon_temple/basement", - "projection": "rigid" + "projection": "rigid", + "processors": [] }, "weight": 1 } diff --git a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/gorgon_pool.json b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/gorgon_pool.json index 477859c..1867893 100644 --- a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/gorgon_pool.json +++ b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/gorgon_pool.json @@ -4,7 +4,8 @@ "element": { "element_type": "minecraft:single_pool_element", "location": "iceandfire:gorgon_temple/gorgon", - "projection": "rigid" + "projection": "rigid", + "processors": [] }, "weight": 1 } diff --git a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/start_pool.json b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/start_pool.json index b027307..3e540b9 100644 --- a/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/start_pool.json +++ b/common/src/main/resources/data/iceandfire/worldgen/template_pool/gorgon_temple/start_pool.json @@ -4,7 +4,8 @@ "element": { "element_type": "minecraft:single_pool_element", "location": "iceandfire:gorgon_temple/building", - "projection": "rigid" + "projection": "rigid", + "processors": [] }, "weight": 1 }