Added MaterialData support for SAPPLING, POWERED_RAIL, and DETECTOR_RAIL.

By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
Bukkit/Spigot
2011-04-25 13:26:58 -07:00
parent 24eb39b2e6
commit 314c53177e
7 changed files with 129 additions and 14 deletions

View File

@ -0,0 +1,34 @@
package org.bukkit.material;
import org.bukkit.Material;
/**
* This is the superclass for the {@link DetectorRail} and {@link PoweredRail} classes
*/
public class ExtendedRails extends Rails {
public ExtendedRails(final int type) {
super(type);
}
public ExtendedRails(final Material type) {
super(type);
}
public ExtendedRails(final int type, final byte data) {
super(type, data);
}
public ExtendedRails(final Material type, final byte data) {
super(type, data);
}
@Override
public boolean isCurve() {
return false;
}
@Override
protected byte getConvertedData() {
return (byte) (getData() & 0x7);
}
}