Search in sources :

Example 1 with BlockMatcher

use of betterwithaddons.block.Factorization.BlockMatcher in project BetterWithAddons by DaedalusGame.

the class ModBlocks method load.

public static void load(FMLPreInitializationEvent event) {
    // FluidRegistry.registerFluid(new Fluid("brine", new ResourceLocation(Reference.MOD_ID, "blocks/brine_still"), new ResourceLocation(Reference.MOD_ID, "blocks/brine_flow")));
    // FluidRegistry.registerFluid(new Fluid("salinated_brine", new ResourceLocation(Reference.MOD_ID, "blocks/salinated_brine_still"), new ResourceLocation(Reference.MOD_ID, "blocks/salinated_brine_flow")));
    registerBlock(new BlockBannerDetector());
    registerBlock(new BlockWorldScale());
    registerBlock(new BlockWorldScaleOre());
    registerBlock(new BlockWorldScaleActive());
    registerBlock(new BlockElytraMagma());
    registerBlock(new BlockExtraGrass());
    registerBlock(new BlockWirePCB(), null, false);
    registerBlock(new BlockPCB());
    registerBlock(new BlockLattice());
    registerBlock(new BlockThornRose());
    registerBlock(new BlockThorns());
    registerBlock(new BlockChute());
    registerBlock(new BlockAqueduct());
    registerBlock(new BlockAqueductWater(), null, false);
    registerBlock(new BlockRedstoneEmitter());
    registerBlock(new BlockMatcher());
    registerBlock(new BlockLegendarium());
    // registerBlock(new BlockPondBase());
    // registerBlock(new BlockBrine(), null, false);
    // registerBlock(new BlockSaltLayer());
    registerBlock(new BlockWeight("weight_wood") {

        @Override
        public boolean decideActivity(boolean isEmpty, boolean isFull) {
            return !isEmpty;
        }
    });
    registerBlock(new BlockWeight("weight_stone") {

        @Override
        public boolean decideActivity(boolean isEmpty, boolean isFull) {
            return isFull;
        }
    });
    registerBlock(new BlockScaffold("scaffold"));
    registerBlock(new BlockRopeSideways("rope_sideways"), null, false);
    registerBlock(new BlockRopePost("rope_post"), null, false);
    registerBlock(new BlockSpindle());
    registerBlock(new BlockLoom());
    // alchDragon = (BlockAlchDragon) registerBlock(new BlockAlchDragon());
    registerBlock(new BlockModLeaves(ModWoods.LURETREE));
    registerBlock(new BlockLureTreeSapling());
    registerBlock(new BlockModLog(ModWoods.LURETREE));
    registerBlock(new BlockLureTree());
    registerBlock(new BlockModLeaves(ModWoods.MULBERRY));
    registerBlock(new BlockModSapling(ModWoods.MULBERRY));
    registerBlock(new BlockModLog(ModWoods.MULBERRY));
    registerBlock(new BlockModPlanks(ModWoods.MULBERRY));
    registerBlock(new BlockCherryLeaves(ModWoods.SAKURA));
    registerBlock(new BlockModSapling(ModWoods.SAKURA));
    registerBlock(new BlockModLog(ModWoods.SAKURA));
    registerBlock(new BlockModPlanks(ModWoods.SAKURA));
    registerBlock(new BlockAncestrySand());
    registerBlock(new BlockInfuser());
    registerBlock(new BlockCherryLeafPile());
    registerBlock(new BlockCropRush(), ItemBlockSeed.class, false);
    registerBlock(new BlockCropRice(), ItemBlockSeed.class, false);
    registerBlock(new BlockBamboo());
    registerBlock(new BlockSlat());
    registerBlock(new BlockNettedScreen());
    registerBlock(new BlockIronSand());
    registerBlock(new BlockKera());
    registerBlock(new BlockTatara());
    registerBlock(new BlockCherryBox());
    registerBlock(new BlockModPane("shoji", Material.WOOD).setHardness(1.0f));
    registerBlock(new BlockFusumaPainted("fusuma").setHardness(1.0f));
    registerBlock(new BlockTatami().setHardness(1.0f));
    registerBlock(new BlockSoap());
    registerBlock(new BlockChandelier().setLightLevel(0.9375F));
    registerBlock(new BlockModPane("paper_wall", Material.WOOD).setHardness(1.0f));
    registerBlock(new BlockModPane("wrought_bars", Material.IRON).setHardness(5.0f));
    registerBlock(new BlockLantern("wood_lamp", Material.WOOD).setHardness(1.0f));
    registerBlock(new BlockLantern("wrought_lamp", Material.IRON).setHardness(5.0f));
    registerBlock(new BlockPavement());
    registerBlock(new BlockWhiteBrick());
    registerBlock(new BlockBox());
    registerBlock(new BlockColoredBrick(), ItemCloth.class, true);
    registerBlock(new BlockModUnbaked());
    registerBlock(new BlockAdobe("adobe", new AdobeType[] { AdobeType.MOSTLY_CLAY, AdobeType.CLAYSAND, AdobeType.SANDCLAY, AdobeType.MOSTLY_SAND, AdobeType.MOSTLY_STRAW, AdobeType.LIGHT, AdobeType.DARK, AdobeType.MOSTLY_DUNG }));
    registerBlock(new BlockReplacement("pond_replacement") {

        @Override
        public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
            switch(state.getValue(BlockReplacement.META)) {
                case (0):
                case (1):
                    drops.add(new ItemStack(adobe, 1, 1));
                    break;
                case (2):
                    drops.add(new ItemStack(adobe, 1, 9));
                    break;
            }
        }
    });
    registerBlock(new BlockEcksieSapling("ecksie_sapling") {

        @Override
        public IBlockState getLeafBlock(int type) {
            switch(type) {
                case (0):
                    return Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK).withProperty(BlockLeaves.DECAYABLE, false);
                case (1):
                    return Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.BIRCH).withProperty(BlockLeaves.DECAYABLE, false);
                case (2):
                    return Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.SPRUCE).withProperty(BlockLeaves.DECAYABLE, false);
                case (3):
                    return Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.JUNGLE).withProperty(BlockLeaves.DECAYABLE, false);
                case (4):
                    return Blocks.LEAVES2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.ACACIA).withProperty(BlockLeaves.DECAYABLE, false);
                case (5):
                    return Blocks.LEAVES2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.DARK_OAK).withProperty(BlockLeaves.DECAYABLE, false);
                case (6):
                    return ModBlocks.sakuraLeaves.getDefaultState().withProperty(BlockLeaves.DECAYABLE, false);
                case (7):
                    return ModBlocks.mulberryLeaves.getDefaultState().withProperty(BlockLeaves.DECAYABLE, false);
                case (8):
                    return ModBlocks.luretreeLeaves.getDefaultState().withProperty(BlockLeaves.DECAYABLE, false);
                default:
                    return null;
            }
        }

        @Override
        public int getTypes() {
            return 9;
        }
    });
    registerBlock(new BlockInvertedGearbox("inverted_gearbox"));
}
Also used : BlockMatcher(betterwithaddons.block.Factorization.BlockMatcher) BlockPos(net.minecraft.util.math.BlockPos) BlockPCB(betterwithaddons.block.BetterRedstone.BlockPCB) IBlockState(net.minecraft.block.state.IBlockState) ItemStack(net.minecraft.item.ItemStack) BlockWirePCB(betterwithaddons.block.BetterRedstone.BlockWirePCB) BlockLegendarium(betterwithaddons.block.Factorization.BlockLegendarium) IBlockAccess(net.minecraft.world.IBlockAccess)

Aggregations

BlockPCB (betterwithaddons.block.BetterRedstone.BlockPCB)1 BlockWirePCB (betterwithaddons.block.BetterRedstone.BlockWirePCB)1 BlockLegendarium (betterwithaddons.block.Factorization.BlockLegendarium)1 BlockMatcher (betterwithaddons.block.Factorization.BlockMatcher)1 IBlockState (net.minecraft.block.state.IBlockState)1 ItemStack (net.minecraft.item.ItemStack)1 BlockPos (net.minecraft.util.math.BlockPos)1 IBlockAccess (net.minecraft.world.IBlockAccess)1