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"));
}
}
}