Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97259e5
commit e35b40b
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
e35b40b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, I was thinking of doing this. Glad you beat me to it. :)