aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-14 11:42:15 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-14 11:42:15 +1000
commitf38c45d27bbccda65cba941887e4c6dbb303df10 (patch)
tree6c1f24efe54f462c494cdfb1a8d012649a06f5a9 /src/Java
parent3fe7780352f03bcbbdfe6af7d23a40f383b90c68 (diff)
downloadGT5-Unofficial-f38c45d27bbccda65cba941887e4c6dbb303df10.tar.gz
GT5-Unofficial-f38c45d27bbccda65cba941887e4c6dbb303df10.tar.bz2
GT5-Unofficial-f38c45d27bbccda65cba941887e4c6dbb303df10.zip
% 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.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java24
1 files changed, 19 insertions, 5 deletions
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