mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 22:48:46 +00:00
Merge branch 'dev' into animation-events
This commit is contained in:
commit
113d27b364
19 files changed
+349
-81
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.api.IPos;
|
||||
import noppes.npcs.api.ITimers;
|
||||
@@ -617,7 +618,11 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
* @param item The item the drop list slot will be changed to
|
||||
*/
|
||||
public void setLootItem(int slot, IItemStack item) {
|
||||
npc.inventory.setInventorySlotContents(slot+7, item.getMCItemStack());
|
||||
if(item == null || item.getMCItemStack() == null){
|
||||
npc.inventory.setInventorySlotContents(slot+7, (ItemStack) null);
|
||||
} else {
|
||||
npc.inventory.setInventorySlotContents(slot+7, item.getMCItemStack());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user