mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added more a full inventory to NPCs, selectable on two tabs and double-point values for NPC droprates.
This commit is contained in:
1 parent
f14337f1bb
commit
989effb5c5
6 files changed
+116
-48
No files matched your search
@@ -532,7 +532,7 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
* @param slot The slot from the NPC's drop list to return (0-8)
|
||||
* @return The chance of dropping the item in this slot. Returns 100 if the slot is not found.
|
||||
*/
|
||||
public int getLootChance(int slot) {
|
||||
public double getLootChance(int slot) {
|
||||
if(!npc.inventory.dropchance.containsKey(slot))
|
||||
return 100;
|
||||
|
||||
@@ -544,8 +544,8 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
* @param slot The slot from the NPC's drop list to change
|
||||
* @param chance The new chance of dropping the item in this slot
|
||||
*/
|
||||
public void setLootChance(int slot, int chance) {
|
||||
if(slot < 0 || slot > 8)
|
||||
public void setLootChance(int slot, double chance) {
|
||||
if(!npc.inventory.dropchance.containsKey(slot))
|
||||
return;
|
||||
|
||||
if(chance < 0)
|
||||
|
||||
Reference in new issue
Block a user