public boolean interact(EntityPlayer var1) {
    ItemStack var2 = var1.inventory.getCurrentItem();

    if (var2 != null) {
      if (!Revival.enableDebugging()) {
        if (var2.getItem() == FAItemRegistry.chickenEss) {
          if (!this.worldObj.isRemote) {
            Revival.ShowMessage(
                StatCollector.translateToLocal(LocalizationStrings.STATUS_ESSENCE_FAIL), var1);
            return true;
          }
        }
      }
    }

    return super.interact(var1);
  }
 public void TriggerOrder(EntityPlayer player) {
   this.Order = this.Order.Next();
   this.worldObj.playSoundEffect(
       (double) this.xCoord,
       (double) this.yCoord,
       (double) this.zCoord,
       "fossil:drum_single",
       8.0F,
       1.0F); // (float)Math.pow(2.0D,
   // (double)(this.Order.ordinal()/*.ToInt()
   // - 1*/)));
   // String var2 = Revival.GetLangTextByKey("Drum.Head");
   // String var3 = this.GetOrderString();
   Revival.ShowMessage(
       StatCollector.translateToLocal(LocalizationStrings.DRUM_TRIGGER)
           + StatCollector.translateToLocal("order." + this.Order.toString()),
       player);
   this.markDirty();
 }
  public boolean SendOrder(Item item, EntityPlayer var2) {
    // var2.itemID == this.ItemToControl.itemID && this.isTamed() &&
    // var1.username.equalsIgnoreCase(this.getOwnerName())
    /*
     * String var3 = ""; String var4 = ""; String var5 =
     * Revival.GetLangTextByKey("Drum.Msg.Head"); String var6 =
     * Revival.GetLangTextByKey("Drum.Msg.Middle"); String var7 =
     * Revival.GetLangTextByKey("Drum.Msg.Tail");
     */
    this.worldObj.playSoundEffect(
        (double) this.xCoord,
        (double) this.yCoord,
        (double) this.zCoord,
        "fossil:drum_triple",
        8.0F,
        1.0F); // (float)Math.pow(2.0D,
    // (double)(this.Order.ordinal()/*ToInt()
    // - 1*/)));

    if (item != FAItemRegistry.skullStick) // That is treated specially ;)
    {
      for (int i = 0; i < EnumPrehistoric.values().length; ++i) {
        if (EnumPrehistoric.values()[i].orderItem != null
            && EnumPrehistoric.values()[i].orderItem == item) {
          Revival.ShowMessage(
              StatCollector.translateToLocal(LocalizationStrings.DRUM_ORDERING)
                  + StatCollector.translateToLocal(
                      "fossil.entity." + EnumPrehistoric.values()[i].toString())
                  + ": "
                  + StatCollector.translateToLocal("order." + this.Order.toString()),
              var2);
        }
      } // Output: Ordering Triceratops: Stay

      List list =
          this.worldObj.getEntitiesWithinAABB(
              EntityDinosaur.class,
              AxisAlignedBB.getBoundingBox(
                      (double) this.xCoord,
                      (double) this.yCoord,
                      (double) this.zCoord,
                      (double) this.xCoord + 1.0D,
                      (double) this.yCoord + 1.0D,
                      (double) this.zCoord + 1.0D)
                  .expand(30.0D, 4.0D, 30.0D));
      Iterator it = list.iterator();

      while (it.hasNext()) {
        Entity var3 = (Entity) it.next();
        EntityDinosaur var4 = (EntityDinosaur) var3;

        if (item == var4.SelfType.orderItem
            && var4.isTamed()
            && var2.getCommandSenderName().equalsIgnoreCase(var4.getCommandSenderName()))
        // {
        {
          var4.SetOrder(this.Order);
        }

        /*
         * Revival.ShowMessage("YES",var2); } else
         * Revival.ShowMessage("NOPE",var2);
         */
      }
    } else {
      Revival.ShowMessage(
          StatCollector.translateToLocal(
              LocalizationStrings.DRUM_TREX + String.valueOf(this.Order.ordinal() + 1)),
          var2);
      List list =
          this.worldObj.getEntitiesWithinAABB(
              EntityTyrannosaurus.class,
              AxisAlignedBB.getBoundingBox(
                      (double) this.xCoord,
                      (double) this.yCoord,
                      (double) this.zCoord,
                      (double) this.xCoord + 1.0D,
                      (double) this.yCoord + 1.0D,
                      (double) this.zCoord + 1.0D)
                  .expand(50.0D, 4.0D, 50.0D));
      Iterator it = list.iterator();

      while (it.hasNext()) {
        Entity var4 = (Entity) it.next();
        EntityTyrannosaurus var5 = (EntityTyrannosaurus) var4;

        if (var5.isAdult() && !var5.isTamed()) {
          var5.setAngry(true);
          var5.setAttackTarget(var2);
        }
      }
    }

    return true;
    /*
     * if (var1 != Item.stick.itemID && var1 != Items.bone && var1 !=
     * Revival.skullStick.itemID && var1 != Item.arrow.itemID) { return
     * false; } else { if (var1 == Item.stick.itemID) { this.OrderTri();
     * var3 = Revival.GetLangTextByKey("Dino.Triceratops"); }
     *
     * if (var1 == Items.bone) { this.OrderRaptor(); var3 =
     * Revival.GetLangTextByKey("Dino.Raptor"); }
     *
     * if (var1 == Item.arrow.itemID) { this.OrderPTS(); var3 =
     * Revival.GetLangTextByKey("Dino.Pterosaur"); }
     *
     * if (var1 == Revival.skullStick.itemID) { this.OrderTRex(var2); }
     *
     * var4 = this.GetOrderString();
     *
     * if (var1 != Revival.skullStick.itemID) { Revival.ShowMessage(var5 +
     * var3 + var6 + var4 + var7, var2); return true; } else { String var8 =
     * Revival.GetLangTextByKey("Drum.Msg.TRex." +
     * String.valueOf(this.Order.ordinal()/*ToInt() + 1*));
     * Revival.ShowMessage(var8, var2); return true; } }
     */
  }