当前位置: 首页>>代码示例>>Java>>正文


Java MinecraftSessionService类代码示例

本文整理汇总了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();
            }
        }
    });
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:SkinManager.java

示例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)
                {
                    ;
                }
            }
        }
    };
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:26,代码来源:DedicatedServer.java

示例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_);
        }
    });
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:SkinManager.java

示例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) {
                    ;
                }
            }
        }
    };
}
 
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:21,代码来源:DedicatedServer.java

示例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);
        }
    });
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:SkinManager.java

示例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());
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:29,代码来源:ClientProxy.java

示例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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:IntegratedServer.java

示例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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:MinecraftServer.java

示例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;
}
 
开发者ID:BasinMC,项目名称:Basin,代码行数:32,代码来源:SinkActivator.java

示例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));
}
 
开发者ID:maruohon,项目名称:placementpreview,代码行数:9,代码来源:FakeServer.java

示例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;
}
 
开发者ID:Zahusek,项目名称:TinyProtocolAPI,代码行数:14,代码来源:WrapperService.java

示例12: getMinecraftSessionService

import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public MinecraftSessionService getMinecraftSessionService()
{
    return this.sessionService;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:MinecraftServer.java

示例13: getSessionService

import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
private MinecraftSessionService getSessionService()
{
    return this.mc.getSessionService();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:NetHandlerLoginClient.java

示例14: getSessionService

import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public MinecraftSessionService getSessionService()
{
    return this.sessionService;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:Minecraft.java

示例15: setSessionService

import com.mojang.authlib.minecraft.MinecraftSessionService; //导入依赖的package包/类
public static void setSessionService(MinecraftSessionService sessionServiceIn) {
    sessionService = sessionServiceIn;
    Main.logger.info("SESSION SERVER CONTACTED");
}
 
开发者ID:CreeperShift,项目名称:WirelessCharger,代码行数:5,代码来源:TilePersonalCharger.java


注:本文中的com.mojang.authlib.minecraft.MinecraftSessionService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。