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


Java ISchematicPage类代码示例

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


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

示例1: updateSchematics

import micdoodle8.mods.galacticraft.api.recipe.ISchematicPage; //导入依赖的package包/类
protected void updateSchematics(EntityPlayerMP player, GCPlayerStats playerStats)
{
    SchematicRegistry.addUnlockedPage(player, SchematicRegistry.getMatchingRecipeForID(0));
    SchematicRegistry.addUnlockedPage(player, SchematicRegistry.getMatchingRecipeForID(Integer.MAX_VALUE));

    Collections.sort(playerStats.unlockedSchematics);

    if (player.playerNetServerHandler != null && (playerStats.unlockedSchematics.size() != playerStats.lastUnlockedSchematics.size() || (player.ticksExisted - 1) % 100 == 0))
    {
        Integer[] iArray = new Integer[playerStats.unlockedSchematics.size()];

        for (int i = 0; i < iArray.length; i++)
        {
            ISchematicPage page = playerStats.unlockedSchematics.get(i);
            iArray[i] = page == null ? -2 : page.getPageID();
        }

        List<Object> objList = new ArrayList<Object>();
        objList.add(iArray);

        GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_UPDATE_SCHEMATIC_LIST, objList), player);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:24,代码来源:GCPlayerHandler.java

示例2: schematicFlipEvent

import micdoodle8.mods.galacticraft.api.recipe.ISchematicPage; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void schematicFlipEvent(FlipPage event)
{
    ISchematicPage page = null;

    switch (event.direction)
    {
    case 1:
        page = EventHandlerGC.getNextSchematic(event.index);
        break;
    case -1:
        page = EventHandlerGC.getLastSchematic(event.index);
        break;
    }

    if (page != null)
    {
        GalacticraftCore.packetPipeline.sendToServer(new PacketSimple(EnumSimplePacket.S_OPEN_SCHEMATIC_PAGE, new Object[] { page.getPageID() }));
        FMLClientHandler.instance().getClient().thePlayer.openGui(GalacticraftCore.instance, page.getGuiID(), FMLClientHandler.instance().getClient().thePlayer.worldObj, (int) FMLClientHandler.instance().getClient().thePlayer.posX, (int) FMLClientHandler.instance().getClient().thePlayer.posY, (int) FMLClientHandler.instance().getClient().thePlayer.posZ);
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:23,代码来源:EventHandlerGC.java

示例3: getGuaranteedLoot

import micdoodle8.mods.galacticraft.api.recipe.ISchematicPage; //导入依赖的package包/类
public ItemStack getGuaranteedLoot(Random rand)
{
    List<ItemStack> stackList = GalacticraftRegistry.getDungeonLoot(2);
    int range = 2;
    //If player seems to have Tier 3 rocket already then add Astro Miner to the loot
    final EntityPlayer player = this.worldObj.getClosestPlayer(this.posX, this.posY, this.posZ, 20.0);
    if (player != null)
    {
     GCPlayerStats stats = GCPlayerStats.get((EntityPlayerMP) player);
     if (stats != null)
     {
      for (ISchematicPage page : stats.unlockedSchematics)
      {
      	if (page.getPageID() == ConfigManagerAsteroids.idSchematicRocketT3)
      	{
      		range = 3;
      		break;
      	}
      }
      if (stats.rocketItem == AsteroidsItems.tier3Rocket)
      	range = 3;
     }
     if (range == 2)
     {
     	SpaceRace race = SpaceRaceManager.getSpaceRaceFromPlayer(player.getGameProfile().getName());
     	if (race != null && race.getCelestialBodyStatusList().containsKey(AsteroidsModule.planetAsteroids))
     		range = 3;        	
     }
    }
    return stackList.get(rand.nextInt(range)).copy();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:32,代码来源:EntityCreeperBoss.java

示例4: compareTo

import micdoodle8.mods.galacticraft.api.recipe.ISchematicPage; //导入依赖的package包/类
@Override
public int compareTo(ISchematicPage o)
{
    if (this.getPageID() > o.getPageID())
    {
        return 1;
    }
    else
    {
        return -1;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:SchematicCargoRocket.java

示例5: compareTo

import micdoodle8.mods.galacticraft.api.recipe.ISchematicPage; //导入依赖的package包/类
@Override
public int compareTo(ISchematicPage o)
{
	if (this.getPageID() > o.getPageID())
	{
		return 2;
	}
	else
	{
		return -2;
	}
}
 
开发者ID:4Space,项目名称:4-Space-Legacy,代码行数:13,代码来源:SCVenusSchematicRocketT3.java


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