use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.
the class BlockPostMetalBase method initializeDefinition.
@Override
public void initializeDefinition() {
HarvestPlugin.setBlockHarvestLevel("pickaxe", 2, this);
ForestryPlugin.addBackpackItem("forestry.builder", this);
for (EnumColor color : EnumColor.VALUES) {
ItemStack stack = getStack(1, color);
if (!stack.isEmpty())
RailcraftRegistry.register(this, color, stack);
}
}
use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.
the class TilePostEmblem method readPacketData.
@Override
public void readPacketData(RailcraftInputStream data) throws IOException {
super.readPacketData(data);
boolean needsUpdate = false;
EnumFacing f = EnumFacing.byIndex(data.readByte());
if (facing != f) {
facing = f;
needsUpdate = true;
}
byte cByte = data.readByte();
if (cByte < 0) {
if (color != null) {
color = null;
needsUpdate = true;
}
} else {
EnumColor c = EnumColor.fromOrdinal(cByte);
if (color != c) {
color = c;
needsUpdate = true;
}
}
emblem = data.readUTF();
if (needsUpdate)
markBlockForUpdate();
}
use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.
the class BlockReinforcedConcrete method getState.
@Override
public IBlockState getState(@Nullable IVariantEnum variant) {
IBlockState state = getDefaultState();
if (variant != null) {
checkVariant(variant);
state = state.withProperty(getVariantEnumProperty(), (EnumColor) variant);
}
return state;
}
use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.
the class BlockReinforcedConcrete method defineRecipes.
@Override
public void defineRecipes() {
super.defineRecipes();
for (EnumColor color : EnumColor.VALUES) {
CraftingPlugin.addShapedRecipe(getStack(8, color), "GGG", "GDG", "GGG", 'G', RailcraftBlocks.REINFORCED_CONCRETE.getWildcard(), 'D', color.getDyeOreDictTag());
}
// TODO: Make it craft a powder ALA Vanilla? World interaction may not be such a bad idea, and we can get rid of the fluid crafting in exchange for crafting colors directly...
FluidStack water = Fluids.WATER.get(FluidTools.BUCKET_VOLUME);
CraftingPlugin.addShapedRecipe(getStack(8, EnumColor.SILVER), "SIS", "IWI", "SIS", 'W', water, 'I', RailcraftItems.REBAR, 'S', RailcraftItems.CONCRETE);
}
use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.
the class BlockStrengthGlass method getState.
@Override
public IBlockState getState(@Nullable IVariantEnum variant) {
IBlockState state = getDefaultState();
if (variant != null) {
checkVariant(variant);
state = state.withProperty(EnumColor.PROPERTY, (EnumColor) variant);
}
return state;
}
Aggregations