Skip to content

Commit

Permalink
Remove mod priority configuration option for Orechid outputs
Browse files Browse the repository at this point in the history
(was never ported to Fabric and didn't work on Forge anyway; mod pack authors should customize the Orechid via data pack recipes)
  • Loading branch information
TheRealWormbo committed Jun 16, 2024
1 parent 34af34d commit 08ff8dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ private static class Common implements BotaniaConfig.ConfigAccess {
public final ForgeConfigSpec.BooleanValue gogSpawnWithLexicon;
public final ForgeConfigSpec.IntValue gogIslandScaleMultiplier;

public final ForgeConfigSpec.ConfigValue<List<? extends String>> orechidPriorityMods;

public final ForgeConfigSpec.ConfigValue<List<? extends String>> rannuncarpusItemBlacklist;
public final ForgeConfigSpec.ConfigValue<List<? extends String>> rannuncarpusModBlacklist;

Expand Down Expand Up @@ -288,13 +286,6 @@ public Common(ForgeConfigSpec.Builder builder) {
By default, the scale is 8, putting each island on points separated by 2048 blocks.
Values below 4 (1024 block spacing) are not recommended due to Nether portal collisions.""")
.defineInRange("gardenOfGlass.islandScaleMultiplier", 8, 1, 512);
orechidPriorityMods = builder
.comment("""
List of modids to prioritize when choosing a random ore from the tag.
By default, the chosen ore is randomly picked from all ores in the ore's tag.
Ores from mods present on this list will be picked over mods listed lower or not listed at all.
Applying changes at runtime requires /reload afterwards.""")
.defineList("orechidPriorityMods", Collections.emptyList(), o -> o instanceof String s && ResourceLocation.tryParse(s + ":test") != null);
rannuncarpusItemBlacklist = builder
.comment("List of item registry names that will be ignored by rannuncarpuses when placing blocks.")
.defineList("rannuncarpus.itemBlacklist", Collections.emptyList(), o -> o instanceof String s && ResourceLocation.tryParse(s) != null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.google.gson.JsonObject;

import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
Expand Down Expand Up @@ -41,15 +40,6 @@ public boolean test(BlockState state) {
return isNotExcluded(state);
}

@Override
public BlockState pick(RandomSource random) {
List<Block> blocks = getBlocks();
if (blocks.isEmpty()) {
return null;
}
return blocks.get(random.nextInt(blocks.size())).defaultBlockState();
}

private boolean isNotExcluded(BlockState state) {
for (StateIngredient exclude : excludes) {
if (exclude.test(state)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public boolean test(BlockState state) {

@Override
public BlockState pick(RandomSource random) {
var values = resolve().toList();
if (values.isEmpty()) {
var blocks = getBlocks();
if (blocks.isEmpty()) {
return null;
}
return values.get(random.nextInt(values.size())).defaultBlockState();
return blocks.get(random.nextInt(blocks.size())).defaultBlockState();
}

@Override
Expand Down

0 comments on commit 08ff8dd

Please sign in to comment.