@Override public TemperatureTicker initializeTempTicker() { TemperatureTicker tempTicker = new TemperatureTicker(); TickRegistry.registerTickHandler(tempTicker, Side.SERVER); TickRegistry.registerTickHandler(new TemperatureTicker(), Side.CLIENT); TickRegistry.registerTickHandler(new DisplayTemperatureTicker(), Side.CLIENT); return tempTicker; }
@PostInit @SideOnly(Side.CLIENT) public void postInit(FMLPostInitializationEvent evt) { bgm = SoundManager.sndSystem; options = FMLClientHandler.instance().getClient().gameSettings; playMenuMusic("bgm.menu"); TickRegistry.registerTickHandler(new TickHandler(), Side.CLIENT); }
@EventHandler public void load(FMLInitializationEvent evt) { lightLevel = 0; enabled = false; lastWorld = null; TickRegistry.registerTickHandler(new TickHandler(), Side.CLIENT); }
@Init public void load(FMLInitializationEvent event) { proxy.Init(); InitEntities.Init(); InitBlocks.Init(); InitItems.Init(); NetworkRegistry.instance().registerGuiHandler(instance, proxy); TickRegistry.registerTickHandler(new CommonTickHandler(), Side.SERVER); TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); MinecraftForge.EVENT_BUS.register(new EntityLivingHandler()); }
@Override public void registerBlocks() { GameRegistry.registerBlock(saltOre, "saltOre"); GameRegistry.registerBlock(platinumOre, "platinumOre"); GameRegistry.registerBlock(leadOre, "leadOre"); GameRegistry.registerBlock(cinnabarOre, "cinnabarOre"); GameRegistry.registerBlock(carobbiiteOre, "carobiiteOre"); TickRegistry.registerScheduledTickHandler(new ScheduledTickHandler(), Side.SERVER); GameRegistry.registerTileEntity(TileLabBench.class, "LabBench"); }
@EventHandler public void init(FMLInitializationEvent event) { proxy.setupConfiguration(); proxy.registerBlocks(); proxy.registerTileEntities(); proxy.registerItems(); proxy.registerRenderers(); NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); TickRegistry.registerTickHandler(new GoggleTickHandler(), Side.CLIENT); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { for (Block block : Block.blocksList) { if (block instanceof BlockFluid || block instanceof IFluidBlock || block instanceof IPlantable) { BuildCraftAPI.softBlocks[block.blockID] = true; } } BuildCraftAPI.softBlocks[Block.snow.blockID] = true; BuildCraftAPI.softBlocks[Block.vine.blockID] = true; BuildCraftAPI.softBlocks[Block.fire.blockID] = true; TickRegistry.registerTickHandler(new TickHandlerCoreClient(), Side.CLIENT); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Initialize the log helper LogHelper.init(); // Load the localization files into the LanguageRegistry LocalizationHandler.loadLanguages(); // Initialize the configuration ConfigurationHandler.init( new File( event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); // Conduct the version check and log the result VersionHelper.execute(); // Initialize the Version Check Tick Handler (Client only) TickRegistry.registerTickHandler(new VersionCheckTickHandler(), Side.CLIENT); // Initialize the Render Tick Handler (Client only) proxy.registerRenderTickHandler(); // Register the KeyBinding Handler (Client only) proxy.registerKeyBindingHandler(); // Register the Sound Handler (Client only) proxy.registerSoundHandler(); // Initialize mod blocks ModBlocks.init(); // Initialize mod items ModItems.init(); }
@Init public void init(FMLInitializationEvent evt) { WCLanguage.init(evt); GameRegistry.registerTileEntity(TileEntityWarpInfuser.class, "Infuser"); // Ore Generation GameRegistry.registerWorldGenerator(new WorldGeneratorWarpCraft()); // Register Rendering Information proxy.registerRenderInformation(); proxy.registerEntityInformation(); // Register Dimension EntityRegistry.addSpawn( EntityRat.class, 5, 2, 3, EnumCreatureType.monster, WCBiomeGenBase.warp); EntityRegistry.addSpawn( EntitySquig.class, 2, 1, 2, EnumCreatureType.monster, WCBiomeGenBase.warp); // stuff TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); }
public TaskRegistry() { instance = this; ticks = new TickTaskHandler(); TickRegistry.registerTickHandler(ticks, Side.SERVER); }
/** * Start measuring statistics. This will immediately create an async repeating task as the plugin * and send the initial data to the metrics backend, and then after that it will post in * increments of PING_INTERVAL * 1200 ticks. * * @return True if statistics measuring is running, otherwise false. */ public boolean start() { // Did we opt out? if (isOptOut()) { return false; } stopped = false; // Is metrics already running? if (task != null) { return true; } // Begin hitting the server with glorious data task = new IScheduledTickHandler() { private boolean firstPost = true; private Thread thrd = null; @Override public void tickStart(EnumSet<TickType> type, Object... tickData) {} @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if (stopped) { return; } // Disable Task, if it is running and the server owner decided // to opt-out if (isOptOut()) { // Tell all plotters to stop gathering information. for (Graph graph : graphs) { graph.onOptOut(); } stopped = true; return; } if (thrd == null) { thrd = new Thread( new Runnable() { @Override public void run() { try { // We use the inverse of firstPost because if it // is the first time we are posting, // it is not a interval ping, so it evaluates to // FALSE // Each time thereafter it will evaluate to // TRUE, i.e PING! postPlugin(!firstPost); // After the first post we set firstPost to // false // Each post thereafter will be a ping firstPost = false; } catch (IOException e) { if (debug) { FMLLog.info("[Metrics] Exception - %s", e.getMessage()); } } finally { thrd = null; } } }); thrd.start(); } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.SERVER); } @Override public String getLabel() { return modname + " Metrics"; } @Override public int nextTickSpacing() { if (firstPost) { return 100; } else { return PING_INTERVAL * 1200; } } }; TickRegistry.registerScheduledTickHandler(task, Side.SERVER); return true; }
public DaytimeManager() { TickRegistry.registerTickHandler(this, Side.SERVER); }
@Override public void serverStarted(FMLServerStartedEvent e) { TickRegistry.registerScheduledTickHandler(new TickHandlerCommands(), Side.SERVER); if (removeDuplicateCommands) removeDuplicateCommands(FMLCommonHandler.instance().getMinecraftServerInstance()); }
public void registerHandlers() { TickRegistry.registerTickHandler(new PlayerTickHandler(), Side.SERVER); }
/** Registers the tick handler * */ public void registerTickHandler() { TickRegistry.registerTickHandler(TickHandler.INSTANCE, Side.SERVER); }
@PreInit public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(proxy); TickRegistry.registerScheduledTickHandler(new ForceFieldClientUpdatehandler(), Side.CLIENT); TickRegistry.registerScheduledTickHandler(new ForceFieldServerUpdatehandler(), Side.SERVER); MFFSconfig = new Configuration(event.getSuggestedConfigurationFile()); event.getModMetadata().version = Versioninfo.curentversion(); try { MFFSconfig.load(); MFFSTab = new MFFSCreativeTab(CreativeTabs.getNextID(), "MFFS"); Property zapperParticles = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "renderZapperParticles", true); zapperParticles.comment = "Set this to false to turn off the small smoke particles present around TouchDamage enabled ForceFields."; showZapperParticles = zapperParticles.getBoolean(true); Property monazitWorldAmount = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "MonazitOreWorldGen", 4); monazitWorldAmount.comment = "Controls the size of the ore node that Monazit Ore will generate in"; MonazitOreworldamount = monazitWorldAmount.getInt(4); Property adminList = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "ForceFieldMaster", "nobody"); adminList.comment = "Add users to this list to give them admin permissions"; Admin = adminList.value; Property influencedByOther = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "influencedbyothermods", true); influencedByOther.comment = "Should MFFS be influenced by other mods. e.g. ICBM's EMP"; influencedbyothermods = influencedByOther.getBoolean(true); Property ffRemoveWaterLavaOnly = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldremoveonlywaterandlava", false); ffRemoveWaterLavaOnly.comment = "Should forcefields only remove water and lava when sponge is enabled?"; forcefieldremoveonlywaterandlava = ffRemoveWaterLavaOnly.getBoolean(false); Property feTransportCost = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldtransportcost", 10000); feTransportCost.comment = "How much FE should it cost to transport through a field?"; forcefieldtransportcost = feTransportCost.getInt(10000); Property feFieldBlockCost = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldblockcost", 1); feFieldBlockCost.comment = "How much upkeep FE cost a default ForceFieldblock per second"; forcefieldblockcost = feFieldBlockCost.getInt(1); Property BlockCreateMod = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldblockcreatemodifier", 10); BlockCreateMod.comment = "Energy need for create a ForceFieldblock (forcefieldblockcost*forcefieldblockcreatemodifier)"; forcefieldblockcreatemodifier = BlockCreateMod.getInt(10); Property ffZapperMod = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldblockzappermodifier", 2); ffZapperMod.comment = "Energy need multiplier used when the zapper option is installed"; forcefieldblockzappermodifier = ffZapperMod.getInt(2); Property maxFFGenPerTick = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "forcefieldmaxblockpeerTick", 5000); maxFFGenPerTick.comment = "How many field blocks can be generated per tick?"; forcefieldmaxblockpeerTick = maxFFGenPerTick.getInt(5000); Property fcWorkCycle = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "ForceciumWorkCylce", 250); fcWorkCycle.comment = "WorkCycle amount of Forcecium inside a Extractor"; ForceciumWorkCylce = fcWorkCycle.getInt(250); Property fcCellWorkCycle = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "ForceciumCellWorkCylce", 230); fcCellWorkCycle.comment = "WorkCycle amount of Forcecium Cell inside a Extractor"; ForceciumCellWorkCylce = fcCellWorkCycle.getInt(230); Property extractorPassFEGen = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "ExtractorPassForceEnergyGenerate", 10000); extractorPassFEGen.comment = "How many ForceEnergy generate per WorkCycle"; ExtractorPassForceEnergyGenerate = extractorPassFEGen.getInt(10000); Property defStationKillCost = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "DefenceStationKillForceEnergy", 10000); defStationKillCost.comment = "How much FE does the AreaDefenseStation when killing someone"; DefenceStationKillForceEnergy = defStationKillCost.getInt(10000); Property defStationSearchCost = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "DefenceStationSearchForceEnergy", 1000); defStationSearchCost.comment = "How much FE does the AreaDefenseStation when searching someone for contraband"; DefenceStationSearchForceEnergy = defStationSearchCost.getInt(1000); Property defStationScannCost = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "DefenceStationScannForceEnergy", 10); defStationScannCost.comment = "How much FE does the AreaDefenseStation when Scann for Targets (amount * range / tick)"; DefenceStationScannForceEnergy = defStationScannCost.getInt(10); Property Adventuremap = MFFSconfig.get(Configuration.CATEGORY_GENERAL, "adventuremap", false); Adventuremap.comment = "Set MFFS to AdventureMap Mode Extractor need no Forcecium and ForceField have no click damage"; adventuremap = Adventuremap.getBoolean(false); // Machines + Blocks MFFSForceEnergyConverter = new BlockConverter( MFFSconfig.getBlock("MFFSForceEnergyConverter", DefaultProps.block_Converter_ID) .getInt(DefaultProps.block_Converter_ID)) .setBlockName("MFFSForceEnergyConverter"); MFFSExtractor = new BlockExtractor( MFFSconfig.getBlock("MFFSExtractor", DefaultProps.block_Extractor_ID) .getInt(DefaultProps.block_Extractor_ID)) .setBlockName("MFFSExtractor"); MFFSMonazitOre = new BlockMonazitOre( MFFSconfig.getBlock("MFFSMonazitOre", DefaultProps.block_MonazitOre_ID) .getInt(DefaultProps.block_MonazitOre_ID)) .setBlockName("MFFSMonazitOre"); MFFSDefenceStation = new BlockAreaDefenseStation( MFFSconfig.getBlock("MFFSDefenceStation", DefaultProps.block_DefenseStation_ID) .getInt(DefaultProps.block_DefenseStation_ID)) .setBlockName("MFFSDefenceStation"); MFFSCapacitor = new BlockCapacitor( MFFSconfig.getBlock("MFFSCapacitor", DefaultProps.block_Capacitor_ID) .getInt(DefaultProps.block_Capacitor_ID)) .setBlockName("MFFSCapacitor"); MFFSProjector = new BlockProjector( MFFSconfig.getBlock("MFFSProjector", DefaultProps.block_Projector_ID) .getInt(DefaultProps.block_Projector_ID)) .setBlockName("MFFSProjector"); MFFSFieldblock = new BlockForceField( MFFSconfig.getBlock("MFFSFieldblock", DefaultProps.block_Field_ID) .getInt(DefaultProps.block_Field_ID)); MFFSSecurtyStorage = new BlockSecurtyStorage( MFFSconfig.getBlock("MFFSSecurtyStorage", DefaultProps.block_SecureStorage_ID) .getInt(DefaultProps.block_SecureStorage_ID)) .setBlockName("MFFSSecurtyStorage"); MFFSSecurtyStation = new BlockAdvSecurtyStation( MFFSconfig.getBlock("MFFSSecurtyStation", DefaultProps.block_SecurityStation_ID) .getInt(DefaultProps.block_SecurityStation_ID)) .setBlockName("MFFSSecurtyStation"); // Items MFFSProjectorFFDistance = new ItemProjectorFieldModulatorDistance( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorFFDistance", DefaultProps.item_AltDistance_ID) .getInt(DefaultProps.item_AltDistance_ID)) .setItemName("itemProjectorFFDistance"); MFFSProjectorFFStrenght = new ItemProjectorFieldModulatorStrength( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorFFStrength", DefaultProps.item_AltStrength_ID) .getInt(DefaultProps.item_AltStrength_ID)) .setItemName("itemProjectorFFStrength"); MFFSitemFocusmatix = new ItemProjectorFocusMatrix( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemPorjectorFocusmatrix", DefaultProps.item_FocusMatrix_ID) .getInt(DefaultProps.item_FocusMatrix_ID)) .setItemName("itemPorjectorFocusmatrix"); MFFSitemForcePowerCrystal = new ItemForcePowerCrystal( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemForcePowerCrystal", DefaultProps.item_FPCrystal_ID) .getInt(DefaultProps.item_FPCrystal_ID)) .setItemName("itemForcePowerCrystal"); MFFSitemForcicium = new ItemForcicium( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemForcicium", DefaultProps.item_Forcicium_ID) .getInt(DefaultProps.item_Forcicium_ID)) .setItemName("itemForcicium"); MFFSitemForcicumCell = new ItemForcicumCell( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemForcicumCell", DefaultProps.item_ForciciumCell_ID) .getInt(DefaultProps.item_ForciciumCell_ID)) .setItemName("itemForcicumCell"); // Modules MFFSProjectorTypdiagowall = new ItemProjectorModulediagonallyWall( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorModulediagonallyWall", DefaultProps.item_ModDiag_ID) .getInt(DefaultProps.item_ModDiag_ID)) .setItemName("itemProjectorModulediagonallyWall"); MFFSProjectorTypsphere = new ItemProjectorModuleSphere( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorTypsphere", DefaultProps.item_ModSphere_ID) .getInt(DefaultProps.item_ModSphere_ID)) .setItemName("itemProjectorTypsphere"); MFFSProjectorTypkube = new ItemProjectorModuleCube( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorTypkube", DefaultProps.item_ModCube_ID) .getInt(DefaultProps.item_ModCube_ID)) .setItemName("itemProjectorTypkube"); MFFSProjectorTypwall = new ItemProjectorModuleWall( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorTypwall", DefaultProps.item_ModWall_ID) .getInt(DefaultProps.item_ModWall_ID)) .setItemName("itemProjectorTypwall"); MFFSProjectorTypdeflector = new ItemProjectorModuleDeflector( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorTypdeflector", DefaultProps.item_ModDeflector_ID) .getInt(DefaultProps.item_ModDeflector_ID)) .setItemName("itemProjectorTypdeflector"); MFFSProjectorTyptube = new ItemProjectorModuleTube( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorTyptube", DefaultProps.item_ModTube_ID) .getInt(DefaultProps.item_ModTube_ID)) .setItemName("itemProjectorTyptube"); MFFSProjectorTypcontainment = new ItemProjectorModuleContainment( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorModuleContainment", DefaultProps.item_ModContainment_ID) .getInt(DefaultProps.item_ModContainment_ID)) .setItemName("itemProjectorModuleContainment"); MFFSProjectorTypAdvCube = new ItemProjectorModuleAdvCube( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorModuleAdvCube", DefaultProps.item_ModAdvCube_ID) .getInt(DefaultProps.item_ModAdvCube_ID)) .setItemName("itemProjectorModuleAdvCube"); // Options MFFSProjectorOptionZapper = new ItemProjectorOptionTouchDamage( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemupgradeprozapper", DefaultProps.item_OptTouchHurt_ID) .getInt(DefaultProps.item_OptTouchHurt_ID)) .setItemName("itemupgradeprozapper"); MFFSProjectorOptionSubwater = new ItemProjectorOptionSponge( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemupgradeprosubwater", DefaultProps.item_OptSponge_ID) .getInt(DefaultProps.item_OptSponge_ID)) .setItemName("itemupgradeprosubwater"); MFFSProjectorOptionDome = new ItemProjectorOptionFieldManipulator( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemupgradeprodome", DefaultProps.item_OptManipulator_ID) .getInt(DefaultProps.item_OptManipulator_ID)) .setItemName("itemupgradeprodome"); MFFSProjectorOptionCutter = new ItemProjectorOptionBlockBreaker( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemUpgradeprocutter", DefaultProps.item_OptBlockBreaker_ID) .getInt(DefaultProps.item_OptBlockBreaker_ID)) .setItemName("itemUpgradeprocutter"); MFFSProjectorOptionDefenceStation = new ItemProjectorOptionDefenseStation( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorOptiondefencestation", DefaultProps.item_OptDefense_ID) .getInt(DefaultProps.item_OptDefense_ID)) .setItemName("itemProjectorOptiondefencestation"); MFFSProjectorOptionMoobEx = new ItemProjectorOptionMobDefence( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorOptionMoobEx", DefaultProps.item_OptMobDefense_ID) .getInt(DefaultProps.item_OptMobDefense_ID)) .setItemName("itemProjectorOptionMoobEx"); MFFSProjectorOptionForceFieldJammer = new ItemProjectorOptionForceFieldJammer( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorOptionFFJammer", DefaultProps.item_OptJammer_ID) .getInt(DefaultProps.item_OptJammer_ID)) .setItemName("itemProjectorOptionFFJammer"); MFFSProjectorOptionCamouflage = new ItemProjectorOptionCamoflage( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorOptionCamoflage", DefaultProps.item_OptCamouflage_ID) .getInt(DefaultProps.item_OptCamouflage_ID)) .setItemName("itemProjectorOptionCamoflage"); MFFSProjectorOptionFieldFusion = new ItemProjectorOptionFieldFusion( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemProjectorOptionFieldFusion", DefaultProps.item_OptFusion_ID) .getInt(DefaultProps.item_OptFusion_ID)) .setItemName("itemProjectorOptionFieldFusion"); // Cards MFFSitemcardempty = new ItemCardEmpty( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemcardempty", DefaultProps.item_BlankCard_ID) .getInt(DefaultProps.item_BlankCard_ID)) .setItemName("itemcardempty"); MFFSitemfc = new ItemCardPowerLink( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemfc", DefaultProps.item_CardPowerLink_ID) .getInt(DefaultProps.item_CardPowerLink_ID)) .setItemName("itemfc"); MFFSItemIDCard = new ItemCardPersonalID( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemIDCard", DefaultProps.item_CardPersonalID_ID) .getInt(DefaultProps.item_CardPersonalID_ID)) .setItemName("itemIDCard"); MFFSItemSecLinkCard = new ItemCardSecurityLink( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemSecLinkCard", DefaultProps.item_CardSecurityLink_ID) .getInt(DefaultProps.item_CardSecurityLink_ID)) .setItemName("itemSecLinkCard"); MFFSitemInfinitePowerCard = new ItemCardPower( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemInfinitePower", DefaultProps.item_infPowerCard_ID) .getInt(DefaultProps.item_infPowerCard_ID)) .setItemName("itemInfPowerCard"); MFFSAccessCard = new ItemAccessCard( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemAccessCard", DefaultProps.item_CardAccess_ID) .getInt(DefaultProps.item_CardAccess_ID)) .setItemName("itemAccessCard"); // MultiTools MFFSitemWrench = new ItemWrench( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemWrench", DefaultProps.item_MTWrench_ID) .getInt(DefaultProps.item_MTWrench_ID)) .setItemName("itemWrench"); MFFSitemSwitch = new ItemSwitch( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemSwitch", DefaultProps.item_MTSwitch_ID) .getInt(DefaultProps.item_MTSwitch_ID)) .setItemName("itemSwitch"); MFFSitemFieldTeleporter = new ItemFieldtransporter( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemForceFieldsync", DefaultProps.item_MTFieldTransporter_ID) .getInt(DefaultProps.item_MTFieldTransporter_ID)) .setItemName("itemForceFieldsync"); MFFSitemMFDidtool = new ItemPersonalIDWriter( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "ItemMFDIDwriter", DefaultProps.item_MTIDWriter_ID) .getInt(DefaultProps.item_MTIDWriter_ID)) .setItemName("ItemMFDIDwriter"); MFFSitemMFDdebugger = new ItemDebugger( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemMFDdebugger", DefaultProps.item_MTDebugger_ID) .getInt(DefaultProps.item_MTDebugger_ID)) .setItemName("itemMFDdebugger"); MFFSitemManuelBook = new ItemManuelBook( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemManuelBook", DefaultProps.item_MTManual_ID) .getInt(DefaultProps.item_MTManual_ID)) .setItemName("itemManuelBook"); // Upgrades MFFSitemupgradeexctractorboost = new ItemExtractorUpgradeBooster( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemextractorbooster", DefaultProps.item_upgradeBoost_ID) .getInt(DefaultProps.item_upgradeBoost_ID)) .setItemName("itemextractorbooster"); MFFSitemupgradecaprange = new ItemCapacitorUpgradeRange( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemupgradecaprange", DefaultProps.item_upgradeRange_ID) .getInt(DefaultProps.item_upgradeRange_ID)) .setItemName("itemupgradecaprange"); MFFSitemupgradecapcap = new ItemCapacitorUpgradeCapacity( MFFSconfig.getItem( Configuration.CATEGORY_ITEM, "itemupgradecapcap", DefaultProps.item_upgradeCap_ID) .getInt(DefaultProps.item_upgradeCap_ID)) .setItemName("itemupgradecapcap"); } catch (Exception e) { FMLLog.log( Level.SEVERE, e, "ModularForceFieldSystem has a problem loading it's configuration"); System.out.println(e.getMessage()); } finally { MFFSconfig.save(); } }
@Override public void bossHealthTicker() { TickRegistry.registerTickHandler(new BossHealthDisplayTicker(), Side.CLIENT); }
/** Initiates mod, registers block and item for use. Generates the necessary folders. */ @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderThings(); TickRegistry.registerTickHandler(new TickerClient(), Side.CLIENT); }
public void rescheduleTicks(Side side) { TickRegistry.updateTickQueue( side.isClient() ? scheduledClientTicks : scheduledServerTicks, side); }
public void start() { // Show our main menu TickRegistry.registerTickHandler( new ITickHandler() { @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { final GuiScreen current = RenderUtil.MINECRAFT.currentScreen; if (current != null && current.getClass() == GuiMainMenu.class && current.getClass() != SpoutcraftMainMenu.class) { RenderUtil.MINECRAFT.displayGuiScreen(new SpoutcraftMainMenu(game)); } } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) {} @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.CLIENT); } @Override public String getLabel() { return "Spoutcraft - Main Menu Hotswap"; } }, Side.CLIENT); // Draw our watermark in game TickRegistry.registerTickHandler( new ITickHandler() { @Override public void tickStart(EnumSet<TickType> type, Object... tickData) {} @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { final GuiScreen current = RenderUtil.MINECRAFT.currentScreen; if (current == null) { ScaledResolution scaledResolution = new ScaledResolution( RenderUtil.MINECRAFT.gameSettings, RenderUtil.MINECRAFT.displayWidth, RenderUtil.MINECRAFT.displayHeight); int width = scaledResolution.getScaledWidth(); int height = scaledResolution.getScaledHeight(); // Draw Spoutcraft logo GL11.glPushMatrix(); RenderUtil.MINECRAFT .getTextureManager() .bindTexture( new ResourceLocation( "spoutcraft", "textures/gui/" + ((CommonAddonManager) game.getAddonManager()) .getInternalAddon() .getDescription() .getIdentifier() + "/spoutcraft.png")); GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GL11.glEnable(GL11.GL_BLEND); GL11.glTranslatef(width - 45, height - 13, 0.0f); GL11.glScalef(0.17f, 0.17f, 1.0f); GL11.glTranslatef(-width + 45, -height + 13, 0.0f); RenderUtil.create2DRectangleModal(width - 45, height - 13, 256, 67, 0); RenderUtil.TESSELLATOR.draw(); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); // Draw milestone string GL11.glPushMatrix(); GL11.glTranslatef(width - 14, height - 8, 0.0f); GL11.glScalef(0.50f, 0.50f, 1.0f); GL11.glTranslatef(-width + 14, -height + 8, 0.0f); RenderUtil.MINECRAFT.fontRenderer.drawString( "Alpha", width - 14, height - 3, 16776960); GL11.glPopMatrix(); } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.RENDER); } @Override public String getLabel() { return "Spoutcraft - Watermark"; } }, Side.CLIENT); }
@Override public void registerHandlers() { super.registerHandlers(); TickRegistry.registerTickHandler(new RenderUtil(), Side.CLIENT); }
@Override public void registerRenderInformation() { TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); }
@PreInit public void postInit(FMLPreInitializationEvent event) { // Registers(Kayitlar) MinecraftForge.EVENT_BUS.register(new SoundHandler()); RenderingRegistry.registerEntityRenderingHandler( ghost.class, new render(new ghostmodel(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler( Badghost.class, new Badghostrender(new ghostmodel(), 0.3F)); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCopperWire.class, new RenderCopperWire()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntitySolarGenerator.class, new RenderSolarPanel()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatteryBox.class, new RenderBattery()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCoalGenerator.class, new RenderGenerator()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEF.class, new RenderEFurnace()); if (MECLiquid.blockID + 1 != MECLiquidStill.blockID) { throw new RuntimeException("Liquid Still id must be Liquid Moving id + 1"); } dirtBucket = (MECBucketHandler) new MECBucketHandler(); MinecraftForge.EVENT_BUS.register(new MECBucketHandler()); ModLoader.registerEntityID(Badghost.class, "Banion", 8, x, y); ModLoader.registerEntityID(ghost.class, "Mip", 7, x, y); ModLoader.getUniqueEntityId(); ModLoader.addSpawn(ghost.class, 10, 4, 7, EnumCreatureType.ambient, MarbleBiome); ModLoader.addSpawn(Badghost.class, 14, 4, 7, EnumCreatureType.ambient, MarbleBiome); LanguageRegistry.instance().addStringLocalization("entity.Mip.name", "en_US", "Mip"); LanguageRegistry.instance().addStringLocalization("entity.Banion.name", "en_US", "Banion"); IronPlate = new IronPlate(ItemID + 5) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateIron"); GoldPlate = new IronPlate(ItemID + 6) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateGold"); CopperPlate = new IronPlate(ItemID + 7) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateCopper"); SteelPlate = new IronPlate(ItemID + 8) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateSteel"); CopperIngot = new ItemMEC(ItemID + 9) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("ingotCopper"); SteelIngot = new ItemMEC(ItemID + 10) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("ingotSteel"); Heart = new Heart(ItemID, 10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("heart"); GHeart = new GHeart(ItemID + 1, -10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("gheart"); MECBucket = new MECBucket(ItemID + 2) .setCreativeTab(MEC) .setUnlocalizedName("mbucket") .setContainerItem(Item.bucketEmpty); MECWrench = new MECWrench(ItemID + 17) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("wrench"); Batery = new ItemBattery("battery", ItemID + 3).setMaxStackSize(1); IBatery = new ItemInfiniteBattery("infinitebattery", ItemID + 4).setMaxDamage(1); CPHelmet = (ItemArmor) (new ItemArmorCP(ItemID + 11, CPA, proxy.addArmor(CPA.name()), 0)) .setUnlocalizedName("cp_helmet") .func_111206_d("cp_helmet"); CPChestPlate = (ItemArmor) (new ItemArmorCP(ItemID + 12, CPA, proxy.addArmor(CPA.name()), 1)) .setUnlocalizedName("cp_chestplate") .func_111206_d("cp_chestplate"); // CPChestPlateWW = (ItemArmor)(new ItemArmorCP(ItemID + 15, CPA, proxy.addArmor(CPA.name()), // 1)).setUnlocalizedName("cp_chestplate").func_111206_d("cp_chestplate"); CPLeggings = (ItemArmor) (new ItemArmorCP(ItemID + 13, CPA, proxy.addArmor(CPA.name()), 2)) .setUnlocalizedName("cp_leggings") .func_111206_d("cp_leggings"); CPBoots = (ItemArmor) (new ItemArmorCP(ItemID + 14, CPA, proxy.addArmor(CPA.name()), 3)) .setUnlocalizedName("cp_boots") .func_111206_d("cp_boots"); CPSword = new ItemSwordCP(ItemID + 16, CP).setUnlocalizedName("cp_sword"); CSoulPart = new ItemMEC(ItemID + 18).setUnlocalizedName("csp"); PSoulPart = new ItemMEC(ItemID + 19).setUnlocalizedName("psp"); CWSoulPart = new ItemMEC(ItemID + 20).setUnlocalizedName("cwsp"); ESoulPart = new ItemMEC(ItemID + 21).setUnlocalizedName("esp"); ZSoulPart = new ItemMEC(ItemID + 22).setUnlocalizedName("zsp"); CRSoulPart = new ItemMEC(ItemID + 23).setUnlocalizedName("crsp"); SSoulPart = new ItemMEC(ItemID + 24).setUnlocalizedName("ssp"); HSoulPart = new ItemMEC(ItemID + 25).setUnlocalizedName("hsp"); GameRegistry.registerItem(CSoulPart, "Chicken Soul Part"); GameRegistry.registerItem(PSoulPart, "Pig Soul Part"); GameRegistry.registerItem(CWSoulPart, "Cow Soul Part"); GameRegistry.registerItem(ESoulPart, "Enderman Soul Part"); GameRegistry.registerItem(ZSoulPart, "Zombie Soul Part"); GameRegistry.registerItem(CRSoulPart, "Creeper Soul Part"); GameRegistry.registerItem(SSoulPart, "Spider Soul Part"); GameRegistry.registerItem(HSoulPart, "Horse Soul Part"); GameRegistry.registerItem(CPSword, "Corruption Sword"); GameRegistry.registerItem(CPHelmet, "Corruption Helmet"); GameRegistry.registerItem(CPChestPlate, "Corruption Chestplate"); GameRegistry.registerItem(CPLeggings, "Corruption Leggings"); GameRegistry.registerItem(CPBoots, "Corruption Boots"); GameRegistry.registerItem(IronPlate, "Iron Plate"); GameRegistry.registerItem(GoldPlate, "Gold Plate"); GameRegistry.registerItem(CopperPlate, "Copper Plate"); GameRegistry.registerItem(SteelPlate, "Steel Plate"); GameRegistry.registerItem(CopperIngot, "Copper Ingot"); GameRegistry.registerItem(SteelIngot, "Steel Ingot"); GameRegistry.registerItem(Heart, "Innocent Heart"); GameRegistry.registerItem(GHeart, "Guilty Heart"); GameRegistry.registerItem(MECWrench, "MEC Wrench"); GameRegistry.registerItem(MECBucket, "Pressure Machine Fuel"); GameRegistry.registerItem(Batery, "Battery"); GameRegistry.registerItem(IBatery, "Infinite Battery"); GameRegistry.registerPickupHandler(new PickupHandler()); GameRegistry.registerCraftingHandler(new CraftingHandler()); LanguageRegistry.addName(CSoulPart, "\u00A7c" + "Chicken Soul Part"); LanguageRegistry.addName(PSoulPart, "\u00A7c" + "Pig Soul Part"); LanguageRegistry.addName(CWSoulPart, "\u00A7c" + "Cow Soul Part"); LanguageRegistry.addName(ESoulPart, "\u00A7c" + "Enderman Soul Part"); LanguageRegistry.addName(ZSoulPart, "\u00A7c" + "Zombie Soul Part"); LanguageRegistry.addName(CRSoulPart, "\u00A7c" + "Creeper Soul Part"); LanguageRegistry.addName(SSoulPart, "\u00A7c" + "Spider Soul Part"); LanguageRegistry.addName(HSoulPart, "\u00A7c" + "Horse Soul Part"); LanguageRegistry.addName(CPSword, "\u00A7e" + "Corruption Sword"); LanguageRegistry.addName(CPHelmet, "\u00A7e" + "Corruption Helmet"); LanguageRegistry.addName(CPChestPlate, "\u00A7e" + "Corruption Chestplate"); LanguageRegistry.addName(CPLeggings, "\u00A7e" + "Corruption Leggings"); LanguageRegistry.addName(CPBoots, "\u00A7e" + "Corruption Boots"); LanguageRegistry.addName(IronPlate, "" + "Iron Plate"); LanguageRegistry.addName(GoldPlate, "Gold Plate"); LanguageRegistry.addName(CopperPlate, "Copper Plate"); LanguageRegistry.addName(SteelPlate, "Steel Plate"); LanguageRegistry.addName(CopperIngot, "Copper Ingot"); LanguageRegistry.addName(SteelIngot, "Steel Ingot"); LanguageRegistry.addName(Batery, "Battery"); LanguageRegistry.addName(IBatery, "Infinite Battery"); LanguageRegistry.instance().addStringLocalization("itemGroup.MEC", "en_US", "ME-Craft"); LanguageRegistry.addName(Heart, "Innocent Heart"); LanguageRegistry.addName(GHeart, "Guilty Heart"); LanguageRegistry.addName(MECBucket, "Pressure Machine Fuel"); LanguageRegistry.addName(MECWrench, "MEC Wrench"); GameRegistry.registerBlock(blocksolar, "Solar Generator"); GameRegistry.registerBlock(blockbat, "Battery Box"); GameRegistry.registerBlock(CPSnad, "Corruption Sand"); GameRegistry.registerBlock(CopperOre, "Copper Ore"); GameRegistry.registerBlock(Mermer, "Marble"); GameRegistry.registerBlock(KirikMermer, "Cobblemurble"); GameRegistry.registerBlock(AMermer, "Light Blue Marble"); GameRegistry.registerBlock(BMermer, "Light Gray Marble"); GameRegistry.registerBlock(CMermer, "Lime Marble"); GameRegistry.registerBlock(DMermer, "Magenta Marble"); GameRegistry.registerBlock(EMermer, "Gray Marble"); GameRegistry.registerBlock(FMermer, "Brown Marble"); GameRegistry.registerBlock(GMermer, "Red Marble"); GameRegistry.registerBlock(HMermer, "Blue Marble"); GameRegistry.registerBlock(SMermer, "Fake Marble"); GameRegistry.registerBlock(IMermer, "Purple Marble"); GameRegistry.registerBlock(JMermer, "Pink Marble"); GameRegistry.registerBlock(KMermer, "Yellow Marble"); GameRegistry.registerBlock(LMermer, "Black Marble"); GameRegistry.registerBlock(MMermer, "Cyan Marble"); GameRegistry.registerBlock(NMermer, "Orange Marble"); GameRegistry.registerBlock(OMermer, "Green Marble"); GameRegistry.registerBlock(AMermerB, "Light Blue Marble Brick"); GameRegistry.registerBlock(BMermerB, "Light Gray Marble Brick"); GameRegistry.registerBlock(CMermerB, "Lime Marble Brick"); GameRegistry.registerBlock(DMermerB, "Magenta Marble Brick"); GameRegistry.registerBlock(EMermerB, "Gray Marble Brick"); GameRegistry.registerBlock(FMermerB, "Brown Marble Brick"); GameRegistry.registerBlock(GMermerB, "Red Marble Brick"); GameRegistry.registerBlock(HMermerB, "Blue Marble Brick"); GameRegistry.registerBlock(IMermerB, "Purple Marble Brick"); GameRegistry.registerBlock(JMermerB, "Pink Marble Brick"); GameRegistry.registerBlock(KMermerB, "Yellow Marble Brick"); GameRegistry.registerBlock(LMermerB, "Black Marble Brick"); GameRegistry.registerBlock(MMermerB, "Cyan Marble Brick"); GameRegistry.registerBlock(NMermerB, "Orange Marble Brick"); GameRegistry.registerBlock(OMermerB, "Green Marble Brick"); GameRegistry.registerBlock(MermerB, "Marble Brick"); GameRegistry.registerBlock(Deneme, "Pressure Machine"); GameRegistry.registerBlock(DenemeB, "Pressure Machine Working"); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCopperWire.class, new RenderCopperWire()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntitySolarGenerator.class, new RenderSolarPanel()); GameRegistry.registerTileEntity(TileEntityCopperWire.class, "Copper Cable"); GameRegistry.registerBlock(CopperCable, ItemBlockCopperWire.class, ""); proxy.registerCopperWireTileEntity(); proxy.registerSG(); proxy.registerBB(); GameRegistry.registerBlock(MECLiquid, "MECLiquid"); GameRegistry.registerBlock(MECLiquidStill, "MECLiquidStill"); GameRegistry.registerTileEntity(MECTileEntity.class, "MECTile"); NetworkRegistry.instance().registerGuiHandler(this, guihandler); LanguageRegistry.addName(blockbat, "Battery Box"); LanguageRegistry.addName(blocksolar, "Solar Generator"); LanguageRegistry.addName(MECLiquid, "MECLiquid"); LanguageRegistry.addName(MECLiquidStill, "MECLiquidStill"); LanguageRegistry.addName(KirikMermer, "CobbleMurble"); LanguageRegistry.addName(CPSnad, "Corruption Sand"); LanguageRegistry.addName(CopperOre, "Copper Ore"); LanguageRegistry.addName(Mermer, "Marble"); LanguageRegistry.addName(Deneme, "Pressure Machine"); LanguageRegistry.addName(DenemeB, "Pressure Machine"); LanguageRegistry.addName(MermerB, "Marble Brick"); LanguageRegistry.addName(SMermer, "Fake Marble"); LanguageRegistry.addName(AMermer, "Light Blue Marble"); LanguageRegistry.addName(BMermer, "Light Gray Marble"); LanguageRegistry.addName(CMermer, "Lime Marble"); LanguageRegistry.addName(DMermer, "Magenta Marble"); LanguageRegistry.addName(EMermer, "Gray Marble"); LanguageRegistry.addName(FMermer, "Brown Marble"); LanguageRegistry.addName(GMermer, "Red Marble"); LanguageRegistry.addName(HMermer, "Blue Marble"); LanguageRegistry.addName(IMermer, "Purple Marble"); LanguageRegistry.addName(JMermer, "Pink Marble"); LanguageRegistry.addName(KMermer, "Yellow Marble"); LanguageRegistry.addName(LMermer, "Black Marble"); LanguageRegistry.addName(MMermer, "Cyan Marble"); LanguageRegistry.addName(NMermer, "Orange Marble"); LanguageRegistry.addName(OMermer, "Green Marble"); LanguageRegistry.addName(AMermerB, "Light Blue Marble Brick"); LanguageRegistry.addName(BMermerB, "Light Gray Marble Brick"); LanguageRegistry.addName(CMermerB, "Lime Marble Brick"); LanguageRegistry.addName(DMermerB, "Magenta Marble Brick"); LanguageRegistry.addName(EMermerB, "Gray Marble Brick"); LanguageRegistry.addName(FMermerB, "Brown Marble Brick"); LanguageRegistry.addName(GMermerB, "Red Marble Brick"); LanguageRegistry.addName(HMermerB, "Blue Marble Brick"); LanguageRegistry.addName(IMermerB, "Purple Marble Brick"); LanguageRegistry.addName(JMermerB, "Pink Marble Brick"); LanguageRegistry.addName(KMermerB, "Yellow Marble Brick"); LanguageRegistry.addName(LMermerB, "Black Marble Brick"); LanguageRegistry.addName(MMermerB, "Cyan Marble Brick"); LanguageRegistry.addName(NMermerB, "Orange Marble Brick"); LanguageRegistry.addName(OMermerB, "Green Marble Brick"); OreDictionary.registerOre("copperWire", new ItemStack(CopperCable, 1, 0)); UniversalElectricity.isVoltageSensitive = true; UniversalElectricity.isNetworkActive = true; GameRegistry.registerTileEntity(TileEntityCoalGenerator.class, "Generator"); GameRegistry.registerTileEntity(TileEntityElectricFurnace.class, "PM"); GameRegistry.registerTileEntity(TileEntityBatteryBox.class, "BB"); GameRegistry.registerTileEntity(TileEntityEF.class, "EF"); GameRegistry.registerTileEntity(TileEntitySolarGenerator.class, "SG"); GameRegistry.registerBlock(blockMachine, ItemBlockBasicMachine.class, "Temel Machine"); OreDictionary.registerOre("generator", ((BlockBasicMachine) blockMachine).getCoalGenerator()); OreDictionary.registerOre("PM", ((BlockBasicMachine) blockMachine).getElectricFurnace()); OreDictionary.registerOre("EM", ((BlockBasicMachine) blockMachine).getAS()); OreDictionary.registerOre("SG", new ItemStack(blocksolar, 1)); LanguageRegistry.addName(blockMachine.getCoalGenerator(), "Generator"); LanguageRegistry.addName(blockMachine.getElectricFurnace(), "Electric Pressure Machine"); LanguageRegistry.addName(blockMachine.getAS(), "Electric Furnace"); LanguageRegistry.addName(CopperCable, "Copper Cable"); if (CopperCable != null) { UniversalElectricity.isNetworkActive = true; } this.addAchievementLocalizations(); LanguageRegistry.instance().addStringLocalization("achievement.Marble", "Start the Mod"); LanguageRegistry.instance() .addStringLocalization("achievement.Marble.desc", "You are starting the Mod"); LanguageRegistry.instance().addStringLocalization("achievement.Marble2", "Get The Marble"); LanguageRegistry.instance() .addStringLocalization("achievement.Marble2.desc", "You are Learning Something!"); LanguageRegistry.instance().addStringLocalization("achievement.Copper", "Find Copper"); LanguageRegistry.instance() .addStringLocalization("achievement.Copper.desc", "You found a new Ore"); LanguageRegistry.instance() .addStringLocalization("achievement.Pressure", "Make a Pressure Machine"); LanguageRegistry.instance() .addStringLocalization("achievement.Pressure.desc", "You can make awesome things!"); LanguageRegistry.instance().addStringLocalization("achievement.Heart", "Friend Slayer"); LanguageRegistry.instance() .addStringLocalization("achievement.Heart.desc", "You killed a Friend Mip"); LanguageRegistry.instance().addStringLocalization("achievement.GHeart", "Enemy Slayer"); LanguageRegistry.instance() .addStringLocalization("achievement.GHeart.desc", "You killed a Enemy Banion"); MinecraftForge.EVENT_BUS.register(new Sounds()); ModLoader.addBiome(MarbleBiome); GameRegistry.registerWorldGenerator(worldGen); GameRegistry.registerWorldGenerator(worldGenCopper); GameRegistry.registerWorldGenerator(worldGenML); // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class, // "TileEntityRedstoneWireBlock"); AchievementPage.registerAchievementPage(page1); GameRegistry.registerTileEntity(TileEntityHiveCore.class, "TileEntityRedstoneNetworkCore"); // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class, // "TileEntityRedstoneWireBlock"); // Recipes(Formuller): ModLoader.addShapelessRecipe( new ItemStack(SMermer, 2), Block.stone, new ItemStack(Item.dyePowder, 1, 15)); ModLoader.addShapelessRecipe( new ItemStack(AMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 12)); ModLoader.addShapelessRecipe( new ItemStack(BMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 7)); ModLoader.addShapelessRecipe( new ItemStack(CMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 10)); ModLoader.addShapelessRecipe( new ItemStack(DMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 13)); ModLoader.addShapelessRecipe( new ItemStack(EMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 8)); ModLoader.addShapelessRecipe( new ItemStack(FMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 3)); ModLoader.addShapelessRecipe( new ItemStack(GMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 1)); ModLoader.addShapelessRecipe( new ItemStack(HMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 4)); ModLoader.addShapelessRecipe( new ItemStack(IMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 5)); ModLoader.addShapelessRecipe( new ItemStack(JMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 9)); ModLoader.addShapelessRecipe( new ItemStack(KMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 11)); ModLoader.addShapelessRecipe( new ItemStack(LMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 0)); ModLoader.addShapelessRecipe( new ItemStack(MMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 6)); ModLoader.addShapelessRecipe( new ItemStack(NMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 14)); ModLoader.addShapelessRecipe( new ItemStack(OMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 2)); ModLoader.addShapelessRecipe( new ItemStack(AMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 12)); ModLoader.addShapelessRecipe( new ItemStack(BMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 7)); ModLoader.addShapelessRecipe( new ItemStack(CMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 10)); ModLoader.addShapelessRecipe( new ItemStack(DMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 13)); ModLoader.addShapelessRecipe( new ItemStack(EMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 8)); ModLoader.addShapelessRecipe( new ItemStack(FMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 3)); ModLoader.addShapelessRecipe( new ItemStack(GMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 1)); ModLoader.addShapelessRecipe( new ItemStack(HMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 4)); ModLoader.addShapelessRecipe( new ItemStack(IMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 5)); ModLoader.addShapelessRecipe( new ItemStack(JMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 9)); ModLoader.addShapelessRecipe( new ItemStack(KMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 11)); ModLoader.addShapelessRecipe( new ItemStack(LMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 0)); ModLoader.addShapelessRecipe( new ItemStack(MMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 6)); ModLoader.addShapelessRecipe( new ItemStack(NMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 14)); ModLoader.addShapelessRecipe( new ItemStack(OMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 2)); ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', Mermer); ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', SMermer); ModLoader.addRecipe(new ItemStack(AMermerB, 4), "xx", "xx", 'x', AMermer); ModLoader.addRecipe(new ItemStack(BMermerB, 4), "xx", "xx", 'x', BMermer); ModLoader.addRecipe(new ItemStack(CMermerB, 4), "xx", "xx", 'x', CMermer); ModLoader.addRecipe(new ItemStack(DMermerB, 4), "xx", "xx", 'x', DMermer); ModLoader.addRecipe(new ItemStack(EMermerB, 4), "xx", "xx", 'x', EMermer); ModLoader.addRecipe(new ItemStack(FMermerB, 4), "xx", "xx", 'x', FMermer); ModLoader.addRecipe(new ItemStack(GMermerB, 4), "xx", "xx", 'x', GMermer); ModLoader.addRecipe(new ItemStack(HMermerB, 4), "xx", "xx", 'x', HMermer); ModLoader.addRecipe(new ItemStack(IMermerB, 4), "xx", "xx", 'x', IMermer); ModLoader.addRecipe(new ItemStack(JMermerB, 4), "xx", "xx", 'x', JMermer); ModLoader.addRecipe(new ItemStack(KMermerB, 4), "xx", "xx", 'x', KMermer); ModLoader.addRecipe(new ItemStack(LMermerB, 4), "xx", "xx", 'x', LMermer); ModLoader.addRecipe(new ItemStack(MMermerB, 4), "xx", "xx", 'x', MMermer); ModLoader.addRecipe(new ItemStack(NMermerB, 4), "xx", "xx", 'x', NMermer); ModLoader.addRecipe(new ItemStack(OMermerB, 4), "xx", "xx", 'x', OMermer); ModLoader.addRecipe( new ItemStack(Deneme, 1), "xxx", "yzy", "xxx", 'x', SteelIngot, 'y', Block.pistonBase, 'z', Block.stone); ModLoader.addRecipe( new ItemStack(Batery, 1), " x ", "yzy", "yzy", 'x', CopperCable, 'y', SteelIngot, 'z', Item.redstone); ModLoader.addRecipe( new ItemStack(SteelIngot, 1), " x ", "xyx", " x ", 'x', Item.coal, 'y', Item.ingotIron); ModLoader.addSmelting(CopperOre.blockID, new ItemStack(CopperIngot, 1), 2.0f); ModLoader.addShapelessRecipe(new ItemStack(SteelIngot, 2), Item.ingotIron, CopperIngot); TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER); }
@Override public void load() { super.load(); // Renderers cbr = new ConduitBundleRenderer((float) Config.conduitScale); BlockConduitBundle.rendererId = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(cbr); BlockCustomFenceGateRenderer bcfgr = new BlockCustomFenceGateRenderer(); BlockCustomFenceGate.renderId = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(bcfgr); BlockFusedQuartz.renderId = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new FusedQuartzRenderer()); BlockElectricLight.renderId = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new ElectricLightRenderer()); CapacitorBankRenderer capr = new CapacitorBankRenderer(); ClientRegistry.bindTileEntitySpecialRenderer(TileCapacitorBank.class, capr); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCapacitorBank.blockID, capr); FusedQuartzFrameRenderer fqfr = new FusedQuartzFrameRenderer(); MinecraftForgeClient.registerItemRenderer(EnderIO.itemFusedQuartzFrame.itemID, fqfr); ItemConduitRenderer itemConRenderer = new ItemConduitRenderer(); MinecraftForgeClient.registerItemRenderer(EnderIO.itemLiquidConduit.itemID, itemConRenderer); MinecraftForgeClient.registerItemRenderer(EnderIO.itemPowerConduit.itemID, itemConRenderer); MinecraftForgeClient.registerItemRenderer(EnderIO.itemRedstoneConduit.itemID, itemConRenderer); MinecraftForgeClient.registerItemRenderer(EnderIO.itemItemConduit.itemID, itemConRenderer); PaintedItemRenderer pir = new PaintedItemRenderer(); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCustomFence.blockID, pir); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCustomFenceGate.blockID, pir); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCustomWall.blockID, pir); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCustomStair.blockID, pir); MinecraftForgeClient.registerItemRenderer(EnderIO.blockCustomSlab.blockID, pir); MinecraftForgeClient.registerItemRenderer( EnderIO.itemMachinePart.itemID, new MachinePartRenderer()); MinecraftForgeClient.registerItemRenderer( EnderIO.itemConduitFacade.itemID, new FacadeRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileConduitBundle.class, cbr); conduitRenderers.add(RedstoneSwitchRenderer.getInstance()); conduitRenderers.add(new LiquidConduitRenderer()); conduitRenderers.add(new PowerConduitRenderer()); conduitRenderers.add(new InsulatedRedstoneConduitRenderer()); conduitRenderers.add(new crazypants.enderio.conduit.item.ItemConduitRenderer()); EnderIoRenderer eior = new EnderIoRenderer(); ClientRegistry.bindTileEntitySpecialRenderer(TileEnderIO.class, eior); MinecraftForgeClient.registerItemRenderer(EnderIO.blockEnderIo.blockID, eior); ClientRegistry.bindTileEntitySpecialRenderer( TileReservoir.class, new ReservoirRenderer(EnderIO.blockReservoir)); HyperCubeRenderer hcr = new HyperCubeRenderer(); ClientRegistry.bindTileEntitySpecialRenderer(TileHyperCube.class, hcr); MinecraftForgeClient.registerItemRenderer(EnderIO.blockHyperCube.blockID, hcr); new YetaWrenchOverlayRenderer(EnderIO.itemYetaWench); // Tick handler if (Config.useSneakMouseWheelYetaWrench) { TickRegistry.registerTickHandler(new YetaWrenchTickHandler(), Side.CLIENT); } }
@Override public void registerTickHandlers() { TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); }