Added support for cloth color with the super pickaxe drops.

This commit is contained in:
sk89q
2011-01-17 20:30:54 -08:00
parent 75c21623da
commit a63ffc2fe4
5 changed files with 43 additions and 59 deletions

View File

@ -28,7 +28,7 @@ public class BaseItem {
/**
* Item ID.
*/
private short id;
private int id;
/**
* Item damage.
*/
@ -39,7 +39,7 @@ public class BaseItem {
*
* @param id
*/
public BaseItem(short id) {
public BaseItem(int id) {
this.id = id;
this.damage = 0;
}
@ -49,7 +49,7 @@ public class BaseItem {
*
* @param id
*/
public BaseItem(short id, short damage) {
public BaseItem(int id, short damage) {
this.id = id;
this.damage = damage;
}
@ -57,14 +57,14 @@ public class BaseItem {
/**
* @return the id
*/
public short getID() {
public int getType() {
return id;
}
/**
* @param id the id to set
*/
public void setID(short id) {
public void setType(int id) {
this.id = id;
}

View File

@ -35,7 +35,7 @@ public class BaseItemStack extends BaseItem {
*
* @param id
*/
public BaseItemStack(short id) {
public BaseItemStack(int id) {
super(id);
}
@ -44,7 +44,7 @@ public class BaseItemStack extends BaseItem {
*
* @param id
*/
public BaseItemStack(short id, int amount) {
public BaseItemStack(int id, int amount) {
super(id);
this.amount = amount;
}
@ -54,7 +54,7 @@ public class BaseItemStack extends BaseItem {
*
* @param id
*/
public BaseItemStack(short id, int amount, short damage) {
public BaseItemStack(int id, int amount, short damage) {
super(id, damage);
this.amount = amount;
}

View File

@ -107,7 +107,7 @@ public class ChestBlock extends BaseBlock implements TileEntityBlock {
if (item != null) {
Map<String,Tag> data = new HashMap<String,Tag>();
CompoundTag itemTag = new CompoundTag("Items", data);
data.put("id", new ShortTag("id", item.getID()));
data.put("id", new ShortTag("id", (short)item.getType()));
data.put("Damage", new ShortTag("Damage", item.getDamage()));
data.put("Count", new ByteTag("Count", (byte)item.getAmount()));
data.put("Slot", new ByteTag("Slot", (byte)i));