Skip to content

Commit

Permalink
sus gravel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Uraneptus committed Jul 9, 2024
1 parent 7588dc0 commit 9efafb2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ dependencies {
//runtimeOnly fg.deobf("curse.maven:configured-457570:4011355")
runtimeOnly fg.deobf("curse.maven:config-menus-forge-544048:4672356")
runtimeOnly fg.deobf("curse.maven:neat-238372:4580940")
runtimeOnly fg.deobf("curse.maven:advanced-xray-256256:4840340")

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{
"feature": "sullysmod:artifact_gravel",
"placement": [
{
"type": "minecraft:count",
"count": 30
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:trapezoid",
"type": "minecraft:uniform",
"max_inclusive": {
"absolute": 62
"absolute": 50
},
"min_inclusive": {
"above_bottom": 0
Expand All @@ -23,10 +27,6 @@
"blocks": "minecraft:gravel"
}
},
{
"type": "minecraft:count",
"count": 40
},
{
"type": "minecraft:biome"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public boolean place(FeaturePlaceContext<SimpleBlockConfiguration> context) {
context.level().getBlockEntity(blockpos, BlockEntityType.BRUSHABLE_BLOCK).ifPresent(brushableBlockEntity -> {
brushableBlockEntity.setLootTable(SMBuiltInLootTables.GRAVEL_PETRIFIED_SAPLING_TREE, blockpos.asLong());
});
worldgenlevel.setBlock(blockpos, blockstate, 2);
}
return true;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.uraneptus.sullysmod.core.registry.SMBlocks;
import net.minecraft.core.Direction;
import net.minecraft.core.Holder;
import net.minecraft.core.Vec3i;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import net.minecraft.data.worldgen.placement.PlacementUtils;
Expand All @@ -30,8 +31,9 @@ public static void create(BootstapContext<PlacedFeature> context) {
));
register(context, SMFeatureDefinitions.PLACED_ARTIFACT_GRAVEL, addFeaturePlacement(context, SMFeatureDefinitions.CONFIGURED_ARTIFACT_GRAVEL,
InSquarePlacement.spread(),
HeightRangePlacement.triangle(VerticalAnchor.bottom(), VerticalAnchor.absolute(62)),
HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.absolute(62)),
BlockPredicateFilter.forPredicate(BlockPredicate.matchesBlocks(Blocks.GRAVEL)),
BlockPredicateFilter.forPredicate(BlockPredicate.matchesBlocks(new Vec3i(0, 1, 0), Blocks.AIR)),
CountPlacement.of(40),
BiomeFilter.biome()
));
Expand Down

0 comments on commit 9efafb2

Please sign in to comment.