@SubscribeEvent(priority = EventPriority.LOWEST)
public void on(PlayerInteractEvent e) {
if (!e.world.isRemote && e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK
&& isStickyJar(e.entityPlayer.getHeldItem())) {
if (interacts == null) {
interacts = new HashMap<EntityPlayer, Integer>();
}
interacts.put(e.entityPlayer, e.face);
}
if (e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
ItemStack i = e.entityPlayer.getHeldItem();
if (i != null && (i.getItem() instanceof ItemWandCasting)) {
WandHandler.handleWandInteract(e.world, e.x, e.y, e.z, e.entityPlayer, i);
}
}
}
EventHandlerWorld.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:Gadomancy
作者:
评论列表
文章目录