Search in sources :

Example 1 with EnumColor

use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.

the class BlockPostMetal method getState.

@Override
public IBlockState getState(@Nullable IVariantEnum variant) {
    IBlockState state = getDefaultState();
    if (variant != null) {
        checkVariant(variant);
        state = state.withProperty(COLOR, (EnumColor) variant);
    }
    return state;
}
Also used : EnumColor(mods.railcraft.common.plugins.color.EnumColor) IBlockState(net.minecraft.block.state.IBlockState)

Example 2 with EnumColor

use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.

the class BlockPostMetal method initializeDefinintion.

@Override
public void initializeDefinintion() {
    HarvestPlugin.setBlockHarvestLevel("pickaxe", 2, this);
    ForestryPlugin.addBackpackItem("forestry.builder", this);
    for (EnumColor color : EnumColor.VALUES) {
        ItemStack stack = getStack(1, color);
        if (stack != null)
            RailcraftRegistry.register(this, color, stack);
    }
}
Also used : EnumColor(mods.railcraft.common.plugins.color.EnumColor) ItemStack(net.minecraft.item.ItemStack)

Example 3 with EnumColor

use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.

the class LocomotivePaintingRecipe method getCraftingResult.

@Override
public ItemStack getCraftingResult(InventoryCrafting craftingGrid) {
    ItemStack dyePrimary = craftingGrid.getStackInRowAndColumn(1, 0);
    ItemStack loco = craftingGrid.getStackInRowAndColumn(1, 1);
    ItemStack dyeSecondary = craftingGrid.getStackInRowAndColumn(1, 2);
    if (InvTools.isEmpty(loco))
        return InvTools.emptyStack();
    EnumColor colorPrimary = getDye(dyePrimary);
    EnumColor colorSecondary = getDye(dyeSecondary);
    ItemStack result = loco.copy();
    if (colorPrimary != null && colorSecondary != null)
        ItemLocomotive.setItemColorData(result, colorPrimary, colorSecondary);
    return result;
}
Also used : EnumColor(mods.railcraft.common.plugins.color.EnumColor) ItemStack(net.minecraft.item.ItemStack)

Example 4 with EnumColor

use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.

the class ThaumcraftPlugin method registerAspects.

