Old Biomes
This commit is contained in:
parent
505006ed17
commit
56e63f3ce2
6 changed files with 37 additions and 15 deletions
6
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
6
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
name: Report a Bug
|
||||
description: File a bug report
|
||||
title: "[Bug] "
|
||||
labels: ["bug"]
|
||||
labels: [ "bug" ]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
@ -50,7 +50,7 @@ body:
|
|||
label: Minecraft
|
||||
description: What version of Minecraft is installed?
|
||||
options:
|
||||
- 1.19-snapshot
|
||||
- 1.19
|
||||
- 1.18.2
|
||||
- 1.18.1
|
||||
- 1.18
|
||||
|
@ -64,7 +64,7 @@ body:
|
|||
- 1.16.0
|
||||
- Before 1.16
|
||||
validations:
|
||||
required: true
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.betterx.bclib.api.features.config.*;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
|
||||
public class BCLFeature {
|
||||
public class BCLFeature<F extends Feature<FC>, FC extends FeatureConfiguration> {
|
||||
public static final Feature<PlaceFacingBlockConfig> PLACE_BLOCK = register(
|
||||
BCLib.makeID("place_block"),
|
||||
new PlaceBlockFeature<>(PlaceFacingBlockConfig.CODEC));
|
||||
|
@ -48,24 +48,27 @@ public class BCLFeature {
|
|||
new ConditionFeature());
|
||||
private final Holder<PlacedFeature> placedFeature;
|
||||
private final Decoration featureStep;
|
||||
private final Feature<?> feature;
|
||||
private final F feature;
|
||||
private final FC configuration;
|
||||
|
||||
|
||||
public <FC extends FeatureConfiguration, F extends Feature<FC>> BCLFeature(ResourceLocation id,
|
||||
F feature,
|
||||
Decoration featureStep,
|
||||
FC configuration,
|
||||
PlacementModifier[] modifiers) {
|
||||
this(id, feature, featureStep, buildPlacedFeature(id, feature, configuration, modifiers));
|
||||
public BCLFeature(ResourceLocation id,
|
||||
F feature,
|
||||
Decoration featureStep,
|
||||
FC configuration,
|
||||
PlacementModifier[] modifiers) {
|
||||
this(id, feature, featureStep, configuration, buildPlacedFeature(id, feature, configuration, modifiers));
|
||||
}
|
||||
|
||||
public BCLFeature(ResourceLocation id,
|
||||
Feature<?> feature,
|
||||
F feature,
|
||||
Decoration featureStep,
|
||||
FC configuration,
|
||||
Holder<PlacedFeature> placedFeature) {
|
||||
this.placedFeature = placedFeature;
|
||||
this.featureStep = featureStep;
|
||||
this.feature = feature;
|
||||
this.configuration = configuration;
|
||||
|
||||
if (!BuiltinRegistries.PLACED_FEATURE.containsKey(id)) {
|
||||
Registry.register(BuiltinRegistries.PLACED_FEATURE, id, placedFeature.value());
|
||||
|
@ -119,7 +122,7 @@ public class BCLFeature {
|
|||
*
|
||||
* @return {@link Feature}.
|
||||
*/
|
||||
public Feature<?> getFeature() {
|
||||
public F getFeature() {
|
||||
return feature;
|
||||
}
|
||||
|
||||
|
@ -140,4 +143,8 @@ public class BCLFeature {
|
|||
public Decoration getDecoration() {
|
||||
return featureStep;
|
||||
}
|
||||
|
||||
public FC getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,16 @@ public class FastFeatures {
|
|||
new SimpleBlockConfiguration(BlockStateProvider.simple(block)));
|
||||
}
|
||||
|
||||
public static BCLFeature
|
||||
patch(ResourceLocation location, BlockStateProvider provider, int attempts, int xzSpread, int ySpread) {
|
||||
return patch(location,
|
||||
attempts,
|
||||
xzSpread,
|
||||
ySpread,
|
||||
Feature.SIMPLE_BLOCK,
|
||||
new SimpleBlockConfiguration(provider));
|
||||
}
|
||||
|
||||
public static BCLFeature patchWitRandomInt(ResourceLocation location, Block block, IntegerProperty prop) {
|
||||
return patchWitRandomInt(location, block, prop, 96, 7, 3);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class SequenceFeatureConfig implements FeatureConfiguration {
|
|||
|
||||
private final List<Holder<PlacedFeature>> features;
|
||||
|
||||
public static SequenceFeatureConfig create(List<BCLFeature> features) {
|
||||
public static SequenceFeatureConfig create(List<BCLFeature<?, ?>> features) {
|
||||
return new SequenceFeatureConfig(features.stream().map(f -> f.getPlacedFeature()).toList());
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ public class CommonBlockTags {
|
|||
NETHER_ORES,
|
||||
SOUL_GROUND,
|
||||
NETHER_MYCELIUM,
|
||||
MYCELIUM,
|
||||
END_STONES);
|
||||
|
||||
TagAPI.BLOCKS.add(MYCELIUM, Blocks.MYCELIUM);
|
||||
|
|
|
@ -69,7 +69,11 @@ public abstract class ModIntegration {
|
|||
Feature<?> feature = Registry.FEATURE.get(id);
|
||||
Holder<PlacedFeature> featurePlaced = BuiltinRegistries.PLACED_FEATURE.getHolder(getFeatureKey(placedFeatureID))
|
||||
.orElse(null);
|
||||
return new BCLFeature(id, feature, featureStep, featurePlaced);
|
||||
return new BCLFeature(id,
|
||||
feature,
|
||||
featureStep,
|
||||
featurePlaced.value().getFeatures().map(f -> f.config()).findFirst().orElse(null),
|
||||
featurePlaced);
|
||||
}
|
||||
|
||||
public BCLFeature getFeature(String name, GenerationStep.Decoration featureStep) {
|
||||
|
|
Loading…
Reference in a new issue