From a390486d5bfcc8b93e68b15a88366aaa368cbaaa Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Wed, 21 Jul 2021 16:04:24 +0300 Subject: [PATCH] Tag migration --- .../ru/betterend/api/BetterEndPlugin.java | 2 +- .../betterend/blocks/AuroraCrystalBlock.java | 2 +- .../betterend/blocks/BulbVineSeedBlock.java | 2 +- .../ru/betterend/blocks/EndLilySeedBlock.java | 2 +- .../betterend/blocks/EndLotusSeedBlock.java | 2 +- .../ru/betterend/blocks/HydraluxBlock.java | 2 +- .../ru/betterend/blocks/LumecornBlock.java | 2 +- .../blocks/NeonCactusPlantBlock.java | 2 +- .../blocks/SmallJellyshroomBlock.java | 2 +- .../betterend/blocks/basis/EndPlantBlock.java | 2 +- .../blocks/basis/EndPlantWithAgeBlock.java | 2 +- .../blocks/basis/EndUnderwaterPlantBlock.java | 2 +- .../basis/EndUnderwaterWallPlantBlock.java | 2 +- .../blocks/basis/EndWallMushroom.java | 2 +- .../blocks/basis/EndWallPlantBlock.java | 2 +- .../blocks/complex/MetalMaterial.java | 4 +- .../blocks/complex/StoneMaterial.java | 11 ++-- .../blocks/complex/WoodenMaterial.java | 4 +- .../integration/byg/BYGIntegration.java | 2 +- .../byg/features/BigEtherTreeFeature.java | 6 +-- .../NightshadeRedwoodTreeFeature.java | 4 +- .../byg/features/OldBulbisTreeFeature.java | 8 +-- .../betterend/integration/rei/REIPlugin.java | 8 +-- .../ru/betterend/item/tool/EndHammerItem.java | 4 +- .../mixin/client/LevelRendererMixin.java | 1 + .../mixin/common/ChorusFlowerBlockMixin.java | 4 +- .../mixin/common/ChorusPlantBlockMixin.java | 6 +-- .../mixin/common/EnchantmentMenuMixin.java | 12 ++--- .../ru/betterend/recipe/CraftingRecipes.java | 2 +- .../recipe/builders/AnvilRecipe.java | 4 +- .../ru/betterend/registry/EndFeatures.java | 2 + .../java/ru/betterend/registry/EndItems.java | 2 +- .../java/ru/betterend/registry/EndTags.java | 34 +++++------- .../world/biome/land/UmbraValleyBiome.java | 2 + .../world/features/CavePumpkinFeature.java | 2 +- .../world/features/CrashedShipFeature.java | 2 +- .../world/features/ScatterFeature.java | 2 +- .../world/features/bushes/BushFeature.java | 4 +- .../features/bushes/BushWithOuterFeature.java | 4 +- .../bushes/LargeAmaranitaFeature.java | 2 +- .../world/features/bushes/Lumecorn.java | 2 +- .../features/bushes/TenaneaBushFeature.java | 2 +- .../world/features/terrain/ArchFeature.java | 54 +++++++++++++++++++ .../terrain/BigAuroraCrystalFeature.java | 2 +- .../features/terrain/DesertLakeFeature.java | 10 ++-- .../features/terrain/EndLakeFeature.java | 8 +-- .../features/terrain/FallenPillarFeature.java | 4 +- .../world/features/terrain/GeyserFeature.java | 10 ++-- .../terrain/ObsidianBoulderFeature.java | 6 +-- .../ObsidianPillarBasementFeature.java | 4 +- .../features/terrain/SingleBlockFeature.java | 2 +- .../terrain/SmaragdantCrystalFeature.java | 4 +- .../world/features/terrain/SpireFeature.java | 6 +-- .../features/terrain/StalactiteFeature.java | 2 +- .../terrain/SulphuricCaveFeature.java | 10 ++-- .../terrain/SulphuricLakeFeature.java | 8 +-- .../features/terrain/SurfaceVentFeature.java | 4 +- .../caves/CaveChunkPopulatorFeature.java | 4 +- .../terrain/caves/EndCaveFeature.java | 10 ++-- .../terrain/caves/RoundCaveFeature.java | 2 +- .../terrain/caves/TunelCaveFeature.java | 6 +-- .../features/trees/DragonTreeFeature.java | 6 +-- .../trees/GiganticAmaranitaFeature.java | 4 +- .../features/trees/HelixTreeFeature.java | 2 +- .../features/trees/JellyshroomFeature.java | 6 +-- .../features/trees/LacugroveFeature.java | 8 +-- .../world/features/trees/LucerniaFeature.java | 6 +-- .../trees/MossyGlowshroomFeature.java | 2 +- .../trees/PythadendronTreeFeature.java | 2 +- .../world/features/trees/TenaneaFeature.java | 4 +- .../features/trees/UmbrellaTreeFeature.java | 6 +-- .../world/structures/piece/CavePiece.java | 2 +- .../piece/CrystalMountainPiece.java | 2 +- .../world/structures/piece/LakePiece.java | 2 +- .../assets/betterend/lang/en_us.json | 6 ++- .../assets/betterend/lang/ru_ru.json | 4 +- 76 files changed, 224 insertions(+), 164 deletions(-) create mode 100644 src/main/java/ru/betterend/world/features/terrain/ArchFeature.java diff --git a/src/main/java/ru/betterend/api/BetterEndPlugin.java b/src/main/java/ru/betterend/api/BetterEndPlugin.java index 5e961c65..e4b64c6c 100644 --- a/src/main/java/ru/betterend/api/BetterEndPlugin.java +++ b/src/main/java/ru/betterend/api/BetterEndPlugin.java @@ -23,7 +23,7 @@ public interface BetterEndPlugin { } /** - * Register other mod stuff, for example, EndHammers. + * Register other mod stuff, for example, EndITEM_HAMMERS. */ default void registerOthers() { } diff --git a/src/main/java/ru/betterend/blocks/AuroraCrystalBlock.java b/src/main/java/ru/betterend/blocks/AuroraCrystalBlock.java index 8a2a0d4b..2c3f9c68 100644 --- a/src/main/java/ru/betterend/blocks/AuroraCrystalBlock.java +++ b/src/main/java/ru/betterend/blocks/AuroraCrystalBlock.java @@ -35,7 +35,7 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements RenderLaye public AuroraCrystalBlock() { super(FabricBlockSettings.of(Material.GLASS) .breakByTool(FabricToolTags.PICKAXES) - .breakByTool(TagAPI.HAMMERS) + .breakByTool(TagAPI.ITEM_HAMMERS) .hardness(1F) .resistance(1F) .luminance(15) diff --git a/src/main/java/ru/betterend/blocks/BulbVineSeedBlock.java b/src/main/java/ru/betterend/blocks/BulbVineSeedBlock.java index 80f99c58..00bd9485 100644 --- a/src/main/java/ru/betterend/blocks/BulbVineSeedBlock.java +++ b/src/main/java/ru/betterend/blocks/BulbVineSeedBlock.java @@ -19,7 +19,7 @@ public class BulbVineSeedBlock extends EndPlantWithAgeBlock { @Override public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) { BlockState up = world.getBlockState(pos.above()); - return up.is(TagAPI.GEN_TERRAIN) || up.is(BlockTags.LOGS) || up.is(BlockTags.LEAVES); + return up.is(TagAPI.BLOCK_GEN_TERRAIN) || up.is(BlockTags.LOGS) || up.is(BlockTags.LEAVES); } @Override diff --git a/src/main/java/ru/betterend/blocks/EndLilySeedBlock.java b/src/main/java/ru/betterend/blocks/EndLilySeedBlock.java index 79ee2dfe..71a7dd2d 100644 --- a/src/main/java/ru/betterend/blocks/EndLilySeedBlock.java +++ b/src/main/java/ru/betterend/blocks/EndLilySeedBlock.java @@ -48,6 +48,6 @@ public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/EndLotusSeedBlock.java b/src/main/java/ru/betterend/blocks/EndLotusSeedBlock.java index b133a38a..20d3e1c4 100644 --- a/src/main/java/ru/betterend/blocks/EndLotusSeedBlock.java +++ b/src/main/java/ru/betterend/blocks/EndLotusSeedBlock.java @@ -134,6 +134,6 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/HydraluxBlock.java b/src/main/java/ru/betterend/blocks/HydraluxBlock.java index 82ee1d1d..7db4f4af 100644 --- a/src/main/java/ru/betterend/blocks/HydraluxBlock.java +++ b/src/main/java/ru/betterend/blocks/HydraluxBlock.java @@ -63,7 +63,7 @@ public class HydraluxBlock extends UnderwaterPlantBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } @Override diff --git a/src/main/java/ru/betterend/blocks/LumecornBlock.java b/src/main/java/ru/betterend/blocks/LumecornBlock.java index 1b2b54a6..ac27121f 100644 --- a/src/main/java/ru/betterend/blocks/LumecornBlock.java +++ b/src/main/java/ru/betterend/blocks/LumecornBlock.java @@ -63,7 +63,7 @@ public class LumecornBlock extends BaseBlockNotFull implements RenderLayerProvid public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) { LumecornShape shape = state.getValue(SHAPE); if (shape == LumecornShape.BOTTOM_BIG || shape == LumecornShape.BOTTOM_SMALL) { - return world.getBlockState(pos.below()).is(TagAPI.END_GROUND); + return world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND); } else if (shape == LumecornShape.LIGHT_TOP) { return world.getBlockState(pos.below()).is(this); diff --git a/src/main/java/ru/betterend/blocks/NeonCactusPlantBlock.java b/src/main/java/ru/betterend/blocks/NeonCactusPlantBlock.java index 6a2b4a4f..c7234f0c 100644 --- a/src/main/java/ru/betterend/blocks/NeonCactusPlantBlock.java +++ b/src/main/java/ru/betterend/blocks/NeonCactusPlantBlock.java @@ -331,7 +331,7 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate mut.move(dir); state = world.getBlockState(mut); if (!state.is(this)) { - if (!state.is(TagAPI.END_GROUND)) { + if (!state.is(TagAPI.BLOCK_END_GROUND)) { length = -1; } break; diff --git a/src/main/java/ru/betterend/blocks/SmallJellyshroomBlock.java b/src/main/java/ru/betterend/blocks/SmallJellyshroomBlock.java index 7776769d..0f1160de 100644 --- a/src/main/java/ru/betterend/blocks/SmallJellyshroomBlock.java +++ b/src/main/java/ru/betterend/blocks/SmallJellyshroomBlock.java @@ -94,7 +94,7 @@ public class SmallJellyshroomBlock extends BaseAttachedBlock implements RenderLa @Override public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) { - return state.getValue(FACING) == Direction.UP && world.getBlockState(pos.below()).is(TagAPI.END_GROUND); + return state.getValue(FACING) == Direction.UP && world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND); } @Override diff --git a/src/main/java/ru/betterend/blocks/basis/EndPlantBlock.java b/src/main/java/ru/betterend/blocks/basis/EndPlantBlock.java index ecc1b787..69df8a02 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndPlantBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndPlantBlock.java @@ -29,7 +29,7 @@ public class EndPlantBlock extends BasePlantBlock implements PottablePlant { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } @Override diff --git a/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java b/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java index 0ad9c22d..1519d471 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndPlantWithAgeBlock.java @@ -15,6 +15,6 @@ public abstract class EndPlantWithAgeBlock extends BasePlantWithAgeBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/basis/EndUnderwaterPlantBlock.java b/src/main/java/ru/betterend/blocks/basis/EndUnderwaterPlantBlock.java index 443b860e..a3acf2d2 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndUnderwaterPlantBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndUnderwaterPlantBlock.java @@ -19,6 +19,6 @@ public class EndUnderwaterPlantBlock extends UnderwaterPlantBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/basis/EndUnderwaterWallPlantBlock.java b/src/main/java/ru/betterend/blocks/basis/EndUnderwaterWallPlantBlock.java index 53d0d3fb..9a23df46 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndUnderwaterWallPlantBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndUnderwaterWallPlantBlock.java @@ -19,6 +19,6 @@ public class EndUnderwaterWallPlantBlock extends BaseUnderwaterWallPlantBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/basis/EndWallMushroom.java b/src/main/java/ru/betterend/blocks/basis/EndWallMushroom.java index 93ce64d1..6faeaf88 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndWallMushroom.java +++ b/src/main/java/ru/betterend/blocks/basis/EndWallMushroom.java @@ -12,6 +12,6 @@ public class EndWallMushroom extends WallMushroomBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/basis/EndWallPlantBlock.java b/src/main/java/ru/betterend/blocks/basis/EndWallPlantBlock.java index 2bbcf20c..46fdba5c 100644 --- a/src/main/java/ru/betterend/blocks/basis/EndWallPlantBlock.java +++ b/src/main/java/ru/betterend/blocks/basis/EndWallPlantBlock.java @@ -18,6 +18,6 @@ public class EndWallPlantBlock extends BaseWallPlantBlock { @Override protected boolean isTerrain(BlockState state) { - return state.is(TagAPI.END_GROUND); + return state.is(TagAPI.BLOCK_END_GROUND); } } diff --git a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java index 218607ab..66163b83 100644 --- a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java +++ b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java @@ -487,7 +487,7 @@ public class MetalMaterial { TagAPI.addTag(BlockTags.ANVIL, anvilBlock); TagAPI.addTag(BlockTags.BEACON_BASE_BLOCKS, block); TagAPI.addTag(ItemTags.BEACON_PAYMENT_ITEMS, ingot); - TagAPI.addTag(TagAPI.DRAGON_IMMUNE, ore, bars); - TagAPI.addTag(TagAPI.HAMMERS, hammer); + TagAPI.addTag(TagAPI.BLOCK_DRAGON_IMMUNE, ore, bars); + TagAPI.addTag(TagAPI.ITEM_HAMMERS, hammer); } } \ No newline at end of file diff --git a/src/main/java/ru/betterend/blocks/complex/StoneMaterial.java b/src/main/java/ru/betterend/blocks/complex/StoneMaterial.java index fe89729a..a78ad1fe 100644 --- a/src/main/java/ru/betterend/blocks/complex/StoneMaterial.java +++ b/src/main/java/ru/betterend/blocks/complex/StoneMaterial.java @@ -164,7 +164,7 @@ public class StoneMaterial { .checkConfig(Configs.RECIPE_CONFIG) .setShape("###", "# #", "###") .addMaterial('#', stone) - .setGroup("end_stone_furnaces") + .setGroup("end_stone_ITEM_FURNACES") .build(); GridRecipe.make(BetterEnd.MOD_ID, name + "_flower_pot", flowerPot) .checkConfig(Configs.RECIPE_CONFIG) @@ -181,15 +181,18 @@ public class StoneMaterial { TagAPI.addTag(ItemTags.STONE_BRICKS, bricks); TagAPI.addTag(ItemTags.STONE_CRAFTING_MATERIALS, stone); TagAPI.addTag(ItemTags.STONE_TOOL_MATERIALS, stone); - TagAPI.addTag(TagAPI.FURNACES, furnace); + TagAPI.addTag(TagAPI.ITEM_FURNACES, furnace); // Block Tags // TagAPI.addTag(BlockTags.STONE_BRICKS, bricks); TagAPI.addTag(BlockTags.WALLS, wall, brickWall); TagAPI.addTag(BlockTags.SLABS, slab, brickSlab); TagAPI.addTags(pressurePlate, BlockTags.PRESSURE_PLATES, BlockTags.STONE_PRESSURE_PLATES); - TagAPI.addTag(TagAPI.END_STONES, stone); + TagAPI.addTag(TagAPI.BLOCK_END_STONES, stone); - TagAPI.addTag(TagAPI.DRAGON_IMMUNE, stone, stairs, slab, wall); + TagAPI.addTag(TagAPI.BLOCK_DRAGON_IMMUNE, stone, stairs, slab, wall); + + TagAPI.addTag(TagAPI.BLOCK_GEN_TERRAIN, stone); + TagAPI.addTag(TagAPI.BLOCK_END_GROUND, stone); } } \ No newline at end of file diff --git a/src/main/java/ru/betterend/blocks/complex/WoodenMaterial.java b/src/main/java/ru/betterend/blocks/complex/WoodenMaterial.java index 84092dcb..ddfd0f05 100644 --- a/src/main/java/ru/betterend/blocks/complex/WoodenMaterial.java +++ b/src/main/java/ru/betterend/blocks/complex/WoodenMaterial.java @@ -198,7 +198,7 @@ public class WoodenMaterial { .setShape("###", "PPP", "###") .addMaterial('#', planks) .addMaterial('P', Items.BOOK) - .setGroup("end_bookshelves") + .setGroup("end_BLOCK_BOOKSHELVES") .build(); GridRecipe.make(BetterEnd.MOD_ID, name + "_bark", bark) .checkConfig(Configs.RECIPE_CONFIG) @@ -250,7 +250,7 @@ public class WoodenMaterial { TagAPI.addTags(slab, BlockTags.WOODEN_SLABS, BlockTags.SLABS); TagAPI.addTags(stairs, BlockTags.WOODEN_STAIRS, BlockTags.STAIRS); TagAPI.addTags(trapdoor, BlockTags.WOODEN_TRAPDOORS, BlockTags.TRAPDOORS); - TagAPI.addTag(TagAPI.BOOKSHELVES, shelf); + TagAPI.addTag(TagAPI.BLOCK_BOOKSHELVES, shelf); TagAPI.addTag(TagAPI.BLOCK_CHEST, chest); logBlockTag = TagAPI.makeBlockTag(BetterEnd.MOD_ID, name + "_logs"); diff --git a/src/main/java/ru/betterend/integration/byg/BYGIntegration.java b/src/main/java/ru/betterend/integration/byg/BYGIntegration.java index 5b46bb74..db64095a 100644 --- a/src/main/java/ru/betterend/integration/byg/BYGIntegration.java +++ b/src/main/java/ru/betterend/integration/byg/BYGIntegration.java @@ -27,7 +27,7 @@ public class BYGIntegration extends ModIntegration implements EndBiomeIntegratio public void init() { Block block = Integrations.BYG.getBlock("ivis_phylium"); if (block != null) { - TagAPI.addTags(block, TagAPI.END_GROUND, TagAPI.GEN_TERRAIN); + TagAPI.addTags(block, TagAPI.BLOCK_END_GROUND, TagAPI.BLOCK_GEN_TERRAIN); } BYGBlocks.register(); BYGFeatures.register(); diff --git a/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java b/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java index d93e5e6d..de5ad664 100644 --- a/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java +++ b/src/main/java/ru/betterend/integration/byg/features/BigEtherTreeFeature.java @@ -24,7 +24,7 @@ public class BigEtherTreeFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; BlockState log = Integrations.BYG.getDefaultState("ether_log"); BlockState wood = Integrations.BYG.getDefaultState("ether_wood"); @@ -32,7 +32,7 @@ public class BigEtherTreeFeature extends DefaultFeature { return log; }; Function replace = (state) -> { - return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() + return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() .isReplaceable(); }; @@ -63,7 +63,7 @@ public class BigEtherTreeFeature extends DefaultFeature { } sdf.setReplaceFunction((state) -> { - return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() + return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() .isReplaceable(); }).addPostProcess((info) -> { if (info.getState().equals(log) && (!info.getStateUp().equals(log) || !info.getStateDown().equals(log))) { diff --git a/src/main/java/ru/betterend/integration/byg/features/NightshadeRedwoodTreeFeature.java b/src/main/java/ru/betterend/integration/byg/features/NightshadeRedwoodTreeFeature.java index ff8bdac7..ef330a00 100644 --- a/src/main/java/ru/betterend/integration/byg/features/NightshadeRedwoodTreeFeature.java +++ b/src/main/java/ru/betterend/integration/byg/features/NightshadeRedwoodTreeFeature.java @@ -38,7 +38,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; BlockState log = Integrations.BYG.getDefaultState("nightshade_log"); BlockState wood = Integrations.BYG.getDefaultState("nightshade_wood"); @@ -49,7 +49,7 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature { return log; }; Function replace = (state) -> { - return state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() + return state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT) || state.getMaterial() .isReplaceable(); }; Function post = (info) -> { diff --git a/src/main/java/ru/betterend/integration/byg/features/OldBulbisTreeFeature.java b/src/main/java/ru/betterend/integration/byg/features/OldBulbisTreeFeature.java index b05f150c..b874a391 100644 --- a/src/main/java/ru/betterend/integration/byg/features/OldBulbisTreeFeature.java +++ b/src/main/java/ru/betterend/integration/byg/features/OldBulbisTreeFeature.java @@ -39,8 +39,8 @@ public class OldBulbisTreeFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; - if (!world.getBlockState(pos.below(4)).is(TagAPI.GEN_TERRAIN)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; + if (!world.getBlockState(pos.below(4)).is(TagAPI.BLOCK_GEN_TERRAIN)) return false; BlockState stem = Integrations.BYG.getDefaultState("bulbis_stem"); BlockState wood = Integrations.BYG.getDefaultState("bulbis_wood"); @@ -48,7 +48,7 @@ public class OldBulbisTreeFeature extends DefaultFeature { BlockState glow = Integrations.BYG.getDefaultState("purple_shroomlight"); Function replacement = (state) -> { - if (state.equals(stem) || state.equals(wood) || state.is(TagAPI.END_GROUND) || state.getMaterial() + if (state.equals(stem) || state.equals(wood) || state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial() .equals(Material.PLANT)) { return true; } @@ -155,7 +155,7 @@ public class OldBulbisTreeFeature extends DefaultFeature { SplineHelper.rotateSpline(branch, angle); SplineHelper.scale(branch, scale); Vector3f last = branch.get(branch.size() - 1); - if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) { SplineHelper.fillSpline(branch, world, wood, pos, replacement); } } diff --git a/src/main/java/ru/betterend/integration/rei/REIPlugin.java b/src/main/java/ru/betterend/integration/rei/REIPlugin.java index bbe1a976..9e76ad79 100644 --- a/src/main/java/ru/betterend/integration/rei/REIPlugin.java +++ b/src/main/java/ru/betterend/integration/rei/REIPlugin.java @@ -72,12 +72,12 @@ public class REIPlugin implements REIClientPlugin { .filter(EndAnvilBlock.class::isInstance) .collect(Collectors.toList()))); anvils.add(0, EntryStacks.of(Blocks.ANVIL)); - List> furnaces = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks() + List> ITEM_FURNACES = Lists.newArrayList(EntryIngredients.ofItems(EndBlocks.getModBlocks() .stream() .filter(BaseFurnaceBlock.class::isInstance) .collect(Collectors.toList()))); EntryStack[] anvilsArray = anvils.toArray(new EntryStack[0]); - EntryStack[] furnacesArray = furnaces.toArray(new EntryStack[0]); + EntryStack[] ITEM_FURNACESArray = ITEM_FURNACES.toArray(new EntryStack[0]); registry.add( new REIAlloyingFuelCategory(), @@ -93,7 +93,7 @@ public class REIPlugin implements REIClientPlugin { registry.removePlusButton(ALLOYING_FUEL); registry.removePlusButton(SMITHING); - registry.addWorkstations(DefaultPlugin.SMELTING, furnacesArray); - registry.addWorkstations(DefaultPlugin.FUEL, furnacesArray); + registry.addWorkstations(DefaultPlugin.SMELTING, ITEM_FURNACESArray); + registry.addWorkstations(DefaultPlugin.FUEL, ITEM_FURNACESArray); } } diff --git a/src/main/java/ru/betterend/item/tool/EndHammerItem.java b/src/main/java/ru/betterend/item/tool/EndHammerItem.java index 6501f211..d5536255 100644 --- a/src/main/java/ru/betterend/item/tool/EndHammerItem.java +++ b/src/main/java/ru/betterend/item/tool/EndHammerItem.java @@ -113,7 +113,7 @@ public class EndHammerItem extends DiggerItem implements DynamicAttributeTool, I @Override public float getMiningSpeedMultiplier(Tag tag, BlockState state, ItemStack stack, LivingEntity user) { - if (tag.equals(TagAPI.HAMMERS)) { + if (tag.equals(TagAPI.ITEM_HAMMERS)) { return this.getDestroySpeed(stack, state); } return 1.0F; @@ -121,7 +121,7 @@ public class EndHammerItem extends DiggerItem implements DynamicAttributeTool, I @Override public int getMiningLevel(Tag tag, BlockState state, ItemStack stack, LivingEntity user) { - if (tag.equals(TagAPI.HAMMERS)) { + if (tag.equals(TagAPI.ITEM_HAMMERS)) { return this.getTier().getLevel(); } return 0; diff --git a/src/main/java/ru/betterend/mixin/client/LevelRendererMixin.java b/src/main/java/ru/betterend/mixin/client/LevelRendererMixin.java index 9ded0a5f..d9542ad9 100644 --- a/src/main/java/ru/betterend/mixin/client/LevelRendererMixin.java +++ b/src/main/java/ru/betterend/mixin/client/LevelRendererMixin.java @@ -100,6 +100,7 @@ public class LevelRendererMixin { RenderSystem.depthMask(false); RenderSystem.enableTexture(); RenderSystem.enableBlend(); + RenderSystem.setShaderColor(1,1,1,1); RenderSystem.blendFunc( GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA diff --git a/src/main/java/ru/betterend/mixin/common/ChorusFlowerBlockMixin.java b/src/main/java/ru/betterend/mixin/common/ChorusFlowerBlockMixin.java index 5c3aa190..9e5c8bda 100644 --- a/src/main/java/ru/betterend/mixin/common/ChorusFlowerBlockMixin.java +++ b/src/main/java/ru/betterend/mixin/common/ChorusFlowerBlockMixin.java @@ -54,7 +54,7 @@ public abstract class ChorusFlowerBlockMixin extends Block { @Inject(method = "randomTick", at = @At("HEAD"), cancellable = true) private void be_randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random, CallbackInfo info) { - if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + if (world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { BlockPos up = pos.above(); if (world.isEmptyBlock(up) && up.getY() < 256) { int i = state.getValue(ChorusFlowerBlock.AGE); @@ -119,7 +119,7 @@ public abstract class ChorusFlowerBlockMixin extends Block { @Inject(method = "placeDeadFlower", at = @At("HEAD"), cancellable = true) private void be_placeDeadFlower(Level world, BlockPos pos, CallbackInfo info) { BlockState down = world.getBlockState(pos.below()); - if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.GEN_TERRAIN)) { + if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.BLOCK_GEN_TERRAIN)) { world.setBlock(pos, this.defaultBlockState().setValue(BlockStateProperties.AGE_5, 5), 2); world.levelEvent(1034, pos, 0); } diff --git a/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java b/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java index 407df282..26a233d0 100644 --- a/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java +++ b/src/main/java/ru/betterend/mixin/common/ChorusPlantBlockMixin.java @@ -50,7 +50,7 @@ public abstract class ChorusPlantBlockMixin extends Block { BlockPos pos = ctx.getClickedPos(); Level world = ctx.getLevel(); BlockState plant = info.getReturnValue(); - if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { if (GeneratorOptions.changeChorusPlant()) { info.setReturnValue(plant.setValue(VanillaBlockProperties.ROOTS, true) .setValue(BlockStateProperties.DOWN, true)); @@ -66,7 +66,7 @@ public abstract class ChorusPlantBlockMixin extends Block { private void be_getStateForPlacement(BlockGetter blockGetter, BlockPos blockPos, CallbackInfoReturnable info) { BlockState plant = info.getReturnValue(); if (plant.is(Blocks.CHORUS_PLANT)) { - if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.END_GROUND)) { + if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.BLOCK_END_GROUND)) { if (GeneratorOptions.changeChorusPlant()) { info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true) .setValue(VanillaBlockProperties.ROOTS, true)); @@ -98,7 +98,7 @@ public abstract class ChorusPlantBlockMixin extends Block { private void be_updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom, CallbackInfoReturnable info) { BlockState plant = info.getReturnValue(); if (plant.is(Blocks.CHORUS_PLANT)) { - if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + if (world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { if (GeneratorOptions.changeChorusPlant()) { plant = plant.setValue(BlockStateProperties.DOWN, true) .setValue(VanillaBlockProperties.ROOTS, true); diff --git a/src/main/java/ru/betterend/mixin/common/EnchantmentMenuMixin.java b/src/main/java/ru/betterend/mixin/common/EnchantmentMenuMixin.java index 7a516653..77cb6d3e 100644 --- a/src/main/java/ru/betterend/mixin/common/EnchantmentMenuMixin.java +++ b/src/main/java/ru/betterend/mixin/common/EnchantmentMenuMixin.java @@ -71,28 +71,28 @@ public abstract class EnchantmentMenuMixin extends AbstractContainerMenu { 0, j )) && world.isEmptyBlock(blockPos.offset(k, 1, j))) { - if (world.getBlockState(blockPos.offset(k * 2, 0, j * 2)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k * 2, 0, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } - if (world.getBlockState(blockPos.offset(k * 2, 1, j * 2)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k * 2, 1, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } if (k != 0 && j != 0) { - if (world.getBlockState(blockPos.offset(k * 2, 0, j)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k * 2, 0, j)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } - if (world.getBlockState(blockPos.offset(k * 2, 1, j)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k * 2, 1, j)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } - if (world.getBlockState(blockPos.offset(k, 0, j * 2)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k, 0, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } - if (world.getBlockState(blockPos.offset(k, 1, j * 2)).is(TagAPI.BOOKSHELVES)) { + if (world.getBlockState(blockPos.offset(k, 1, j * 2)).is(TagAPI.BLOCK_BOOKSHELVES)) { ++i; } } diff --git a/src/main/java/ru/betterend/recipe/CraftingRecipes.java b/src/main/java/ru/betterend/recipe/CraftingRecipes.java index 64a6a0b6..90d13b2f 100644 --- a/src/main/java/ru/betterend/recipe/CraftingRecipes.java +++ b/src/main/java/ru/betterend/recipe/CraftingRecipes.java @@ -34,7 +34,7 @@ public class CraftingRecipes { .setShape("T#T", "V V", "T#T") .addMaterial('#', Blocks.END_STONE_BRICKS) .addMaterial('T', EndBlocks.THALLASIUM.ingot) - .addMaterial('V', TagAPI.FURNACES) + .addMaterial('V', TagAPI.ITEM_FURNACES) .build(); registerPedestal( diff --git a/src/main/java/ru/betterend/recipe/builders/AnvilRecipe.java b/src/main/java/ru/betterend/recipe/builders/AnvilRecipe.java index 3eb3024b..6cc41e74 100644 --- a/src/main/java/ru/betterend/recipe/builders/AnvilRecipe.java +++ b/src/main/java/ru/betterend/recipe/builders/AnvilRecipe.java @@ -99,7 +99,7 @@ public class AnvilRecipe implements Recipe, BetterEndRecipe { public boolean matches(Container craftingInventory) { ItemStack hammer = craftingInventory.getItem(1); - if (hammer.isEmpty() || !TagAPI.HAMMERS.contains(hammer.getItem())) { + if (hammer.isEmpty() || !TagAPI.ITEM_HAMMERS.contains(hammer.getItem())) { return false; } ItemStack material = craftingInventory.getItem(0); @@ -123,7 +123,7 @@ public class AnvilRecipe implements Recipe, BetterEndRecipe { @Override public NonNullList getIngredients() { NonNullList defaultedList = NonNullList.create(); - defaultedList.add(Ingredient.of(TagAPI.HAMMERS.getValues() + defaultedList.add(Ingredient.of(TagAPI.ITEM_HAMMERS.getValues() .stream() .filter(hammer -> ((TieredItem) hammer).getTier() .getLevel() >= toolLevel) diff --git a/src/main/java/ru/betterend/registry/EndFeatures.java b/src/main/java/ru/betterend/registry/EndFeatures.java index 070b8362..5c45a673 100644 --- a/src/main/java/ru/betterend/registry/EndFeatures.java +++ b/src/main/java/ru/betterend/registry/EndFeatures.java @@ -46,6 +46,7 @@ import ru.betterend.world.features.bushes.BushWithOuterFeature; import ru.betterend.world.features.bushes.LargeAmaranitaFeature; import ru.betterend.world.features.bushes.Lumecorn; import ru.betterend.world.features.bushes.TenaneaBushFeature; +import ru.betterend.world.features.terrain.ArchFeature; import ru.betterend.world.features.terrain.BigAuroraCrystalFeature; import ru.betterend.world.features.terrain.DesertLakeFeature; import ru.betterend.world.features.terrain.EndLakeFeature; @@ -517,6 +518,7 @@ public class EndFeatures { BetterEnd.makeID("tunel_cave"), new TunelCaveFeature() ); + public static final BCLFeature UMBRALITH_ARCH = registerChanced("umbralith_arch", new ArchFeature(), 10); // Ores // public static final BCLFeature THALLASIUM_ORE = registerOre( diff --git a/src/main/java/ru/betterend/registry/EndItems.java b/src/main/java/ru/betterend/registry/EndItems.java index 23e90f65..179d9b2e 100644 --- a/src/main/java/ru/betterend/registry/EndItems.java +++ b/src/main/java/ru/betterend/registry/EndItems.java @@ -156,7 +156,7 @@ public class EndItems extends ItemsRegistry { public final static Item AETERNIUM_SWORD_BLADE = registerEndItem("aeternium_sword_blade"); public final static Item AETERNIUM_SWORD_HANDLE = registerEndItem("aeternium_sword_handle"); - // Hammers // + // ITEM_HAMMERS // public static final TieredItem IRON_HAMMER = registerEndTool( "iron_hammer", new EndHammerItem(Tiers.IRON, 5.0F, -3.2F, 0.2D, makeEndItemSettings()) diff --git a/src/main/java/ru/betterend/registry/EndTags.java b/src/main/java/ru/betterend/registry/EndTags.java index d745d23d..6c14da55 100644 --- a/src/main/java/ru/betterend/registry/EndTags.java +++ b/src/main/java/ru/betterend/registry/EndTags.java @@ -38,8 +38,8 @@ public class EndTags { // Block Tags public static final Tag.Named PEDESTALS = TagAPI.makeBlockTag(BetterEnd.MOD_ID, "pedestal"); - public static final Tag.Named END_STONES = TagAPI.makeCommonBlockTag("end_stones"); - + + // Item Tags public static final Tag.Named ALLOYING_IRON = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_iron"); public static final Tag.Named ALLOYING_GOLD = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_gold"); public static final Tag.Named ALLOYING_COPPER = TagAPI.makeItemTag(BetterEnd.MOD_ID, "alloying_copper"); @@ -93,7 +93,7 @@ public class EndTags { BonemealAPI.addSpreadableBlock(EndBlocks.MOSSY_OBSIDIAN, Blocks.OBSIDIAN); BonemealAPI.addSpreadableBlock(EndBlocks.MOSSY_DRAGON_BONE, EndBlocks.DRAGON_BONE_BLOCK); - List hammers = Lists.newArrayList(); + List ITEM_HAMMERS = Lists.newArrayList(); EndItems.getModItems(BetterEnd.MOD_ID).forEach(item -> { if (item.isEdible()) { FoodProperties food = item.getFoodProperties(); @@ -103,35 +103,29 @@ public class EndTags { } } if (item instanceof EndHammerItem) { - hammers.add(item); + ITEM_HAMMERS.add(item); } }); - ToolManagerImpl.tag(TagAPI.HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(hammers)); - TagAPI.addTag(TagAPI.HAMMERS, EndItems.AETERNIUM_HAMMER); + ToolManagerImpl.tag(TagAPI.ITEM_HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(ITEM_HAMMERS)); + TagAPI.addTag(TagAPI.ITEM_HAMMERS, EndItems.AETERNIUM_HAMMER); TagAPI.addTag( - TagAPI.GEN_TERRAIN, + TagAPI.BLOCK_GEN_TERRAIN, EndBlocks.ENDER_ORE, - EndBlocks.FLAVOLITE.stone, - EndBlocks.VIOLECITE.stone, - EndBlocks.SULPHURIC_ROCK.stone, - EndBlocks.BRIMSTONE, - EndBlocks.VIRID_JADESTONE.stone, - EndBlocks.AZURE_JADESTONE.stone, - EndBlocks.SANDY_JADESTONE.stone + EndBlocks.BRIMSTONE ); - TagAPI.addTag(TagAPI.END_GROUND, EndBlocks.SULPHURIC_ROCK.stone, EndBlocks.BRIMSTONE); + TagAPI.addTag(TagAPI.BLOCK_END_GROUND, EndBlocks.BRIMSTONE); TagAPI.addTag(BlockTags.ANVIL, EndBlocks.AETERNIUM_ANVIL); TagAPI.addTag(BlockTags.BEACON_BASE_BLOCKS, EndBlocks.AETERNIUM_BLOCK); TagAPI.addTag(ItemTags.BEACON_PAYMENT_ITEMS, EndItems.AETERNIUM_INGOT); TagAPI.addTag( - TagAPI.DRAGON_IMMUNE, + TagAPI.BLOCK_DRAGON_IMMUNE, EndBlocks.ENDER_ORE, EndBlocks.ETERNAL_PEDESTAL, EndBlocks.FLAVOLITE_RUNED_ETERNAL, EndBlocks.FLAVOLITE_RUNED ); - TagAPI.addTag(TagAPI.IRON_INGOTS, EndBlocks.THALLASIUM.ingot); + TagAPI.addTag(TagAPI.ITEM_IRON_INGOTS, EndBlocks.THALLASIUM.ingot); TagAPI.addTag(ALLOYING_IRON, Items.IRON_ORE, Items.DEEPSLATE_IRON_ORE, Items.RAW_IRON); TagAPI.addTag(ALLOYING_GOLD, Items.GOLD_ORE, Items.DEEPSLATE_GOLD_ORE, Items.RAW_GOLD); @@ -144,10 +138,10 @@ public class EndTags { SurfaceBuilderConfiguration config = biome.getGenerationSettings().getSurfaceBuilderConfig(); Block under = config.getUnderMaterial().getBlock(); Block surface = config.getTopMaterial().getBlock(); - TagAPI.addTag(TagAPI.GEN_TERRAIN, under, surface); - TagAPI.addTag(TagAPI.END_GROUND, surface); + TagAPI.addTag(TagAPI.BLOCK_GEN_TERRAIN, under, surface); + TagAPI.addTag(TagAPI.BLOCK_END_GROUND, surface); } }); - END_STONES.getValues().forEach(TagAPI::addEndGround); + TagAPI.BLOCK_END_STONES.getValues().forEach(TagAPI::addEndGround); } } diff --git a/src/main/java/ru/betterend/world/biome/land/UmbraValleyBiome.java b/src/main/java/ru/betterend/world/biome/land/UmbraValleyBiome.java index 22525819..f3391046 100644 --- a/src/main/java/ru/betterend/world/biome/land/UmbraValleyBiome.java +++ b/src/main/java/ru/betterend/world/biome/land/UmbraValleyBiome.java @@ -2,6 +2,7 @@ package ru.betterend.world.biome.land; import ru.bclib.world.biomes.BCLBiomeDef; import ru.betterend.BetterEnd; +import ru.betterend.registry.EndFeatures; import ru.betterend.world.biome.EndBiome; import ru.betterend.world.surface.SurfaceBuilders; @@ -13,6 +14,7 @@ public class UmbraValleyBiome extends EndBiome { .setPlantsColor(200, 200, 200) .setWaterAndFogColor(69, 104, 134) .setSurface(SurfaceBuilders.UMBRA_SURFACE.configured(SurfaceBuilders.DEFAULT_END_CONFIG)) + .addFeature(EndFeatures.UMBRALITH_ARCH) ); } } diff --git a/src/main/java/ru/betterend/world/features/CavePumpkinFeature.java b/src/main/java/ru/betterend/world/features/CavePumpkinFeature.java index f99df6b7..6af34e7d 100644 --- a/src/main/java/ru/betterend/world/features/CavePumpkinFeature.java +++ b/src/main/java/ru/betterend/world/features/CavePumpkinFeature.java @@ -18,7 +18,7 @@ public class CavePumpkinFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.above()).is(TagAPI.GEN_TERRAIN) || !world.isEmptyBlock(pos) || !world.isEmptyBlock( + if (!world.getBlockState(pos.above()).is(TagAPI.BLOCK_GEN_TERRAIN) || !world.isEmptyBlock(pos) || !world.isEmptyBlock( pos.below())) { return false; } diff --git a/src/main/java/ru/betterend/world/features/CrashedShipFeature.java b/src/main/java/ru/betterend/world/features/CrashedShipFeature.java index 560f5136..185c0901 100644 --- a/src/main/java/ru/betterend/world/features/CrashedShipFeature.java +++ b/src/main/java/ru/betterend/world/features/CrashedShipFeature.java @@ -49,7 +49,7 @@ public class CrashedShipFeature extends NBTStructureFeature { if (x * x + z * z < 3600) { return false; } - return pos.getY() > 5 && world.getBlockState(pos.below()).is(TagAPI.GEN_TERRAIN); + return pos.getY() > 5 && world.getBlockState(pos.below()).is(TagAPI.BLOCK_GEN_TERRAIN); } @Override diff --git a/src/main/java/ru/betterend/world/features/ScatterFeature.java b/src/main/java/ru/betterend/world/features/ScatterFeature.java index f6d50c56..7539ec00 100644 --- a/src/main/java/ru/betterend/world/features/ScatterFeature.java +++ b/src/main/java/ru/betterend/world/features/ScatterFeature.java @@ -32,7 +32,7 @@ public abstract class ScatterFeature extends DefaultFeature { if (pos.getY() < 5) { return false; } - else if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + else if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { return false; } return true; diff --git a/src/main/java/ru/betterend/world/features/bushes/BushFeature.java b/src/main/java/ru/betterend/world/features/bushes/BushFeature.java index a1854d03..6f11fef4 100644 --- a/src/main/java/ru/betterend/world/features/bushes/BushFeature.java +++ b/src/main/java/ru/betterend/world/features/bushes/BushFeature.java @@ -39,8 +39,8 @@ public class BushFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND) && !world.getBlockState(pos.above()) - .is(TagAPI.END_GROUND)) + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND) && !world.getBlockState(pos.above()) + .is(TagAPI.BLOCK_END_GROUND)) return false; float radius = MHelper.randRange(1.8F, 3.5F, random); diff --git a/src/main/java/ru/betterend/world/features/bushes/BushWithOuterFeature.java b/src/main/java/ru/betterend/world/features/bushes/BushWithOuterFeature.java index 7b09690f..b87a4fa1 100644 --- a/src/main/java/ru/betterend/world/features/bushes/BushWithOuterFeature.java +++ b/src/main/java/ru/betterend/world/features/bushes/BushWithOuterFeature.java @@ -43,8 +43,8 @@ public class BushWithOuterFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND) && !world.getBlockState(pos.above()) - .is(TagAPI.END_GROUND)) + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND) && !world.getBlockState(pos.above()) + .is(TagAPI.BLOCK_END_GROUND)) return false; float radius = MHelper.randRange(1.8F, 3.5F, random); diff --git a/src/main/java/ru/betterend/world/features/bushes/LargeAmaranitaFeature.java b/src/main/java/ru/betterend/world/features/bushes/LargeAmaranitaFeature.java index cf28e054..4752f2a7 100644 --- a/src/main/java/ru/betterend/world/features/bushes/LargeAmaranitaFeature.java +++ b/src/main/java/ru/betterend/world/features/bushes/LargeAmaranitaFeature.java @@ -23,7 +23,7 @@ public class LargeAmaranitaFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; MutableBlockPos mut = new MutableBlockPos().set(pos); int height = MHelper.randRange(2, 3, random); diff --git a/src/main/java/ru/betterend/world/features/bushes/Lumecorn.java b/src/main/java/ru/betterend/world/features/bushes/Lumecorn.java index df7ed8e2..46f41366 100644 --- a/src/main/java/ru/betterend/world/features/bushes/Lumecorn.java +++ b/src/main/java/ru/betterend/world/features/bushes/Lumecorn.java @@ -23,7 +23,7 @@ public class Lumecorn extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; int height = MHelper.randRange(4, 7, random); MutableBlockPos mut = new MutableBlockPos().set(pos); diff --git a/src/main/java/ru/betterend/world/features/bushes/TenaneaBushFeature.java b/src/main/java/ru/betterend/world/features/bushes/TenaneaBushFeature.java index c1eaa9fb..48383275 100644 --- a/src/main/java/ru/betterend/world/features/bushes/TenaneaBushFeature.java +++ b/src/main/java/ru/betterend/world/features/bushes/TenaneaBushFeature.java @@ -42,7 +42,7 @@ public class TenaneaBushFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float radius = MHelper.randRange(1.8F, 3.5F, random); OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt()); diff --git a/src/main/java/ru/betterend/world/features/terrain/ArchFeature.java b/src/main/java/ru/betterend/world/features/terrain/ArchFeature.java new file mode 100644 index 00000000..555b4e61 --- /dev/null +++ b/src/main/java/ru/betterend/world/features/terrain/ArchFeature.java @@ -0,0 +1,54 @@ +package ru.betterend.world.features.terrain; + +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; +import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; +import ru.bclib.api.TagAPI; +import ru.bclib.sdf.SDF; +import ru.bclib.sdf.operator.SDFDisplacement; +import ru.bclib.sdf.operator.SDFRotation; +import ru.bclib.sdf.primitive.SDFTorus; +import ru.bclib.util.MHelper; +import ru.bclib.world.features.DefaultFeature; +import ru.betterend.noise.OpenSimplexNoise; + +import java.util.Random; + +public class ArchFeature extends DefaultFeature { + @Override + public boolean place(FeaturePlaceContext featurePlaceContext) { + final WorldGenLevel world = featurePlaceContext.level(); + BlockPos origin = featurePlaceContext.origin(); + Random random = featurePlaceContext.random(); + + BlockPos pos = getPosOnSurfaceWG(world, new BlockPos((origin.getX() & 0xFFFFFFF0) | 7, 0, (origin.getZ() & 0xFFFFFFF0) | 7)); + if (!world.getBlockState(pos.below(5)).is(TagAPI.BLOCK_GEN_TERRAIN)) { + return false; + } + + float bigRadius = MHelper.randRange(10F, 20F, random); + float smallRadius = MHelper.randRange(3F, 7F, random); + if (smallRadius + bigRadius > 23) { + smallRadius = 23 - bigRadius; + } + SDF arch = new SDFTorus().setBigRadius(bigRadius).setSmallRadius(smallRadius).setBlock(Blocks.DIAMOND_BLOCK); + arch = new SDFRotation().setRotation(MHelper.randomHorizontal(random), (float) Math.PI * 0.5F).setSource(arch); + + final float smallRadiusF = smallRadius; + OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong()); + arch = new SDFDisplacement().setFunction((vec) -> { + return (float) (Math.abs(noise.eval( + vec.x() * 0.1, + vec.y() * 0.1, + vec.z() * 0.1 + )) * 3F + Math.abs(noise.eval(vec.x() * 0.3, vec.y() * 0.3 + 100, vec.z() * 0.3)) * 1.3F) - smallRadiusF * Math.abs(1 - vec.y() / bigRadius); + }).setSource(arch); + + arch.fillArea(world, pos, AABB.ofSize(Vec3.atCenterOf(pos), 46, 46, 46)); + return true; + } +} diff --git a/src/main/java/ru/betterend/world/features/terrain/BigAuroraCrystalFeature.java b/src/main/java/ru/betterend/world/features/terrain/BigAuroraCrystalFeature.java index 2e43e221..82faf6d5 100644 --- a/src/main/java/ru/betterend/world/features/terrain/BigAuroraCrystalFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/BigAuroraCrystalFeature.java @@ -40,7 +40,7 @@ public class BigAuroraCrystalFeature extends DefaultFeature { Vector3f vec = MHelper.randomHorizontal(random); prism = new SDFRotation().setRotation(vec, random.nextFloat()).setSource(prism); prism.setReplaceFunction((bState) -> { - return bState.getMaterial().isReplaceable() || bState.is(TagAPI.GEN_TERRAIN) || bState.getMaterial() + return bState.getMaterial().isReplaceable() || bState.is(TagAPI.BLOCK_GEN_TERRAIN) || bState.getMaterial() .equals(Material.PLANT) || bState .getMaterial() .equals(Material.LEAVES); diff --git a/src/main/java/ru/betterend/world/features/terrain/DesertLakeFeature.java b/src/main/java/ru/betterend/world/features/terrain/DesertLakeFeature.java index 130feb90..6f114656 100644 --- a/src/main/java/ru/betterend/world/features/terrain/DesertLakeFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/DesertLakeFeature.java @@ -118,11 +118,11 @@ public class DesertLakeFeature extends DefaultFeature { r *= r; if (x2 + z2 <= r) { state = world.getBlockState(POS); - if (state.is(TagAPI.GEN_TERRAIN)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN)) { BlocksHelper.setWithoutUpdate(world, POS, AIR); } pos = POS.below(); - if (world.getBlockState(pos).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN)) { state = world.getBiome(pos) .getGenerationSettings() .getSurfaceBuilderConfig() @@ -180,7 +180,7 @@ public class DesertLakeFeature extends DefaultFeature { BlocksHelper.setWithoutUpdate(world, POS, state); } pos = POS.below(); - if (world.getBlockState(pos).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN)) { BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.ENDSTONE_DUST.defaultBlockState()); } pos = POS.above(); @@ -193,7 +193,7 @@ public class DesertLakeFeature extends DefaultFeature { // Make border else if (y2 + x2 + z2 <= rb) { state = world.getBlockState(POS); - if (state.is(TagAPI.GEN_TERRAIN) && world.isEmptyBlock(POS.above())) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) && world.isEmptyBlock(POS.above())) { BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.END_MOSS); } else if (y < waterLevel) { @@ -235,7 +235,7 @@ public class DesertLakeFeature extends DefaultFeature { private boolean canReplace(BlockState state) { return state.getMaterial() - .isReplaceable() || state.is(TagAPI.GEN_TERRAIN) || state.is(EndBlocks.ENDSTONE_DUST) || state.getMaterial() + .isReplaceable() || state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.is(EndBlocks.ENDSTONE_DUST) || state.getMaterial() .equals( Material.PLANT) || state .getMaterial() diff --git a/src/main/java/ru/betterend/world/features/terrain/EndLakeFeature.java b/src/main/java/ru/betterend/world/features/terrain/EndLakeFeature.java index 2773a4a7..b35a60f2 100644 --- a/src/main/java/ru/betterend/world/features/terrain/EndLakeFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/EndLakeFeature.java @@ -118,11 +118,11 @@ public class EndLakeFeature extends DefaultFeature { r *= r; if (x2 + z2 <= r) { state = world.getBlockState(POS); - if (state.is(TagAPI.GEN_TERRAIN)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN)) { BlocksHelper.setWithoutUpdate(world, POS, AIR); } pos = POS.below(); - if (world.getBlockState(pos).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN)) { state = world.getBiome(pos) .getGenerationSettings() .getSurfaceBuilderConfig() @@ -180,7 +180,7 @@ public class EndLakeFeature extends DefaultFeature { BlocksHelper.setWithoutUpdate(world, POS, state); } pos = POS.below(); - if (world.getBlockState(pos).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN)) { BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.ENDSTONE_DUST.defaultBlockState()); } pos = POS.above(); @@ -225,7 +225,7 @@ public class EndLakeFeature extends DefaultFeature { private boolean canReplace(BlockState state) { return state.getMaterial() - .isReplaceable() || state.is(TagAPI.GEN_TERRAIN) || state.is(EndBlocks.ENDSTONE_DUST) || state.getMaterial() + .isReplaceable() || state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.is(EndBlocks.ENDSTONE_DUST) || state.getMaterial() .equals( Material.PLANT) || state .getMaterial() diff --git a/src/main/java/ru/betterend/world/features/terrain/FallenPillarFeature.java b/src/main/java/ru/betterend/world/features/terrain/FallenPillarFeature.java index bf1c84b3..b5ca611e 100644 --- a/src/main/java/ru/betterend/world/features/terrain/FallenPillarFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/FallenPillarFeature.java @@ -31,7 +31,7 @@ public class FallenPillarFeature extends DefaultFeature { world, new BlockPos(pos.getX() + random.nextInt(16), pos.getY(), pos.getZ() + random.nextInt(16)) ); - if (!world.getBlockState(pos.below(5)).is(TagAPI.GEN_TERRAIN)) { + if (!world.getBlockState(pos.below(5)).is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } @@ -57,7 +57,7 @@ public class FallenPillarFeature extends DefaultFeature { } return info.getState(); }).setReplaceFunction((state) -> { - return state.getMaterial().isReplaceable() || state.is(TagAPI.GEN_TERRAIN) || state.getMaterial() + return state.getMaterial().isReplaceable() || state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.getMaterial() .equals(Material.PLANT); }).fillRecursive(world, pos); diff --git a/src/main/java/ru/betterend/world/features/terrain/GeyserFeature.java b/src/main/java/ru/betterend/world/features/terrain/GeyserFeature.java index a6cfe4d6..ae0aff33 100644 --- a/src/main/java/ru/betterend/world/features/terrain/GeyserFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/GeyserFeature.java @@ -60,7 +60,7 @@ public class GeyserFeature extends DefaultFeature { MutableBlockPos bpos = new MutableBlockPos().set(pos); bpos.setY(bpos.getY() - 1); BlockState state = world.getBlockState(bpos); - while (state.is(TagAPI.GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { + while (state.is(TagAPI.BLOCK_GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { bpos.setY(bpos.getY() - 1); state = world.getBlockState(bpos); } @@ -194,7 +194,7 @@ public class GeyserFeature extends DefaultFeature { mut.setY(mut.getY() - 1); state = world.getBlockState(mut); } - if (state.is(TagAPI.GEN_TERRAIN) && !world.getBlockState(mut.above()).is(EndBlocks.HYDROTHERMAL_VENT)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) && !world.getBlockState(mut.above()).is(EndBlocks.HYDROTHERMAL_VENT)) { for (int j = 0; j <= dist; j++) { BlocksHelper.setWithoutUpdate(world, mut, EndBlocks.SULPHURIC_ROCK.stone); MHelper.shuffle(HORIZONTAL, random); @@ -239,7 +239,7 @@ public class GeyserFeature extends DefaultFeature { mut.setY(mut.getY() - 1); state = world.getBlockState(mut); } - if (state.is(TagAPI.GEN_TERRAIN)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN)) { for (int j = 0; j <= dist; j++) { BlocksHelper.setWithoutUpdate(world, mut, EndBlocks.SULPHURIC_ROCK.stone); mut.setY(mut.getY() + 1); @@ -271,11 +271,11 @@ public class GeyserFeature extends DefaultFeature { static { REPLACE1 = (state) -> { - return state.isAir() || (state.is(TagAPI.GEN_TERRAIN)); + return state.isAir() || (state.is(TagAPI.BLOCK_GEN_TERRAIN)); }; REPLACE2 = (state) -> { - if (state.is(TagAPI.GEN_TERRAIN) || state.is(EndBlocks.HYDROTHERMAL_VENT) || state.is(EndBlocks.SULPHUR_CRYSTAL)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.is(EndBlocks.HYDROTHERMAL_VENT) || state.is(EndBlocks.SULPHUR_CRYSTAL)) { return true; } if (state.getMaterial().equals(Material.PLANT)) { diff --git a/src/main/java/ru/betterend/world/features/terrain/ObsidianBoulderFeature.java b/src/main/java/ru/betterend/world/features/terrain/ObsidianBoulderFeature.java index b21174b5..736af16c 100644 --- a/src/main/java/ru/betterend/world/features/terrain/ObsidianBoulderFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/ObsidianBoulderFeature.java @@ -29,7 +29,7 @@ public class ObsidianBoulderFeature extends DefaultFeature { world, new BlockPos(pos.getX() + random.nextInt(16), pos.getY(), pos.getZ() + random.nextInt(16)) ); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { return false; } @@ -46,7 +46,7 @@ public class ObsidianBoulderFeature extends DefaultFeature { } private void makeBoulder(WorldGenLevel world, BlockPos pos, Random random) { - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) { + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) { return; } @@ -68,7 +68,7 @@ public class ObsidianBoulderFeature extends DefaultFeature { } return info.getState(); }).setReplaceFunction((state) -> { - return state.getMaterial().isReplaceable() || state.is(TagAPI.GEN_TERRAIN) || state.getMaterial() + return state.getMaterial().isReplaceable() || state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.getMaterial() .equals(Material.PLANT); }).fillRecursive(world, pos); } diff --git a/src/main/java/ru/betterend/world/features/terrain/ObsidianPillarBasementFeature.java b/src/main/java/ru/betterend/world/features/terrain/ObsidianPillarBasementFeature.java index c16ef5fa..9411bbbf 100644 --- a/src/main/java/ru/betterend/world/features/terrain/ObsidianPillarBasementFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/ObsidianPillarBasementFeature.java @@ -33,7 +33,7 @@ public class ObsidianPillarBasementFeature extends DefaultFeature { world, new BlockPos(pos.getX() + random.nextInt(16), pos.getY(), pos.getZ() + random.nextInt(16)) ); - if (!world.getBlockState(pos.below(5)).is(TagAPI.GEN_TERRAIN)) { + if (!world.getBlockState(pos.below(5)).is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } @@ -64,7 +64,7 @@ public class ObsidianPillarBasementFeature extends DefaultFeature { } return info.getState(); }).setReplaceFunction((state) -> { - return state.getMaterial().isReplaceable() || state.is(TagAPI.GEN_TERRAIN) || state.getMaterial() + return state.getMaterial().isReplaceable() || state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.getMaterial() .equals(Material.PLANT); }).fillRecursive(world, pos); diff --git a/src/main/java/ru/betterend/world/features/terrain/SingleBlockFeature.java b/src/main/java/ru/betterend/world/features/terrain/SingleBlockFeature.java index 41701817..416680fe 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SingleBlockFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SingleBlockFeature.java @@ -25,7 +25,7 @@ public class SingleBlockFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.GEN_TERRAIN)) { + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } diff --git a/src/main/java/ru/betterend/world/features/terrain/SmaragdantCrystalFeature.java b/src/main/java/ru/betterend/world/features/terrain/SmaragdantCrystalFeature.java index 35318b8a..4ec06f76 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SmaragdantCrystalFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SmaragdantCrystalFeature.java @@ -21,7 +21,7 @@ public class SmaragdantCrystalFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.GEN_TERRAIN)) { + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } @@ -42,7 +42,7 @@ public class SmaragdantCrystalFeature extends DefaultFeature { mut.setY(mut.getY() - 1); state = world.getBlockState(mut); } - if (state.is(TagAPI.GEN_TERRAIN) && !world.getBlockState(mut.above()).is(crystal.getBlock())) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) && !world.getBlockState(mut.above()).is(crystal.getBlock())) { for (int j = 0; j <= dist; j++) { BlocksHelper.setWithoutUpdate(world, mut, crystal); mut.setY(mut.getY() + 1); diff --git a/src/main/java/ru/betterend/world/features/terrain/SpireFeature.java b/src/main/java/ru/betterend/world/features/terrain/SpireFeature.java index fa487652..b8eaf7a6 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SpireFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SpireFeature.java @@ -39,8 +39,8 @@ public class SpireFeature extends DefaultFeature { final ChunkGenerator chunkGenerator = featureConfig.chunkGenerator(); pos = getPosOnSurfaceWG(world, pos); if (pos.getY() < 10 || !world.getBlockState(pos.below(3)) - .is(TagAPI.GEN_TERRAIN) || !world.getBlockState(pos.below(6)) - .is(TagAPI.GEN_TERRAIN)) { + .is(TagAPI.BLOCK_GEN_TERRAIN) || !world.getBlockState(pos.below(6)) + .is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } @@ -95,7 +95,7 @@ public class SpireFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getBlock() instanceof LeavesBlock) { diff --git a/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java b/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java index de8ac175..3065a834 100644 --- a/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/StalactiteFeature.java @@ -45,7 +45,7 @@ public class StalactiteFeature extends DefaultFeature { mut.setY(pos.getY() + i * dir); BlockState state = world.getBlockState(mut); if (!state.getMaterial().isReplaceable()) { - stalagnate = state.is(TagAPI.GEN_TERRAIN); + stalagnate = state.is(TagAPI.BLOCK_GEN_TERRAIN); height = i; break; } diff --git a/src/main/java/ru/betterend/world/features/terrain/SulphuricCaveFeature.java b/src/main/java/ru/betterend/world/features/terrain/SulphuricCaveFeature.java index de60314c..8402a245 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SulphuricCaveFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SulphuricCaveFeature.java @@ -44,7 +44,7 @@ public class SulphuricCaveFeature extends DefaultFeature { bpos.setY(top - 1); BlockState state = world.getBlockState(bpos); - while (!state.is(TagAPI.GEN_TERRAIN) && bpos.getY() > 5) { + while (!state.is(TagAPI.BLOCK_GEN_TERRAIN) && bpos.getY() > 5) { bpos.setY(bpos.getY() - 1); state = world.getBlockState(bpos); } @@ -53,7 +53,7 @@ public class SulphuricCaveFeature extends DefaultFeature { } top = (int) (bpos.getY() - (radius * 1.3F + 5)); - while (state.is(TagAPI.GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { + while (state.is(TagAPI.BLOCK_GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { bpos.setY(bpos.getY() - 1); state = world.getBlockState(bpos); } @@ -105,7 +105,7 @@ public class SulphuricCaveFeature extends DefaultFeature { } else if (dist < r2 * r2) { state = world.getBlockState(mut); - if (state.is(TagAPI.GEN_TERRAIN) || state.is(Blocks.AIR)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.is(Blocks.AIR)) { double v = noise.eval(x * 0.1, y * 0.1, z * 0.1) + noise.eval( x * 0.03, y * 0.03, @@ -144,7 +144,7 @@ public class SulphuricCaveFeature extends DefaultFeature { mut.setY(mut.getY() - 1); state = world.getBlockState(mut); } - if (state.is(TagAPI.GEN_TERRAIN) && !world.getBlockState(mut.above()) + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) && !world.getBlockState(mut.above()) .is(EndBlocks.HYDROTHERMAL_VENT)) { for (int j = 0; j <= dist; j++) { BlocksHelper.setWithoutUpdate(world, mut, EndBlocks.SULPHURIC_ROCK.stone); @@ -183,7 +183,7 @@ public class SulphuricCaveFeature extends DefaultFeature { } private boolean isReplaceable(BlockState state) { - return state.is(TagAPI.GEN_TERRAIN) || state.is(EndBlocks.HYDROTHERMAL_VENT) || state.is(EndBlocks.VENT_BUBBLE_COLUMN) || state + return state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.is(EndBlocks.HYDROTHERMAL_VENT) || state.is(EndBlocks.VENT_BUBBLE_COLUMN) || state .is(EndBlocks.SULPHUR_CRYSTAL) || state.getMaterial().isReplaceable() || state.getMaterial() .equals(Material.PLANT) || state .getMaterial() diff --git a/src/main/java/ru/betterend/world/features/terrain/SulphuricLakeFeature.java b/src/main/java/ru/betterend/world/features/terrain/SulphuricLakeFeature.java index 825cfcca..7d490631 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SulphuricLakeFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SulphuricLakeFeature.java @@ -61,7 +61,7 @@ public class SulphuricLakeFeature extends DefaultFeature { int dist = x2 + z2; if (dist <= r) { POS.setY(getYOnSurface(world, x, z) - 1); - if (world.getBlockState(POS).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(POS).is(TagAPI.BLOCK_GEN_TERRAIN)) { if (isBorder(world, POS)) { if (random.nextInt(8) > 0) { brimstone.add(POS.immutable()); @@ -97,7 +97,7 @@ public class SulphuricLakeFeature extends DefaultFeature { brimstone.remove(POS); for (Direction dir : BlocksHelper.HORIZONTAL) { BlockPos offseted = POS.relative(dir); - if (world.getBlockState(offseted).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(offseted).is(TagAPI.BLOCK_GEN_TERRAIN)) { brimstone.add(offseted); } } @@ -106,7 +106,7 @@ public class SulphuricLakeFeature extends DefaultFeature { brimstone.remove(POS); for (Direction dir : BlocksHelper.HORIZONTAL) { BlockPos offseted = POS.relative(dir); - if (world.getBlockState(offseted).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(offseted).is(TagAPI.BLOCK_GEN_TERRAIN)) { brimstone.add(offseted); } } @@ -123,7 +123,7 @@ public class SulphuricLakeFeature extends DefaultFeature { } else if (dist < r2) { POS.setY(getYOnSurface(world, x, z) - 1); - if (world.getBlockState(POS).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(POS).is(TagAPI.BLOCK_GEN_TERRAIN)) { brimstone.add(POS.immutable()); if (random.nextBoolean()) { brimstone.add(POS.below()); diff --git a/src/main/java/ru/betterend/world/features/terrain/SurfaceVentFeature.java b/src/main/java/ru/betterend/world/features/terrain/SurfaceVentFeature.java index b661750a..a7b8133f 100644 --- a/src/main/java/ru/betterend/world/features/terrain/SurfaceVentFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/SurfaceVentFeature.java @@ -25,7 +25,7 @@ public class SurfaceVentFeature extends DefaultFeature { world, new BlockPos(pos.getX() + random.nextInt(16), pos.getY(), pos.getZ() + random.nextInt(16)) ); - if (!world.getBlockState(pos.below(3)).is(TagAPI.GEN_TERRAIN)) { + if (!world.getBlockState(pos.below(3)).is(TagAPI.BLOCK_GEN_TERRAIN)) { return false; } @@ -46,7 +46,7 @@ public class SurfaceVentFeature extends DefaultFeature { mut.setY(mut.getY() - 1); state = world.getBlockState(mut); } - if (state.is(TagAPI.GEN_TERRAIN) && !world.getBlockState(mut.above()).is(EndBlocks.HYDROTHERMAL_VENT)) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) && !world.getBlockState(mut.above()).is(EndBlocks.HYDROTHERMAL_VENT)) { for (int j = 0; j <= dist; j++) { BlocksHelper.setWithoutUpdate(world, mut, EndBlocks.SULPHURIC_ROCK.stone); mut.setY(mut.getY() + 1); diff --git a/src/main/java/ru/betterend/world/features/terrain/caves/CaveChunkPopulatorFeature.java b/src/main/java/ru/betterend/world/features/terrain/caves/CaveChunkPopulatorFeature.java index 8c7eecc7..a8d9135f 100644 --- a/src/main/java/ru/betterend/world/features/terrain/caves/CaveChunkPopulatorFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/caves/CaveChunkPopulatorFeature.java @@ -62,13 +62,13 @@ public class CaveChunkPopulatorFeature extends DefaultFeature { mut.setY(y); BlockState top = chunk.getBlockState(mut); BlockState bottom = chunk.getBlockState(mut2); - if (top.isAir() && (bottom.is(TagAPI.GEN_TERRAIN) || bottom.is(Blocks.STONE))) { + if (top.isAir() && (bottom.is(TagAPI.BLOCK_GEN_TERRAIN) || bottom.is(Blocks.STONE))) { mut3.set(mut2).move(sx, 0, sz); floorPositions.add(mut3.immutable()); updateMin(mut3, min); updateMax(mut3, max); } - else if (bottom.isAir() && (top.is(TagAPI.GEN_TERRAIN) || top.is(Blocks.STONE))) { + else if (bottom.isAir() && (top.is(TagAPI.BLOCK_GEN_TERRAIN) || top.is(Blocks.STONE))) { mut3.set(mut).move(sx, 0, sz); ceilPositions.add(mut3.immutable()); updateMin(mut3, min); diff --git a/src/main/java/ru/betterend/world/features/terrain/caves/EndCaveFeature.java b/src/main/java/ru/betterend/world/features/terrain/caves/EndCaveFeature.java index 8d420424..d882ad6a 100644 --- a/src/main/java/ru/betterend/world/features/terrain/caves/EndCaveFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/caves/EndCaveFeature.java @@ -65,11 +65,11 @@ public abstract class EndCaveFeature extends DefaultFeature { caveBlocks.parallelStream().forEach((bpos) -> { if (world.getBlockState(bpos).getMaterial().isReplaceable()) { BlockPos side = bpos.below(); - if (world.getBlockState(side).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(side).is(TagAPI.BLOCK_GEN_TERRAIN)) { floorPositions.add(side); } side = bpos.above(); - if (world.getBlockState(side).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(side).is(TagAPI.BLOCK_GEN_TERRAIN)) { ceilPositions.add(side); } } @@ -130,7 +130,7 @@ public abstract class EndCaveFeature extends DefaultFeature { for (Vec3i offset : SPHERE) { BlockPos wallPos = pos.offset(offset); if (!positions.contains(wallPos) && !placed.contains(wallPos) && world.getBlockState(wallPos) - .is(TagAPI.GEN_TERRAIN)) { + .is(TagAPI.BLOCK_GEN_TERRAIN)) { wallBlock = biome.getWall(wallPos); BlocksHelper.setWithoutUpdate(world, wallPos, wallBlock); placed.add(wallPos); @@ -170,7 +170,7 @@ public abstract class EndCaveFeature extends DefaultFeature { bpos.setY(top - 1); BlockState state = world.getBlockState(bpos); - while (!state.is(TagAPI.GEN_TERRAIN) && bpos.getY() > 5) { + while (!state.is(TagAPI.BLOCK_GEN_TERRAIN) && bpos.getY() > 5) { bpos.setY(bpos.getY() - 1); state = world.getBlockState(bpos); } @@ -179,7 +179,7 @@ public abstract class EndCaveFeature extends DefaultFeature { } top = (int) (bpos.getY() - (radius * 1.3F + 5)); - while (state.is(TagAPI.GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { + while (state.is(TagAPI.BLOCK_GEN_TERRAIN) || !state.getFluidState().isEmpty() && bpos.getY() > 5) { bpos.setY(bpos.getY() - 1); state = world.getBlockState(bpos); } diff --git a/src/main/java/ru/betterend/world/features/terrain/caves/RoundCaveFeature.java b/src/main/java/ru/betterend/world/features/terrain/caves/RoundCaveFeature.java index 94dead51..35c5c35c 100644 --- a/src/main/java/ru/betterend/world/features/terrain/caves/RoundCaveFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/caves/RoundCaveFeature.java @@ -74,7 +74,7 @@ public class RoundCaveFeature extends EndCaveFeature { } private boolean isReplaceable(BlockState state) { - return state.is(TagAPI.GEN_TERRAIN) || state.getMaterial().isReplaceable() || state.getMaterial() + return state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.getMaterial().isReplaceable() || state.getMaterial() .equals(Material.PLANT) || state .getMaterial() .equals(Material.LEAVES); diff --git a/src/main/java/ru/betterend/world/features/terrain/caves/TunelCaveFeature.java b/src/main/java/ru/betterend/world/features/terrain/caves/TunelCaveFeature.java index 9f5a8222..33407556 100644 --- a/src/main/java/ru/betterend/world/features/terrain/caves/TunelCaveFeature.java +++ b/src/main/java/ru/betterend/world/features/terrain/caves/TunelCaveFeature.java @@ -80,7 +80,7 @@ public class TunelCaveFeature extends EndCaveFeature { ) * 20) * 0.1F) * 0.9F; float dist = (float) noiseD.eval(pos.getX() * 0.1, y * 0.1, pos.getZ() * 0.1) * 0.12F; val = (val + vert * vert + dist) + density + gradient; - if (val < 0.15 && world.getBlockState(pos).is(TagAPI.GEN_TERRAIN) && noWaterNear(world, pos)) { + if (val < 0.15 && world.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN) && noWaterNear(world, pos)) { positions.add(pos.immutable()); } } @@ -139,7 +139,7 @@ public class TunelCaveFeature extends EndCaveFeature { } else if (world.getBlockState(mut).getMaterial().isReplaceable()) { mut.setY(bpos.getY() - 1); - if (world.getBlockState(mut).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(mut).is(TagAPI.BLOCK_GEN_TERRAIN)) { Set floorPositions = floorSets.get(bio); if (floorPositions == null) { floorPositions = Sets.newHashSet(); @@ -148,7 +148,7 @@ public class TunelCaveFeature extends EndCaveFeature { floorPositions.add(mut.immutable()); } mut.setY(bpos.getY() + 1); - if (world.getBlockState(mut).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(mut).is(TagAPI.BLOCK_GEN_TERRAIN)) { Set ceilPositions = ceilSets.get(bio); if (ceilPositions == null) { ceilPositions = Sets.newHashSet(); diff --git a/src/main/java/ru/betterend/world/features/trees/DragonTreeFeature.java b/src/main/java/ru/betterend/world/features/trees/DragonTreeFeature.java index 36e37c0e..65c80849 100644 --- a/src/main/java/ru/betterend/world/features/trees/DragonTreeFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/DragonTreeFeature.java @@ -45,7 +45,7 @@ public class DragonTreeFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float size = MHelper.randRange(10, 25, random); List spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 6); @@ -111,7 +111,7 @@ public class DragonTreeFeature extends DefaultFeature { SplineHelper.rotateSpline(branch, angle); SplineHelper.scale(branch, scale); Vector3f last = branch.get(branch.size() - 1); - if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) { SplineHelper.fillSpline(branch, world, EndBlocks.DRAGON_TREE.bark.defaultBlockState(), pos, REPLACE); } } @@ -195,7 +195,7 @@ public class DragonTreeFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getBlock() == EndBlocks.DRAGON_TREE_LEAVES) { diff --git a/src/main/java/ru/betterend/world/features/trees/GiganticAmaranitaFeature.java b/src/main/java/ru/betterend/world/features/trees/GiganticAmaranitaFeature.java index 08afa8b6..ad793ad1 100644 --- a/src/main/java/ru/betterend/world/features/trees/GiganticAmaranitaFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/GiganticAmaranitaFeature.java @@ -36,7 +36,7 @@ public class GiganticAmaranitaFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float size = MHelper.randRange(5, 10, random); List spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 5); @@ -361,7 +361,7 @@ public class GiganticAmaranitaFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT)) { + if (state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT)) { return true; } return state.getMaterial().isReplaceable(); diff --git a/src/main/java/ru/betterend/world/features/trees/HelixTreeFeature.java b/src/main/java/ru/betterend/world/features/trees/HelixTreeFeature.java index 3e6d04ee..cf247746 100644 --- a/src/main/java/ru/betterend/world/features/trees/HelixTreeFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/HelixTreeFeature.java @@ -37,7 +37,7 @@ public class HelixTreeFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; BlocksHelper.setWithoutUpdate(world, pos, AIR); float angle = random.nextFloat() * MHelper.PI2; diff --git a/src/main/java/ru/betterend/world/features/trees/JellyshroomFeature.java b/src/main/java/ru/betterend/world/features/trees/JellyshroomFeature.java index 703475d4..2bcdc2a9 100644 --- a/src/main/java/ru/betterend/world/features/trees/JellyshroomFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/JellyshroomFeature.java @@ -36,7 +36,7 @@ public class JellyshroomFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; BlockState bark = EndBlocks.JELLYSHROOM.bark.defaultBlockState(); BlockState membrane = EndBlocks.JELLYSHROOM_CAP_PURPLE.defaultBlockState(); @@ -89,7 +89,7 @@ public class JellyshroomFeature extends DefaultFeature { SplineHelper.rotateSpline(branch, angle); SplineHelper.scale(branch, scale); Vector3f last = branch.get(branch.size() - 1); - if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) { SplineHelper.fillSpline(branch, world, wood, pos, REPLACE); } } @@ -122,7 +122,7 @@ public class JellyshroomFeature extends DefaultFeature { SplineHelper.offset(ROOT, new Vector3f(0, -0.45F, 0)); REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND) || state.getMaterial().equals(Material.PLANT)) { + if (state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial().equals(Material.PLANT)) { return true; } return state.getMaterial().isReplaceable(); diff --git a/src/main/java/ru/betterend/world/features/trees/LacugroveFeature.java b/src/main/java/ru/betterend/world/features/trees/LacugroveFeature.java index 5df25849..441f1a88 100644 --- a/src/main/java/ru/betterend/world/features/trees/LacugroveFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/LacugroveFeature.java @@ -38,7 +38,7 @@ public class LacugroveFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float size = MHelper.randRange(15, 25, random); List spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 6); @@ -82,7 +82,7 @@ public class LacugroveFeature extends DefaultFeature { boolean generate = false; for (int y = minY; y < maxY; y++) { mut.setY(y); - if (world.getBlockState(mut).is(TagAPI.END_GROUND)) { + if (world.getBlockState(mut).is(TagAPI.BLOCK_END_GROUND)) { generate = true; break; } @@ -93,7 +93,7 @@ public class LacugroveFeature extends DefaultFeature { mut.setY(y); BlockState state = world.getBlockState(mut); if (state.getMaterial().isReplaceable() || state.getMaterial() - .equals(Material.PLANT) || state.is(TagAPI.END_GROUND)) { + .equals(Material.PLANT) || state.is(TagAPI.BLOCK_END_GROUND)) { BlocksHelper.setWithoutUpdate( world, mut, @@ -188,7 +188,7 @@ public class LacugroveFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (EndBlocks.LACUGROVE.isTreeLog(state)) { diff --git a/src/main/java/ru/betterend/world/features/trees/LucerniaFeature.java b/src/main/java/ru/betterend/world/features/trees/LucerniaFeature.java index 010157c5..25ad52af 100644 --- a/src/main/java/ru/betterend/world/features/trees/LucerniaFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/LucerniaFeature.java @@ -46,7 +46,7 @@ public class LucerniaFeature extends DefaultFeature { final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); final NoneFeatureConfiguration config = featureConfig.config(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float size = MHelper.randRange(12, 20, random); int count = (int) (size * 0.3F); @@ -186,7 +186,7 @@ public class LucerniaFeature extends DefaultFeature { SplineHelper.rotateSpline(branch, angle); SplineHelper.scale(branch, scale); Vector3f last = branch.get(branch.size() - 1); - if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) { SplineHelper.fillSplineForce(branch, world, EndBlocks.LUCERNIA.bark.defaultBlockState(), pos, REPLACE); } } @@ -194,7 +194,7 @@ public class LucerniaFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getBlock() == EndBlocks.LUCERNIA_LEAVES) { diff --git a/src/main/java/ru/betterend/world/features/trees/MossyGlowshroomFeature.java b/src/main/java/ru/betterend/world/features/trees/MossyGlowshroomFeature.java index 05cfcd87..e813ad47 100644 --- a/src/main/java/ru/betterend/world/features/trees/MossyGlowshroomFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/MossyGlowshroomFeature.java @@ -172,7 +172,7 @@ public class MossyGlowshroomFeature extends DefaultFeature { .setSourceB(new SDFUnion().setSourceA(HEAD_POS).setSourceB(ROOTS_ROT)); REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getMaterial().equals(Material.PLANT)) { diff --git a/src/main/java/ru/betterend/world/features/trees/PythadendronTreeFeature.java b/src/main/java/ru/betterend/world/features/trees/PythadendronTreeFeature.java index 8b36632a..c78873bb 100644 --- a/src/main/java/ru/betterend/world/features/trees/PythadendronTreeFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/PythadendronTreeFeature.java @@ -188,7 +188,7 @@ public class PythadendronTreeFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getBlock() == EndBlocks.PYTHADENDRON_LEAVES) { diff --git a/src/main/java/ru/betterend/world/features/trees/TenaneaFeature.java b/src/main/java/ru/betterend/world/features/trees/TenaneaFeature.java index 085e9f6e..b9e94297 100644 --- a/src/main/java/ru/betterend/world/features/trees/TenaneaFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/TenaneaFeature.java @@ -44,7 +44,7 @@ public class TenaneaFeature extends DefaultFeature { final Random random = featureConfig.random(); final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; float size = MHelper.randRange(7, 10, random); int count = (int) (size * 0.45F); @@ -175,7 +175,7 @@ public class TenaneaFeature extends DefaultFeature { static { REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND)) { + if (state.is(TagAPI.BLOCK_END_GROUND)) { return true; } if (state.getBlock() == EndBlocks.TENANEA_LEAVES) { diff --git a/src/main/java/ru/betterend/world/features/trees/UmbrellaTreeFeature.java b/src/main/java/ru/betterend/world/features/trees/UmbrellaTreeFeature.java index 8430d0a0..654c000d 100644 --- a/src/main/java/ru/betterend/world/features/trees/UmbrellaTreeFeature.java +++ b/src/main/java/ru/betterend/world/features/trees/UmbrellaTreeFeature.java @@ -44,7 +44,7 @@ public class UmbrellaTreeFeature extends DefaultFeature { final BlockPos pos = featureConfig.origin(); final WorldGenLevel world = featureConfig.level(); final NoneFeatureConfiguration config = featureConfig.config(); - if (!world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) return false; + if (!world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) return false; BlockState wood = EndBlocks.UMBRELLA_TREE.bark.defaultBlockState(); BlockState membrane = EndBlocks.UMBRELLA_TREE_MEMBRANE.defaultBlockState() @@ -161,7 +161,7 @@ public class UmbrellaTreeFeature extends DefaultFeature { SplineHelper.rotateSpline(branch, angle); SplineHelper.scale(branch, scale); Vector3f last = branch.get(branch.size() - 1); - if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.GEN_TERRAIN)) { + if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(TagAPI.BLOCK_GEN_TERRAIN)) { SplineHelper.fillSplineForce(branch, world, wood, pos, REPLACE); } } @@ -220,7 +220,7 @@ public class UmbrellaTreeFeature extends DefaultFeature { SplineHelper.offset(ROOT, new Vector3f(0, -0.45F, 0)); REPLACE = (state) -> { - if (state.is(TagAPI.END_GROUND) || state.getMaterial() + if (state.is(TagAPI.BLOCK_END_GROUND) || state.getMaterial() .equals(Material.PLANT) || state.is(EndBlocks.UMBRELLA_TREE_MEMBRANE)) { return true; } diff --git a/src/main/java/ru/betterend/world/structures/piece/CavePiece.java b/src/main/java/ru/betterend/world/structures/piece/CavePiece.java index b159dc94..3de511f7 100644 --- a/src/main/java/ru/betterend/world/structures/piece/CavePiece.java +++ b/src/main/java/ru/betterend/world/structures/piece/CavePiece.java @@ -66,7 +66,7 @@ public class CavePiece extends BasePiece { double r2 = r - 4.5; double dist = xsq + ysq + zsq; if (dist < r2 * r2) { - if (world.getBlockState(pos).is(TagAPI.END_GROUND)) { + if (world.getBlockState(pos).is(TagAPI.BLOCK_END_GROUND)) { BlocksHelper.setWithoutUpdate(world, pos, CAVE_AIR); } } diff --git a/src/main/java/ru/betterend/world/structures/piece/CrystalMountainPiece.java b/src/main/java/ru/betterend/world/structures/piece/CrystalMountainPiece.java index 4326ec5c..9d16fd65 100644 --- a/src/main/java/ru/betterend/world/structures/piece/CrystalMountainPiece.java +++ b/src/main/java/ru/betterend/world/structures/piece/CrystalMountainPiece.java @@ -68,7 +68,7 @@ public class CrystalMountainPiece extends MountainPiece { continue; } pos.setY(minY); - while (!chunk.getBlockState(pos).is(TagAPI.GEN_TERRAIN) && pos.getY() > 56 && !chunk.getBlockState( + while (!chunk.getBlockState(pos).is(TagAPI.BLOCK_GEN_TERRAIN) && pos.getY() > 56 && !chunk.getBlockState( pos.below()).is(Blocks.CAVE_AIR)) { pos.setY(pos.getY() - 1); } diff --git a/src/main/java/ru/betterend/world/structures/piece/LakePiece.java b/src/main/java/ru/betterend/world/structures/piece/LakePiece.java index daf70cb6..eabc553f 100644 --- a/src/main/java/ru/betterend/world/structures/piece/LakePiece.java +++ b/src/main/java/ru/betterend/world/structures/piece/LakePiece.java @@ -117,7 +117,7 @@ public class LakePiece extends BasePiece { double dist = x3 + y2 + z3; if (dist < r2) { BlockState state = chunk.getBlockState(mut); - if (state.is(TagAPI.GEN_TERRAIN) || state.isAir()) { + if (state.is(TagAPI.BLOCK_GEN_TERRAIN) || state.isAir()) { state = mut.getY() < center.getY() ? WATER : CAVE_AIR; chunk.setBlockState(mut, state, false); } diff --git a/src/main/resources/assets/betterend/lang/en_us.json b/src/main/resources/assets/betterend/lang/en_us.json index d22b3f31..657b4fb5 100644 --- a/src/main/resources/assets/betterend/lang/en_us.json +++ b/src/main/resources/assets/betterend/lang/en_us.json @@ -901,5 +901,7 @@ "block.betterend.umbralith_slab": "Umbralith Slab", "block.betterend.umbralith_stairs": "Umbralith Stairs", "block.betterend.umbralith_tiles": "Umbralith Tiles", - "block.betterend.umbralith_wall": "Umbralith Wall" - } + "block.betterend.umbralith_wall": "Umbralith Wall", + + "biome.betterend.umbra_valley": "Umbra Valley" +} diff --git a/src/main/resources/assets/betterend/lang/ru_ru.json b/src/main/resources/assets/betterend/lang/ru_ru.json index 109a89f8..9389582e 100644 --- a/src/main/resources/assets/betterend/lang/ru_ru.json +++ b/src/main/resources/assets/betterend/lang/ru_ru.json @@ -916,5 +916,7 @@ "block.betterend.umbralith_slab": "Умбралитовая плита", "block.betterend.umbralith_stairs": "Умбралитовые ступени", "block.betterend.umbralith_tiles": "Умбралитовая плитка", - "block.betterend.umbralith_wall": "Умбралитовая стена" + "block.betterend.umbralith_wall": "Умбралитовая стена", + + "biome.betterend.umbra_valley": "Долина Умбра" } \ No newline at end of file