Skip to content

Commit

Permalink
dried valtrox changes + infected columns changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gemsb committed Jan 12, 2025
1 parent 241ef0c commit 8a80922
Show file tree
Hide file tree
Showing 21 changed files with 837 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public boolean generate(FeatureContext<DefaultFeatureConfig> context) {
if (!context.getWorld().getBlockState(blockPos.down()).isOf(ModBlocks.AURIC_SPORE_BLOCK)) return false;

//config
int topOffsetRange = 0; //xz coordinaterange
int topOffsetRange = random.nextInt(10); //xz coordinaterange
int maxHeight = random.nextInt(50) + 70; //height of spike

int xTopOffset = random.nextBetween(-topOffsetRange, topOffsetRange);//x pos of top
Expand All @@ -60,8 +60,8 @@ public boolean generate(FeatureContext<DefaultFeatureConfig> context) {
if (!context.getWorld().getBlockState(new BlockPos((int)Math.round(x + relativeVector.x) ,(int)Math.round(y + relativeVector.y), (int)Math.round(z + relativeVector.z))).isOf(Blocks.AIR)) return false;

int spawnCrux = random.nextInt(100);

while (length>0){
int j = 0;
while (length - j>0){
int radius = radiusSetting;

//non rounded tracking of coordinates
Expand All @@ -81,7 +81,32 @@ public boolean generate(FeatureContext<DefaultFeatureConfig> context) {
this.setBlockState(structureWorldAccess, blockPos1, ModBlocks.FLUMROCK.getDefaultState());
}
});
length--;
if (j > 40){
if (random.nextInt(10) == 0){
int angleTopOffset = random.nextBetween(0, 360);
int holeX = (int)Math.round(Math.cos(Math.toRadians(angleTopOffset))*radius);
int holeZ = (int)Math.round(Math.sin(Math.toRadians(angleTopOffset))*radius);

int holeRadius = random.nextInt((int)(radius/4))+2;

int finalX2 = (int)Math.round(x+holeX);
int finalY2 = (int)Math.round(y-5);
int finalZ2 = (int)Math.round(z+holeZ);

Iterable<BlockPos> blockPosIterable2 = BlockPos.iterateOutwards(new BlockPos( (int)Math.round(finalX2), (int)Math.round(finalY2), (int)Math.round(finalZ2)), (holeRadius*2) + 2, holeRadius+1, (holeRadius*2) + 2);

blockPosIterable2.forEach(blockPos2 -> {
int distance = (int) (((blockPos2.getX() - finalX2)/2)*((blockPos2.getX() - finalX2)/2) + ((blockPos2.getY() - finalY2)/1)*((blockPos2.getY() - finalY2)/1) + ((blockPos2.getZ() - finalZ2)/2)*((blockPos2.getZ() - finalZ2)/2));
if (Math.round(distance) <= (holeRadius-1)*(holeRadius-1)) {//ball instead of rectangle
this.setBlockState(structureWorldAccess, blockPos2, Blocks.AIR.getDefaultState());
}
else if (Math.round(distance) <= holeRadius*holeRadius && context.getWorld().getBlockState(blockPos2).isOf(ModBlocks.FLUMROCK) && random.nextInt(5) != 0) {//ball instead of rectangle
this.setBlockState(structureWorldAccess, blockPos2, ModBlocks.LARGUTH.getDefaultState());
}
});
}
}
j++;

}
for(x = 0; x < totalLength/20; x++){
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"sculk_depths:crumbling_dirt"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,22 @@
[],
[],
[],
[],
[
"sculk_depths:dried_valtrox"

],
[
"sculk_depths:dried_valtrox_forest/coarse_dirt_patch",
"sculk_depths:dried_valtrox_forest/grass",
"sculk_depths:dried_valtrox_forest/berry_bush",
"sculk_depths:dried_valtrox_forest/dead_bush",
"sculk_depths:dried_valtrox_forest/stone",
"sculk_depths:dried_valtrox_forest/boulder",
"sculk_depths:dried_valtrox_forest/large_boulder",
"sculk_depths:dried_valtrox_forest/stone_pile",
"sculk_depths:dried_valtrox_forest/dried_valtrox",
"sculk_depths:dried_valtrox_forest/small_dried_valtrox",
"sculk_depths:dried_valtrox_forest/fallen_dried_valtrox",
"sculk_depths:dried_valtrox_forest/mud_patch"
]
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
]
},
"features": [
["sculk_depths:pillars",
"sculk_depths:infested_spikes"
["sculk_depths:infected_columns/pillars",
"sculk_depths:infected_columns/infested_spikes"

],
["sculk_depths:auric_shroom",
"sculk_depths:auric_spore_sprouts"],
[],
["sculk_depths:infected_columns/auric_shroom",
"sculk_depths:infected_columns/auric_spore_sprouts"],
["sculk_depths:infected_columns/auric_spore_layer"],
[],
[]
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"feature": {
"type": "minecraft:random_patch",
"config": {
"feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:sweet_berry_bush"
}
}
}
},
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
}
}
]
},
"tries": 32,
"xz_spread": 7,
"y_spread": 3
}
},
"placement": [
{
"type": "minecraft:count",
"count": 3
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"feature": {
"type": "minecraft:ore",
"config": {
"targets": [
{
"target": {
"predicate_type": "minecraft:block_match",
"block": "air"
},
"state": {
"Name": "minecraft:tuff"
}
}
],
"size": 9,
"discard_chance_on_air_exposure": 0.07
}
},
"placement": [
{
"type": "minecraft:count",
"count": 1
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"feature": {
"config": {
"state_provider": {
"fallback": {
"type": "minecraft:weighted_state_provider",
"entries": [
{
"weight": 1,
"data": {
"Name": "minecraft:coarse_dirt"
}
},
{
"weight": 2,
"data": {
"Name": "sculk_depths:crumbling_dirt"
}
}
]
},
"rules": []
},
"radius": {
"type": "minecraft:uniform",
"min_inclusive": 4,
"max_inclusive": 6
},
"half_height": 1,
"target": {
"type": "minecraft:matching_blocks",
"blocks": [
"sculk_depths:crumbling_dirt"
]
}
},
"type": "minecraft:disk"
},
"placement": [
{
"type": "minecraft:count",
"count": 4
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"feature": {
"type": "minecraft:random_patch",
"config": {
"feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:simple_state_provider",
"state": {
"Name": "minecraft:dead_bush"
}
}
}
},
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
}
}
]
},
"tries": 16,
"xz_spread": 7,
"y_spread": 3
}
},
"placement": [
{
"type": "minecraft:count",
"count": 2
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
Loading

0 comments on commit 8a80922

Please sign in to comment.