Search in sources :

Example 1 with ItemTraverseWoodDoor

use of prospector.traverse.item.ItemTraverseWoodDoor in project Traverse by ProfessorProspector.

the class TraverseBlocks method addFirTreeStuff.

static void addFirTreeStuff() {
    String fir = "fir";
    FirLSCompound lsCompound = new FirLSCompound();
    register(lsCompound.lsLeaves);
    oreDictNames.put(lsCompound.lsLeaves, "treeLeaves");
    register(lsCompound.lsSapling);
    oreDictNames.put(lsCompound.lsSapling, "treeSapling");
    BlockTraverseWoodLog log = new BlockTraverseWoodLog(fir);
    register(log);
    oreDictNames.put(log, "logWood");
    BlockTraverseWoodPlanks planks = new BlockTraverseWoodPlanks(fir);
    register(planks);
    oreDictNames.put(planks, "plankWood");
    BlockTraverseStairs stairs = new BlockTraverseStairs(planks.getDefaultState(), fir);
    register(stairs);
    oreDictNames.put(stairs, "stairWood");
    BlockTraverseWoodSlab.Half halfSlab = new BlockTraverseWoodSlab.Half(fir);
    register(halfSlab, true);
    oreDictNames.put(halfSlab, "slabWood");
    BlockTraverseWoodSlab.Double doubleSlab = new BlockTraverseWoodSlab.Double(fir, halfSlab);
    register(doubleSlab, (ItemBlock) new ItemSlab(blocks.get(halfSlab.name + "_slab"), halfSlab, doubleSlab).setRegistryName(halfSlab.getRegistryName()));
    register(new BlockTraverseWoodFence(fir));
    register(new BlockTraverseWoodFenceGate(fir));
    BlockTraverseWoodDoor door = new BlockTraverseWoodDoor(fir);
    register(door, new ItemTraverseWoodDoor(door));
}
Also used : ItemSlab(net.minecraft.item.ItemSlab) FirLSCompound(prospector.traverse.blocks.FirLSCompound) ItemTraverseWoodDoor(prospector.traverse.item.ItemTraverseWoodDoor)

Example 2 with ItemTraverseWoodDoor

use of prospector.traverse.item.ItemTraverseWoodDoor in project Traverse by ProfessorProspector.

the class TraverseBlocks method initialize.

public static void initialize() {
    for (Block block : blocks.values()) {
        if (!(block instanceof BlockTraverseWoodSlab || block instanceof BlockTraverseWoodDoor)) {
            registerBlock(block);
        }
        if (block instanceof BlockTraverseWoodDoor) {
            registerBlock(block, new ItemTraverseWoodDoor(block));
        }
    }
    for (BlockTraverseWoodSlab halfSlab : slabs.keySet()) {
        BlockTraverseWoodSlab doubleSlab = slabs.get(halfSlab);
        registerBlockWithoutItem(halfSlab);
        registerBlockWithoutItem(doubleSlab);
        GameRegistry.register(new ItemSlab(blocks.get(halfSlab.name + "_slab"), halfSlab, doubleSlab), halfSlab.getRegistryName());
    }
    for (String name : oreDictNames.keySet()) {
        OreDictionary.registerOre(name, oreDictNames.get(name));
    }
}
Also used : ItemSlab(net.minecraft.item.ItemSlab) Block(net.minecraft.block.Block) ItemBlock(net.minecraft.item.ItemBlock) ItemTraverseWoodDoor(prospector.traverse.item.ItemTraverseWoodDoor)

Aggregations

ItemSlab (net.minecraft.item.ItemSlab)2 ItemTraverseWoodDoor (prospector.traverse.item.ItemTraverseWoodDoor)2 Block (net.minecraft.block.Block)1 ItemBlock (net.minecraft.item.ItemBlock)1 FirLSCompound (prospector.traverse.blocks.FirLSCompound)1