public StatementAPIPlugin() { StatementManager.registerStatement(triggerManaEmpty); StatementManager.registerStatement(triggerManaContains); StatementManager.registerStatement(triggerManaSpace); StatementManager.registerStatement(triggerManaFull); StatementManager.registerStatement(triggerManaDetector); StatementManager.registerStatement(triggerRuneAltarCanCraft); StatementManager.registerTriggerProvider(this); }
@SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Pre event) { for (FillerPattern pattern : FillerPattern.patterns.values()) { pattern.registerIcons(event.map); } if (event.map.getTextureType() == 1) { iconProvider = new CoreIconProvider(); iconProvider.registerIcons(event.map); StatementManager.registerIcons(event.map); } else if (event.map.getTextureType() == 0) { BuildCraftCore.redLaserTexture = event.map.registerIcon("buildcraftcore:laserBox/blockRedLaser"); BuildCraftCore.blueLaserTexture = event.map.registerIcon("buildcraftcore:laserBox/blockBlueLaser"); BuildCraftCore.stripesLaserTexture = event.map.registerIcon("buildcraftcore:laserBox/blockStripesLaser"); BuildCraftCore.transparentTexture = event.map.registerIcon("buildcraftcore:misc/transparent"); RenderLEDTile.registerBlockIcons(event.map); } }
public static void initialize() { Actions.initialize(); StatementManager.registerActionProvider(new ActionProvider()); }
@Mod.EventHandler public void init(FMLInitializationEvent evt) { BuildCraftAPI.proxy = CoreProxy.proxy; ChannelHandler coreChannelHandler = new ChannelHandler(); coreChannelHandler.registerPacketType(PacketTabletMessage.class); channels = NetworkRegistry.INSTANCE.newChannel( DefaultProps.NET_CHANNEL_NAME + "-CORE", coreChannelHandler, new PacketHandlerCore()); achievementManager = new AchievementManager("BuildCraft"); FMLCommonHandler.instance().bus().register(achievementManager); woodenGearAchievement = achievementManager.registerAchievement( new Achievement( "achievement.woodenGear", "woodenGearAchievement", 0, 0, woodenGearItem, null)); stoneGearAchievement = achievementManager.registerAchievement( new Achievement( "achievement.stoneGear", "stoneGearAchievement", 2, 0, stoneGearItem, woodenGearAchievement)); ironGearAchievement = achievementManager.registerAchievement( new Achievement( "achievement.ironGear", "ironGearAchievement", 4, 0, ironGearItem, stoneGearAchievement)); goldGearAchievement = achievementManager.registerAchievement( new Achievement( "achievement.goldGear", "goldGearAchievement", 6, 0, goldGearItem, ironGearAchievement)); diamondGearAchievement = achievementManager.registerAchievement( new Achievement( "achievement.diamondGear", "diamondGearAchievement", 8, 0, diamondGearItem, goldGearAchievement)); wrenchAchievement = achievementManager.registerAchievement( new Achievement( "achievement.wrench", "wrenchAchievement", 3, 2, wrenchItem, stoneGearAchievement)); engineRedstoneAchievement = BuildCraftCore.achievementManager.registerAchievement( new Achievement( "achievement.redstoneEngine", "engineAchievement1", 1, -2, new ItemStack(engineBlock, 1, 0), BuildCraftCore.woodenGearAchievement)); // BuildCraft 6.1.4 and below - migration only StatementManager.registerParameterClass( "buildcraft:stackTrigger", StatementParameterItemStack.class); StatementManager.registerParameterClass( "buildcraft:stackAction", StatementParameterItemStack.class); StatementManager.registerParameterClass(StatementParameterItemStack.class); StatementManager.registerParameterClass(StatementParameterDirection.class); StatementManager.registerParameterClass(StatementParameterRedstoneGateSideOnly.class); StatementManager.registerTriggerProvider(new DefaultTriggerProvider()); StatementManager.registerActionProvider(new DefaultActionProvider()); if (BuildCraftCore.modifyWorld) { MinecraftForge.EVENT_BUS.register(new SpringPopulate()); } if (mainConfiguration.hasChanged()) { mainConfiguration.save(); } if (BuildCraftCore.loadDefaultRecipes) { loadRecipes(); } BCCreativeTab.get("main").setIcon(new ItemStack(BuildCraftCore.wrenchItem, 1)); EntityList.stringToClassMapping.remove("BuildCraft|Core.bcLaser"); EntityList.stringToClassMapping.remove("BuildCraft|Core.bcEnergyLaser"); BuilderAPI.schematicRegistry.registerSchematicBlock(engineBlock, SchematicEngine.class); CoreProxy.proxy.initializeRendering(); CoreProxy.proxy.initializeEntityRendering(); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new CoreGuiHandler()); FMLCommonHandler.instance().bus().register(TabletManagerClient.INSTANCE); FMLCommonHandler.instance().bus().register(TabletManagerServer.INSTANCE); MinecraftForge.EVENT_BUS.register(TabletManagerClient.INSTANCE); MinecraftForge.EVENT_BUS.register(TabletManagerServer.INSTANCE); TabletAPI.registerProgram(new TabletProgramMenuFactory()); // Create filler registry try { FillerManager.registry = new FillerRegistry(); // INIT FILLER PATTERNS FillerManager.registry.addPattern(PatternFill.INSTANCE); FillerManager.registry.addPattern(new PatternFlatten()); FillerManager.registry.addPattern(new PatternHorizon()); FillerManager.registry.addPattern(new PatternClear()); FillerManager.registry.addPattern(new PatternBox()); FillerManager.registry.addPattern(new PatternPyramid()); FillerManager.registry.addPattern(new PatternStairs()); FillerManager.registry.addPattern(new PatternCylinder()); FillerManager.registry.addPattern(new PatternFrame()); } catch (Error error) { BCLog.logErrorAPI("Buildcraft", error, IFillerPattern.class); throw error; } StatementManager.registerParameterClass(PatternParameterYDir.class); StatementManager.registerParameterClass(PatternParameterXZDir.class); StatementManager.registerParameterClass(PatternParameterCenter.class); StatementManager.registerParameterClass(PatternParameterHollow.class); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent evt) { new BCCreativeTab("boards"); BuildCraftCore.mainConfigManager.register( "general", "boards.blacklist", new String[] {}, "Blacklisted robots boards", ConfigManager.RestartRequirement.GAME); reloadConfig(ConfigManager.RestartRequirement.GAME); robotItem = new ItemRobot().setUnlocalizedName("robot"); CoreProxy.proxy.registerItem(robotItem); robotStationItem = new ItemRobotStation().setUnlocalizedName("robotStation"); CoreProxy.proxy.registerItem(robotStationItem); redstoneBoard = new ItemRedstoneBoard(); redstoneBoard.setUnlocalizedName("redstone_board"); CoreProxy.proxy.registerItem(redstoneBoard); zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class); zonePlanBlock.setBlockName("zonePlan"); CoreProxy.proxy.registerBlock(zonePlanBlock); requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class); requesterBlock.setBlockName("requester"); CoreProxy.proxy.registerBlock(requesterBlock); RedstoneBoardRegistry.instance = new ImplRedstoneBoardRegistry(); RedstoneBoardRegistry.instance.setEmptyRobotBoard(RedstoneBoardRobotEmptyNBT.instance); // Cheapest, dumbest robot types // Those generally do very simple tasks RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotPicker", "picker", BoardRobotPicker.class, "green"), 8000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotCarrier", "carrier", BoardRobotCarrier.class, "green"), 8000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotFluidCarrier", "fluidCarrier", BoardRobotFluidCarrier.class, "green"), 8000); // More expensive robot types // Those generally handle block mining/harvesting/placement. RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotLumberjack", "lumberjack", BoardRobotLumberjack.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotHarvester", "harvester", BoardRobotHarvester.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:miner", "miner", BoardRobotMiner.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotPlanter", "planter", BoardRobotPlanter.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotFarmer", "farmer", BoardRobotFarmer.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:leave_cutter", "leaveCutter", BoardRobotLeaveCutter.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotButcher", "butcher", BoardRobotButcher.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:shovelman", "shovelman", BoardRobotShovelman.class, "blue"), 32000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotPump", "pump", BoardRobotPump.class, "blue"), 32000); // Even more expensive // These handle complex multi-step operations. RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotDelivery", "delivery", BoardRobotDelivery.class, "green"), 128000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotKnight", "knight", BoardRobotKnight.class, "red"), 128000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT("buildcraft:boardRobotBomber", "bomber", BoardRobotBomber.class, "red"), 128000); RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotStripes", "stripes", BoardRobotStripes.class, "yellow"), 128000); // Most expensive // Overpowered galore! if (Loader.isModLoaded("BuildCraft|Builders")) { RedstoneBoardRegistry.instance.registerBoardType( new BCBoardNBT( "buildcraft:boardRobotBuilder", "builder", BoardRobotBuilder.class, "yellow"), 512000); } StatementManager.registerParameterClass(StatementParameterRobot.class); StatementManager.registerParameterClass(StatementParameterMapLocation.class); StatementManager.registerActionProvider(new RobotsActionProvider()); StatementManager.registerTriggerProvider(new RobotsTriggerProvider()); }