Search in sources :

Example 1 with TarotMessage

use of com.bewitchment.common.core.net.messages.TarotMessage in project Bewitchment by Um-Mitternacht.

the class TileEntityTarotsTable method read.

public void read(@Nonnull ItemStack tarotDeck, @Nonnull EntityPlayer reader) {
    if (!reader.world.isRemote) {
        if (checkDeck(tarotDeck) && consumePower(READ_COST, false)) {
            reader.openGui(Bewitchment.instance, LibGui.TAROT.ordinal(), reader.world, pos.getX(), pos.getY(), pos.getZ());
            NetworkHandler.HANDLER.sendTo(new TarotMessage(reader), (EntityPlayerMP) reader);
        } else {
            reader.sendStatusMessage(new TextComponentTranslation("item.tarots.error_reading"), true);
        }
    }
}
Also used : TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) TarotMessage(com.bewitchment.common.core.net.messages.TarotMessage)

Aggregations

TarotMessage (com.bewitchment.common.core.net.messages.TarotMessage)1 TextComponentTranslation (net.minecraft.util.text.TextComponentTranslation)1