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


Java WorldProviderHell类代码示例

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


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

示例1: getChunkLoader

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * initializes and returns the chunk loader for the specified world provider
 */
public IChunkLoader getChunkLoader(WorldProvider provider)
{
    File file1 = this.getWorldDirectory();

    if (provider instanceof WorldProviderHell)
    {
        File file3 = new File(file1, "DIM-1");
        file3.mkdirs();
        return new AnvilChunkLoader(file3);
    }
    else if (provider instanceof WorldProviderEnd)
    {
        File file2 = new File(file1, "DIM1");
        file2.mkdirs();
        return new AnvilChunkLoader(file2);
    }
    else
    {
        return new AnvilChunkLoader(file1);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:AnvilSaveHandler.java

示例2: getChunkLoader

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * initializes and returns the chunk loader for the specified world provider
 */
public IChunkLoader getChunkLoader(WorldProvider provider)
{
    File file1 = this.getWorldDirectory();

    if (provider instanceof WorldProviderHell)
    {
        File file3 = new File(file1, "DIM-1");
        file3.mkdirs();
        return new AnvilChunkLoader(file3, this.dataFixer);
    }
    else if (provider instanceof WorldProviderEnd)
    {
        File file2 = new File(file1, "DIM1");
        file2.mkdirs();
        return new AnvilChunkLoader(file2, this.dataFixer);
    }
    else
    {
        return new AnvilChunkLoader(file1, this.dataFixer);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:AnvilSaveHandler.java

示例3: getWorldID

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * Gets the name of the current world the player is.
 * Returns "single player" is the player is playing single player.
 */
public String getWorldID()
{
    if (lastResponse < lastRequest)
    {
        //No WorldInfo response so just use vanilla world names
        WorldProvider provider = Minecraft.getMinecraft().theWorld.provider;
        if (provider instanceof WorldProviderEnd)
            return "world_the_end";
        else if (provider instanceof WorldProviderHell)
            return "world_nether";
        else
            return "world";
    }
    else
        return worldID;
}
 
开发者ID:MrLittleKitty,项目名称:Snitch-Master,代码行数:21,代码来源:WorldInfoListener.java

示例4: init

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public static void init()
{
    if (hasInit)
    {
        return;
    }

    hasInit = true;

    registerProviderType( 0, WorldProviderSurface.class, true);
    registerProviderType(-1, WorldProviderHell.class,    true);
    registerProviderType( 1, WorldProviderEnd.class,     false);
    registerDimension( 0,  0);
    registerDimension(-1, -1);
    registerDimension( 1,  1);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:17,代码来源:DimensionManager.java

示例5: getChunkLoader

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * Returns the chunk loader with the provided world provider
 */
public IChunkLoader getChunkLoader(WorldProvider par1WorldProvider)
{
    File var2 = this.getWorldDirectory();
    File var3;

    if (par1WorldProvider instanceof WorldProviderHell)
    {
        var3 = new File(var2, "DIM-1");
        var3.mkdirs();
        return new AnvilChunkLoader(var3);
    }
    else if (par1WorldProvider instanceof WorldProviderEnd)
    {
        var3 = new File(var2, "DIM1");
        var3.mkdirs();
        return new AnvilChunkLoader(var3);
    }
    else
    {
        return new AnvilChunkLoader(var2);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:AnvilSaveHandler.java

示例6: func_110161_a

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public EntityLivingData func_110161_a(EntityLivingData p_110161_1_) {
   p_110161_1_ = super.func_110161_a(p_110161_1_);
   if(this.field_70170_p.field_73011_w instanceof WorldProviderHell && this.func_70681_au().nextInt(5) > 0) {
      this.field_70714_bg.func_75776_a(4, this.field_85038_e);
      this.func_82201_a(1);
      this.func_70062_b(0, new ItemStack(Item.field_77711_v));
      this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(4.0D);
   } else {
      this.field_70714_bg.func_75776_a(4, this.field_85037_d);
      this.func_82164_bB();
      this.func_82162_bC();
   }

   this.func_98053_h(this.field_70146_Z.nextFloat() < 0.55F * this.field_70170_p.func_110746_b(this.field_70165_t, this.field_70163_u, this.field_70161_v));
   if(this.func_71124_b(4) == null) {
      Calendar var2 = this.field_70170_p.func_83015_S();
      if(var2.get(2) + 1 == 10 && var2.get(5) == 31 && this.field_70146_Z.nextFloat() < 0.25F) {
         this.func_70062_b(4, new ItemStack(this.field_70146_Z.nextFloat() < 0.1F?Block.field_72008_bf:Block.field_72061_ba));
         this.field_82174_bp[4] = 0.0F;
      }
   }

   return p_110161_1_;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:EntitySkeleton.java

示例7: onInitialSpawn

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called
 * when entity is reloaded from nbt. Mainly used for initializing attributes and inventory
 */
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata)
{
    livingdata = super.onInitialSpawn(difficulty, livingdata);

    if (this.worldObj.provider instanceof WorldProviderHell && this.getRNG().nextInt(5) > 0)
    {
        this.tasks.addTask(4, this.aiAttackOnCollide);
        this.setSkeletonType(1);
        this.setCurrentItemOrArmor(0, new ItemStack(Items.stone_sword));
        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(4.0D);
    }
    else
    {
        this.tasks.addTask(4, this.aiArrowAttack);
        this.setEquipmentBasedOnDifficulty(difficulty);
        this.setEnchantmentBasedOnDifficulty(difficulty);
    }

    this.setCanPickUpLoot(this.rand.nextFloat() < 0.55F * difficulty.getClampedAdditionalDifficulty());

    if (this.getEquipmentInSlot(4) == null)
    {
        Calendar calendar = this.worldObj.getCurrentDate();

        if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31 && this.rand.nextFloat() < 0.25F)
        {
            this.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.1F ? Blocks.lit_pumpkin : Blocks.pumpkin));
            this.equipmentDropChances[4] = 0.0F;
        }
    }

    return livingdata;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:38,代码来源:EntitySkeleton.java

示例8: getAmbientMusicType

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public MusicTicker.MusicType getAmbientMusicType() {
	return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell
			? MusicTicker.MusicType.NETHER
			: (this.thePlayer.worldObj.provider instanceof WorldProviderEnd
					? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS
							: MusicTicker.MusicType.END)
					: (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying
							? MusicTicker.MusicType.CREATIVE
							: MusicTicker.MusicType.GAME)))
			: MusicTicker.MusicType.MENU;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:Minecraft.java

示例9: findSuitableSpawnpoint

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
@Nonnull
public static BlockPos findSuitableSpawnpoint(World world)
{
    WorldProvider provider = world.provider;
    BlockPos pos;

    // Likely end type dimensions
    if (provider.getDimensionType() == DimensionType.THE_END ||
        provider instanceof WorldProviderEnd)
    {
        pos = provider.getSpawnCoordinate();

        if (pos == null)
        {
            pos = getSuitableSpawnBlockInColumn(world, BlockPos.ORIGIN);
        }
    }
    // Likely nether type dimensions
    else if (provider.getDimensionType() == DimensionType.NETHER ||
             provider instanceof WorldProviderHell ||
             provider instanceof WorldProviderHellJED)
    {
        pos = findNetherSpawnpoint(world);
    }
    else if (world.getWorldInfo().getTerrainType() == WorldType.DEBUG_ALL_BLOCK_STATES)
    {
        pos = BlockPos.ORIGIN.up(64);
    }
    // Mostly overworld type dimensions
    else
    {
        pos = findOverworldSpawnpoint(world);
    }

    return pos;
}
 
开发者ID:maruohon,项目名称:justenoughdimensions,代码行数:37,代码来源:WorldUtils.java

示例10: onSpawnWithEgg

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public IEntityLivingData onSpawnWithEgg(IEntityLivingData par1EntityLivingData)
{
    par1EntityLivingData = super.onSpawnWithEgg(par1EntityLivingData);

    if (this.worldObj.provider instanceof WorldProviderHell && this.getRNG().nextInt(5) > 0)
    {
        this.tasks.addTask(4, this.aiAttackOnCollide);
        this.setSkeletonType(1);
        this.setCurrentItemOrArmor(0, new ItemStack(Items.stone_sword));
        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(4.0D);
    }
    else
    {
        this.tasks.addTask(4, this.aiArrowAttack);
        this.addRandomArmor();
        this.enchantEquipment();
    }

    this.setCanPickUpLoot(this.rand.nextFloat() < 0.55F * this.worldObj.func_147462_b(this.posX, this.posY, this.posZ));

    if (this.getEquipmentInSlot(4) == null)
    {
        Calendar var2 = this.worldObj.getCurrentDate();

        if (var2.get(2) + 1 == 10 && var2.get(5) == 31 && this.rand.nextFloat() < 0.25F)
        {
            this.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.1F ? Blocks.lit_pumpkin : Blocks.pumpkin));
            this.equipmentDropChances[4] = 0.0F;
        }
    }

    return par1EntityLivingData;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:34,代码来源:EntitySkeleton.java

示例11: getChunkLoader

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
/**
 * @author jamierocks - 30th October 2016
 * @reason Use the Canary directory structure
 */
@Overwrite
public IChunkLoader getChunkLoader(WorldProvider provider) {
    if (provider instanceof WorldProviderHell) {
        return new AnvilChunkLoader(new File(this.getWorldDirectory(), this.getWorldDirectoryName() + "_" + DimensionType.NETHER.getName()));
    } else if (provider instanceof WorldProviderEnd) {
        return new AnvilChunkLoader(new File(this.getWorldDirectory(), this.getWorldDirectoryName() + "_" + DimensionType.END.getName()));
    } else {
        return new AnvilChunkLoader(new File(this.getWorldDirectory(), this.getWorldDirectoryName() + "_" + DimensionType.NORMAL.getName()));
    }
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:15,代码来源:MixinAnvilSaveHandler.java

示例12: onSpawnWithEgg

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public EntityLivingData onSpawnWithEgg(EntityLivingData par1EntityLivingData)
{
    par1EntityLivingData = super.onSpawnWithEgg(par1EntityLivingData);

    if (this.worldObj.provider instanceof WorldProviderHell && this.getRNG().nextInt(5) > 0)
    {
        this.tasks.addTask(4, this.aiAttackOnCollide);
        this.setSkeletonType(1);
        this.setCurrentItemOrArmor(0, new ItemStack(Item.swordStone));
        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(4.0D);
    }
    else
    {
        this.tasks.addTask(4, this.aiArrowAttack);
        this.addRandomArmor();
        this.enchantEquipment();
    }

    this.setCanPickUpLoot(this.rand.nextFloat() < 0.55F * this.worldObj.getLocationTensionFactor(this.posX, this.posY, this.posZ));

    if (this.getCurrentItemOrArmor(4) == null)
    {
        Calendar calendar = this.worldObj.getCurrentDate();

        if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31 && this.rand.nextFloat() < 0.25F)
        {
            this.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.1F ? Block.pumpkinLantern : Block.pumpkin));
            this.equipmentDropChances[4] = 0.0F;
        }
    }

    return par1EntityLivingData;
}
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:34,代码来源:EntityEskimoSkeleton.java

示例13: World

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public World(WorldServer worldMC) {
    this.worldMC = worldMC;

    if (worldMC.provider instanceof WorldProviderSurface)
        type = WorldType.OVERWORLD;
    else if (worldMC.provider instanceof WorldProviderHell)
        type = WorldType.NETHER;
    else if (worldMC.provider instanceof WorldProviderEnd)
        type = WorldType.END;
    else
        type = WorldType.CUSTOM;

    if (!worlds.contains(this))
        worlds.add(this);
}
 
开发者ID:asusoda,项目名称:Corundum,代码行数:16,代码来源:World.java

示例14: onSpawnWithEgg

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public IEntityLivingData onSpawnWithEgg(IEntityLivingData p_110161_1_)
{
    p_110161_1_ = super.onSpawnWithEgg(p_110161_1_);

    if (this.worldObj.provider instanceof WorldProviderHell && this.getRNG().nextInt(5) > 0)
    {
        this.tasks.addTask(4, this.aiAttackOnCollide);
        this.setSkeletonType(1);
        this.setCurrentItemOrArmor(0, new ItemStack(Items.stone_sword));
        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(4.0D);
    }
    else
    {
        this.tasks.addTask(4, this.aiArrowAttack);
        this.addRandomArmor();
        this.enchantEquipment();
    }

    this.setCanPickUpLoot(this.rand.nextFloat() < 0.55F * this.worldObj.func_147462_b(this.posX, this.posY, this.posZ));

    if (this.getEquipmentInSlot(4) == null)
    {
        Calendar calendar = this.worldObj.getCurrentDate();

        if (calendar.get(2) + 1 == 10 && calendar.get(5) == 31 && this.rand.nextFloat() < 0.25F)
        {
            this.setCurrentItemOrArmor(4, new ItemStack(this.rand.nextFloat() < 0.1F ? Blocks.lit_pumpkin : Blocks.pumpkin));
            this.equipmentDropChances[4] = 0.0F;
        }
    }

    return p_110161_1_;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:34,代码来源:EntitySkeleton.java

示例15: func_75763_a

import net.minecraft.world.WorldProviderHell; //导入依赖的package包/类
public IChunkLoader func_75763_a(WorldProvider p_75763_1_) {
   File var2 = this.func_75765_b();
   File var3;
   if(p_75763_1_ instanceof WorldProviderHell) {
      var3 = new File(var2, "DIM-1");
      var3.mkdirs();
      return new AnvilChunkLoader(var3);
   } else if(p_75763_1_ instanceof WorldProviderEnd) {
      var3 = new File(var2, "DIM1");
      var3.mkdirs();
      return new AnvilChunkLoader(var3);
   } else {
      return new AnvilChunkLoader(var2);
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:AnvilSaveHandler.java


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