public static Block addBlock(String name, Block block) { // System.out.printf("%s: Adding block %s id %s\n", modName, name, // block.blockID); block.setUnlocalizedName("gcewing." + idToName.get(block.blockID)); GameRegistry.registerBlock(block); LanguageRegistry.addName(block, name); return block; }
@Override public void onUpdate() { // no homePos chosen yet OR home chest is missing if (homePos.x == 0 && homePos.y == 0 && homePos.z == 0 || Block.getIdFromBlock(worldObj.getBlock(homePos.x, homePos.y, homePos.z)) != CHEST_ID) { locateHome(); } this.foodStats.onUpdate(this); super.onUpdate(); }