本文整理汇总了Java中com.mojang.authlib.minecraft.MinecraftSessionService类的典型用法代码示例。如果您正苦于以下问题:Java MinecraftSessionService类的具体用法?Java MinecraftSessionService怎么用?Java MinecraftSessionService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MinecraftSessionService类属于com.mojang.authlib.minecraft包,在下文中一共展示了MinecraftSessionService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SkinManager
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService)
{
this.textureManager = textureManagerInstance;
this.skinCacheDir = skinCacheDirectory;
this.sessionService = sessionService;
this.skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).<GameProfile, Map<Type, MinecraftProfileTexture>>build(new CacheLoader<GameProfile, Map<Type, MinecraftProfileTexture>>()
{
public Map<Type, MinecraftProfileTexture> load(GameProfile p_load_1_) throws Exception
{
try
{
return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false);
}
catch (Throwable var3)
{
return Maps.<Type, MinecraftProfileTexture>newHashMap();
}
}
});
}
示例2: DedicatedServer
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public DedicatedServer(File anvilFileIn, DataFixer dataFixerIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
super(anvilFileIn, Proxy.NO_PROXY, dataFixerIn, authServiceIn, sessionServiceIn, profileRepoIn, profileCacheIn);
Thread thread = new Thread("Server Infinisleeper")
{
{
this.setDaemon(true);
this.start();
}
public void run()
{
while (true)
{
try
{
Thread.sleep(2147483647L);
}
catch (InterruptedException var2)
{
;
}
}
}
};
}
示例3: SkinManager
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public SkinManager(TextureManager p_i1044_1_, File p_i1044_2_, MinecraftSessionService p_i1044_3_)
{
this.field_152795_c = p_i1044_1_;
this.field_152796_d = p_i1044_2_;
this.field_152797_e = p_i1044_3_;
this.field_152798_f = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).build(new CacheLoader()
{
private static final String __OBFID = "CL_00001829";
public Map func_152786_a(GameProfile p_152786_1_)
{
return Minecraft.getMinecraft().func_152347_ac().getTextures(p_152786_1_, false);
}
public Object load(Object p_load_1_)
{
return this.func_152786_a((GameProfile)p_load_1_);
}
});
}
示例4: DedicatedServer
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public DedicatedServer(joptsimple.OptionSet options, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
super(options, Proxy.NO_PROXY, dataconvertermanager, yggdrasilauthenticationservice, minecraftsessionservice, gameprofilerepository, usercache);
// CraftBukkit end
Thread thread = new Thread("Server Infinisleeper") {
{
this.setDaemon(true);
this.start();
}
public void run() {
while (true) {
try {
Thread.sleep(2147483647L);
} catch (InterruptedException interruptedexception) {
;
}
}
}
};
}
示例5: SkinManager
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public SkinManager(TextureManager textureManagerInstance, File skinCacheDirectory, MinecraftSessionService sessionService)
{
this.textureManager = textureManagerInstance;
this.skinCacheDir = skinCacheDirectory;
this.sessionService = sessionService;
this.skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).<GameProfile, Map<Type, MinecraftProfileTexture>>build(new CacheLoader<GameProfile, Map<Type, MinecraftProfileTexture>>()
{
public Map<Type, MinecraftProfileTexture> load(GameProfile p_load_1_) throws Exception
{
return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false);
}
});
}
示例6: registerEntityRenderers
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void registerEntityRenderers() {
if (EtFuturum.enableArmourStand)
RenderingRegistry.registerEntityRenderingHandler(EntityArmourStand.class, new ArmourStandRenderer());
if (EtFuturum.enableEndermite)
RenderingRegistry.registerEntityRenderingHandler(EntityEndermite.class, new EndermiteRenderer());
if (EtFuturum.enableRabbit)
RenderingRegistry.registerEntityRenderingHandler(EntityRabbit.class, new RabbitRenderer());
if (EtFuturum.enableLingeringPotions) {
RenderingRegistry.registerEntityRenderingHandler(EntityLingeringPotion.class, new LingeringPotionRenderer());
RenderingRegistry.registerEntityRenderingHandler(EntityLingeringEffect.class, new LingeringEffectRenderer());
}
if (EtFuturum.enableVillagerZombies)
RenderingRegistry.registerEntityRenderingHandler(EntityZombieVillager.class, new VillagerZombieRenderer());
if (EtFuturum.enableDragonRespawn)
RenderingRegistry.registerEntityRenderingHandler(EntityPlacedEndCrystal.class, new PlacedEndCrystalRenderer());
if (EtFuturum.enablePlayerSkinOverlay) {
TextureManager texManager = Minecraft.getMinecraft().renderEngine;
File fileAssets = ReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "fileAssets", "field_110446_Y", " field_110607_c");
File skinFolder = new File(fileAssets, "skins");
MinecraftSessionService sessionService = Minecraft.getMinecraft().func_152347_ac();
ReflectionHelper.setPrivateValue(Minecraft.class, Minecraft.getMinecraft(), new NewSkinManager(Minecraft.getMinecraft().func_152342_ad(), texManager, skinFolder, sessionService), "field_152350_aA");
RenderManager.instance.entityRenderMap.put(EntityPlayer.class, new NewRenderPlayer());
}
if (EtFuturum.enableShearableGolems)
RenderingRegistry.registerEntityRenderingHandler(EntityNewSnowGolem.class, new NewSnowGolemRenderer());
}
示例7: IntegratedServer
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public IntegratedServer(Minecraft clientIn, String folderNameIn, String worldNameIn, WorldSettings worldSettingsIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
super(new File(clientIn.mcDataDir, "saves"), clientIn.getProxy(), clientIn.getDataFixer(), authServiceIn, sessionServiceIn, profileRepoIn, profileCacheIn);
this.setServerOwner(clientIn.getSession().getUsername());
this.setFolderName(folderNameIn);
this.setWorldName(worldNameIn);
this.setDemo(clientIn.isDemo());
this.canCreateBonusChest(worldSettingsIn.isBonusChestEnabled());
this.setBuildLimit(256);
this.setPlayerList(new IntegratedPlayerList(this));
this.mc = clientIn;
this.theWorldSettings = this.isDemo() ? DemoWorldServer.DEMO_WORLD_SETTINGS : worldSettingsIn;
}
示例8: MinecraftServer
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public MinecraftServer(File anvilFileIn, Proxy proxyIn, DataFixer dataFixerIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
this.serverProxy = proxyIn;
this.authService = authServiceIn;
this.sessionService = sessionServiceIn;
this.profileRepo = profileRepoIn;
this.profileCache = profileCacheIn;
this.anvilFile = anvilFileIn;
this.networkSystem = new NetworkSystem(this);
this.commandManager = this.createNewCommandManager();
this.anvilConverterForAnvilFile = new AnvilSaveConverter(anvilFileIn, dataFixerIn);
this.dataFixer = dataFixerIn;
}
示例9: constructServerInstance
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
@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;
}
示例10: FakeServer
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public FakeServer(Minecraft clientIn, String folderNameIn, String worldNameIn, WorldSettings worldSettingsIn,
YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn,
GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
super(new File(clientIn.mcDataDir, "saves"), null, clientIn.getDataFixer(), authServiceIn, sessionServiceIn, profileRepoIn, profileCacheIn);
this.setPlayerList(new FakePlayerList(this));
}
示例11: getProfile
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public static GameProfile getProfile (String name)
{
Player online = getPlayerExact(name);
@SuppressWarnings("deprecation")
GameProfile profile = online != null ? entity.invoke(craftonline.invoke(online, "getHandle"), "getProfile"): craftofffline.invoke(getOfflinePlayer(name), "getProfile");
if(!mode) return profile;
if (getFirst(profile.getProperties().get("textures"), null) == null)
{
MinecraftSessionService service = minecraftserver.get(server, MinecraftSessionService.class, 0);
profile = service.fillProfileProperties(profile, true);
}
return profile;
}
示例12: getMinecraftSessionService
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public MinecraftSessionService getMinecraftSessionService()
{
return this.sessionService;
}
示例13: getSessionService
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
private MinecraftSessionService getSessionService()
{
return this.mc.getSessionService();
}
示例14: getSessionService
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public MinecraftSessionService getSessionService()
{
return this.sessionService;
}
示例15: setSessionService
import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public static void setSessionService(MinecraftSessionService sessionServiceIn) {
sessionService = sessionServiceIn;
Main.logger.info("SESSION SERVER CONTACTED");
}