From 8eea60ddee11f0d4967bc6f4ca89f5e3689ff007 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 8 Dec 2021 22:44:00 +0100 Subject: [PATCH] Tuff on the Eyes - Slightly reduced the amount of block types represented in one batch of ore layers --- .../foundation/worldgen/AllLayerPatterns.java | 37 +++++++++++-------- .../foundation/worldgen/LayerPattern.java | 6 ++- .../worldgen/LayeredOreFeature.java | 7 ---- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/AllLayerPatterns.java b/src/main/java/com/simibubi/create/foundation/worldgen/AllLayerPatterns.java index b97432db5..4908780fe 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/AllLayerPatterns.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/AllLayerPatterns.java @@ -15,10 +15,12 @@ public class AllLayerPatterns { .layer(l -> l.weight(2) .block(AllPaletteStoneTypes.CRIMSITE.getBaseBlock()) .size(1, 3)) - .layer(l -> l.weight(2) + .layer(l -> l.weight(1) .block(Blocks.TUFF) - .block(Blocks.GRANITE) - .size(1, 2)) + .block(Blocks.DEEPSLATE) + .size(2, 2)) + .layer(l -> l.weight(1) + .blocks(Blocks.DEEPSLATE, Blocks.TUFF)) .layer(l -> l.weight(1) .block(AllPaletteStoneTypes.LIMESTONE.getBaseBlock())) .build(); @@ -29,46 +31,47 @@ public class AllLayerPatterns { .layer(l -> l.weight(2) .block(AllPaletteStoneTypes.ASURINE.getBaseBlock()) .size(1, 3)) - .layer(l -> l.weight(2) + .layer(l -> l.weight(1) .block(Blocks.TUFF) - .block(Blocks.SMOOTH_BASALT) + .block(Blocks.DEEPSLATE) .size(1, 2)) .layer(l -> l.weight(1) - .block(Blocks.DIORITE) + .blocks(Blocks.DEEPSLATE, Blocks.TUFF)) + .layer(l -> l.weight(1) .block(Blocks.CALCITE)) .build(); public static NonNullSupplier OCHRESTONE = () -> LayerPattern.builder() .layer(l -> l.weight(1) - .block(Blocks.ANDESITE) .passiveBlock()) .layer(l -> l.weight(2) .block(AllPaletteStoneTypes.OCHRUM.getBaseBlock()) .size(1, 3)) .layer(l -> l.weight(2) .block(Blocks.TUFF) - .block(Blocks.SMOOTH_BASALT) + .block(Blocks.DEEPSLATE) .size(1, 2)) .layer(l -> l.weight(2) .block(Blocks.DRIPSTONE_BLOCK) - .block(Blocks.GRANITE) .size(1, 2)) .build(); public static NonNullSupplier MALACHITE = () -> LayerPattern.builder() - .layer(l -> l.weight(1) - .passiveBlock()) .layer(l -> l.weight(2) + .passiveBlock()) + .layer(l -> l.weight(4) .block(AllPaletteStoneTypes.VERIDIUM.getBaseBlock()) .size(1, 3)) .layer(l -> l.weight(2) .block(Blocks.TUFF) .block(Blocks.ANDESITE) .size(1, 2)) - .layer(l -> l.weight(1) + .layer(l -> l.weight(2) + .blocks(Blocks.TUFF, Blocks.ANDESITE)) + .layer(l -> l.weight(3) .block(Blocks.SMOOTH_BASALT)) .build(); - + public static NonNullSupplier SCORIA = () -> LayerPattern.builder() .layer(l -> l.weight(1) .passiveBlock()) @@ -79,6 +82,8 @@ public class AllLayerPatterns { .block(Blocks.TUFF) .block(Blocks.ANDESITE) .size(1, 2)) + .layer(l -> l.weight(1) + .blocks(Blocks.TUFF, Blocks.ANDESITE)) .layer(l -> l.weight(1) .block(Blocks.DIORITE)) .build(); @@ -88,9 +93,11 @@ public class AllLayerPatterns { .passiveBlock()) .layer(l -> l.weight(2) .block(Blocks.CALCITE)) + .layer(l -> l.weight(1) + .block(Blocks.DIORITE)) .layer(l -> l.weight(2) .block(AllPaletteStoneTypes.LIMESTONE.getBaseBlock()) - .size(1, 5)) + .size(1, 4)) .build(); public static NonNullSupplier SCORIA_NETHER = () -> LayerPattern.builder() @@ -107,7 +114,7 @@ public class AllLayerPatterns { .block(Blocks.BASALT) .block(Blocks.SMOOTH_BASALT)) .build(); - + public static NonNullSupplier SCORCHIA_NETHER = () -> LayerPattern.builder() .inNether() .layer(l -> l.weight(2) diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/LayerPattern.java b/src/main/java/com/simibubi/create/foundation/worldgen/LayerPattern.java index 5fa7ef7f8..56169577b 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/LayerPattern.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/LayerPattern.java @@ -105,7 +105,7 @@ public class LayerPattern { } public LayerBuilder passiveBlock() { - return block(Blocks.AIR); + return blocks(Blocks.STONE.defaultBlockState(), Blocks.DEEPSLATE.defaultBlockState()); } public LayerBuilder block(Block block) { @@ -116,6 +116,10 @@ public class LayerPattern { } return blocks(block.defaultBlockState(), block.defaultBlockState()); } + + public LayerBuilder blocks(Block block, Block deepblock) { + return blocks(block.defaultBlockState(), deepblock.defaultBlockState()); + } public LayerBuilder blocks(Couple> blocksByDepth) { return blocks(blocksByDepth.getFirst() diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/LayeredOreFeature.java b/src/main/java/com/simibubi/create/foundation/worldgen/LayeredOreFeature.java index 5fb46b8fd..e3799a12b 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/LayeredOreFeature.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/LayeredOreFeature.java @@ -1,7 +1,6 @@ package com.simibubi.create.foundation.worldgen; import java.util.ArrayList; -import java.util.BitSet; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -64,7 +63,6 @@ public class LayeredOreFeature extends OreFeatureBase { List resolvedLayers = new ArrayList<>(); List layerDiameterOffsets = new ArrayList<>(); - BitSet bitset = new BitSet(size * size * size); MutableBlockPos mutablePos = new MutableBlockPos(); BulkSectionAccess bulksectionaccess = new BulkSectionAccess(worldgenlevel); int layerCoordinate = random.nextInt(4); @@ -106,11 +104,6 @@ public class LayeredOreFeature extends OreFeatureBase { if (dx * dx + dy * dy + dz * dz > 1 * layerDiameterOffsets.get(layerIndex)) continue; - int index = x * length * height + y * length + z; - if (bitset.get(index)) - continue; - bitset.set(index); - LayerPattern.Layer layer = resolvedLayers.get(layerIndex); List state = layer.rollBlock(random);