2825ece820
while some of these may of been true, they are extreme cases and cause a ton of noise to plugin developers. Use ApiStatus.Internal instead of Deprecated for actual internal API that continues to have use (internally). These do not help plugin developers if they bring moise noise than value.
50 lines
1.3 KiB
Java
50 lines
1.3 KiB
Java
package org.bukkit.material;
|
|
|
|
import org.bukkit.Material;
|
|
import org.bukkit.block.BlockFace;
|
|
|
|
/**
|
|
* Simple utility class for attachable MaterialData subclasses
|
|
*
|
|
* @deprecated all usage of MaterialData is deprecated and subject to removal.
|
|
* Use {@link org.bukkit.block.data.BlockData}.
|
|
*/
|
|
@Deprecated(since = "1.13", forRemoval = true)
|
|
public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable {
|
|
|
|
public SimpleAttachableMaterialData(Material type, BlockFace direction) {
|
|
this(type);
|
|
setFacingDirection(direction);
|
|
}
|
|
|
|
public SimpleAttachableMaterialData(Material type) {
|
|
super(type);
|
|
}
|
|
|
|
/**
|
|
* @param type the type
|
|
* @param data the raw data value
|
|
* @deprecated Magic value
|
|
*/
|
|
@Deprecated(since = "1.6.2")
|
|
public SimpleAttachableMaterialData(Material type, byte data) {
|
|
super(type, data);
|
|
}
|
|
|
|
@Override
|
|
public BlockFace getFacing() {
|
|
BlockFace attachedFace = getAttachedFace();
|
|
return attachedFace == null ? null : attachedFace.getOppositeFace();
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return super.toString() + " facing " + getFacing();
|
|
}
|
|
|
|
@Override
|
|
public SimpleAttachableMaterialData clone() {
|
|
return (SimpleAttachableMaterialData) super.clone();
|
|
}
|
|
}
|