public static void registerAspects() {
    try {
        AspectList worldspikeAspects = new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.ORDER, 4).add(Aspect.AURA, 2).add(Aspect.DESIRE, 2);
        AspectList steamAspects = new AspectList().add(Aspect.WATER, 3).add(Aspect.MECHANISM, 2).add(Aspect.FIRE, 3);
        AspectList tankAspects = new AspectList().add(Aspect.VOID, 4).add(Aspect.WATER, 4);
        addBrickAspects(BrickTheme.ABYSSAL, Aspect.DARKNESS);
        addBrickAspects(BrickTheme.BLEACHEDBONE, Aspect.DEATH);
        addBrickAspects(BrickTheme.BLOODSTAINED, Aspect.LIFE);
        addBrickAspects(BrickTheme.FROSTBOUND, Aspect.COLD);
        addBrickAspects(BrickTheme.INFERNAL, 2, Aspect.FIRE, Aspect.SOUL);
        addBrickAspects(BrickTheme.NETHER, Aspect.FIRE);
        addBrickAspects(BrickTheme.QUARRIED, Aspect.LIGHT);
        addBrickAspects(BrickTheme.SANDY, Aspect.EARTH);
        addItemAspect(EnumGeneric.STONE_ABYSSAL.getStack(), new AspectList().add(Aspect.EARTH, 4).add(Aspect.DARKNESS, 2));
        addItemAspect(EnumGeneric.STONE_QUARRIED.getStack(), new AspectList().add(Aspect.EARTH, 4).add(Aspect.LIGHT, 2));
        addItemAspect(EnumGeneric.CRUSHED_OBSIDIAN.getStack(), copyAspects(Blocks.OBSIDIAN).remove(Aspect.EARTH, 1).add(Aspect.ENTROPY, 1).add(Aspect.ELDRITCH, 1));
        addItemAspect(EnumGeneric.BLOCK_CONCRETE.getStack(), new AspectList().add(Aspect.EARTH, 3).add(Aspect.METAL, 1));
        addItemAspect(EnumGeneric.BLOCK_CREOSOTE.getStack(), new AspectList().add(Aspect.PLANT, 3).add(Aspect.ORDER, 1));
        addItemAspect(EnumOre.DARK_DIAMOND.getStack(), copyAspects(Blocks.DIAMOND_ORE).add(Aspect.DARKNESS, 1));
        addItemAspect(EnumOre.DARK_EMERALD.getStack(), copyAspects(Blocks.EMERALD_ORE).add(Aspect.DARKNESS, 1));
        addItemAspect(EnumOre.DARK_LAPIS.getStack(), copyAspects(Blocks.LAPIS_ORE).add(Aspect.DARKNESS, 1));
        addItemAspect(EnumOre.SULFUR.getStack(), new AspectList().add(Aspect.EARTH, 1).add(Aspect.FIRE, 3));
        addItemAspect(EnumOre.SALTPETER.getStack(), new AspectList().add(Aspect.EARTH, 1).add(Aspect.AIR, 3));
        addItemAspect(EnumOreMagic.FIRESTONE.getStack(), new AspectList().add(Aspect.EARTH, 1).add(Aspect.FIRE, 6).add(Aspect.ENTROPY, 1));
        addItemAspect(RailcraftItems.DUST.getStack(ItemDust.EnumDust.SULFUR), new AspectList().add(Aspect.ENTROPY, 1).add(Aspect.FIRE, 3));
        addItemAspect(RailcraftItems.DUST.getStack(ItemDust.EnumDust.SALTPETER), new AspectList().add(Aspect.ENTROPY, 1).add(Aspect.AIR, 3));
        addItemAspect(RailcraftItems.DUST.getStack(ItemDust.EnumDust.CHARCOAL), new AspectList().add(Aspect.ENTROPY, 1).add(Aspect.FIRE, 2));
        addItemAspect(RailcraftItems.DUST.getStack(ItemDust.EnumDust.OBSIDIAN), copyAspects(Blocks.OBSIDIAN).remove(Aspect.EARTH, 2).add(Aspect.ENTROPY, 1));
        addItemAspect(RailcraftItems.REBAR.getStack(), new AspectList().add(Aspect.METAL, 1));
        addItemAspect(RailcraftItems.RAIL.getStack(1, EnumRail.STANDARD), new AspectList().add(Aspect.METAL, 1));
        addItemAspect(RailcraftItems.RAIL.getStack(1, EnumRail.REINFORCED), new AspectList().add(Aspect.METAL, 1).add(Aspect.ORDER, 1));
        addItemAspect(RailcraftItems.RAIL.getStack(1, EnumRail.WOOD), new AspectList().add(Aspect.PLANT, 1));
        addItemAspect(RailcraftItems.RAIL.getStack(1, EnumRail.ADVANCED), new AspectList().add(Aspect.METAL, 1).add(Aspect.MECHANISM, 1));
        addItemAspect(RailcraftItems.RAIL.getStack(1, EnumRail.SPEED), new AspectList().add(Aspect.METAL, 1).add(Aspect.MOTION, 1));
        addItemAspect(RailcraftItems.TIE.getStack(1, EnumTie.WOOD), new AspectList().add(Aspect.PLANT, 3).add(Aspect.ORDER, 1));
        addItemAspect(RailcraftItems.TIE.getStack(1, EnumTie.STONE), new AspectList().add(Aspect.EARTH, 3).add(Aspect.METAL, 1));
        addItemAspect(RailcraftItems.COKE.getStack(), new AspectList().add(Aspect.FIRE, 4).add(Aspect.ENERGY, 4));
        addItemAspect(RailcraftItems.PLATE.getStack(1, Metal.IRON), new AspectList().add(Aspect.METAL, 4));
        addItemAspect(RailcraftItems.PLATE.getStack(1, Metal.STEEL), new AspectList().add(Aspect.METAL, 3).add(Aspect.ORDER, 1));
        addItemAspect(RailcraftItems.PLATE.getStack(1, Metal.TIN), new AspectList().add(Aspect.METAL, 3));
        addItemAspect(RailcraftItems.GEAR.getStack(EnumGear.BRASS), new AspectList().add(Aspect.METAL, 4).add(Aspect.ORDER, 1).add(Aspect.MECHANISM, 2).add(Aspect.DESIRE, 2));
        addItemAspect(RailcraftItems.GEAR.getStack(EnumGear.BUSHING), new AspectList().add(Aspect.METAL, 1).add(Aspect.ORDER, 1).add(Aspect.MECHANISM, 1));
        addItemAspect(RailcraftItems.GEAR.getStack(EnumGear.IRON), new AspectList().add(Aspect.METAL, 4).add(Aspect.ORDER, 1).add(Aspect.MECHANISM, 4));
        addItemAspect(RailcraftItems.GEAR.getStack(EnumGear.STEEL), new AspectList().add(Aspect.METAL, 8).add(Aspect.ORDER, 2).add(Aspect.MECHANISM, 4));
        addItemAspect(EquipmentVariant.ROLLING_MACHINE_POWERED.getStack(), new AspectList().add(Aspect.CRAFT, 6).add(Aspect.MECHANISM, 2));
        addItemAspect(EnumMachineAlpha.ROCK_CRUSHER.getStack(), new AspectList().add(Aspect.CRAFT, 2).add(Aspect.MECHANISM, 4).add(Aspect.EARTH, 4).add(Aspect.EARTH, 4));
        addItemAspect(EquipmentVariant.FEED_STATION.getStack(), new AspectList().add(Aspect.PLANT, 4).add(Aspect.BEAST, 4).add(Aspect.MECHANISM, 2));
        addItemAspect(EquipmentVariant.SMOKER.getStack(), new AspectList().add(Aspect.FIRE, 4).add(Aspect.AIR, 4).add(Aspect.MECHANISM, 2));
        addItemAspect(EquipmentVariant.SMOKER.getStack(), new AspectList().add(Aspect.FIRE, 4).add(Aspect.AIR, 4).add(Aspect.MECHANISM, 2));
        addItemAspect(EnumMachineAlpha.STEAM_TRAP_MANUAL.getStack(), steamAspects.copy().add(Aspect.TRAP, 4));
        addItemAspect(EnumMachineAlpha.STEAM_TRAP_AUTO.getStack(), steamAspects.copy().add(Aspect.TRAP, 4).add(Aspect.MIND, 2));
        addItemAspect(EnumMachineAlpha.STEAM_OVEN.getStack(), steamAspects.copy().add(Aspect.FIRE, 3));
        addItemAspect(EnumMachineAlpha.TURBINE.getStack(), steamAspects.copy().add(Aspect.ENERGY, 4));
        addItemAspect(WorldspikeVariant.ADMIN.getStack(), worldspikeAspects);
        addItemAspect(WorldspikeVariant.PERSONAL.getStack(), worldspikeAspects);
        addItemAspect(WorldspikeVariant.STANDARD.getStack(), worldspikeAspects);
        addItemAspect(RailcraftBlocks.WORLDSPIKE_POINT.getStack(), worldspikeAspects);
        addItemAspect(EnumMachineBeta.BOILER_FIREBOX_SOLID.getStack(), steamAspects.copy().add(Aspect.ENERGY, 2));
        addItemAspect(EnumMachineBeta.BOILER_FIREBOX_FLUID.getStack(), steamAspects.copy().add(Aspect.ENERGY, 2));
        addItemAspect(EnumMachineBeta.BOILER_TANK_LOW_PRESSURE.getStack(), steamAspects.copy().add(Aspect.ENERGY, 2));
        addItemAspect(EnumMachineBeta.BOILER_TANK_HIGH_PRESSURE.getStack(), steamAspects.copy().add(Aspect.ENERGY, 2));
        addItemAspect(EnumMachineBeta.ENGINE_STEAM_HOBBY.getStack(), steamAspects.copy().add(Aspect.ENERGY, 4));
        addItemAspect(EnumMachineBeta.ENGINE_STEAM_LOW.getStack(), steamAspects.copy().add(Aspect.ENERGY, 4));
        addItemAspect(EnumMachineBeta.ENGINE_STEAM_HIGH.getStack(), steamAspects.copy().add(Aspect.ENERGY, 4));
        addItemAspect(EnumMachineAlpha.TANK_WATER.getStack(), tankAspects.copy().add(Aspect.PLANT, 2).add(Aspect.WATER, 2));
        AspectList ironTankAspects = tankAspects.copy().add(Aspect.METAL, 2);
        addItemAspect(EnumMachineBeta.TANK_IRON_GAUGE.getStack(), ironTankAspects);
        addItemAspect(EnumMachineBeta.TANK_IRON_VALVE.getStack(), ironTankAspects);
        addItemAspect(EnumMachineBeta.TANK_IRON_WALL.getStack(), ironTankAspects);
        addItemAspect(EnumMachineBeta.TANK_STEEL_GAUGE.getStack(), ironTankAspects);
        addItemAspect(EnumMachineBeta.TANK_STEEL_VALVE.getStack(), ironTankAspects);
        addItemAspect(EnumMachineBeta.TANK_STEEL_WALL.getStack(), ironTankAspects);
        AspectList detectorAspects = new AspectList().add(Aspect.SENSES, 4).add(Aspect.MECHANISM, 4);
        for (EnumDetector detector : EnumDetector.VALUES) {
            addItemAspect(detector.getStack(), detectorAspects);
        }
        AspectList glassAspects = new AspectList().add(Aspect.CRYSTAL, 4).add(Aspect.METAL, 1);
        for (EnumColor color : EnumColor.VALUES) {
            addItemAspect(RailcraftBlocks.GLASS.getStack(color), glassAspects);
        }
        addItemAspect(RailcraftBlocks.ANVIL_STEEL.getStack(), new AspectList().add(Aspect.CRAFT, 4).add(Aspect.EXCHANGE, 2).add(Aspect.METAL, 4).add(Aspect.ORDER, 2));
        addCartAspect(RailcraftCarts.LOCO_STEAM_SOLID, steamAspects.copy().add(Aspect.MOTION, 2).add(Aspect.MECHANISM, 4));
        addCartAspect(RailcraftCarts.LOCO_ELECTRIC, new AspectList().add(Aspect.FLUX, 6).add(Aspect.MECHANISM, 6).add(Aspect.MOTION, 2));
        addCartAspect(RailcraftCarts.PUMPKIN, new AspectList(new ItemStack(Blocks.PUMPKIN)).add(Aspect.MOTION, 2).add(Aspect.ENTROPY, 6));
        addCartAspect(RailcraftCarts.WORLDSPIKE_STANDARD, worldspikeAspects.copy().add(Aspect.MOTION, 2));
        addCartAspect(RailcraftCarts.WORLDSPIKE_ADMIN, worldspikeAspects.copy().add(Aspect.MOTION, 2));
        addCartAspect(RailcraftCarts.WORLDSPIKE_PERSONAL, worldspikeAspects.copy().add(Aspect.MOTION, 2));
        addItemAspect(RailcraftItems.GOGGLES.getStack(), new AspectList().add(Aspect.AURA, 4).add(Aspect.SENSES, 4));
        addItemAspect(RailcraftItems.FIRESTONE_RAW.getStack(), new AspectList().add(Aspect.FIRE, 6).add(Aspect.CRYSTAL, 2).add(Aspect.ENTROPY, 4));
        addItemAspect(RailcraftItems.FIRESTONE_CUT.getStack(), new AspectList().add(Aspect.FIRE, 6).add(Aspect.CRYSTAL, 2).add(Aspect.ENTROPY, 2).add(Aspect.ORDER, 2));
        addItemAspect(ItemFirestoneRefined.getItemCharged(), new AspectList().add(Aspect.FIRE, 6).add(Aspect.CRYSTAL, 2).add(Aspect.ORDER, 4));
        addItemAspect(ItemFirestoneCracked.getItemCharged(), new AspectList().add(Aspect.FIRE, 6).add(Aspect.CRYSTAL, 2).add(Aspect.ENTROPY, 4));
    } catch (Throwable error) {
        Game.logErrorAPI("Thaumcraft", error, ThaumcraftApi.class);
    }
}
Also used : EnumColor(mods.railcraft.common.plugins.color.EnumColor) AspectList(thaumcraft.api.aspects.AspectList) ThaumcraftApi(thaumcraft.api.ThaumcraftApi) EnumDetector(mods.railcraft.common.blocks.detector.EnumDetector) ItemStack(net.minecraft.item.ItemStack)

