diff --git a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/garrigue_short_twisty_tree.json b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/garrigue_short_twisty_tree.json index d3af092..441888c 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/garrigue_short_twisty_tree.json +++ b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/garrigue_short_twisty_tree.json @@ -30,23 +30,18 @@ "foliage_provider": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:oak_leaves", - "Properties": { - "distance": "7", - "persistent": "false", - "waterlogged": "false" - } + "Name": "ageofthegods:olive_leaves" } }, "ignore_vines": false, "minimum_size": { "type": "minecraft:two_layers_feature_size", - "limit": 5, - "lower_size": 3, - "upper_size": 5 + "limit": 3, + "lower_size": 1, + "upper_size": 3 }, "trunk_placer": { - "type": "ageofthegods:twisty_trunk_placer", + "type": "ageofthegods:bush_twisty_trunk_placer", "base_height": 2, "height_rand_a": 3, "height_rand_b": 3 diff --git a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_short_twisty_tree.json b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_short_twisty_tree.json index 8c10149..704b9ea 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_short_twisty_tree.json +++ b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_short_twisty_tree.json @@ -46,7 +46,7 @@ "upper_size": 5 }, "trunk_placer": { - "type": "ageofthegods:twisty_trunk_placer", + "type": "ageofthegods:tall_twisty_trunk_placer", "base_height": 3, "height_rand_a": 3, "height_rand_b": 3 diff --git a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_tall_twisty_tree.json b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_tall_twisty_tree.json index 07bb0d7..f836f65 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_tall_twisty_tree.json +++ b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/maquis_tall_twisty_tree.json @@ -46,7 +46,7 @@ "upper_size": 5 }, "trunk_placer": { - "type": "ageofthegods:twisty_trunk_placer", + "type": "ageofthegods:tall_twisty_trunk_placer", "base_height": 10, "height_rand_a": 10, "height_rand_b": 10 diff --git a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/tall_thin_twisty_tree.json b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/tall_thin_twisty_tree.json index f09e94e..029aa8d 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/tall_thin_twisty_tree.json +++ b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/tall_thin_twisty_tree.json @@ -41,12 +41,12 @@ "ignore_vines": false, "minimum_size": { "type": "minecraft:two_layers_feature_size", - "limit": 4, - "lower_size": 3, - "upper_size": 4 + "limit": 3, + "lower_size": 1, + "upper_size": 3 }, "trunk_placer": { - "type": "ageofthegods:twisty_trunk_placer", + "type": "ageofthegods:tall_twisty_trunk_placer", "base_height": 12, "height_rand_a": 10, "height_rand_b": 10 diff --git a/src/generated/resources/data/ageofthegods/worldgen/placed_feature/tall_thin_twisty_tree_placed.json b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/tall_thin_twisty_tree_placed.json index 6c96d81..72827d7 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/placed_feature/tall_thin_twisty_tree_placed.json +++ b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/tall_thin_twisty_tree_placed.json @@ -2,10 +2,8 @@ "feature": "ageofthegods:tall_thin_twisty_tree", "placement": [ { - "type": "minecraft:noise_threshold_count", - "above_noise": 10, - "below_noise": 3, - "noise_level": -0.2 + "type": "minecraft:count", + "count": 15 }, { "type": "minecraft:rarity_filter", diff --git a/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json b/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json index 2053d7c..3987472 100644 --- a/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json +++ b/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json @@ -454,6 +454,24 @@ "then_run": { "type": "minecraft:sequence", "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": -1, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, { "type": "minecraft:condition", "if_true": { @@ -641,6 +659,24 @@ "then_run": { "type": "minecraft:sequence", "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": -1, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "ageofthegods:shale_block" + } + } + }, { "type": "minecraft:condition", "if_true": { @@ -787,6 +823,24 @@ "then_run": { "type": "minecraft:sequence", "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:water", + "add_stone_depth": false, + "offset": -1, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "ageofthegods:shale_block" + } + } + }, { "type": "minecraft:condition", "if_true": { @@ -805,36 +859,33 @@ "noise": "minecraft:patch" }, "then_run": { - "type": "minecraft:block", - "result_state": { - "Name": "minecraft:air" - } - } - } - }, - { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:stone_depth", - "add_surface_depth": false, - "offset": 4, - "secondary_depth_range": 0, - "surface_type": "floor" - }, - "then_run": { - "type": "minecraft:condition", - "if_true": { - "type": "minecraft:noise_threshold", - "max_threshold": 0.15, - "min_threshold": 0.0, - "noise": "minecraft:patch" - }, - "then_run": { - "type": "minecraft:block", - "result_state": { - "Name": "minecraft:water", - "Properties": { - "level": "0" + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "add_stone_depth": false, + "anchor": { + "absolute": 64 + }, + "surface_depth_multiplier": 0 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "add_stone_depth": false, + "anchor": { + "absolute": 72 + }, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:air" + } } } } @@ -844,9 +895,9 @@ "type": "minecraft:condition", "if_true": { "type": "minecraft:stone_depth", - "add_surface_depth": false, - "offset": 6, - "secondary_depth_range": 0, + "add_surface_depth": true, + "offset": 0, + "secondary_depth_range": 2, "surface_type": "floor" }, "then_run": { @@ -858,9 +909,26 @@ "noise": "minecraft:patch" }, "then_run": { - "type": "minecraft:block", - "result_state": { - "Name": "ageofthegods:shale_block" + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "add_stone_depth": false, + "anchor": { + "absolute": 72 + }, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } } } } @@ -869,9 +937,90 @@ "type": "minecraft:condition", "if_true": { "type": "minecraft:stone_depth", - "add_surface_depth": false, + "add_surface_depth": true, "offset": 1, - "secondary_depth_range": 0, + "secondary_depth_range": 2, + "surface_type": "floor" + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "max_threshold": 0.1, + "min_threshold": 0.05, + "noise": "minecraft:patch" + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "add_stone_depth": false, + "anchor": { + "absolute": 72 + }, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "add_surface_depth": true, + "offset": 6, + "secondary_depth_range": 3, + "surface_type": "floor" + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "max_threshold": 0.15, + "min_threshold": 0.0, + "noise": "minecraft:patch" + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "add_stone_depth": false, + "anchor": { + "absolute": 72 + }, + "surface_depth_multiplier": 0 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "ageofthegods:shale_block" + } + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "add_surface_depth": true, + "offset": 1, + "secondary_depth_range": 2, "surface_type": "floor" }, "then_run": { diff --git a/src/main/java/net/halbear/aotg/AgeoftheGods.java b/src/main/java/net/halbear/aotg/AgeoftheGods.java index 0db150b..9dbde21 100644 --- a/src/main/java/net/halbear/aotg/AgeoftheGods.java +++ b/src/main/java/net/halbear/aotg/AgeoftheGods.java @@ -63,6 +63,7 @@ public class AgeoftheGods { output.accept(SHALE_ITEM.get()); output.accept(SHALE_GRASS_ITEM.get()); output.accept(LIMESTONE_GRASS_ITEM.get()); + output.accept(OLIVE_LEAVES_ITEM.get()); }).build()); // The constructor for the mod class is the first code that is run when your mod is loaded. diff --git a/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/BushTwistyBranchingTrunkPlacer.java b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/BushTwistyBranchingTrunkPlacer.java new file mode 100644 index 0000000..53664bb --- /dev/null +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/BushTwistyBranchingTrunkPlacer.java @@ -0,0 +1,145 @@ +package net.halbear.aotg.custom.WorldGen.GenerationFeatures; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.halbear.aotg.registries.ModTreeGen; +import net.minecraft.core.BlockPos; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; +import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer; +import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer; +import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.BiConsumer; + +public class BushTwistyBranchingTrunkPlacer extends TrunkPlacer { + private int BEGINNING_TRUNK_WIDTH = 2; + private float BranchPossibility = 0.40f; + public BushTwistyBranchingTrunkPlacer(int baseHeight, int heightRandA, int heightRandB) { + super(baseHeight, heightRandA, heightRandB); + } + + public BushTwistyBranchingTrunkPlacer SetTrunkWidth(int BEGINNING_TRUNK_WIDTH){ + this.BEGINNING_TRUNK_WIDTH = BEGINNING_TRUNK_WIDTH; + return this; + } + + public BushTwistyBranchingTrunkPlacer SetBranchPossibility(float BranchPossibility){ + this.BranchPossibility = BranchPossibility; + return this; + } + + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> + trunkPlacerParts(instance).apply(instance, BushTwistyBranchingTrunkPlacer::new) + ); + + @Override + protected TrunkPlacerType type() { + return ModTreeGen.BUSH_TWISTY_TRUNK_PLACER.get(); + } + + @Override + public List placeTrunk(WorldGenLevel worldGenLevel, BiConsumer biConsumer, RandomSource randomSource, int freeSpace, BlockPos blockPos, TreeConfiguration treeConfiguration) { + int TRUNK_WIDTH = 2; + List leafNodes = new ArrayList<>(); + int mainHeight = this.getTreeHeight(randomSource); + BlockPos currentPos = blockPos; + + for (int i = 0; i < mainHeight; i++) { + TRUNK_WIDTH = (int)Math.max(2 * (1.0-((i*0.75)/(double)mainHeight)),1); + for (int xOffset = 0; xOffset < TRUNK_WIDTH; xOffset++) { + for (int zOffset = 0; zOffset < TRUNK_WIDTH; zOffset++) { + BlockPos thickLogPos = currentPos.offset(xOffset, 0, zOffset); + if(i < 2 && randomSource.nextFloat() < 0.40f){ + generateRoots(worldGenLevel, biConsumer, randomSource, thickLogPos, treeConfiguration); + } + if ((randomSource.nextInt(10) < 9) || TRUNK_WIDTH < 3) + this.placeLog(worldGenLevel, biConsumer, randomSource, thickLogPos, treeConfiguration); + } + } + if (randomSource.nextFloat() < 0.6f && i > 1) { + currentPos = currentPos.offset(randomSource.nextInt(3) - 1, 0, randomSource.nextInt(3) - 1); + } + + if (i > 2 && randomSource.nextFloat() < BranchPossibility) { + BlockPos branchStart = currentPos.offset(randomSource.nextInt(TRUNK_WIDTH), 0, randomSource.nextInt(TRUNK_WIDTH)); + BlockPos branchEnd = generateBranch(worldGenLevel, biConsumer, randomSource, branchStart, treeConfiguration,i, leafNodes); + + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*3,1)), false)); + } else if(i > 2 && i == mainHeight - 1){ + for(int l = 0; l < 2 + randomSource.nextInt(3); l++){ + BlockPos branchStart = currentPos.offset(randomSource.nextInt(TRUNK_WIDTH), 0, randomSource.nextInt(TRUNK_WIDTH)); + BlockPos branchEnd = generateBranch(worldGenLevel, biConsumer, randomSource, branchStart, treeConfiguration,i, leafNodes); + + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*3,1)), false)); + } + } + + currentPos = currentPos.above(); + } + + for (int xOffset = 0; xOffset < TRUNK_WIDTH; xOffset++) { + for (int zOffset = 0; zOffset < TRUNK_WIDTH; zOffset++) { + leafNodes.add(new FoliagePlacer.FoliageAttachment(currentPos.offset(xOffset, 0, zOffset), 0, false)); + } + } + return leafNodes; + } + + private BlockPos generateRoots(WorldGenLevel level, BiConsumer blockSetter, + RandomSource random, BlockPos branchStart, TreeConfiguration config) { + int dirX = random.nextBoolean() ? 1 : -1; + int dirZ = random.nextBoolean() ? 1 : -1; + int branchLength = 2 + random.nextInt(6); + + BlockPos bPos = branchStart; + for (int b = 0; b < branchLength; b++) { + int stepX = random.nextFloat() < 0.7f ? dirX : 0; + int stepZ = random.nextFloat() < 0.7f ? dirZ : 0; + int stepY = random.nextFloat() < 0.4f ? -1 : 0; + bPos = bPos.offset(stepX, stepY, stepZ); + this.placeLog(level, blockSetter, random, bPos, config); + } + return bPos; + } + + private BlockPos generateBranch(WorldGenLevel level, BiConsumer blockSetter, + RandomSource random, BlockPos branchStart, TreeConfiguration config, int CurrentTreeHeight,List leafNodes) { + int dirX = random.nextBoolean() ? 1 : -1; + int dirZ = random.nextBoolean() ? 1 : -1; + int branchLength = 3 + random.nextInt(Math.min(CurrentTreeHeight,12)); + + BlockPos bPos = branchStart; + for (int b = 0; b < branchLength; b++) { + int stepX = random.nextFloat() < 0.7f ? dirX : 0; + int stepZ = random.nextFloat() < 0.7f ? dirZ : 0; + int stepY = random.nextFloat() < 0.4f ? 1 : 0; + bPos = bPos.offset(stepX, stepY, stepZ); + this.placeLog(level, blockSetter, random, bPos, config); + if (random.nextDouble() < 0.25) { + leafNodes.add(new FoliagePlacer.FoliageAttachment(bPos, random.nextInt(2), false)); + } + } + return bPos; + } + + public static int checkPointPosition(double xp, double yp, double xc, double yc, double r) { + double dx = xp - xc; + double dy = yp - yc; + double squaredDistance = (dx * dx) + (dy * dy); + + double squaredRadius = r * r * 1.25; + + if (squaredDistance < squaredRadius) { + return -1; + } else if (squaredDistance == squaredRadius) { + return 0; + } else { + return 1; + } + } +} diff --git a/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinTwistyBranchingTrunkPlacer.java b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinTwistyBranchingTrunkPlacer.java new file mode 100644 index 0000000..65f8f8e --- /dev/null +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinTwistyBranchingTrunkPlacer.java @@ -0,0 +1,138 @@ +package net.halbear.aotg.custom.WorldGen.GenerationFeatures; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.halbear.aotg.registries.ModTreeGen; +import net.minecraft.core.BlockPos; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; +import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer; +import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer; +import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.BiConsumer; + +public class ThinTwistyBranchingTrunkPlacer extends TrunkPlacer { + + public ThinTwistyBranchingTrunkPlacer(int baseHeight, int heightRandA, int heightRandB) { + super(baseHeight, heightRandA, heightRandB); + } + + + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> + trunkPlacerParts(instance).apply(instance, ThinTwistyBranchingTrunkPlacer::new) + ); + + @Override + protected TrunkPlacerType type() { + return ModTreeGen.TALL_TWISTY_TRUNK_PLACER.get(); + } + + @Override + public List placeTrunk(WorldGenLevel worldGenLevel, BiConsumer biConsumer, RandomSource randomSource, int freeSpace, BlockPos blockPos, TreeConfiguration treeConfiguration) { + int TRUNK_WIDTH = 3; + List leafNodes = new ArrayList<>(); + int mainHeight = this.getTreeHeight(randomSource); + BlockPos currentPos = blockPos; + + for (int i = 0; i < mainHeight; i++) { + TRUNK_WIDTH = (int)Math.max(3 * (1.0-((i*0.75)/(double)mainHeight)),1); + for (int xOffset = 0; xOffset < TRUNK_WIDTH; xOffset++) { + for (int zOffset = 0; zOffset < TRUNK_WIDTH; zOffset++) { + BlockPos thickLogPos = currentPos.offset(xOffset, 0, zOffset); + if(i < 2 && randomSource.nextFloat() < 0.40f){ + generateRoots(worldGenLevel, biConsumer, randomSource, thickLogPos, treeConfiguration); + } + if ((randomSource.nextInt(10) < 9) || TRUNK_WIDTH < 3) + this.placeLog(worldGenLevel, biConsumer, randomSource, thickLogPos, treeConfiguration); + else if (randomSource.nextDouble() < 0.1) + leafNodes.add(new FoliagePlacer.FoliageAttachment(thickLogPos, randomSource.nextInt(2), false)); + } + } + if (randomSource.nextFloat() < 0.6f && i > 1) { + currentPos = currentPos.offset(randomSource.nextInt(3) - 1, 0, randomSource.nextInt(3) - 1); + } + + if (i > 2 && randomSource.nextFloat() < 0.65) { + BlockPos branchStart = currentPos.offset(randomSource.nextInt(TRUNK_WIDTH), 0, randomSource.nextInt(TRUNK_WIDTH)); + BlockPos branchEnd = generateBranch(worldGenLevel, biConsumer, randomSource, branchStart, treeConfiguration,i, leafNodes); + + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*3,1)), false)); + } else if(i > 2 && i == mainHeight - 1){ + for(int l = 0; l < 2 + randomSource.nextInt(3); l++){ + BlockPos branchStart = currentPos.offset(randomSource.nextInt(TRUNK_WIDTH), 0, randomSource.nextInt(TRUNK_WIDTH)); + BlockPos branchEnd = generateBranch(worldGenLevel, biConsumer, randomSource, branchStart, treeConfiguration,i, leafNodes); + this.placeLog(worldGenLevel, biConsumer, randomSource, branchStart, treeConfiguration); + + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*3,1)), false)); + } + } + + currentPos = currentPos.above(); + } + + for (int xOffset = 0; xOffset < TRUNK_WIDTH; xOffset++) { + for (int zOffset = 0; zOffset < TRUNK_WIDTH; zOffset++) { + leafNodes.add(new FoliagePlacer.FoliageAttachment(currentPos.offset(xOffset, 0, zOffset), 0, false)); + } + } + return leafNodes; + } + + private BlockPos generateRoots(WorldGenLevel level, BiConsumer blockSetter, + RandomSource random, BlockPos branchStart, TreeConfiguration config) { + int dirX = random.nextBoolean() ? 1 : -1; + int dirZ = random.nextBoolean() ? 1 : -1; + int branchLength = 2 + random.nextInt(6); + + BlockPos bPos = branchStart; + for (int b = 0; b < branchLength; b++) { + int stepX = random.nextFloat() < 0.7f ? dirX : 0; + int stepZ = random.nextFloat() < 0.7f ? dirZ : 0; + int stepY = random.nextFloat() < 0.4f ? -1 : 0; + bPos = bPos.offset(stepX, stepY, stepZ); + this.placeLog(level, blockSetter, random, bPos, config); + } + return bPos; + } + + private BlockPos generateBranch(WorldGenLevel level, BiConsumer blockSetter, + RandomSource random, BlockPos branchStart, TreeConfiguration config, int CurrentTreeHeight,List leafNodes) { + int dirX = random.nextBoolean() ? 1 : -1; + int dirZ = random.nextBoolean() ? 1 : -1; + int branchLength = 3 + random.nextInt(Math.min(CurrentTreeHeight,12)); + + BlockPos bPos = branchStart; + for (int b = 0; b < branchLength; b++) { + int stepX = random.nextFloat() < 0.7f ? dirX : 0; + int stepZ = random.nextFloat() < 0.7f ? dirZ : 0; + int stepY = random.nextFloat() < 0.4f ? 1 : 0; + bPos = bPos.offset(stepX, stepY, stepZ); + this.placeLog(level, blockSetter, random, bPos, config); + if (random.nextDouble() < 0.25) { + leafNodes.add(new FoliagePlacer.FoliageAttachment(bPos, random.nextInt(2), false)); + } + } + return bPos; + } + + public static int checkPointPosition(double xp, double yp, double xc, double yc, double r) { + double dx = xp - xc; + double dy = yp - yc; + double squaredDistance = (dx * dx) + (dy * dy); + + double squaredRadius = r * r * 1.25; + + if (squaredDistance < squaredRadius) { + return -1; + } else if (squaredDistance == squaredRadius) { + return 0; + } else { + return 1; + } + } +} diff --git a/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/TwistyBranchingTrunkPlacer.java b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/TwistyBranchingTrunkPlacer.java index 646b5fb..c183c79 100644 --- a/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/TwistyBranchingTrunkPlacer.java +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/TwistyBranchingTrunkPlacer.java @@ -5,15 +5,12 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.halbear.aotg.registries.ModTreeGen; import net.minecraft.core.BlockPos; import net.minecraft.util.RandomSource; -import net.minecraft.world.level.LevelSimulatedReader; import net.minecraft.world.level.WorldGenLevel; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer; import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer; import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType; -import org.joml.Vector3f; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/net/halbear/aotg/custom/WorldGen/ModNoiseSettings.java b/src/main/java/net/halbear/aotg/custom/WorldGen/ModNoiseSettings.java index 7486646..c2c91b0 100644 --- a/src/main/java/net/halbear/aotg/custom/WorldGen/ModNoiseSettings.java +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/ModNoiseSettings.java @@ -13,6 +13,7 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.levelgen.NoiseGeneratorSettings; import net.minecraft.world.level.levelgen.Noises; import net.minecraft.world.level.levelgen.SurfaceRules; +import net.minecraft.world.level.levelgen.VerticalAnchor; import net.minecraft.world.level.levelgen.placement.CaveSurface; public class ModNoiseSettings { @@ -32,33 +33,63 @@ public class ModNoiseSettings { SurfaceRules.ConditionSource isMaquisGrassPatch = SurfaceRules.noiseCondition(AgeOfTheGodsDataGeneration.TINY_PATCHY_NOISE, 0.0); SurfaceRules.ConditionSource isGranite = SurfaceRules.noiseCondition(AgeOfTheGodsDataGeneration.TINY_PATCHY_NOISE, 0.1); SurfaceRules.ConditionSource isGraniteSurfacePatch = SurfaceRules.noiseCondition(Noises.PATCH, 0.0,0.15); + SurfaceRules.ConditionSource isDeepRiver = SurfaceRules.noiseCondition(Noises.PATCH, 0.05,0.1); SurfaceRules.ConditionSource isRiverBed = SurfaceRules.noiseCondition(Noises.PATCH, -0.05,0.2); SurfaceRules.ConditionSource isPath = SurfaceRules.noiseCondition(Noises.EROSION_LARGE, -1.0,-0.5); + SurfaceRules.ConditionSource atOrAboveSeaLevel = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(63), 0); + SurfaceRules.ConditionSource AboveSeaLevel = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(64), 0); + SurfaceRules.ConditionSource RiverCap = SurfaceRules.not(SurfaceRules.yBlockCheck(VerticalAnchor.absolute(72), 0)); SurfaceRules.RuleSource MediterraneanSurface = SurfaceRules.sequence( + SurfaceRules.ifTrue( + SurfaceRules.not(SurfaceRules.waterBlockCheck(-1,0)), + SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState()) + ), SurfaceRules.ifTrue( SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR), SurfaceRules.ifTrue( isGraniteSurfacePatch, - SurfaceRules.state(Blocks.AIR.defaultBlockState()) + SurfaceRules.ifTrue( + AboveSeaLevel, + SurfaceRules.ifTrue( + RiverCap, + SurfaceRules.state(Blocks.AIR.defaultBlockState()) + ) + ) ) ), SurfaceRules.ifTrue( - SurfaceRules.stoneDepthCheck(4, false, 0, CaveSurface.FLOOR), + SurfaceRules.stoneDepthCheck(0, true, 2, CaveSurface.FLOOR), SurfaceRules.ifTrue( isGraniteSurfacePatch, - SurfaceRules.state(Blocks.WATER.defaultBlockState()) + SurfaceRules.ifTrue( + RiverCap, + SurfaceRules.state(Blocks.WATER.defaultBlockState()) + ) ) ), SurfaceRules.ifTrue( - SurfaceRules.stoneDepthCheck(6, false, 0, CaveSurface.FLOOR), + SurfaceRules.stoneDepthCheck(1, true, 2, CaveSurface.FLOOR), + SurfaceRules.ifTrue( + isDeepRiver, + SurfaceRules.ifTrue( + RiverCap, + SurfaceRules.state(Blocks.WATER.defaultBlockState()) + ) + ) + ), + SurfaceRules.ifTrue( + SurfaceRules.stoneDepthCheck(6, true, 3, CaveSurface.FLOOR), SurfaceRules.ifTrue( isGraniteSurfacePatch, - SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState()) + SurfaceRules.ifTrue( + RiverCap, + SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState()) + ) ) ), SurfaceRules.ifTrue( - SurfaceRules.stoneDepthCheck(1, false, 0, CaveSurface.FLOOR), + SurfaceRules.stoneDepthCheck(1, true, 2, CaveSurface.FLOOR), SurfaceRules.ifTrue( isRiverBed, SurfaceRules.state(Blocks.SAND.defaultBlockState()) @@ -103,6 +134,10 @@ public class ModNoiseSettings { ); SurfaceRules.RuleSource garrigueSurface = SurfaceRules.sequence( + SurfaceRules.ifTrue( + SurfaceRules.not(SurfaceRules.waterBlockCheck(-1,0)), + SurfaceRules.state(Blocks.SANDSTONE.defaultBlockState()) + ), SurfaceRules.ifTrue( SurfaceRules.stoneDepthCheck(0, false, 0, CaveSurface.FLOOR), SurfaceRules.ifTrue( @@ -149,6 +184,10 @@ public class ModNoiseSettings { ); SurfaceRules.RuleSource maquisSurface = SurfaceRules.sequence( + SurfaceRules.ifTrue( + SurfaceRules.not(SurfaceRules.waterBlockCheck(-1,0)), + SurfaceRules.state(ModBlocks.SHALE_BLOCK.get().defaultBlockState()) + ), SurfaceRules.ifTrue( SurfaceRules.stoneDepthCheck(6, false, 0, CaveSurface.FLOOR), SurfaceRules.ifTrue( diff --git a/src/main/java/net/halbear/aotg/registries/ModBlocks.java b/src/main/java/net/halbear/aotg/registries/ModBlocks.java index 9dab1f9..fad7fa6 100644 --- a/src/main/java/net/halbear/aotg/registries/ModBlocks.java +++ b/src/main/java/net/halbear/aotg/registries/ModBlocks.java @@ -30,6 +30,16 @@ public class ModBlocks { .explosionResistance(6.0f) .sound(SoundType.GRASS) .lightLevel(state -> 0) + + )); + + public static final DeferredBlock OLIVE_LEAVES = RegisterBlock("olive_leaves", + properties -> new RockCoveredGrassBlock(properties.strength(1.5f) + .requiresCorrectToolForDrops() + .explosionResistance(6.0f) + .sound(SoundType.GRASS) + .lightLevel(state -> 0) + .noOcclusion() )); public static final DeferredBlock SHALE_BLOCK = RegisterBlock("shale_block", diff --git a/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java b/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java index 60b2634..7395bd5 100644 --- a/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java +++ b/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java @@ -1,8 +1,7 @@ package net.halbear.aotg.registries; import net.halbear.aotg.AgeoftheGods; -import net.halbear.aotg.custom.WorldGen.GenerationFeatures.LeafBunchFoliagePlacer; -import net.halbear.aotg.custom.WorldGen.GenerationFeatures.TwistyBranchingTrunkPlacer; +import net.halbear.aotg.custom.WorldGen.GenerationFeatures.*; import net.minecraft.core.BlockPos; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; @@ -16,10 +15,7 @@ import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.BlockBlobConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; import net.minecraft.world.level.levelgen.feature.featuresize.TwoLayersFeatureSize; -import net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer; -import net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; -import net.minecraft.world.level.levelgen.placement.BlockPredicateFilter; public class ModConfiguredFeatures { public static final ResourceKey> TWISTY_TREE_KEY = @@ -44,17 +40,17 @@ public class ModConfiguredFeatures { Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), - new TwistyBranchingTrunkPlacer(12, 10, 10).SetTrunkWidth(3).SetBranchPossibility(0.65f), + new ThinTwistyBranchingTrunkPlacer(12, 10, 10), BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), - new TwoLayersFeatureSize(4, 3, 4) + new TwoLayersFeatureSize(3, 1, 3) ).build() )); context.register(TWISTY_TREE_KEY, new ConfiguredFeature<>( Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), - new TwistyBranchingTrunkPlacer(10, 10, 10), + new ThinTwistyBranchingTrunkPlacer(10, 10, 10), BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), new TwoLayersFeatureSize(5, 3, 5) @@ -64,17 +60,17 @@ public class ModConfiguredFeatures { Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), - new TwistyBranchingTrunkPlacer(2, 3, 3).SetTrunkWidth(2), - BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), + new BushTwistyBranchingTrunkPlacer(2, 3, 3), + BlockStateProvider.simple(ModBlocks.OLIVE_LEAVES.get().defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), - new TwoLayersFeatureSize(5, 3, 5) + new TwoLayersFeatureSize(3, 1, 3) ).build() )); context.register(MAQUIS_SHORT_TWISTY_TREE_KEY, new ConfiguredFeature<>( Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), - new TwistyBranchingTrunkPlacer(3, 3, 3), + new ThinTwistyBranchingTrunkPlacer(3, 3, 3), BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), new TwoLayersFeatureSize(5, 3, 5) diff --git a/src/main/java/net/halbear/aotg/registries/ModItems.java b/src/main/java/net/halbear/aotg/registries/ModItems.java index 2b76d7b..b2988eb 100644 --- a/src/main/java/net/halbear/aotg/registries/ModItems.java +++ b/src/main/java/net/halbear/aotg/registries/ModItems.java @@ -13,5 +13,6 @@ public class ModItems { public static final DeferredItem SHALE_ITEM = ITEMS.registerSimpleBlockItem("shale_block", SHALE_BLOCK); public static final DeferredItem SHALE_GRASS_ITEM = ITEMS.registerSimpleBlockItem("shale_grass_block", SHALE_GRASS_BLOCK); public static final DeferredItem LIMESTONE_GRASS_ITEM = ITEMS.registerSimpleBlockItem("limestone_grass_block", LIMESTONE_GRASS_BLOCK); + public static final DeferredItem OLIVE_LEAVES_ITEM = ITEMS.registerSimpleBlockItem("olive_leaves", OLIVE_LEAVES); } diff --git a/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java b/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java index a21bff3..9fdd389 100644 --- a/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java +++ b/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java @@ -45,7 +45,7 @@ public class ModPlacedFeatures { context.register(TALL_THIN_TWISTY_TREE_PLACED_KEY, new PlacedFeature( configuredTreeHolder, List.of( - NoiseThresholdCountPlacement.of(-0.2D, 3, 10), + CountPlacement.of(15), RarityFilter.onAverageOnceEvery(10), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_OCEAN_FLOOR, diff --git a/src/main/java/net/halbear/aotg/registries/ModTreeGen.java b/src/main/java/net/halbear/aotg/registries/ModTreeGen.java index 318bc33..aaa5275 100644 --- a/src/main/java/net/halbear/aotg/registries/ModTreeGen.java +++ b/src/main/java/net/halbear/aotg/registries/ModTreeGen.java @@ -1,6 +1,8 @@ package net.halbear.aotg.registries; import net.halbear.aotg.AgeoftheGods; +import net.halbear.aotg.custom.WorldGen.GenerationFeatures.BushTwistyBranchingTrunkPlacer; +import net.halbear.aotg.custom.WorldGen.GenerationFeatures.ThinTwistyBranchingTrunkPlacer; import net.halbear.aotg.custom.WorldGen.GenerationFeatures.TwistyBranchingTrunkPlacer; import net.minecraft.core.registries.Registries; import net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacerType; @@ -15,6 +17,12 @@ public class ModTreeGen { public static final DeferredHolder, TrunkPlacerType> TWISTY_TRUNK_PLACER = TRUNK_PLACERS.register("twisty_trunk_placer", () -> new TrunkPlacerType<>(TwistyBranchingTrunkPlacer.CODEC)); + public static final DeferredHolder, TrunkPlacerType> TALL_TWISTY_TRUNK_PLACER = + TRUNK_PLACERS.register("tall_twisty_trunk_placer", () -> new TrunkPlacerType<>(ThinTwistyBranchingTrunkPlacer.CODEC)); + + public static final DeferredHolder, TrunkPlacerType> BUSH_TWISTY_TRUNK_PLACER = + TRUNK_PLACERS.register("bush_twisty_trunk_placer", () -> new TrunkPlacerType<>(BushTwistyBranchingTrunkPlacer.CODEC)); + public static void register(IEventBus eventBus) { TRUNK_PLACERS.register(eventBus); } diff --git a/src/main/java/net/halbear/aotg/rendering/skybox/SkyBoxRendering.java b/src/main/java/net/halbear/aotg/rendering/skybox/SkyBoxRendering.java index 2f64df8..b1c4c5a 100644 --- a/src/main/java/net/halbear/aotg/rendering/skybox/SkyBoxRendering.java +++ b/src/main/java/net/halbear/aotg/rendering/skybox/SkyBoxRendering.java @@ -53,7 +53,6 @@ public class SkyBoxRendering { Identifier.parse("ageofthegods:textures/smallcloud3.png"), }; double[] aspectRatios = new double[]{1.5625,1,1,1,3.71875}; - DistantSkyObject newObject; for(int i = 0; i < 128; i++){ @@ -74,7 +73,7 @@ public class SkyBoxRendering { float Scale = 2f + (float)Math.random() * 12; - newObject = new DistantSkyObject(name, clouds[Index], aspectRatios[Index], //Object ID, texture, mesh aspect ratio + new DistantSkyObject(name, clouds[Index], aspectRatios[Index], //Object ID, texture, mesh aspect ratio (float)Math.toRadians(360*Math.random()),(float)Math.toRadians(-130F + (60 * Math.random())), // horizontal angle, vertical angle new Vector3f(0,100,0),new Vector3f(Scale,-1,Scale),new Vector4f(1,1,1,1)) // translation, scale, colour modifiers .AddToDimension(OVERWORLD) diff --git a/src/main/java/net/halbear/aotg/utility/ModEventHandler.java b/src/main/java/net/halbear/aotg/utility/ModEventHandler.java index 47bcdeb..a5f9a5d 100644 --- a/src/main/java/net/halbear/aotg/utility/ModEventHandler.java +++ b/src/main/java/net/halbear/aotg/utility/ModEventHandler.java @@ -17,6 +17,7 @@ import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.renderer.BiomeColors; import net.minecraft.client.renderer.RenderPipelines; import net.minecraft.client.renderer.block.BlockAndTintGetter; +import net.minecraft.client.renderer.rendertype.RenderType; import net.minecraft.core.BlockPos; import net.minecraft.resources.Identifier; import net.minecraft.world.entity.LivingEntity; @@ -28,6 +29,7 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.EventBus; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.EventBusSubscriber; +import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent; import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent.BlockTintSources; import net.neoforged.neoforge.client.event.RegisterRenderPipelinesEvent; @@ -76,6 +78,7 @@ public class ModEventHandler { public static void registerBlockTint(RegisterColorHandlersEvent.BlockTintSources event) { BlockTint(event, ModBlocks.LIMESTONE_GRASS_BLOCK.get()); BlockTint(event, ModBlocks.SHALE_GRASS_BLOCK.get()); + BlockTint(event, ModBlocks.OLIVE_LEAVES.get()); } @SubscribeEvent @@ -84,6 +87,8 @@ public class ModEventHandler { (new CustomItemGrassTint().type()) ); event.register( ModBlocks.SHALE_GRASS_BLOCK.getId(), (new CustomItemGrassTint().type()) ); + event.register( ModBlocks.OLIVE_LEAVES.getId(), + (new CustomItemGrassTint().type()) ); } private static class CustomItemGrassTint implements ItemTintSource { diff --git a/src/main/resources/assets/ageofthegods/blockstates/olive_leaves.json b/src/main/resources/assets/ageofthegods/blockstates/olive_leaves.json new file mode 100644 index 0000000..05106ad --- /dev/null +++ b/src/main/resources/assets/ageofthegods/blockstates/olive_leaves.json @@ -0,0 +1,9 @@ +{ + "variants": { + "": [ + { + "model": "ageofthegods:block/olive/olive_leaves", "weight": 3 + } + ] + } +} diff --git a/src/main/resources/assets/ageofthegods/items/limestone_block.json b/src/main/resources/assets/ageofthegods/items/limestone_block.json new file mode 100644 index 0000000..8acfd78 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/items/limestone_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/limestone_block" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json b/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json new file mode 100644 index 0000000..9a2c0e1 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/limestone_grass_block" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/items/olive_leaves.json b/src/main/resources/assets/ageofthegods/items/olive_leaves.json new file mode 100644 index 0000000..095846e --- /dev/null +++ b/src/main/resources/assets/ageofthegods/items/olive_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/olive_leaves" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/items/shale_block.json b/src/main/resources/assets/ageofthegods/items/shale_block.json new file mode 100644 index 0000000..1e52824 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/items/shale_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/shale_block" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/items/shale_grass_block.json b/src/main/resources/assets/ageofthegods/items/shale_grass_block.json new file mode 100644 index 0000000..8601a61 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/items/shale_grass_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/shale_grass_block" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_leaves.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_leaves.json new file mode 100644 index 0000000..3123f5f --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_leaves.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:block/block", + "textures": { + "particle": "ageofthegods:block/olive/oliveleavesside", + "bottom": "ageofthegods:block/olive/oliveleavestopgreyscale", + "top": "ageofthegods:block/olive/oliveleavestopgreyscale", + "side": "ageofthegods:block/olive/oliveleavessideoverlay", + "overlay": "ageofthegods:block/olive/oliveleavessideoverlay" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "down": { "texture": "#bottom", "cullface": "down", "tintindex": 0 }, + "up": { "texture": "#top", "cullface": "up", "tintindex": 0 }, + "north": { "texture": "#side", "cullface": "north" }, + "south": { "texture": "#side", "cullface": "south" }, + "west": { "texture": "#side", "cullface": "west" }, + "east": { "texture": "#side", "cullface": "east" } + } + }, + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": { "texture": "#overlay", "cullface": "north", "tintindex": 0 }, + "south": { "texture": "#overlay", "cullface": "south", "tintindex": 0 }, + "west": { "texture": "#overlay", "cullface": "west", "tintindex": 0 }, + "east": { "texture": "#overlay", "cullface": "east", "tintindex": 0 } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/limestone_block.json b/src/main/resources/assets/ageofthegods/models/item/limestone_block.json index 8acfd78..c18e1d4 100644 --- a/src/main/resources/assets/ageofthegods/models/item/limestone_block.json +++ b/src/main/resources/assets/ageofthegods/models/item/limestone_block.json @@ -1,6 +1,22 @@ { - "model": { - "type": "minecraft:model", - "model": "ageofthegods:block/limestone_block" + "parent": "ageofthegods:block/limestone_block", + "display": { + "thirdperson": { + "rotation": [ + 10, + -45, + 170 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + } } } \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/limestone_grass_block.json b/src/main/resources/assets/ageofthegods/models/item/limestone_grass_block.json new file mode 100644 index 0000000..9ee5ea8 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/limestone_grass_block.json @@ -0,0 +1,22 @@ +{ + "parent": "ageofthegods:block/limestone_grass_block", + "display": { + "thirdperson": { + "rotation": [ + 10, + -45, + 170 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/olive_leaves.json b/src/main/resources/assets/ageofthegods/models/item/olive_leaves.json new file mode 100644 index 0000000..f3c3923 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/olive_leaves.json @@ -0,0 +1,22 @@ +{ + "parent": "ageofthegods:block/olive_leaves", + "display": { + "thirdperson": { + "rotation": [ + 10, + -45, + 170 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/shale_block.json b/src/main/resources/assets/ageofthegods/models/item/shale_block.json index 1e52824..49328ce 100644 --- a/src/main/resources/assets/ageofthegods/models/item/shale_block.json +++ b/src/main/resources/assets/ageofthegods/models/item/shale_block.json @@ -1,6 +1,22 @@ { - "model": { - "type": "minecraft:model", - "model": "ageofthegods:block/shale_block" + "parent": "ageofthegods:block/shale_block", + "display": { + "thirdperson": { + "rotation": [ + 10, + -45, + 170 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + } } } \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/item/shale_grass_block.json b/src/main/resources/assets/ageofthegods/models/item/shale_grass_block.json new file mode 100644 index 0000000..5c8af13 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/shale_grass_block.json @@ -0,0 +1,22 @@ +{ + "parent": "ageofthegods:block/shale_grass_block", + "display": { + "thirdperson": { + "rotation": [ + 10, + -45, + 170 + ], + "translation": [ + 0, + 1.5, + -2.75 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavesside.png b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavesside.png new file mode 100644 index 0000000..b2e5337 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavesside.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessidegreyscale.png b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessidegreyscale.png new file mode 100644 index 0000000..bf24c92 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessidegreyscale.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessideoverlay.png b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessideoverlay.png new file mode 100644 index 0000000..608929f Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessideoverlay.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestop.png b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestop.png new file mode 100644 index 0000000..c1cacb8 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestop.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestopgreyscale.png b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestopgreyscale.png new file mode 100644 index 0000000..3cc2acd Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavestopgreyscale.png differ