From f38c45d27bbccda65cba941887e4c6dbb303df10 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 14 Aug 2017 11:42:15 +1000 Subject: % Tweaked Fish Catcher loot, enabling Iron and Gold to generate. If nuggets exist, you will get nuggets, else you will get ingots. > This is a drastic chance change, it's 1/100 to get 'resources' and it's then a 4/10 for Iron, 3/10 for Gold, 2/10 for Emerald and 1/10 for Diamond. --- .../tileentities/general/TileEntityFishTrap.java | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/Java/gtPlusPlus/core') diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java index 176d65ceac..5e1bd73a51 100644 --- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java +++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java @@ -28,8 +28,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { public TileEntityFishTrap() { this.inventoryContents = new InventoryFishTrap();// number of slots - - // without product - // slot + // without product + // slot this.setTileLocation(); } @@ -147,9 +147,23 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { else if (lootWeight <= 99) { loot = ItemUtils.getSimpleStack(minecraftFish[MathUtils.randInt(0, minecraftFish.length - 1)], 1); } + else if (lootWeight == 100){ - if (MathUtils.randInt(0, 1) == 0){ - loot = ItemUtils.getSimpleStack(Items.emerald); + int rareLoot = MathUtils.randInt(1, 10); + if (rareLoot <= 4) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetIron", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotIron", 1); + } + } + else if (rareLoot <= 7) { + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nuggetGold", 1); + if (loot == null){ + loot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotGold", 1); + } + } + else if (rareLoot <= 9){ + loot = ItemUtils.getSimpleStack(Items.emerald); } else { loot = ItemUtils.getSimpleStack(Items.diamond); @@ -333,7 +347,7 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory { accessibleSides[r]=r; } return accessibleSides; - + } @Override -- cgit