Skip to content

Commit

Permalink
[1.20.5] fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMCLoveMan committed May 1, 2024
1 parent 7024b2e commit 42b07af
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.themcbrothers.uselessmod.world.worldgen;

import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import com.mojang.serialization.MapCodec;
import net.minecraft.MethodsReturnNonnullByDefault;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
Expand All @@ -10,7 +9,7 @@
import net.minecraft.world.level.levelgen.placement.PlacementFilter;
import net.minecraft.world.level.levelgen.placement.PlacementModifierType;
import net.themcbrothers.uselessmod.config.ServerConfig;
import net.themcbrothers.uselessmod.init.UselessPlacementModifierTypes;
import net.themcbrothers.uselessmod.core.UselessPlacementModifierTypes;

import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Locale;
Expand All @@ -19,9 +18,7 @@
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
public class ConfigFeaturePlacement extends PlacementFilter {
public static final Codec<ConfigFeaturePlacement> CODEC = RecordCodecBuilder.create(instance -> instance.group(
Type.CODEC.fieldOf("dim_type").forGetter(o -> o.type)
).apply(instance, ConfigFeaturePlacement::new));
public static final MapCodec<ConfigFeaturePlacement> CODEC = Type.CODEC.fieldOf("dim_type").xmap(ConfigFeaturePlacement::new, placement -> placement.type);

private final Type type;

Expand Down

0 comments on commit 42b07af

Please sign in to comment.