mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Added MonsterEggs materialdata
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
cae1a829df
commit
63cd6ba7d1
2 changed files with 48 additions and 1 deletions
|
@ -109,7 +109,7 @@ public enum Material {
|
|||
DIODE_BLOCK_ON(94, Diode.class),
|
||||
LOCKED_CHEST(95),
|
||||
TRAP_DOOR(96, TrapDoor.class),
|
||||
MONSTER_EGGS(97),
|
||||
MONSTER_EGGS(97, MonsterEggs.class),
|
||||
SMOOTH_BRICK(98, SmoothBrick.class),
|
||||
HUGE_MUSHROOM_1(99),
|
||||
HUGE_MUSHROOM_2(100),
|
||||
|
|
47
paper-api/src/main/java/org/bukkit/material/MonsterEggs.java
Normal file
47
paper-api/src/main/java/org/bukkit/material/MonsterEggs.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package org.bukkit.material;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
/**
|
||||
* Represents the different types of monster eggs
|
||||
*/
|
||||
public class MonsterEggs extends TexturedMaterial {
|
||||
|
||||
private static final List<Material> textures = new ArrayList<Material>();
|
||||
static {
|
||||
textures.add(Material.STONE);
|
||||
textures.add(Material.COBBLESTONE);
|
||||
textures.add(Material.SMOOTH_BRICK);
|
||||
}
|
||||
|
||||
public MonsterEggs() {
|
||||
super(Material.SMOOTH_BRICK);
|
||||
}
|
||||
|
||||
public MonsterEggs(final int type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public MonsterEggs(final Material type) {
|
||||
super((textures.contains(type)) ? Material.MONSTER_EGGS : type);
|
||||
if (textures.contains(type)) {
|
||||
setMaterial(type);
|
||||
}
|
||||
}
|
||||
|
||||
public MonsterEggs(final int type, final byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
public MonsterEggs(final Material type, final byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Material> getTextures() {
|
||||
return textures;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue