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

Added Iron Nuggets to Gold Pan drops

This commit is contained in:
TheBusyBiscuit 2019-11-26 00:48:47 +01:00
parent c9bd5840e0
commit 61a58d87dd
3 changed files with 13 additions and 2 deletions

View File

@ -28,14 +28,16 @@ public class GoldPan extends SimpleSlimefunItem<ItemInteractionHandler> implemen
private int chanceSiftedOre; private int chanceSiftedOre;
private int chanceFlint; private int chanceFlint;
private int chanceClay; private int chanceClay;
private int chanceIronNuggets;
public GoldPan(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { public GoldPan(Category category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
super(category, item, recipeType, recipe, new String[] {"chance.FLINT", "chance.CLAY", "chance.SIFTED_ORE"}, new Integer[] {40, 25, 35}); super(category, item, recipeType, recipe, new String[] {"chance.FLINT", "chance.CLAY", "chance.SIFTED_ORE", "chance.IRON_NUGGET"}, new Integer[] {40, 20, 35, 5});
recipes = Arrays.asList( recipes = Arrays.asList(
new ItemStack(Material.GRAVEL), new ItemStack(Material.FLINT), new ItemStack(Material.GRAVEL), new ItemStack(Material.FLINT),
new ItemStack(Material.GRAVEL), new ItemStack(Material.CLAY_BALL), new ItemStack(Material.GRAVEL), new ItemStack(Material.CLAY_BALL),
new ItemStack(Material.GRAVEL), SlimefunItems.SIFTED_ORE new ItemStack(Material.GRAVEL), SlimefunItems.SIFTED_ORE,
new ItemStack(Material.GRAVEL), new ItemStack(Material.IRON_NUGGET)
); );
} }
@ -44,6 +46,7 @@ public class GoldPan extends SimpleSlimefunItem<ItemInteractionHandler> implemen
chanceSiftedOre = (int) Slimefun.getItemValue(getID(), "chance.SIFTED_ORE"); chanceSiftedOre = (int) Slimefun.getItemValue(getID(), "chance.SIFTED_ORE");
chanceClay = (int) Slimefun.getItemValue(getID(), "chance.CLAY"); chanceClay = (int) Slimefun.getItemValue(getID(), "chance.CLAY");
chanceFlint = (int) Slimefun.getItemValue(getID(), "chance.FLINT"); chanceFlint = (int) Slimefun.getItemValue(getID(), "chance.FLINT");
chanceIronNuggets = (int) Slimefun.getItemValue(getID(), "chance.IRON_NUGGET");
} }
@Override @Override
@ -57,6 +60,7 @@ public class GoldPan extends SimpleSlimefunItem<ItemInteractionHandler> implemen
if (random.nextInt(100) < chanceSiftedOre) drops.add(SlimefunItems.SIFTED_ORE); if (random.nextInt(100) < chanceSiftedOre) drops.add(SlimefunItems.SIFTED_ORE);
else if (random.nextInt(100) < chanceClay) drops.add(new ItemStack(Material.CLAY_BALL)); else if (random.nextInt(100) < chanceClay) drops.add(new ItemStack(Material.CLAY_BALL));
else if (random.nextInt(100) < chanceFlint) drops.add(new ItemStack(Material.FLINT)); else if (random.nextInt(100) < chanceFlint) drops.add(new ItemStack(Material.FLINT));
else if (random.nextInt(100) < chanceIronNuggets) drops.add(new ItemStack(Material.IRON_NUGGET));
e.getClickedBlock().getWorld().playEffect(e.getClickedBlock().getLocation(), Effect.STEP_SOUND, e.getClickedBlock().getType()); e.getClickedBlock().getWorld().playEffect(e.getClickedBlock().getLocation(), Effect.STEP_SOUND, e.getClickedBlock().getType());
e.getClickedBlock().setType(Material.AIR); e.getClickedBlock().setType(Material.AIR);

View File

@ -27,6 +27,7 @@ public class AutomatedPanningMachine extends MultiBlockMachine {
private int chanceSiftedOre; private int chanceSiftedOre;
private int chanceFlint; private int chanceFlint;
private int chanceClay; private int chanceClay;
private int chanceIronNuggets;
// Nether Gold Pan // Nether Gold Pan
private int chanceQuartz; private int chanceQuartz;
@ -61,6 +62,7 @@ public class AutomatedPanningMachine extends MultiBlockMachine {
chanceSiftedOre = (int) Slimefun.getItemValue(goldPan, "chance.SIFTED_ORE"); chanceSiftedOre = (int) Slimefun.getItemValue(goldPan, "chance.SIFTED_ORE");
chanceClay = (int) Slimefun.getItemValue(goldPan, "chance.CLAY"); chanceClay = (int) Slimefun.getItemValue(goldPan, "chance.CLAY");
chanceFlint = (int) Slimefun.getItemValue(goldPan, "chance.FLINT"); chanceFlint = (int) Slimefun.getItemValue(goldPan, "chance.FLINT");
chanceIronNuggets = (int) Slimefun.getItemValue(goldPan, "chance.IRON_NUGGET");
chanceQuartz = (int) Slimefun.getItemValue(netherGoldPan, "chance.QUARTZ"); chanceQuartz = (int) Slimefun.getItemValue(netherGoldPan, "chance.QUARTZ");
chanceGoldNuggets = (int) Slimefun.getItemValue(netherGoldPan, "chance.GOLD_NUGGET"); chanceGoldNuggets = (int) Slimefun.getItemValue(netherGoldPan, "chance.GOLD_NUGGET");
@ -122,6 +124,9 @@ public class AutomatedPanningMachine extends MultiBlockMachine {
else if (random.nextInt(100) < chanceFlint) { else if (random.nextInt(100) < chanceFlint) {
return new ItemStack(Material.FLINT); return new ItemStack(Material.FLINT);
} }
else if (random.nextInt(100) < chanceIronNuggets) {
return new ItemStack(Material.IRON_NUGGET);
}
} }
else if (input == Material.SOUL_SAND) { else if (input == Material.SOUL_SAND) {
if (random.nextInt(100) < chanceQuartz) { if (random.nextInt(100) < chanceQuartz) {

View File

@ -188,6 +188,8 @@ public final class GuideSettings {
lore.add(ChatColors.color(entry.getKey() + " &7(" + entry.getValue() + " Commit" + (entry.getValue() > 1 ? "s": "") + ")")); lore.add(ChatColors.color(entry.getKey() + " &7(" + entry.getValue() + " Commit" + (entry.getValue() > 1 ? "s": "") + ")"));
} }
lore.add("");
lore.add("&7\u21E8 Click to visit " + contributor.getName() + "'s profile");
meta.setLore(lore); meta.setLore(lore);
skull.setItemMeta(meta); skull.setItemMeta(meta);