use of club.nsdn.nyasamarailway.item.tool.Item1N4148 in project NyaSamaRailway by NSDN.
the class NSPCT10J method interactFirst.
@Override
public boolean interactFirst(EntityPlayer player) {
if (MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, player))) {
return true;
} else if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != player) {
return true;
} else if (this.riddenByEntity != null && this.riddenByEntity != player) {
return false;
} else {
if (player != null) {
ItemStack stack = player.getCurrentEquippedItem();
if (stack != null) {
if (stack.getItem() instanceof Item1N4148 || stack.getItem() instanceof ItemNTP8Bit || stack.getItem() instanceof ItemNTP32Bit) {
return true;
}
if (stack.getItem() instanceof ItemMinecart)
return true;
}
if (!this.worldObj.isRemote) {
player.mountEntity(this);
player.addChatComponentMessage(new ChatComponentTranslation("info.nsr.x"));
}
}
return true;
}
}
Aggregations