Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public int getDropItemId() {
- if (npcIsFriend) {
- if (Math.random() < 0.25) {
- if (npcLevel <= 9) {
- return Item.arrow.shiftedIndex;
- }
- if (npcLevel >= 10 && npcLevel <= 19) {
- return Item.cookie.shiftedIndex;
- }
- if (npcLevel >= 20 && npcLevel <= 29) {
- return Item.gunpowder.shiftedIndex;
- }
- if (npcLevel >= 30 && npcLevel <= 39) {
- return Item.cake.shiftedIndex;
- }
- if (npcLevel >= 40 && npcLevel <= 49) {
- return Block.tnt.blockID;
- }
- if (npcLevel == 50) {
- final double rand = Math.random() * 50;
- if (rand >= 0 && rand <= 7) {
- return Block.blockGold.blockID;
- }
- if (rand >= 8 && rand <= 17) {
- return Item.appleGold.shiftedIndex;
- }
- if (rand >= 18 && rand <= 27) {
- return Item.diamond.shiftedIndex;
- }
- if (rand >= 28 && rand <= 37) {
- return Block.obsidian.blockID;
- }
- if (rand >= 38 && rand <= 47) {
- return Block.blockSteel.blockID;
- }
- if (rand >= 48 && rand <= 50) {
- return Block.blockDiamond.blockID;
- }
- }
- } else {
- return GenuineNpcItems.HumanBrain.shiftedIndex;
- }
- } else if (Math.random() < 0.25) {
- if (npcLevel <= 9) {
- return Item.arrow.shiftedIndex;
- }
- if (npcLevel >= 10 && npcLevel <= 19) {
- return Item.cookie.shiftedIndex;
- }
- if (npcLevel >= 20 && npcLevel <= 29) {
- return Item.gunpowder.shiftedIndex;
- }
- if (npcLevel >= 30 && npcLevel <= 39) {
- return Item.cake.shiftedIndex;
- }
- if (npcLevel >= 40 && npcLevel <= 49) {
- return Block.tnt.blockID;
- }
- if (npcLevel == 50) {
- final int rand = (int) (Math.random() * 50);
- if (rand >= 0 && rand <= 7) {
- return Block.blockGold.blockID;
- }
- if (rand >= 8 && rand <= 17) {
- return Item.appleGold.shiftedIndex;
- }
- if (rand >= 18 && rand <= 27) {
- return Item.diamond.shiftedIndex;
- }
- if (rand >= 28 && rand <= 37) {
- return Block.obsidian.blockID;
- }
- if (rand >= 38 && rand <= 47) {
- return Block.blockSteel.blockID;
- }
- if (rand >= 48 && rand <= 50) {
- return Block.blockDiamond.blockID;
- }
- }
- } else {
- return GenuineNpcItems.ZombieBrain.shiftedIndex;
- }
- return 0;
- }
Advertisement