Example 5 with EnumColor

use of mods.railcraft.common.plugins.color.EnumColor in project Railcraft by Railcraft.

the class LocomotivePaintingRecipe method getIngredients.

@Override
public NonNullList<Ingredient> getIngredients() {
    NonNullList<Ingredient> ingredients = NonNullList.withSize(9, Ingredient.EMPTY);
    Ingredient dye = Ingredients.from(Stream.of(EnumColor.VALUES).map(EnumColor::getIngredient).toArray(Object[]::new));
    ingredients.set(1, dye);
    ingredients.set(4, Ingredients.from(locomotive));
    ingredients.set(7, dye);
    return ingredients;
}
Also used : EnumColor(mods.railcraft.common.plugins.color.EnumColor) Ingredient(net.minecraft.item.crafting.Ingredient)

Aggregations

EnumColor (mods.railcraft.common.plugins.color.EnumColor)21 ItemStack (net.minecraft.item.ItemStack)7 IBlockState (net.minecraft.block.state.IBlockState)4 GameProfile (com.mojang.authlib.GameProfile)2 Emblem (mods.railcraft.client.emblems.Emblem)2 EntityLocomotive (mods.railcraft.common.carts.EntityLocomotive)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 FluidStack (net.minecraftforge.fluids.FluidStack)2 LocomotiveModelRenderer (mods.railcraft.api.carts.locomotive.LocomotiveModelRenderer)1 LocomotiveRenderType (mods.railcraft.api.carts.locomotive.LocomotiveRenderType)1 LocomotiveModelRenderer (mods.railcraft.client.render.carts.LocomotiveModelRenderer)1 EnumDetector (mods.railcraft.common.blocks.detector.EnumDetector)1 Ingredient (net.minecraft.item.crafting.Ingredient)1 EnumFacing (net.minecraft.util.EnumFacing)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1 ThaumcraftApi (thaumcraft.api.ThaumcraftApi)1 AspectList (thaumcraft.api.aspects.AspectList)1