1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Allow admins to control the behavior of the Electric Gold Pan via the legacy-gold-pan configuration option.

This commit is contained in:
Kyle Einstein 2021-09-22 20:43:15 -04:00
parent 19c7e235ed
commit ba8cc49b6e
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem; import io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GoldPan; import io.github.thebusybiscuit.slimefun4.implementation.items.tools.GoldPan;
import io.github.thebusybiscuit.slimefun4.implementation.items.tools.NetherGoldPan; import io.github.thebusybiscuit.slimefun4.implementation.items.tools.NetherGoldPan;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
@ -40,9 +41,13 @@ public class ElectricGoldPan extends AContainer implements RecipeDisplayItem {
private final ItemStack gravel = new ItemStack(Material.GRAVEL); private final ItemStack gravel = new ItemStack(Material.GRAVEL);
private final ItemStack soulSand = new ItemStack(Material.SOUL_SAND); private final ItemStack soulSand = new ItemStack(Material.SOUL_SAND);
private final boolean legacyMode;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public ElectricGoldPan(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public ElectricGoldPan(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(itemGroup, item, recipeType, recipe); super(itemGroup, item, recipeType, recipe);
legacyMode = Slimefun.getCfg().getBoolean("options.legacy-gold-pan");
} }
@Override @Override
@ -62,7 +67,7 @@ public class ElectricGoldPan extends AContainer implements RecipeDisplayItem {
@Override @Override
protected MachineRecipe findNextRecipe(BlockMenu menu) { protected MachineRecipe findNextRecipe(BlockMenu menu) {
if (!hasFreeSlot(menu)) { if (!legacyMode && !hasFreeSlot(menu)) {
return null; return null;
} }

View File

@ -13,6 +13,7 @@ options:
legacy-ore-washer: false legacy-ore-washer: false
legacy-dust-washer: false legacy-dust-washer: false
legacy-ore-grinder: true legacy-ore-grinder: true
legacy-gold-pan: false
language: en language: en
enable-translations: true enable-translations: true
log-duplicate-block-entries: true log-duplicate-block-entries: true