Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Fixed Material
Dieser Commit ist enthalten in:
Ursprung
c7d680163f
Commit
49b225ac08
@ -86,22 +86,40 @@ public class CraftBlock implements Block {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the type of this block
|
||||||
|
*
|
||||||
|
* @param type Material to change this block to
|
||||||
|
*/
|
||||||
|
public void setType(final Material type) {
|
||||||
|
setTypeID(type.getID());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the type-ID of this block
|
* Sets the type-ID of this block
|
||||||
*
|
*
|
||||||
* @param type Type-ID to change this block to
|
* @param type Type-ID to change this block to
|
||||||
*/
|
*/
|
||||||
public void setType(final int type) {
|
public void setTypeID(final int type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
world.getHandle().d(x, y, z, type);
|
world.getHandle().d(x, y, z, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the type of this block
|
||||||
|
*
|
||||||
|
* @return block type
|
||||||
|
*/
|
||||||
|
public Material getType() {
|
||||||
|
return Material.getMaterial(getTypeID());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the type-ID of this block
|
* Gets the type-ID of this block
|
||||||
*
|
*
|
||||||
* @return block type-ID
|
* @return block type-ID
|
||||||
*/
|
*/
|
||||||
public int getType() {
|
public int getTypeID() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren