added support for SmoothBrick and changed steps to a TexturedMaterial
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
48
paper-api/src/main/java/org/bukkit/material/SmoothBrick.java
Normal file
48
paper-api/src/main/java/org/bukkit/material/SmoothBrick.java
Normal file
@ -0,0 +1,48 @@
|
||||
package org.bukkit.material;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* Represents the different types of smooth bricks.
|
||||
*/
|
||||
public class SmoothBrick extends TexturedMaterial {
|
||||
|
||||
private static final List<Material> textures = new ArrayList<Material>();
|
||||
static {
|
||||
textures.add(Material.STONE);
|
||||
textures.add(Material.MOSSY_COBBLESTONE);
|
||||
textures.add(Material.COBBLESTONE);
|
||||
}
|
||||
|
||||
public SmoothBrick() {
|
||||
super(Material.SMOOTH_BRICK);
|
||||
}
|
||||
|
||||
public SmoothBrick(final int type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public SmoothBrick(final Material type) {
|
||||
super((textures.contains(type)) ? Material.SMOOTH_BRICK : type);
|
||||
if (textures.contains(type)) {
|
||||
setMaterial(type);
|
||||
}
|
||||
}
|
||||
|
||||
public SmoothBrick(final int type, final byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
public SmoothBrick(final Material type, final byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Material> getTextures() {
|
||||
return textures;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user