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


Java ITeleportType类代码示例

本文整理汇总了Java中micdoodle8.mods.galacticraft.api.world.ITeleportType的典型用法代码示例。如果您正苦于以下问题:Java ITeleportType类的具体用法?Java ITeleportType怎么用?Java ITeleportType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ITeleportType类属于micdoodle8.mods.galacticraft.api.world包,在下文中一共展示了ITeleportType类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getTeleportTypeForDimension

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
public static ITeleportType getTeleportTypeForDimension(Class<? extends WorldProvider> clazz)
{
    if (!IGalacticraftWorldProvider.class.isAssignableFrom(clazz))
    {
        clazz = WorldProviderSurface.class;
    }
    return GalacticraftRegistry.teleportTypeMap.get(clazz);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:GalacticraftRegistry.java


示例2: transferEntityToDimension

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
public static Entity transferEntityToDimension(Entity entity, int dimensionID, WorldServer world, boolean transferInv, EntityAutoRocket ridingRocket)
{
    if (!world.isRemote)
    {
        //GalacticraftCore.packetPipeline.sendToAll(new PacketSimple(EnumSimplePacket.C_UPDATE_PLANETS_LIST, WorldUtil.getPlanetList()));

        MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();

        if (mcServer != null)
        {
            final WorldServer var6 = mcServer.worldServerForDimension(dimensionID);

            if (var6 == null)
            {
                System.err.println("Cannot Transfer Entity to Dimension: Could not get World for Dimension " + dimensionID);
                return null;
            }

            final ITeleportType type = GalacticraftRegistry.getTeleportTypeForDimension(var6.provider.getClass());

            if (type != null)
            {
                return WorldUtil.teleportEntity(var6, entity, dimensionID, type, transferInv, ridingRocket);
            }
        }
    }

    return null;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:30,代码来源:WorldUtil.java


示例3: transferEntityToDimension

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
public static Entity transferEntityToDimension(Entity entity, int dimensionID, WorldServer world)
{
    //boolean transferInv = true;
    //EntityAutoRocket ridingRocket = null;
    if (!world.isRemote)
    {
        //GalacticraftCore.packetPipeline.sendToAll(new PacketSimple(EnumSimplePacket.C_UPDATE_PLANETS_LIST, WorldUtil.getPlanetList()));

        MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();

        if (mcServer != null)
        {
            final WorldServer targetWorld = world.provider.dimensionId==dimensionID ? world : mcServer.worldServerForDimension(dimensionID);

            if (targetWorld == null)
            {
                System.err.println("Cannot Transfer Entity to Dimension: Could not get World for Dimension " + dimensionID);
                return null;
            }

            final ITeleportType type = GalacticraftRegistry.getTeleportTypeForDimension(targetWorld.provider.getClass());

            if (type != null)
            {
                return teleportEntity(targetWorld, entity, dimensionID, type);
            }
        }
    }

    return null;
}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:32,代码来源:ShuttleTeleportHelper.java


示例4: transferEntityToDimension

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
public static Entity transferEntityToDimension(Entity entity, int dimensionID, WorldServer world, boolean transferInv, EntityAutoRocket ridingRocket)
/*     */   {
/* 523 */     if (!world.field_72995_K)
/*     */     {
/* 525 */       MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
/*     */ 
/* 527 */       if (server != null)
/*     */       {
/* 529 */         ArrayList array = new ArrayList();
/*     */ 
/* 531 */         for (Iterator i$ = registeredPlanets.iterator(); i$.hasNext(); ) { int i = ((Integer)i$.next()).intValue();
/*     */ 
/* 533 */           array.add(Integer.valueOf(i));
/*     */         }
/*     */ 
/* 536 */         server.func_71203_ab().func_72384_a(GCCorePacketDimensionListPlanets.buildDimensionListPacket(array));
/*     */       }
/*     */ 
/* 539 */       MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
/*     */ 
/* 541 */       if (mcServer != null)
/*     */       {
/* 543 */         WorldServer var6 = mcServer.func_71218_a(dimensionID);
/*     */ 
/* 545 */         if (var6 == null)
/*     */         {
/* 547 */           System.err.println("Cannot Transfer Entity to Dimension: Could not get World for Dimension " + dimensionID);
/*     */         }
/*     */ 
/* 550 */         ITeleportType type = GalacticraftRegistry.getTeleportTypeForDimension(var6.field_73011_w.getClass());
/*     */ 
/* 552 */         if (type != null)
/*     */         {
/* 554 */           return teleportEntity(var6, entity, dimensionID, type, transferInv, ridingRocket);
/*     */         }
/*     */       }
/*     */     }
/*     */ 
/* 559 */     return null;
/*     */   }
 
开发者ID:Nathor40000,项目名称:Connection,代码行数:41,代码来源:WorldUtil.java


示例5: getTeleportTypeForDimension

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
public static ITeleportType getTeleportTypeForDimension(Class<? extends WorldProvider> clazz)
{
	return GalacticraftRegistry.teleportTypeMap.get(clazz);
}
 
开发者ID:4Space,项目名称:4-Space-Legacy,代码行数:5,代码来源:GalacticraftRegistry.java


示例6: registerTeleportType

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
/**
 * Register a new Teleport type for the world provider passed
 *
 * @param clazz the world provider class that you wish to customize
 *              teleportation for
 * @param type  an ITeleportType-implemented class that will be used for the
 *              provided world type
 */
public static void registerTeleportType(Class<? extends WorldProvider> clazz, ITeleportType type)
{
    if (!GalacticraftRegistry.teleportTypeMap.containsKey(clazz))
    {
        GalacticraftRegistry.teleportTypeMap.put(clazz, type);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:16,代码来源:GalacticraftRegistry.java


示例7: ICoreCelestial

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
/**
 * Creates a new celestial body.
 * 
 * @param event The event given on pre init, used to create the configs.
 * @param prefixAsset The asset prefix to use (EX: "spacecelestial").
 * @param rocketGuiLocation The location for the rocket GUI (EX: "textures/gui/celestialRocketGui.png").
 * @param worldProvider The world provider, the class that contains info about the celestial body.
 * @param teleportType The teleport type used when entering the planet (use one from the com.mattparks.space.core.teleport package).
 */
public ICoreCelestial(FMLPreInitializationEvent event, String prefixAsset, String rocketGuiLocation, WorldProviderSpace worldProvider, ITeleportType teleportType) {
	super(event, prefixAsset);
	this.rocketGuiLocation = rocketGuiLocation;
	
	this.worldProvider = worldProvider;
	this.teleportType = teleportType;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:17,代码来源:ICoreCelestial.java


示例8: registerTeleportType

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
/**
 * Register a new Teleport type for the world provider passed
 * 
 * @param clazz
 *            the world provider class that you wish to customize
 *            teleportation for
 * @param type
 *            an ITeleportType-implemented class that will be used for the
 *            provided world type
 */
public static void registerTeleportType(Class<? extends WorldProvider> clazz, ITeleportType type)
{
	if (!GalacticraftRegistry.teleportTypeMap.containsKey(clazz))
	{
		GalacticraftRegistry.teleportTypeMap.put(clazz, type);
	}
}
 
开发者ID:4Space,项目名称:4-Space-Legacy,代码行数:18,代码来源:GalacticraftRegistry.java


示例9: ICoreMoon

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
/**
 * Creates a new moon.
 * 
 * @param event The event given on pre init, used to create the configs.
 * @param prefixAsset The asset prefix to use (EX: "spacemoon").
 * @param rocketGuiLocation The location for the rocket GUI (EX: "textures/gui/moonRocketGui.png").
 * @param worldProvider The world provider, the class that contains info about the planet.
 * @param teleportType The teleport type used when entering the planet (use one from com.mattparks.space.core.teleport).
 */
public ICoreMoon(FMLPreInitializationEvent event, String prefixAsset, String rocketGuiLocation, WorldProviderSpace worldProvider, ITeleportType teleportType) {
	super(event, prefixAsset, rocketGuiLocation, worldProvider, teleportType);
	this.moon = null; // Will be created in `registerMoon()`.
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:ICoreMoon.java


示例10: ICorePlanet

import micdoodle8.mods.galacticraft.api.world.ITeleportType; //导入依赖的package包/类
/**
 * Creates a new planet.
 * 
 * @param event The event given on pre init, used to create the configs.
 * @param prefixAsset The asset prefix to use (EX: "spaceplanet").
 * @param rocketGuiLocation The location for the rocket GUI (EX: "textures/gui/planetRocketGui.png").
 * @param worldProvider The world provider, the class that contains info about the planet.
 * @param teleportType The teleport type used when entering the planet (use one from com.mattparks.space.core.teleport).
 */
public ICorePlanet(FMLPreInitializationEvent event, String prefixAsset, String rocketGuiLocation, WorldProviderSpace worldProvider, ITeleportType teleportType) {
	super(event, prefixAsset, rocketGuiLocation, worldProvider, teleportType);
	this.planet = null; // Will be created in `registerPlanet()`.
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:ICorePlanet.java



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