Skip to content

Commit

Permalink
refactor: Use NeoForgeExtraCodecs
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed Feb 23, 2024
1 parent 7edf129 commit 490d0a4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.Property;
import net.neoforged.neoforge.common.util.NeoForgeExtraCodecs;

import javax.annotation.Nullable;
import java.util.*;
Expand Down Expand Up @@ -228,7 +229,7 @@ public Collection<BlockPropertyPair> getPairs() {
}

public interface Value {
Codec<BlockStateIngredient.Value> CODEC = Util.make(() -> ExtraCodecs.withAlternative(BlockStateIngredient.TagValue.CODEC, ExtraCodecs.withAlternative(BlockStateIngredient.StateValue.CODEC, BlockStateIngredient.BlockValue.CODEC)));
Codec<BlockStateIngredient.Value> CODEC = Util.make(() -> NeoForgeExtraCodecs.withAlternative(BlockStateIngredient.TagValue.CODEC, NeoForgeExtraCodecs.withAlternative(BlockStateIngredient.StateValue.CODEC, BlockStateIngredient.BlockValue.CODEC)));

Collection<BlockPropertyPair> getPairs();
}
Expand Down

0 comments on commit 490d0a4

Please sign in to comment.