diff --git a/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_thin_twisty_tree.json b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_thin_twisty_tree.json new file mode 100644 index 0000000..c8518d2 --- /dev/null +++ b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_thin_twisty_tree.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "ageofthegods:mediterranean_forest", + "features": "ageofthegods:short_thin_twisty_tree_placed", + "step": "vegetal_decoration" +} \ No newline at end of file diff --git a/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_twisty_tree.json b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_twisty_tree.json new file mode 100644 index 0000000..29ad8de --- /dev/null +++ b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_short_twisty_tree.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "ageofthegods:maquis_shrubland", + "features": "ageofthegods:short_maquis_twisty_tree_placed", + "step": "vegetal_decoration" +} \ No newline at end of file diff --git a/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_twisty_tree.json b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_twisty_tree.json index 29ad8de..4fa46ec 100644 --- a/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_twisty_tree.json +++ b/src/generated/resources/data/ageofthegods/neoforge/biome_modifier/add_twisty_tree.json @@ -1,6 +1,6 @@ { "type": "neoforge:add_features", - "biomes": "ageofthegods:maquis_shrubland", - "features": "ageofthegods:short_maquis_twisty_tree_placed", + "biomes": "ageofthegods:mediterranean_forest", + "features": "ageofthegods:twisty_tree_placed", "step": "vegetal_decoration" } \ No newline at end of file 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 441888c..b17efa1 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 @@ -49,7 +49,7 @@ "trunk_provider": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:oak_log", + "Name": "ageofthegods:olive_log", "Properties": { "axis": "y" } 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 f836f65..fe92147 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,10 +46,10 @@ "upper_size": 5 }, "trunk_placer": { - "type": "ageofthegods:tall_twisty_trunk_placer", - "base_height": 10, - "height_rand_a": 10, - "height_rand_b": 10 + "type": "ageofthegods:twisty_trunk_placer", + "base_height": 15, + "height_rand_a": 15, + "height_rand_b": 15 }, "trunk_provider": { "type": "minecraft:simple_state_provider", diff --git a/src/generated/resources/data/ageofthegods/worldgen/configured_feature/short_thin_twisty_tree.json b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/short_thin_twisty_tree.json new file mode 100644 index 0000000..a2d2a50 --- /dev/null +++ b/src/generated/resources/data/ageofthegods/worldgen/configured_feature/short_thin_twisty_tree.json @@ -0,0 +1,59 @@ +{ + "type": "minecraft:tree", + "config": { + "below_trunk_provider": { + "type": "minecraft:rule_based_state_provider", + "rules": [ + { + "if_true": { + "type": "minecraft:not", + "predicate": { + "type": "minecraft:matching_block_tag", + "tag": "minecraft:cannot_replace_below_tree_trunk" + } + }, + "then": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + } + } + ] + }, + "decorators": [], + "foliage_placer": { + "type": "ageofthegods:spherical_foliage_placer", + "offset": 0, + "radius": 1 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "ageofthegods:olive_leaves" + } + }, + "ignore_vines": false, + "minimum_size": { + "type": "minecraft:two_layers_feature_size", + "limit": 3, + "lower_size": 1, + "upper_size": 3 + }, + "trunk_placer": { + "type": "ageofthegods:bush_twisty_trunk_placer", + "base_height": 5, + "height_rand_a": 4, + "height_rand_b": 5 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "ageofthegods:olive_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file 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 029aa8d..40aa9fd 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 @@ -30,12 +30,7 @@ "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, @@ -54,7 +49,7 @@ "trunk_provider": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:oak_log", + "Name": "ageofthegods:olive_log", "Properties": { "axis": "y" } diff --git a/src/generated/resources/data/ageofthegods/worldgen/placed_feature/short_thin_twisty_tree_placed.json b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/short_thin_twisty_tree_placed.json new file mode 100644 index 0000000..4924ac5 --- /dev/null +++ b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/short_thin_twisty_tree_placed.json @@ -0,0 +1,44 @@ +{ + "feature": "ageofthegods:short_thin_twisty_tree", + "placement": [ + { + "type": "minecraft:count", + "count": 15 + }, + { + "type": "minecraft:rarity_filter", + "chance": 6 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": [ + "ageofthegods:shale_grass_block", + "minecraft:sandstone", + "ageofthegods:shale_block", + "ageofthegods:limestone_grass_block" + ], + "offset": [ + 0, + -1, + 0 + ] + } + }, + { + "type": "minecraft:surface_water_depth_filter", + "max_water_depth": 2 + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file 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 72827d7..751439e 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 @@ -7,7 +7,7 @@ }, { "type": "minecraft:rarity_filter", - "chance": 10 + "chance": 6 }, { "type": "minecraft:in_square" diff --git a/src/generated/resources/data/ageofthegods/worldgen/placed_feature/twisty_tree_placed.json b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/twisty_tree_placed.json index 8d19b22..550b7bd 100644 --- a/src/generated/resources/data/ageofthegods/worldgen/placed_feature/twisty_tree_placed.json +++ b/src/generated/resources/data/ageofthegods/worldgen/placed_feature/twisty_tree_placed.json @@ -2,10 +2,8 @@ "feature": "ageofthegods:maquis_tall_twisty_tree", "placement": [ { - "type": "minecraft:noise_threshold_count", - "above_noise": 10, - "below_noise": 3, - "noise_level": -0.2 + "type": "minecraft:count", + "count": 7 }, { "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 3987472..bbea182 100644 --- a/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json +++ b/src/generated/resources/data/minecraft/worldgen/noise_settings/overworld.json @@ -12,7 +12,7 @@ "disable_mob_generation": false, "legacy_random_source": false, "noise": { - "height": 384, + "height": 512, "min_y": -64, "size_horizontal": 1, "size_vertical": 2 diff --git a/src/main/java/net/halbear/aotg/AgeoftheGods.java b/src/main/java/net/halbear/aotg/AgeoftheGods.java index 9dbde21..6e7f623 100644 --- a/src/main/java/net/halbear/aotg/AgeoftheGods.java +++ b/src/main/java/net/halbear/aotg/AgeoftheGods.java @@ -54,7 +54,7 @@ public class AgeoftheGods { public static final DeferredRegister CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID); - public static final DeferredHolder EXAMPLE_TAB = CREATIVE_MODE_TABS.register("example_tab", () -> CreativeModeTab.builder() + public static final DeferredHolder AGE_OF_THE_GODS_TAB = CREATIVE_MODE_TABS.register("age_of_the_gods", () -> CreativeModeTab.builder() .title(Component.translatable("itemGroup.ageofthegods")) //The language key for the title of your CreativeModeTab .withTabsBefore(CreativeModeTabs.COMBAT) .icon(() -> LIMESTONE_BLOCK.get().asItem().getDefaultInstance()) @@ -64,6 +64,8 @@ public class AgeoftheGods { output.accept(SHALE_GRASS_ITEM.get()); output.accept(LIMESTONE_GRASS_ITEM.get()); output.accept(OLIVE_LEAVES_ITEM.get()); + output.accept(OLIVE_LOG_ITEM.get()); + output.accept(XIPHOS_SWORD.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/ThinShortTwistyBranchingTrunkPlacer.java b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinShortTwistyBranchingTrunkPlacer.java new file mode 100644 index 0000000..653b577 --- /dev/null +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinShortTwistyBranchingTrunkPlacer.java @@ -0,0 +1,142 @@ +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 ThinShortTwistyBranchingTrunkPlacer extends TrunkPlacer { + private int BEGINNING_TRUNK_WIDTH = 1; + private float BranchPossibility = 0.60f; + public ThinShortTwistyBranchingTrunkPlacer(int baseHeight, int heightRandA, int heightRandB) { + super(baseHeight, heightRandA, heightRandB); + } + + public ThinShortTwistyBranchingTrunkPlacer SetTrunkWidth(int BEGINNING_TRUNK_WIDTH){ + this.BEGINNING_TRUNK_WIDTH = BEGINNING_TRUNK_WIDTH; + return this; + } + + public ThinShortTwistyBranchingTrunkPlacer SetBranchPossibility(float BranchPossibility){ + this.BranchPossibility = BranchPossibility; + return this; + } + + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> + trunkPlacerParts(instance).apply(instance, ThinShortTwistyBranchingTrunkPlacer::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 = 1; + List leafNodes = new ArrayList<>(); + int mainHeight = this.getTreeHeight(randomSource); + BlockPos currentPos = blockPos; + + for (int i = 0; i < mainHeight; i++) { + BlockPos thickLogPos = currentPos; + if(i < 2 && randomSource.nextFloat() < 0.60f){ + generateRoots(worldGenLevel, biConsumer, randomSource, thickLogPos, treeConfiguration); + } + 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); + this.placeLog(worldGenLevel, biConsumer, randomSource, currentPos.below(), treeConfiguration); + } + 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(); + } + + leafNodes.add(new FoliagePlacer.FoliageAttachment(currentPos, 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); + if(stepY == 1) this.placeLog(level, blockSetter, random, bPos.below(), config); + this.placeLog(level, blockSetter, random, bPos, config); + if (random.nextDouble() < 0.25) { + leafNodes.add(new FoliagePlacer.FoliageAttachment(bPos, random.nextInt(2), false)); + } + if (b > 2 && random.nextFloat() < BranchPossibility) { + BlockPos subBranchStart = bPos; + BlockPos subbranchEnd = generateBranch(level, blockSetter, random, subBranchStart, config,branchLength, leafNodes); + + leafNodes.add(new FoliagePlacer.FoliageAttachment(subbranchEnd, random.nextInt(3), 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 index 65f8f8e..7a330b4 100644 --- a/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinTwistyBranchingTrunkPlacer.java +++ b/src/main/java/net/halbear/aotg/custom/WorldGen/GenerationFeatures/ThinTwistyBranchingTrunkPlacer.java @@ -55,20 +55,21 @@ public class ThinTwistyBranchingTrunkPlacer extends TrunkPlacer { } if (randomSource.nextFloat() < 0.6f && i > 1) { currentPos = currentPos.offset(randomSource.nextInt(3) - 1, 0, randomSource.nextInt(3) - 1); + this.placeLog(worldGenLevel, biConsumer, randomSource, currentPos.below(), treeConfiguration); } 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)); + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*2,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)); + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*2,1)), false)); } } @@ -112,6 +113,7 @@ public class ThinTwistyBranchingTrunkPlacer extends TrunkPlacer { int stepZ = random.nextFloat() < 0.7f ? dirZ : 0; int stepY = random.nextFloat() < 0.4f ? 1 : 0; bPos = bPos.offset(stepX, stepY, stepZ); + if(stepY == 1) this.placeLog(level, blockSetter, random, bPos.below(), config); this.placeLog(level, blockSetter, random, bPos, config); if (random.nextDouble() < 0.25) { leafNodes.add(new FoliagePlacer.FoliageAttachment(bPos, random.nextInt(2), false)); 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 c183c79..1a8e065 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 @@ -75,13 +75,13 @@ public class TwistyBranchingTrunkPlacer extends TrunkPlacer { 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)); + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*4,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)); + leafNodes.add(new FoliagePlacer.FoliageAttachment(branchEnd, randomSource.nextInt(2) + (Math.max((int)(i/(double)(mainHeight/1.25))*4,1)), false)); } } @@ -126,6 +126,7 @@ public class TwistyBranchingTrunkPlacer extends TrunkPlacer { int stepY = random.nextFloat() < 0.4f ? 1 : 0; bPos = bPos.offset(stepX, stepY, stepZ); this.placeLog(level, blockSetter, random, bPos, config); + if(stepY == 1) this.placeLog(level, blockSetter, random, bPos.below(), config); if (random.nextDouble() < 0.25) { leafNodes.add(new FoliagePlacer.FoliageAttachment(bPos, random.nextInt(2), false)); } diff --git a/src/main/java/net/halbear/aotg/registries/ModBiomeModifiers.java b/src/main/java/net/halbear/aotg/registries/ModBiomeModifiers.java index b3b35b1..9302bfe 100644 --- a/src/main/java/net/halbear/aotg/registries/ModBiomeModifiers.java +++ b/src/main/java/net/halbear/aotg/registries/ModBiomeModifiers.java @@ -20,10 +20,14 @@ import static net.halbear.aotg.registries.ModPlacedFeatures.*; public class ModBiomeModifiers { public static final ResourceKey ADD_TWISTY_TREE = ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_twisty_tree")); + public static final ResourceKey ADD_SHORT_TWISTY_TREE = + ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_short_twisty_tree")); public static final ResourceKey ADD_TWISTY_BUSH_TREE = ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_twisty_bush_tree")); public static final ResourceKey ADD_TALL_THIN_TWISTY_TREE = ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_tall_thin_twisty_tree")); + public static final ResourceKey ADD_SHORT_THIN_TWISTY_TREE = + ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_short_thin_twisty_tree")); public static final ResourceKey GRANITE_BOULDER_BIOME_MODIFIER = ResourceKey.create( NeoForgeRegistries.Keys.BIOME_MODIFIERS, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "add_granite_boulder")); public static final ResourceKey GRAVEL_BOULDER_BIOME_MODIFIER = ResourceKey.create( @@ -42,7 +46,7 @@ public class ModBiomeModifiers { var targetBiomes = HolderSet.direct(biomes.getOrThrow(ModBiomes.MAQUIS_SHRUBLAND)); - context.register(ADD_TWISTY_TREE, new BiomeModifiers.AddFeaturesBiomeModifier( + context.register(ADD_SHORT_TWISTY_TREE, new BiomeModifiers.AddFeaturesBiomeModifier( targetBiomes, HolderSet.direct(placedTreeHolder), GenerationStep.Decoration.VEGETAL_DECORATION @@ -100,5 +104,21 @@ public class ModBiomeModifiers { HolderSet.direct(placedTreeHolder), GenerationStep.Decoration.VEGETAL_DECORATION )); + + placedTreeHolder = placedFeatures.getOrThrow(TWISTY_TREE_PLACED_KEY); + + context.register(ADD_TWISTY_TREE, new BiomeModifiers.AddFeaturesBiomeModifier( + targetBiomes, + HolderSet.direct(placedTreeHolder), + GenerationStep.Decoration.VEGETAL_DECORATION + )); + placedTreeHolder = placedFeatures.getOrThrow(SHORT_THIN_TWISTY_TREE_PLACED_KEY); + + context.register(ADD_SHORT_THIN_TWISTY_TREE, new BiomeModifiers.AddFeaturesBiomeModifier( + targetBiomes, + HolderSet.direct(placedTreeHolder), + GenerationStep.Decoration.VEGETAL_DECORATION + )); + } } diff --git a/src/main/java/net/halbear/aotg/registries/ModBlocks.java b/src/main/java/net/halbear/aotg/registries/ModBlocks.java index fad7fa6..cbf15bf 100644 --- a/src/main/java/net/halbear/aotg/registries/ModBlocks.java +++ b/src/main/java/net/halbear/aotg/registries/ModBlocks.java @@ -7,6 +7,8 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.RotatedPillarBlock; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.neoforged.neoforge.registries.DeferredBlock; @@ -26,17 +28,25 @@ public class ModBlocks { )); public static final DeferredBlock LIMESTONE_GRASS_BLOCK = RegisterBlock("limestone_grass_block", properties -> new RockCoveredGrassBlock(properties.strength(1.5f) - .requiresCorrectToolForDrops() .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) + public static final DeferredBlock OLIVE_LOG = RegisterBlock("olive_log", + properties -> new RotatedPillarBlock(properties.strength(0.5f) .requiresCorrectToolForDrops() - .explosionResistance(6.0f) + .explosionResistance(1.0f) + .sound(SoundType.WOOD) + .lightLevel(state -> 0) + )); + + + public static final DeferredBlock OLIVE_LEAVES = RegisterBlock("olive_leaves", + properties -> new RockCoveredGrassBlock(properties.strength(0.25f) + .requiresCorrectToolForDrops() + .explosionResistance(0.5f) .sound(SoundType.GRASS) .lightLevel(state -> 0) .noOcclusion() diff --git a/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java b/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java index 7395bd5..ceaf894 100644 --- a/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java +++ b/src/main/java/net/halbear/aotg/registries/ModConfiguredFeatures.java @@ -16,6 +16,7 @@ import net.minecraft.world.level.levelgen.feature.configurations.BlockBlobConfig 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.stateproviders.BlockStateProvider; +import net.neoforged.fml.common.Mod; public class ModConfiguredFeatures { public static final ResourceKey> TWISTY_TREE_KEY = @@ -26,6 +27,8 @@ public class ModConfiguredFeatures { ResourceKey.create(Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "garrigue_short_twisty_tree")); public static final ResourceKey> TALL_THIN_TWISTY_TREE = ResourceKey.create(Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "tall_thin_twisty_tree")); + public static final ResourceKey> SHORT_THIN_TWISTY_TREE = + ResourceKey.create(Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "short_thin_twisty_tree")); public static final ResourceKey> GRANITE_BOULDER = ResourceKey.create( Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "granite_boulder")); public static final ResourceKey> SHALE_BOULDER = ResourceKey.create( @@ -36,12 +39,22 @@ public class ModConfiguredFeatures { Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "limestone_boulder")); public static void bootstrap(BootstrapContext> context) { + context.register(SHORT_THIN_TWISTY_TREE, new ConfiguredFeature<>( + Feature.TREE, + new TreeConfiguration.TreeConfigurationBuilder( + BlockStateProvider.simple(ModBlocks.OLIVE_LOG.get().defaultBlockState()), + new ThinShortTwistyBranchingTrunkPlacer(5, 4, 5), + BlockStateProvider.simple(ModBlocks.OLIVE_LEAVES.get().defaultBlockState()), + new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), + new TwoLayersFeatureSize(3, 1, 3) + ).build() + )); context.register(TALL_THIN_TWISTY_TREE, new ConfiguredFeature<>( Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( - BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), + BlockStateProvider.simple(ModBlocks.OLIVE_LOG.get().defaultBlockState()), new ThinTwistyBranchingTrunkPlacer(12, 10, 10), - BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), + BlockStateProvider.simple(ModBlocks.OLIVE_LEAVES.get().defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), new TwoLayersFeatureSize(3, 1, 3) ).build() @@ -50,7 +63,7 @@ public class ModConfiguredFeatures { Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), - new ThinTwistyBranchingTrunkPlacer(10, 10, 10), + new TwistyBranchingTrunkPlacer(15, 15, 15), BlockStateProvider.simple(Blocks.OAK_LEAVES.defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), new TwoLayersFeatureSize(5, 3, 5) @@ -59,7 +72,7 @@ public class ModConfiguredFeatures { context.register(GARRIGUE_TWISTY_TREE, new ConfiguredFeature<>( Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( - BlockStateProvider.simple(Blocks.OAK_LOG.defaultBlockState()), + BlockStateProvider.simple(ModBlocks.OLIVE_LOG.get().defaultBlockState()), new BushTwistyBranchingTrunkPlacer(2, 3, 3), BlockStateProvider.simple(ModBlocks.OLIVE_LEAVES.get().defaultBlockState()), new LeafBunchFoliagePlacer(ConstantInt.of(1),ConstantInt.of(0)), diff --git a/src/main/java/net/halbear/aotg/registries/ModItems.java b/src/main/java/net/halbear/aotg/registries/ModItems.java index b2988eb..4949fe1 100644 --- a/src/main/java/net/halbear/aotg/registries/ModItems.java +++ b/src/main/java/net/halbear/aotg/registries/ModItems.java @@ -1,10 +1,17 @@ package net.halbear.aotg.registries; import net.halbear.aotg.AgeoftheGods; +import net.minecraft.tags.BlockTags; import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.neoforged.neoforge.registries.DeferredBlock; import net.neoforged.neoforge.registries.DeferredItem; import net.neoforged.neoforge.registries.DeferredRegister; +import java.util.function.Function; + import static net.halbear.aotg.registries.ModBlocks.*; public class ModItems { @@ -14,5 +21,21 @@ public class ModItems { 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); + public static final DeferredItem OLIVE_LOG_ITEM = ITEMS.registerSimpleBlockItem("olive_log", OLIVE_LOG); + public static final DeferredItem XIPHOS_SWORD = RegisterItem("xiphos", + properties -> new Item(properties + .tool(ModTiers.SWORD_TIER, + BlockTags.SWORD_EFFICIENT, + 3.0f, + -2.4f, + 1.0f + ).durability(1900) + ) + ); + + private static DeferredItem RegisterItem(String Name, Function function){ + DeferredItem newBlock = ITEMS.registerItem(Name, function); + return newBlock; + } } diff --git a/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java b/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java index 9fdd389..1217292 100644 --- a/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java +++ b/src/main/java/net/halbear/aotg/registries/ModPlacedFeatures.java @@ -27,6 +27,8 @@ public class ModPlacedFeatures { ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "short_garrigue_twisty_tree_placed")); public static final ResourceKey TALL_THIN_TWISTY_TREE_PLACED_KEY = ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "tall_thin_twisty_tree_placed")); + public static final ResourceKey SHORT_THIN_TWISTY_TREE_PLACED_KEY = + ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "short_thin_twisty_tree_placed")); public static final ResourceKey GRANITE_BOULDER_PLACED = ResourceKey.create( Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(AgeoftheGods.MODID, "granite_boulder_placed")); @@ -46,7 +48,7 @@ public class ModPlacedFeatures { configuredTreeHolder, List.of( CountPlacement.of(15), - RarityFilter.onAverageOnceEvery(10), + RarityFilter.onAverageOnceEvery(6), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_OCEAN_FLOOR, BlockPredicateFilter.forPredicate( @@ -62,11 +64,33 @@ public class ModPlacedFeatures { BiomeFilter.biome() ) )); + configuredTreeHolder = configuredFeatures.getOrThrow(SHORT_THIN_TWISTY_TREE); + + context.register(SHORT_THIN_TWISTY_TREE_PLACED_KEY, new PlacedFeature( + configuredTreeHolder, + List.of( + CountPlacement.of(15), + RarityFilter.onAverageOnceEvery(6), + InSquarePlacement.spread(), + PlacementUtils.HEIGHTMAP_OCEAN_FLOOR, + BlockPredicateFilter.forPredicate( + BlockPredicate.matchesBlocks( + new BlockPos(0, -1, 0), + ModBlocks.SHALE_GRASS_BLOCK.get(), + Blocks.SANDSTONE, + ModBlocks.SHALE_BLOCK.get(), + ModBlocks.LIMESTONE_GRASS_BLOCK.get() + ) + ), + SurfaceWaterDepthFilter.forMaxDepth(2), + BiomeFilter.biome() + ) + )); configuredTreeHolder = configuredFeatures.getOrThrow(ModConfiguredFeatures.TWISTY_TREE_KEY); context.register(TWISTY_TREE_PLACED_KEY, new PlacedFeature( configuredTreeHolder, List.of( - NoiseThresholdCountPlacement.of(-0.2D, 3, 10), + CountPlacement.of(7), RarityFilter.onAverageOnceEvery(10), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_OCEAN_FLOOR, diff --git a/src/main/java/net/halbear/aotg/registries/ModTags.java b/src/main/java/net/halbear/aotg/registries/ModTags.java new file mode 100644 index 0000000..28eae80 --- /dev/null +++ b/src/main/java/net/halbear/aotg/registries/ModTags.java @@ -0,0 +1,16 @@ +package net.halbear.aotg.registries; + +import net.minecraft.resources.Identifier; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; + +public class ModTags { + public static class Items{ + public static final TagKey SWORD_REPAIR_MATERIAL = create("xiphon_repair_material"); + + private static TagKey create(String name) { + return ItemTags.create(Identifier.fromNamespaceAndPath("ageofthegods", name)); + } + } +} diff --git a/src/main/java/net/halbear/aotg/registries/ModTiers.java b/src/main/java/net/halbear/aotg/registries/ModTiers.java new file mode 100644 index 0000000..16eca88 --- /dev/null +++ b/src/main/java/net/halbear/aotg/registries/ModTiers.java @@ -0,0 +1,16 @@ +package net.halbear.aotg.registries; + +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.ToolMaterial; + +public class ModTiers { + public static final ToolMaterial SWORD_TIER = new ToolMaterial( + BlockTags.INCORRECT_FOR_DIAMOND_TOOL, // Block tag restriction + 1500, // Durability (Max damage) + 8.0f, // Mining speed (unused by swords, used if a tool) + 3.0f, // Base attack damage bonus + 15, // Enchantment value + ModTags.Items.SWORD_REPAIR_MATERIAL + ); +} diff --git a/src/main/java/net/halbear/aotg/utility/DataGenerators/AOTGModelProvider.java b/src/main/java/net/halbear/aotg/utility/DataGenerators/AOTGModelProvider.java index 8401359..3e29573 100644 --- a/src/main/java/net/halbear/aotg/utility/DataGenerators/AOTGModelProvider.java +++ b/src/main/java/net/halbear/aotg/utility/DataGenerators/AOTGModelProvider.java @@ -24,9 +24,11 @@ public class AOTGModelProvider extends ModelProvider { @Override protected void registerModels(BlockModelGenerators BlockModels, ItemModelGenerators itemModels){ - // BlockModels.createTrivialCube(ModBlocks.LIMESTONE_BLOCK.get()); - // BlockModels.createTrivialCube(ModBlocks.LIMESTONE_GRASS_BLOCK.get()); - // BlockModels.createTrivialCube(ModBlocks.SHALE_BLOCK.get()); - // BlockModels.createTrivialCube(ModBlocks.SHALE_GRASS_BLOCK.get()); + // BlockModels.createTrivialCube(ModBlocks.LIMESTONE_BLOCK.get()); + // BlockModels.createTrivialCube(ModBlocks.LIMESTONE_GRASS_BLOCK.get()); + // BlockModels.createTrivialCube(ModBlocks.SHALE_BLOCK.get()); + // BlockModels.createTrivialCube(ModBlocks.OLIVE_LEAVES.get()); + // BlockModels.createTrivialCube(ModBlocks.SHALE_GRASS_BLOCK.get()); + } } diff --git a/src/main/java/net/halbear/aotg/utility/DataGenerators/AgeOfTheGodsDataGeneration.java b/src/main/java/net/halbear/aotg/utility/DataGenerators/AgeOfTheGodsDataGeneration.java index 3ce9638..0d30cea 100644 --- a/src/main/java/net/halbear/aotg/utility/DataGenerators/AgeOfTheGodsDataGeneration.java +++ b/src/main/java/net/halbear/aotg/utility/DataGenerators/AgeOfTheGodsDataGeneration.java @@ -79,7 +79,10 @@ public class AgeOfTheGodsDataGeneration { } @SubscribeEvent - public static void GatherClientData(GatherDataEvent.Server event){ + public static void GatherClientData(GatherDataEvent.Client event){ + DataGenerator generator = event.getGenerator(); + PackOutput output = generator.getPackOutput(); + // generator.addProvider(true, new AOTGModelProvider(output)); } } diff --git a/src/main/java/net/halbear/aotg/utility/ModEventHandler.java b/src/main/java/net/halbear/aotg/utility/ModEventHandler.java index a5f9a5d..64657ce 100644 --- a/src/main/java/net/halbear/aotg/utility/ModEventHandler.java +++ b/src/main/java/net/halbear/aotg/utility/ModEventHandler.java @@ -74,11 +74,28 @@ public class ModEventHandler { ); } + public static void BlockFoliageTint(RegisterColorHandlersEvent.BlockTintSources event, Block block) { + event.register( + List.of(new BlockTintSource() { + @Override + public int color(BlockState state) { + return 0xFFFFFFFF; + } + + @Override + public int colorInWorld(BlockState state, BlockAndTintGetter level, BlockPos pos) { + return BiomeColors.getAverageFoliageColor(level, pos); + } + }), + block + ); + } + @SubscribeEvent 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()); + BlockFoliageTint(event, ModBlocks.OLIVE_LEAVES.get()); } @SubscribeEvent @@ -94,7 +111,7 @@ public class ModEventHandler { private static class CustomItemGrassTint implements ItemTintSource { @Override public int calculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) { - return GrassColor.get(0.5D, 1.0D); // Classic vanilla inventory grass green + return GrassColor.get(0.5D, 1.0D); } @Override 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..ccd62da --- /dev/null +++ b/src/main/resources/assets/ageofthegods/Items/limestone_block.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/limestone/limestone1" + } +} \ 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..d82065c --- /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/limestone_grass" + } +} \ 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..35638d1 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/Items/olive_leaves.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "ageofthegods:block/olive/olive_leaves" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/items/limestone_block.json b/src/main/resources/assets/ageofthegods/Items/olive_log.json similarity index 50% rename from src/main/resources/assets/ageofthegods/items/limestone_block.json rename to src/main/resources/assets/ageofthegods/Items/olive_log.json index 8acfd78..60813a2 100644 --- a/src/main/resources/assets/ageofthegods/items/limestone_block.json +++ b/src/main/resources/assets/ageofthegods/Items/olive_log.json @@ -1,6 +1,6 @@ { "model": { "type": "minecraft:model", - "model": "ageofthegods:block/limestone_block" + "model": "ageofthegods:block/olive/olive_log1" } } \ 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 similarity index 52% rename from src/main/resources/assets/ageofthegods/items/shale_block.json rename to src/main/resources/assets/ageofthegods/Items/shale_block.json index 1e52824..5bc3c76 100644 --- a/src/main/resources/assets/ageofthegods/items/shale_block.json +++ b/src/main/resources/assets/ageofthegods/Items/shale_block.json @@ -1,6 +1,6 @@ { "model": { "type": "minecraft:model", - "model": "ageofthegods:block/shale_block" + "model": "ageofthegods:block/shale/shale1" } } \ 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..44fcb3a --- /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/shale_grass" + } +} \ 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/xiphos.json similarity index 52% rename from src/main/resources/assets/ageofthegods/items/olive_leaves.json rename to src/main/resources/assets/ageofthegods/Items/xiphos.json index 095846e..8776ce3 100644 --- a/src/main/resources/assets/ageofthegods/items/olive_leaves.json +++ b/src/main/resources/assets/ageofthegods/Items/xiphos.json @@ -1,6 +1,6 @@ { "model": { "type": "minecraft:model", - "model": "ageofthegods:block/olive_leaves" + "model": "ageofthegods:item/xiphos/xiphos" } } \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/blockstates/olive_log.json b/src/main/resources/assets/ageofthegods/blockstates/olive_log.json new file mode 100644 index 0000000..61546c5 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/blockstates/olive_log.json @@ -0,0 +1,45 @@ +{ + "variants": { + "axis=y": [ + { + "model": "ageofthegods:block/olive/olive_log1", "weight": 13 + },{ + "model": "ageofthegods:block/olive/olive_log2", "weight":13 + }, + { + "model": "ageofthegods:block/olive/olive_log3", "weight": 1 + } + ], + "axis=z": [ + { + "model": "ageofthegods:block/olive/olive_log1_horizontal", "weight": 13, + "x": 90 + }, + { + "model": "ageofthegods:block/olive/olive_log2_horizontal", "weight": 13, + "x": 90 + }, + { + "model": "ageofthegods:block/olive/olive_log3_horizontal", "weight": 1, + "x": 90 + } + ], + "axis=x": [ + { + "model": "ageofthegods:block/olive/olive_log1_horizontal", "weight": 13, + "x": 90, + "y": 90 + }, + { + "model": "ageofthegods:block/olive/olive_log2_horizontal", "weight": 13, + "x": 90, + "y": 90 + }, + { + "model": "ageofthegods:block/olive/olive_log3_horizontal", "weight": 1, + "x": 90, + "y": 90 + } + ] + } +} diff --git a/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json b/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json deleted file mode 100644 index 9a2c0e1..0000000 --- a/src/main/resources/assets/ageofthegods/items/limestone_grass_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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/shale_grass_block.json b/src/main/resources/assets/ageofthegods/items/shale_grass_block.json deleted file mode 100644 index 8601a61..0000000 --- a/src/main/resources/assets/ageofthegods/items/shale_grass_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "model": { - "type": "minecraft:model", - "model": "ageofthegods:block/shale_grass_block" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/lang/en_us.json b/src/main/resources/assets/ageofthegods/lang/en_us.json index eba1fb5..1790f7b 100644 --- a/src/main/resources/assets/ageofthegods/lang/en_us.json +++ b/src/main/resources/assets/ageofthegods/lang/en_us.json @@ -1,7 +1,5 @@ { - "itemGroup.ageofthegods": "Example Mod Tab", - "block.ageofthegods.example_block": "Example Block", - "item.ageofthegods.example_item": "Example Item", + "itemGroup.ageofthegods": "Age of the Gods", "ageofthegods.configuration.title": "Age of the Gods Configs", "ageofthegods.configuration.section.ageofthegods.common.toml": "Age of the Gods Configs", 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 index 3123f5f..fd48673 100644 --- a/src/main/resources/assets/ageofthegods/models/block/olive/olive_leaves.json +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_leaves.json @@ -2,8 +2,8 @@ "parent": "minecraft:block/block", "textures": { "particle": "ageofthegods:block/olive/oliveleavesside", - "bottom": "ageofthegods:block/olive/oliveleavestopgreyscale", - "top": "ageofthegods:block/olive/oliveleavestopgreyscale", + "bottom": "ageofthegods:block/olive/oliveleavessideoverlay", + "top": "ageofthegods:block/olive/oliveleavessideoverlay", "side": "ageofthegods:block/olive/oliveleavessideoverlay", "overlay": "ageofthegods:block/olive/oliveleavessideoverlay" }, diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1.json new file mode 100644 index 0000000..3d73e23 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1_horizontal.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1_horizontal.json new file mode 100644 index 0000000..ec92c89 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log1_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2.json new file mode 100644 index 0000000..c36fe16 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2_horizontal.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2_horizontal.json new file mode 100644 index 0000000..b5060c5 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log2_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3.json new file mode 100644 index 0000000..29b0695 --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3_horizontal.json b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3_horizontal.json new file mode 100644 index 0000000..fbb013a --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/block/olive/olive_log3_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "ageofthegods:block/olive/olive_log_top", + "side": "ageofthegods:block/olive/olive_log_side3" + } +} \ 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 deleted file mode 100644 index c18e1d4..0000000 --- a/src/main/resources/assets/ageofthegods/models/item/limestone_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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 deleted file mode 100644 index 9ee5ea8..0000000 --- a/src/main/resources/assets/ageofthegods/models/item/limestone_grass_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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 deleted file mode 100644 index f3c3923..0000000 --- a/src/main/resources/assets/ageofthegods/models/item/olive_leaves.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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 deleted file mode 100644 index 49328ce..0000000 --- a/src/main/resources/assets/ageofthegods/models/item/shale_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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 deleted file mode 100644 index 5c8af13..0000000 --- a/src/main/resources/assets/ageofthegods/models/item/shale_grass_block.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/models/item/xiphos/xiphos.json b/src/main/resources/assets/ageofthegods/models/item/xiphos/xiphos.json new file mode 100644 index 0000000..f9675ed --- /dev/null +++ b/src/main/resources/assets/ageofthegods/models/item/xiphos/xiphos.json @@ -0,0 +1,143 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "0": "ageofthegods:xiphos/xiphos", + "particle": "ageofthegods:xiphos/xiphos" + }, + "elements": [ + { + "from": [6.25, -3.25, 6.75], + "to": [9.75, 0.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, -2, 7]}, + "faces": { + "north": {"uv": [12.008, 8.008, 13.492, 9.492], "texture": "#0"}, + "east": {"uv": [12.008, 11.008, 12.992, 12.492], "texture": "#0"}, + "south": {"uv": [12.008, 9.508, 13.492, 10.992], "texture": "#0"}, + "west": {"uv": [0.008, 12.508, 0.992, 13.992], "texture": "#0"}, + "up": {"uv": [2.492, 13.492, 1.008, 12.508], "texture": "#0"}, + "down": {"uv": [3.992, 12.508, 2.508, 13.492], "texture": "#0"} + } + }, + { + "from": [7, 0, 7], + "to": [9, 5, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 7]}, + "faces": { + "north": {"uv": [9.992, 8.008, 9.008, 10.492], "texture": "#0"}, + "east": {"uv": [8.992, 10.508, 8.008, 12.992], "texture": "#0"}, + "south": {"uv": [7.992, 10.508, 7.008, 12.992], "texture": "#0"}, + "west": {"uv": [10.992, 8.008, 10.008, 10.492], "texture": "#0"}, + "up": {"uv": [6.008, 13.492, 6.992, 12.508], "texture": "#0"}, + "down": {"uv": [12.008, 12.508, 12.992, 13.492], "texture": "#0"} + } + }, + { + "from": [6.85, -0.15, 6.85], + "to": [9.15, 5.15, 9.15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 7]}, + "faces": { + "north": {"uv": [9.008, 10.508, 9.992, 12.992], "texture": "#0"}, + "east": {"uv": [10.008, 10.508, 10.992, 12.992], "texture": "#0"}, + "south": {"uv": [11.008, 8.008, 11.992, 10.492], "texture": "#0"}, + "west": {"uv": [11.008, 10.508, 11.992, 12.992], "texture": "#0"}, + "up": {"uv": [13.992, 2.992, 13.008, 2.008], "texture": "#0"}, + "down": {"uv": [13.992, 3.008, 13.008, 3.992], "texture": "#0"} + } + }, + { + "from": [7.5, 7, 7.75], + "to": [8.5, 28, 8.25], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 7, 6.5]}, + "faces": { + "north": {"uv": [7.008, 0.008, 7.492, 10.492], "texture": "#0"}, + "east": {"uv": [7.508, 0.008, 7.992, 10.492], "texture": "#0"}, + "south": {"uv": [8.008, 0.008, 8.492, 10.492], "texture": "#0"}, + "west": {"uv": [8.508, 0.008, 8.992, 10.492], "texture": "#0"}, + "up": {"uv": [13.492, 4.492, 13.008, 4.008], "texture": "#0"}, + "down": {"uv": [13.492, 4.508, 13.008, 4.992], "texture": "#0"} + } + }, + { + "from": [4.5, 7, 8], + "to": [11.5, 32, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 7, 7]}, + "faces": { + "north": {"uv": [0.008, 0.008, 3.492, 12.492], "texture": "#0"}, + "east": {"uv": [-1.05, 0.008, -1.55, 12.492], "texture": "#0"}, + "south": {"uv": [3.508, 0.008, 6.992, 12.492], "texture": "#0"}, + "west": {"uv": [-1.05, 0.008, -1.55, 12.492], "texture": "#0"}, + "up": {"uv": [3.492, -1.05, 0.008, -1.55], "texture": "#0"}, + "down": {"uv": [3.492, -1.05, 0.008, -1.55], "texture": "#0"} + } + }, + { + "from": [4, 5, 7], + "to": [12, 7, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]}, + "faces": { + "north": {"uv": [9.008, 4.008, 12.992, 4.992], "texture": "#0"}, + "east": {"uv": [13.008, 0.008, 13.992, 0.992], "texture": "#0"}, + "south": {"uv": [9.008, 5.008, 12.992, 5.992], "texture": "#0"}, + "west": {"uv": [13.008, 1.008, 13.992, 1.992], "texture": "#0"}, + "up": {"uv": [12.992, 6.992, 9.008, 6.008], "texture": "#0"}, + "down": {"uv": [12.992, 7.008, 9.008, 7.992], "texture": "#0"} + } + }, + { + "from": [3.75, 4.75, 6.75], + "to": [12.25, 7.25, 9.25], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]}, + "faces": { + "north": {"uv": [9.008, 0.008, 12.992, 0.992], "texture": "#0"}, + "east": {"uv": [4.008, 12.508, 4.992, 13.492], "texture": "#0"}, + "south": {"uv": [9.008, 1.008, 12.992, 1.992], "texture": "#0"}, + "west": {"uv": [5.008, 12.508, 5.992, 13.492], "texture": "#0"}, + "up": {"uv": [12.992, 2.992, 9.008, 2.008], "texture": "#0"}, + "down": {"uv": [12.992, 3.008, 9.008, 3.992], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [0, 90, 0], + "translation": [0, 3.5, 1.75] + }, + "thirdperson_lefthand": { + "rotation": [0, 90, 0], + "translation": [0, 3.5, 1.75] + }, + "firstperson_righthand": { + "rotation": [0, 90, -2], + "translation": [0, 4.5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_lefthand": { + "rotation": [0, 90, -2], + "translation": [0, 4.5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "ground": { + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [0, 0, -45], + "translation": [-2.5, -2.5, 0], + "scale": [0.6, 0.6, 0.6] + }, + "head": { + "rotation": [-90, 0, 0], + "translation": [0, 7, 0] + }, + "fixed": { + "rotation": [0, 0, 45], + "translation": [2.75, -2.75, 0], + "scale": [0.7, 0.7, 0.7] + }, + "on_shelf": { + "rotation": [0, 0, -180], + "scale": [0.85, 0.85, 0.85] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side1.png b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side1.png new file mode 100644 index 0000000..784f801 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side1.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side2.png b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side2.png new file mode 100644 index 0000000..458ac04 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side2.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side3.png b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side3.png new file mode 100644 index 0000000..f2abf73 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_side3.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_top.png b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_top.png new file mode 100644 index 0000000..21b0af8 Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/block/olive/olive_log_top.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 index 608929f..ae61d75 100644 Binary files a/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessideoverlay.png and b/src/main/resources/assets/ageofthegods/textures/block/olive/oliveleavessideoverlay.png differ diff --git a/src/main/resources/assets/ageofthegods/textures/item/xiphos.png b/src/main/resources/assets/ageofthegods/textures/item/xiphos.png new file mode 100644 index 0000000..b23026b Binary files /dev/null and b/src/main/resources/assets/ageofthegods/textures/item/xiphos.png differ diff --git a/src/main/resources/data/ageofthegods/tags/item/xiphon_repair_material.json b/src/main/resources/data/ageofthegods/tags/item/xiphon_repair_material.json new file mode 100644 index 0000000..c656021 --- /dev/null +++ b/src/main/resources/data/ageofthegods/tags/item/xiphon_repair_material.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:iron_ingot" + ] +} \ No newline at end of file