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:
parent
19c7e235ed
commit
ba8cc49b6e
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user