本文整理汇总了Java中org.spongepowered.api.data.manipulator.mutable.block.DecayableData类的典型用法代码示例。如果您正苦于以下问题:Java DecayableData类的具体用法?Java DecayableData怎么用?Java DecayableData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DecayableData类属于org.spongepowered.api.data.manipulator.mutable.block包,在下文中一共展示了DecayableData类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LeavesDataConverter
import org.spongepowered.api.data.manipulator.mutable.block.DecayableData; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private LeavesDataConverter() {
converters.put(
ImmutableBiMap.<AbstractDataValue, Byte>builder()
.put(new LogDataConverter.TreeDataValue(TreeTypes.OAK), (byte) 0)
.put(new LogDataConverter.TreeDataValue(TreeTypes.SPRUCE), (byte) 1)
.put(new LogDataConverter.TreeDataValue(TreeTypes.BIRCH), (byte) 2)
.put(new LogDataConverter.TreeDataValue(TreeTypes.JUNGLE), (byte) 3)
.build(),
(byte) 2
);
applicableTypes.add(TreeData.class);
converters.put(
ImmutableBiMap.<AbstractDataValue, Byte>builder()
.put(new DecayableDataValue(false), (byte) 0)
.put(new DecayableDataValue(true), (byte) 1)
.build(),
(byte) 1
);
applicableTypes.add(DecayableData.class);
}
示例2: Leaves2DataConverter
import org.spongepowered.api.data.manipulator.mutable.block.DecayableData; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private Leaves2DataConverter() {
converters.put(
ImmutableBiMap.<AbstractDataValue, Byte>builder()
.put(new TreeDataValue(TreeTypes.ACACIA), (byte) 0)
.put(new TreeDataValue(TreeTypes.DARK_OAK), (byte) 1)
.build(),
(byte) 2
);
applicableTypes.add(TreeData.class);
converters.put(
ImmutableBiMap.<AbstractDataValue, Byte>builder()
.put(new DecayableDataValue(false), (byte) 0)
.put(new DecayableDataValue(true), (byte) 1)
.build(),
(byte) 1
);
applicableTypes.add(DecayableData.class);
}
示例3: DecayableDataView
import org.spongepowered.api.data.manipulator.mutable.block.DecayableData; //导入依赖的package包/类
public DecayableDataView(DecayableData value) {
super(value);
this.decayable = value.decayable().get();
}
示例4: DecayableDataValue
import org.spongepowered.api.data.manipulator.mutable.block.DecayableData; //导入依赖的package包/类
DecayableDataValue(boolean flag) {
super(DecayableData.class, flag ? FLAG : ABSENT);
}