mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-15 20:44:50 +00:00
Added several more functions to pre-existing classes:
-Spawner, Transport, Healer, Guard, Bard jobs received more functions. -Added more functions to the transporter role. -IRole: Added getNpc() function. -IAnimal, IEntityLiving, and IEntityLivingBase received more functions from their MC counterparts. -Nearly every function with that takes position/vector parameters now has an equivalent with IPos as a parameter instead.
This commit is contained in:
1 parent
112e82a09d
commit
e9a8f8cebc
51 files changed
+1025
-227
No files matched your search
@@ -103,7 +103,7 @@ public class ScriptItemEventHandler {
|
||||
try {
|
||||
if (event.entityPlayer.getHeldItem().getItem() == CustomItems.scripted_item && !event.isCanceled()) {
|
||||
IItemCustom isw = ItemScripted.GetWrapper(event.entityPlayer.getHeldItem());
|
||||
ItemEvent.InteractEvent eve = new ItemEvent.InteractEvent(isw, (IPlayer) NpcAPI.Instance().getIEntity(event.entityPlayer), 2, NpcAPI.Instance().getIBlock(event.entityPlayer.worldObj, new BlockPos(event.entityPlayer.posX, event.entityPlayer.posY, event.entityPlayer.posZ)));
|
||||
ItemEvent.InteractEvent eve = new ItemEvent.InteractEvent(isw, (IPlayer) NpcAPI.Instance().getIEntity(event.entityPlayer), 2, NpcAPI.Instance().getIBlock(NpcAPI.Instance().getIWorld(event.entityPlayer.worldObj), NpcAPI.Instance().getIPos(event.entityPlayer.posX, event.entityPlayer.posY, event.entityPlayer.posZ)));
|
||||
event.setCanceled(EventHooks.onScriptItemInteract(isw, eve));
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
|
||||
Reference in new issue
Block a user