Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Mechalopa committed Oct 19, 2024
1 parent 1a72a8b commit 6cabe38
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.util.function.Supplier;

import com.github.mechalopa.jafohana.JAFOhana;
import com.github.mechalopa.jafohana.world.level.levelgen.configurations.LayeredFeatureConfiguration;
import com.github.mechalopa.jafohana.world.level.levelgen.configurations.LayeringFeatureConfiguration;
import com.github.mechalopa.jafohana.world.level.levelgen.feature.JadeVinesFeature;
import com.github.mechalopa.jafohana.world.level.levelgen.feature.LayeredFeature;
import com.github.mechalopa.jafohana.world.level.levelgen.feature.LayeringFeature;

import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.levelgen.feature.Feature;
Expand All @@ -18,7 +18,7 @@ public class ModBiomeFeatures
private static final DeferredRegister<Feature<?>> REGISTRY = DeferredRegister.create(Registries.FEATURE, JAFOhana.MODID);

public static final Supplier<Feature<JadeVinesFeature.JadeVinesConfiguration>> JADE_VINES = REGISTRY.register("jade_vines", () -> new JadeVinesFeature(JadeVinesFeature.JadeVinesConfiguration.CODEC));
public static final Supplier<Feature<LayeredFeatureConfiguration>> LAYERED_FEATURE = REGISTRY.register("layered", () -> new LayeredFeature(LayeredFeatureConfiguration.CODEC));
public static final Supplier<Feature<LayeringFeatureConfiguration>> LAYERING_FEATURE = REGISTRY.register("layering", () -> new LayeringFeature(LayeringFeatureConfiguration.CODEC));

@SubscribeEvent
public static void register(IEventBus eventBus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;

public class LayeredFeatureConfiguration implements FeatureConfiguration
public class LayeringFeatureConfiguration implements FeatureConfiguration
{
public static final Codec<LayeredFeatureConfiguration> CODEC = ExtraCodecs.nonEmptyHolderSet(PlacedFeature.LIST_CODEC).fieldOf("features").xmap(LayeredFeatureConfiguration::new, p -> p.features).codec();
public static final Codec<LayeringFeatureConfiguration> CODEC = ExtraCodecs.nonEmptyHolderSet(PlacedFeature.LIST_CODEC).fieldOf("features").xmap(LayeringFeatureConfiguration::new, p -> p.features).codec();
public final HolderSet<PlacedFeature> features;

public LayeredFeatureConfiguration(HolderSet<PlacedFeature> features)
public LayeringFeatureConfiguration(HolderSet<PlacedFeature> features)
{
this.features = features;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.mechalopa.jafohana.world.level.levelgen.feature;

import com.github.mechalopa.jafohana.world.level.levelgen.configurations.LayeredFeatureConfiguration;
import com.github.mechalopa.jafohana.world.level.levelgen.configurations.LayeringFeatureConfiguration;
import com.mojang.serialization.Codec;

import net.minecraft.core.BlockPos;
Expand All @@ -11,18 +11,18 @@
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;

public class LayeredFeature extends Feature<LayeredFeatureConfiguration>
public class LayeringFeature extends Feature<LayeringFeatureConfiguration>
{
public LayeredFeature(Codec<LayeredFeatureConfiguration> config)
public LayeringFeature(Codec<LayeringFeatureConfiguration> config)
{
super(config);
}

@Override
public boolean place(FeaturePlaceContext<LayeredFeatureConfiguration> context)
public boolean place(FeaturePlaceContext<LayeringFeatureConfiguration> context)
{
RandomSource randomsource = context.random();
LayeredFeatureConfiguration config = context.config();
LayeringFeatureConfiguration config = context.config();
WorldGenLevel worldgenlevel = context.level();
BlockPos blockpos = context.origin();
ChunkGenerator chunkgenerator = context.chunkGenerator();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "jafohana:layered",
"type": "jafohana:layering",
"config": {
"features": [
{
Expand Down

0 comments on commit 6cabe38

Please sign in to comment.