mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Added support for newer mobs to fishing's shake ability.
This commit is contained in:
parent
42aa426991
commit
058dc8c611
7
pom.xml
Normal file → Executable file
7
pom.xml
Normal file → Executable file
@ -121,6 +121,13 @@
|
|||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bukkit</groupId>
|
||||||
|
<artifactId>craftbukkit</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.getspout</groupId>
|
<groupId>org.getspout</groupId>
|
||||||
<artifactId>spoutpluginapi</artifactId>
|
<artifactId>spoutpluginapi</artifactId>
|
||||||
|
83
src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java
Normal file → Executable file
83
src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java
Normal file → Executable file
@ -17,6 +17,8 @@ import org.bukkit.event.player.PlayerFishEvent;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.Wool;
|
import org.bukkit.material.Wool;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftSkeleton;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.TreasuresConfig;
|
import com.gmail.nossr50.config.TreasuresConfig;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
@ -242,7 +244,12 @@ public class Fishing {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CREEPER:
|
case CREEPER:
|
||||||
|
if (DROP_NUMBER > 99) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM, 1, (short) 4));
|
||||||
|
}
|
||||||
|
else {
|
||||||
Misc.dropItem(location, new ItemStack(Material.SULPHUR));
|
Misc.dropItem(location, new ItemStack(Material.SULPHUR));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ENDERMAN:
|
case ENDERMAN:
|
||||||
@ -258,6 +265,18 @@ public class Fishing {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IRON_GOLEM:
|
||||||
|
if (DROP_NUMBER > 99) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.PUMPKIN));
|
||||||
|
}
|
||||||
|
else if (DROP_NUMBER > 90) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.IRON_INGOT));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.RED_ROSE));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case MAGMA_CUBE:
|
case MAGMA_CUBE:
|
||||||
Misc.dropItem(location, new ItemStack(Material.MAGMA_CREAM));
|
Misc.dropItem(location, new ItemStack(Material.MAGMA_CREAM));
|
||||||
break;
|
break;
|
||||||
@ -309,12 +328,28 @@ public class Fishing {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SKELETON:
|
case SKELETON:
|
||||||
if (DROP_NUMBER > 50) {
|
if(((CraftSkeleton) le).getHandle().getSkeletonType() == 1) {
|
||||||
|
if (DROP_NUMBER > 97) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM, 1, (short) 1));
|
||||||
|
}
|
||||||
|
else if (DROP_NUMBER > 50) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.BONE));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Misc.dropItems(location, new ItemStack(Material.COAL), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (DROP_NUMBER > 99) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM));
|
||||||
|
}
|
||||||
|
else if (DROP_NUMBER > 50) {
|
||||||
Misc.dropItem(location, new ItemStack(Material.BONE));
|
Misc.dropItem(location, new ItemStack(Material.BONE));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Misc.dropItems(location, new ItemStack(Material.ARROW), 3);
|
Misc.dropItems(location, new ItemStack(Material.ARROW), 3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SLIME:
|
case SLIME:
|
||||||
@ -343,8 +378,54 @@ public class Fishing {
|
|||||||
Misc.dropItem(location, new ItemStack(Material.INK_SACK, 1, (short) 0, (byte) 0x0));
|
Misc.dropItem(location, new ItemStack(Material.INK_SACK, 1, (short) 0, (byte) 0x0));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WITCH:
|
||||||
|
final int DROP_NUMBER_2 = random.nextInt(randomChance);
|
||||||
|
if (DROP_NUMBER > 97) {
|
||||||
|
if(DROP_NUMBER_2 > 66) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.POTION, 1, (short) 8197));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 33) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.POTION, 1, (short) 8195));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.POTION, 1, (short) 8194));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(DROP_NUMBER_2 > 88) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.GLASS_BOTTLE));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 75) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.GLOWSTONE_DUST));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 63) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SULPHUR));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 50) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.REDSTONE));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 38) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SPIDER_EYE));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 25) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.STICK));
|
||||||
|
}
|
||||||
|
else if(DROP_NUMBER_2 > 13) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SUGAR));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.POTION));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case ZOMBIE:
|
case ZOMBIE:
|
||||||
|
if (DROP_NUMBER > 99) {
|
||||||
|
Misc.dropItem(location, new ItemStack(Material.SKULL_ITEM, 1, (short) 2));
|
||||||
|
}
|
||||||
|
else {
|
||||||
Misc.dropItem(location, new ItemStack(Material.ROTTEN_FLESH));
|
Misc.dropItem(location, new ItemStack(Material.ROTTEN_FLESH));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user