Skip to content

Commit

Permalink
fix for columns giving an error in world gen because they are bigger …
Browse files Browse the repository at this point in the history
…then 48x48
  • Loading branch information
gemsb committed Jan 13, 2025
1 parent 2d6fd3c commit fcca094
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public boolean generate(FeatureContext<DefaultFeatureConfig> context) {

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
if (Math.round(distance) <= (holeRadius-1)*(holeRadius-1) && context.getWorld().getBlockState(blockPos2).isOf(ModBlocks.FLUMROCK)) {//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
Expand Down

0 comments on commit fcca094

Please sign in to comment.