コード例 #1
0
 /**
  * Sets the type id of this item
  *
  * <p>Note that in doing so you will reset the MaterialData for this stack
  *
  * @param type New type id to set the items in this stack to
  * @deprecated Magic value
  */
 @Deprecated
 public void setTypeId(int type) {
   this.type = type;
   if (this.meta != null) {
     this.meta = Bukkit.getItemFactory().asMetaFor(meta, getType0());
   }
   createData((byte) 0);
 }
コード例 #2
0
 /**
  * @param type the raw type id
  * @param amount the amount in the stack
  * @param damage the damage value of the item
  * @param data the data value or null
  * @deprecated this method uses an ambiguous data byte object
  */
 @Deprecated
 public ItemStack(final int type, final int amount, final short damage, final Byte data) {
   this.type = type;
   this.amount = amount;
   this.durability = damage;
   if (data != null) {
     createData(data);
     this.durability = data;
   }
 }