mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Added detectAndSendChanges, putStackInSlot(slot,itemStack), isPlayerNotUsingContainer(player) functions to ScriptContainer
This commit is contained in:
1 parent
09f76d84c4
commit
80e3c075c7
2 files changed
+23
No files matched your search
@@ -6,11 +6,13 @@
|
||||
package noppes.npcs.scripted;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.containers.ContainerCustomGui;
|
||||
import noppes.npcs.scripted.entity.ScriptPlayer;
|
||||
import noppes.npcs.scripted.interfaces.IContainer;
|
||||
import noppes.npcs.scripted.interfaces.IItemStack;
|
||||
|
||||
@@ -87,4 +89,16 @@ public class ScriptContainer implements IContainer {
|
||||
public boolean isCustomGUI() {
|
||||
return this.container instanceof ContainerCustomGui;
|
||||
}
|
||||
|
||||
public void detectAndSendChanges() {
|
||||
container.detectAndSendChanges();
|
||||
}
|
||||
|
||||
public void putStackInSlot(int slot, ScriptItemStack itemStack){
|
||||
container.putStackInSlot(slot,itemStack.getMCItemStack());
|
||||
}
|
||||
|
||||
public boolean isPlayerNotUsingContainer(ScriptPlayer player){
|
||||
return container.isPlayerNotUsingContainer((EntityPlayerMP) player.getMCEntity());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user