public static Gson createGson() { Bootstrap.register(); if (gson == null) { GsonBuilder gsonBuilder = new GsonBuilder(); if (!registered) { new VanillaPlugin().registerContent(CustomStuff4.contentRegistry); registered = true; } for (Pair<Type, JsonDeserializer<?>> pair : CustomStuff4.contentRegistry.getDeserializers()) { gsonBuilder.registerTypeAdapter(pair.getLeft(), pair.getRight()); } gson = gsonBuilder.create(); } return gson; }
public Minecraft(Session par1Session, int par2, int par3, boolean par4, boolean par5, File par6File, File par7File, File par8File, Proxy par9Proxy, String par10Str) { theMinecraft = this; this.mcDataDir = par6File; this.fileAssets = par7File; this.fileResourcepacks = par8File; this.launchedVersion = par10Str; this.mcDefaultResourcePack = new DefaultResourcePack(this.fileAssets); this.addDefaultResourcePack(); this.proxy = par9Proxy == null ? Proxy.NO_PROXY : par9Proxy; this.startTimerHackThread(); this.session = par1Session; logger.info("Setting user: " + par1Session.getUsername()); logger.info("(Session ID is " + par1Session.getSessionID() + ")"); this.isDemo = par5; this.displayWidth = par2; this.displayHeight = par3; this.tempDisplayWidth = par2; this.tempDisplayHeight = par3; this.fullscreen = par4; this.jvm64bit = isJvm64bit(); ImageIO.setUseCache(false); Bootstrap.func_151354_b(); }
public Minecraft(Session p_i1103_1_, int p_i1103_2_, int p_i1103_3_, boolean p_i1103_4_, boolean p_i1103_5_, File p_i1103_6_, File p_i1103_7_, File p_i1103_8_, Proxy p_i1103_9_, String p_i1103_10_, Multimap p_i1103_11_, String p_i1103_12_) { theMinecraft = this; this.mcDataDir = p_i1103_6_; this.fileAssets = p_i1103_7_; this.fileResourcepacks = p_i1103_8_; this.launchedVersion = p_i1103_10_; this.field_152356_J = p_i1103_11_; this.mcDefaultResourcePack = new DefaultResourcePack((new ResourceIndex(p_i1103_7_, p_i1103_12_)).func_152782_a()); this.addDefaultResourcePack(); this.proxy = p_i1103_9_ == null ? Proxy.NO_PROXY : p_i1103_9_; this.field_152355_az = (new YggdrasilAuthenticationService(p_i1103_9_, UUID.randomUUID().toString())).createMinecraftSessionService(); this.startTimerHackThread(); this.session = p_i1103_1_; logger.info("Setting user: " + p_i1103_1_.getUsername()); this.isDemo = p_i1103_5_; this.displayWidth = p_i1103_2_; this.displayHeight = p_i1103_3_; this.tempDisplayWidth = p_i1103_2_; this.tempDisplayHeight = p_i1103_3_; this.fullscreen = p_i1103_4_; this.jvm64bit = isJvm64bit(); ImageIO.setUseCache(false); Bootstrap.func_151354_b(); }
public Minecraft(GameConfiguration gameConfig) { theMinecraft = this; this.mcDataDir = gameConfig.folderInfo.mcDataDir; this.fileAssets = gameConfig.folderInfo.assetsDir; this.fileResourcepacks = gameConfig.folderInfo.resourcePacksDir; this.launchedVersion = gameConfig.gameInfo.version; this.twitchDetails = gameConfig.userInfo.userProperties; this.field_181038_N = gameConfig.userInfo.field_181172_c; this.mcDefaultResourcePack = new DefaultResourcePack((new ResourceIndex(gameConfig.folderInfo.assetsDir, gameConfig.folderInfo.assetIndex)).getResourceMap()); this.proxy = gameConfig.userInfo.proxy == null ? Proxy.NO_PROXY : gameConfig.userInfo.proxy; this.sessionService = (new YggdrasilAuthenticationService(gameConfig.userInfo.proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); this.session = gameConfig.userInfo.session; logger.info("Setting user: " + this.session.getUsername()); logger.info("(Session ID is " + this.session.getSessionID() + ")"); this.isDemo = gameConfig.gameInfo.isDemo; this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1; this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1; this.tempDisplayWidth = gameConfig.displayInfo.width; this.tempDisplayHeight = gameConfig.displayInfo.height; this.fullscreen = gameConfig.displayInfo.fullscreen; this.jvm64bit = isJvm64bit(); this.theIntegratedServer = new IntegratedServer(this); if (gameConfig.serverInfo.serverName != null) { this.serverName = gameConfig.serverInfo.serverName; this.serverPort = gameConfig.serverInfo.serverPort; } ImageIO.setUseCache(false); Bootstrap.register(); }
public Minecraft(GameConfiguration gameConfig) { theMinecraft = this; this.mcDataDir = gameConfig.folderInfo.mcDataDir; this.fileAssets = gameConfig.folderInfo.assetsDir; this.fileResourcepacks = gameConfig.folderInfo.resourcePacksDir; this.launchedVersion = gameConfig.gameInfo.version; this.twitchDetails = gameConfig.userInfo.userProperties; this.field_181038_N = gameConfig.userInfo.field_181172_c; this.mcDefaultResourcePack = new DefaultResourcePack( (new ResourceIndex(gameConfig.folderInfo.assetsDir, gameConfig.folderInfo.assetIndex)) .getResourceMap()); this.proxy = gameConfig.userInfo.proxy == null ? Proxy.NO_PROXY : gameConfig.userInfo.proxy; this.sessionService = (new YggdrasilAuthenticationService(gameConfig.userInfo.proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); this.session = gameConfig.userInfo.session; logger.info("Setting user: " + this.session.getUsername()); logger.info("(Session ID is " + this.session.getSessionID() + ")"); this.isDemo = gameConfig.gameInfo.isDemo; this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1; this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1; this.tempDisplayWidth = gameConfig.displayInfo.width; this.tempDisplayHeight = gameConfig.displayInfo.height; this.fullscreen = gameConfig.displayInfo.fullscreen; this.jvm64bit = isJvm64bit(); this.theIntegratedServer = new IntegratedServer(this); if (gameConfig.serverInfo.serverName != null) { this.serverName = gameConfig.serverInfo.serverName; this.serverPort = gameConfig.serverInfo.serverPort; } ImageIO.setUseCache(false); Bootstrap.register(); }
public Minecraft(GameConfiguration gameConfig) { theMinecraft = this; this.mcDataDir = gameConfig.folderInfo.mcDataDir; this.fileAssets = gameConfig.folderInfo.assetsDir; this.fileResourcepacks = gameConfig.folderInfo.resourcePacksDir; this.launchedVersion = gameConfig.gameInfo.version; this.versionType = gameConfig.gameInfo.versionType; this.twitchDetails = gameConfig.userInfo.userProperties; this.profileProperties = gameConfig.userInfo.profileProperties; this.mcDefaultResourcePack = new DefaultResourcePack(gameConfig.folderInfo.getAssetsIndex()); this.proxy = gameConfig.userInfo.proxy == null ? Proxy.NO_PROXY : gameConfig.userInfo.proxy; this.sessionService = (new YggdrasilAuthenticationService(this.proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); this.session = gameConfig.userInfo.session; LOGGER.info("Setting user: {}", new Object[] {this.session.getUsername()}); LOGGER.debug("(Session ID is {})", new Object[] {this.session.getSessionID()}); this.isDemo = gameConfig.gameInfo.isDemo; this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1; this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1; this.tempDisplayWidth = gameConfig.displayInfo.width; this.tempDisplayHeight = gameConfig.displayInfo.height; this.fullscreen = gameConfig.displayInfo.fullscreen; this.jvm64bit = isJvm64bit(); this.theIntegratedServer = null; if (gameConfig.serverInfo.serverName != null) { this.serverName = gameConfig.serverInfo.serverName; this.serverPort = gameConfig.serverInfo.serverPort; } ImageIO.setUseCache(false); Bootstrap.register(); this.dataFixer = DataFixesManager.createFixer(); //-ZMod-core---------------------------------------------------------- ZHandle.onMinecraftInit(this); //-------------------------------------------------------------------- }
@BeforeClass public static void setup() { Bootstrap.register(); BLOCK = new TestBlock(); }
public Minecraft(GameConfiguration gameConfig) { theMinecraft = this; this.mcDataDir = gameConfig.folderInfo.mcDataDir; this.fileAssets = gameConfig.folderInfo.assetsDir; this.fileResourcepacks = gameConfig.folderInfo.resourcePacksDir; this.launchedVersion = gameConfig.gameInfo.version; this.versionType = gameConfig.gameInfo.versionType; this.twitchDetails = gameConfig.userInfo.userProperties; this.profileProperties = gameConfig.userInfo.profileProperties; this.mcDefaultResourcePack = new DefaultResourcePack(gameConfig.folderInfo.getAssetsIndex()); this.proxy = gameConfig.userInfo.proxy == null ? Proxy.NO_PROXY : gameConfig.userInfo.proxy; this.sessionService = (new YggdrasilAuthenticationService(this.proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); this.session = gameConfig.userInfo.session; LOGGER.info("Setting user: {}", new Object[] {this.session.getUsername()}); LOGGER.debug("(Session ID is {})", new Object[] {this.session.getSessionID()}); this.isDemo = gameConfig.gameInfo.isDemo; this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1; this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1; this.tempDisplayWidth = gameConfig.displayInfo.width; this.tempDisplayHeight = gameConfig.displayInfo.height; this.fullscreen = gameConfig.displayInfo.fullscreen; this.jvm64bit = isJvm64bit(); this.theIntegratedServer = null; if (gameConfig.serverInfo.serverName != null) { this.serverName = gameConfig.serverInfo.serverName; this.serverPort = gameConfig.serverInfo.serverPort; } ImageIO.setUseCache(false); Locale.setDefault(Locale.ROOT); Bootstrap.register(); this.dataFixer = DataFixesManager.createFixer(); }
public Minecraft(GameConfiguration gameConfig) { theMinecraft = this; this.mcDataDir = gameConfig.folderInfo.mcDataDir; this.fileAssets = gameConfig.folderInfo.assetsDir; this.fileResourcepacks = gameConfig.folderInfo.resourcePacksDir; this.launchedVersion = gameConfig.gameInfo.version; this.versionType = gameConfig.gameInfo.versionType; this.twitchDetails = gameConfig.userInfo.userProperties; this.profileProperties = gameConfig.userInfo.profileProperties; this.mcDefaultResourcePack = new DefaultResourcePack(gameConfig.folderInfo.getAssetsIndex()); this.proxy = gameConfig.userInfo.proxy == null ? Proxy.NO_PROXY : gameConfig.userInfo.proxy; this.sessionService = (new YggdrasilAuthenticationService(this.proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); this.session = gameConfig.userInfo.session; LOGGER.info("Setting user: {}", new Object[] {this.session.getUsername()}); this.isDemo = gameConfig.gameInfo.isDemo; this.displayWidth = gameConfig.displayInfo.width > 0 ? gameConfig.displayInfo.width : 1; this.displayHeight = gameConfig.displayInfo.height > 0 ? gameConfig.displayInfo.height : 1; this.tempDisplayWidth = gameConfig.displayInfo.width; this.tempDisplayHeight = gameConfig.displayInfo.height; this.fullscreen = gameConfig.displayInfo.fullscreen; this.jvm64bit = isJvm64bit(); this.theIntegratedServer = null; if (gameConfig.serverInfo.serverName != null) { this.serverName = gameConfig.serverInfo.serverName; this.serverPort = gameConfig.serverInfo.serverPort; } ImageIO.setUseCache(false); Bootstrap.register(); this.dataFixer = DataFixesManager.createFixer(); }
@Nonnull private DedicatedServer constructServerInstance(@Nonnull BundleContext ctx) { logger.info("Initializing Minecraft %s", FaucetVersion.API_VERSION); Bootstrap.register(); // apparently this is how the registries work ... don't question it // log some environment information logger.info("Running on Java v%s supplied by %s", System.getProperty("java.version", "Unknown"), System.getProperty("java.vendor")); // TODO: Integrate with plugins here? YggdrasilAuthenticationService var15 = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); MinecraftSessionService var16 = var15.createMinecraftSessionService(); GameProfileRepository var17 = var15.createProfileRepository(); PlayerProfileCache var18 = new PlayerProfileCache(var17, new File(".", "usercache.json")); DedicatedServer server = new DedicatedServer(new File("."), DataFixesManager.createFixer(), var15, var16, var17, var18); // TODO: Re-introduce configuration if (!GraphicsEnvironment.isHeadless()) { logger.info("Server GUI has been disabled or is unavailable in this environment"); // TODO: Custom GUI } else { logger .info("Server GUI has been disabled or is not available within the current environment"); } return server; }
@BeforeClass public static void setup() { Bootstrap.register(); }
@BeforeClass public static void setUp() throws Exception { Bootstrap.register(); }
@Before public void setUp() throws Exception { Bootstrap.register(); }
@BeforeClass public static void setUp() { Bootstrap.register(); }