Package thaumic.tinkerer.common.block.tile

Examples of thaumic.tinkerer.common.block.tile.TileInfusedGrain


    public void processCommand(ICommandSender sender, String[] args) {
        if (sender instanceof EntityPlayer) {
            EntityPlayer player = (EntityPlayer) sender;
            MovingObjectPosition pos = BlockUtils.getTargetBlock(player.worldObj, player, true);
            if (player.worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ) instanceof TileInfusedGrain) {
                TileInfusedGrain tile = (TileInfusedGrain) player.worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
                for (Aspect a : Aspect.getPrimalAspects()) {
                    if (args[0].toUpperCase().equals(a.getName().toUpperCase())) {
                        try {
                            tile.primalTendencies.merge(a, Integer.parseInt(args[1]));
                            tile.reduceSaturatedAspects();
                        } catch (NumberFormatException e) {
                            sender.addChatMessage(new ChatComponentText("Invalid number"));
                        }
                    }
                }
View Full Code Here


        return TileInfusedGrain.class;
    }

    @Override
    public TileEntity createTileEntity(World world, int metadata) {
        return new TileInfusedGrain();
    }
View Full Code Here

TOP

Related Classes of thaumic.tinkerer.common.block.tile.TileInfusedGrain

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.