Java 类net.minecraft.world.WorldProviderEnd 实例源码

项目:DecompiledMinecraft    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:DecompiledMinecraft    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock() != Blocks.fire)
    {
        this.worldObj.setBlockState(new BlockPos(i, j, k), Blocks.fire.getDefaultState());
    }
}
项目:DecompiledMinecraft    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:DecompiledMinecraft    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock() != Blocks.fire)
    {
        this.worldObj.setBlockState(new BlockPos(i, j, k), Blocks.fire.getDefaultState());
    }
}
项目:BaseClient    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:BaseClient    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock() != Blocks.fire)
    {
        this.worldObj.setBlockState(new BlockPos(i, j, k), Blocks.fire.getDefaultState());
    }
}
项目:BaseClient    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:BaseClient    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock() != Blocks.fire)
    {
        this.worldObj.setBlockState(new BlockPos(i, j, k), Blocks.fire.getDefaultState());
    }
}
项目:Backmemed    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:Backmemed    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;

    if (!this.world.isRemote)
    {
        BlockPos blockpos = new BlockPos(this);

        if (this.world.provider instanceof WorldProviderEnd && this.world.getBlockState(blockpos).getBlock() != Blocks.FIRE)
        {
            this.world.setBlockState(blockpos, Blocks.FIRE.getDefaultState());
        }
    }
}
项目:Backmemed    文件:EntityDragon.java   
public EntityDragon(World worldIn)
{
    super(worldIn);
    this.dragonPartArray = new EntityDragonPart[] {this.dragonPartHead, this.dragonPartNeck, this.dragonPartBody, this.dragonPartTail1, this.dragonPartTail2, this.dragonPartTail3, this.dragonPartWing1, this.dragonPartWing2};
    this.setHealth(this.getMaxHealth());
    this.setSize(16.0F, 8.0F);
    this.noClip = true;
    this.isImmuneToFire = true;
    this.growlTime = 100;
    this.ignoreFrustumCheck = true;

    if (!worldIn.isRemote && worldIn.provider instanceof WorldProviderEnd)
    {
        this.fightManager = ((WorldProviderEnd)worldIn.provider).getDragonFightManager();
    }
    else
    {
        this.fightManager = null;
    }

    this.phaseManager = new PhaseManager(this);
}
项目:Backmemed    文件:TileEntityEndGateway.java   
public void teleportEntity(Entity entityIn)
{
    if (!this.world.isRemote && !this.isCoolingDown())
    {
        this.teleportCooldown = 100;

        if (this.exitPortal == null && this.world.provider instanceof WorldProviderEnd)
        {
            this.findExitPortal();
        }

        if (this.exitPortal != null)
        {
            BlockPos blockpos = this.exactTeleport ? this.exitPortal : this.findExitPosition();
            entityIn.setPositionAndUpdate((double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 0.5D, (double)blockpos.getZ() + 0.5D);
        }

        this.triggerCooldown();
    }
}
项目:CustomWorldGen    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;

    if (!this.worldObj.isRemote)
    {
        BlockPos blockpos = new BlockPos(this);

        if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(blockpos).getBlock() != Blocks.FIRE)
        {
            this.worldObj.setBlockState(blockpos, Blocks.FIRE.getDefaultState());
        }
    }
}
项目:CustomWorldGen    文件:EntityDragon.java   
public EntityDragon(World worldIn)
{
    super(worldIn);
    this.dragonPartArray = new EntityDragonPart[] {this.dragonPartHead, this.dragonPartNeck, this.dragonPartBody, this.dragonPartTail1, this.dragonPartTail2, this.dragonPartTail3, this.dragonPartWing1, this.dragonPartWing2};
    this.setHealth(this.getMaxHealth());
    this.setSize(16.0F, 8.0F);
    this.noClip = true;
    this.isImmuneToFire = true;
    this.growlTime = 100;
    this.ignoreFrustumCheck = true;

    if (!worldIn.isRemote && worldIn.provider instanceof WorldProviderEnd)
    {
        this.fightManager = ((WorldProviderEnd)worldIn.provider).getDragonFightManager();
    }
    else
    {
        this.fightManager = null;
    }

    this.phaseManager = new PhaseManager(this);
}
项目:CustomWorldGen    文件:TileEntityEndGateway.java   
public void teleportEntity(Entity entityIn)
{
    if (!this.worldObj.isRemote && !this.isCoolingDown())
    {
        this.teleportCooldown = 100;

        if (this.exitPortal == null && this.worldObj.provider instanceof WorldProviderEnd)
        {
            this.findExitPortal();
        }

        if (this.exitPortal != null)
        {
            BlockPos blockpos = this.exactTeleport ? this.exitPortal : this.findExitPosition();
            entityIn.setPositionAndUpdate((double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 0.5D, (double)blockpos.getZ() + 0.5D);
        }

        this.triggerCooldown();
    }
}
项目:Snitch-Master    文件:WorldInfoListener.java   
/**
 * 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;
}
项目:TRHS_Club_Mod_2016    文件:DimensionManager.java   
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);
}
项目:justenoughdimensions    文件:CommandTeleportJED.java   
private void removeDragonBossBarHack(EntityPlayerMP player, WorldProviderEnd provider)
{
    // FIXME 1.9 - Somewhat ugly way to clear the Boss Info stuff when teleporting FROM The End
    DragonFightManager manager = provider.getDragonFightManager();

    if (manager != null)
    {
        try
        {
            BossInfoServer bossInfo = ReflectionHelper.getPrivateValue(DragonFightManager.class, manager, "field_186109_c", "bossInfo");
            if (bossInfo != null)
            {
                bossInfo.removePlayer(player);
            }
        }
        catch (UnableToAccessFieldException e)
        {
            JustEnoughDimensions.logger.warn("tpj: Failed to get DragonFightManager#bossInfo");
        }
    }
}
项目:CauldronGit    文件:DimensionManager.java   
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);
}
项目:Resilience-Client-Source    文件:AnvilSaveHandler.java   
/**
 * 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);
    }
}
项目:Resilience-Client-Source    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int var1 = MathHelper.floor_double(this.posX);
    int var2 = MathHelper.floor_double(this.posY);
    int var3 = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(var1, var2, var3) != Blocks.fire)
    {
        this.worldObj.setBlock(var1, var2, var3, Blocks.fire);
    }
}
项目:enderutilities    文件:TeleportEntity.java   
private static void removeDragonBossBarHack(EntityPlayerMP player, WorldProviderEnd provider)
{
    // Somewhat ugly way to clear the Boss Info stuff when teleporting FROM The End
    DragonFightManager manager = provider.getDragonFightManager();

    if (manager != null)
    {
        try
        {
            BossInfoServer bossInfo = ReflectionHelper.getPrivateValue(DragonFightManager.class, manager, "field_186109_c", "bossInfo");

            if (bossInfo != null)
            {
                bossInfo.removePlayer(player);
            }
        }
        catch (UnableToAccessFieldException e)
        {
            EnderUtilities.logger.warn("TP: Failed to get DragonFightManager#bossInfo");
        }
    }
}
项目:ExpandedRailsMod    文件:EntityEnderCrystal.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;

    if (!this.worldObj.isRemote)
    {
        BlockPos blockpos = new BlockPos(this);

        if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlockState(blockpos).getBlock() != Blocks.FIRE)
        {
            this.worldObj.setBlockState(blockpos, Blocks.FIRE.getDefaultState());
        }
    }
}
项目:ExpandedRailsMod    文件:EntityDragon.java   
public EntityDragon(World worldIn)
{
    super(worldIn);
    this.dragonPartArray = new EntityDragonPart[] {this.dragonPartHead, this.dragonPartNeck, this.dragonPartBody, this.dragonPartTail1, this.dragonPartTail2, this.dragonPartTail3, this.dragonPartWing1, this.dragonPartWing2};
    this.setHealth(this.getMaxHealth());
    this.setSize(16.0F, 8.0F);
    this.noClip = true;
    this.isImmuneToFire = true;
    this.growlTime = 100;
    this.ignoreFrustumCheck = true;

    if (!worldIn.isRemote && worldIn.provider instanceof WorldProviderEnd)
    {
        this.fightManager = ((WorldProviderEnd)worldIn.provider).getDragonFightManager();
    }
    else
    {
        this.fightManager = null;
    }

    this.phaseManager = new PhaseManager(this);
}
项目:Cauldron    文件:DimensionManager.java   
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);
}
项目:Cauldron    文件:DimensionManager.java   
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);
}
项目:Cauldron    文件:EntityEnderCrystal.java   
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k) != Blocks.fire)
    {
        // CraftBukkit start
        if (!CraftEventFactory.callBlockIgniteEvent(this.worldObj, i, j, k, this).isCancelled())
        {
            this.worldObj.setBlock(i, j, k, Blocks.fire);
        }

        // CraftBukkit end
    }
}
项目:Cauldron    文件:DimensionManager.java   
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);
}
项目:Cauldron    文件:EntityEnderCrystal.java   
public void onUpdate()
{
    this.prevPosX = this.posX;
    this.prevPosY = this.posY;
    this.prevPosZ = this.posZ;
    ++this.innerRotation;
    this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY);
    int k = MathHelper.floor_double(this.posZ);

    if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k) != Blocks.fire)
    {
        this.worldObj.setBlock(i, j, k, Blocks.fire);
    }
}
项目:RuneCraftery    文件:DimensionManager.java   
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);
}
项目:RuneCraftery    文件:DimensionManager.java   
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);
}
项目:BetterNutritionMod    文件:DimensionManager.java   
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);
}
项目:BaseClient    文件:Minecraft.java   
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;
}
项目:Backmemed    文件:EntityEnderCrystal.java   
private void onCrystalDestroyed(DamageSource source)
{
    if (this.world.provider instanceof WorldProviderEnd)
    {
        WorldProviderEnd worldproviderend = (WorldProviderEnd)this.world.provider;
        DragonFightManager dragonfightmanager = worldproviderend.getDragonFightManager();

        if (dragonfightmanager != null)
        {
            dragonfightmanager.onCrystalDestroyed(this, source);
        }
    }
}
项目:CustomWorldGen    文件:EntityEnderCrystal.java   
private void onCrystalDestroyed(DamageSource source)
{
    if (this.worldObj.provider instanceof WorldProviderEnd)
    {
        WorldProviderEnd worldproviderend = (WorldProviderEnd)this.worldObj.provider;
        DragonFightManager dragonfightmanager = worldproviderend.getDragonFightManager();

        if (dragonfightmanager != null)
        {
            dragonfightmanager.onCrystalDestroyed(this, source);
        }
    }
}
项目:justenoughdimensions    文件:WorldUtils.java   
@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;
}
项目:justenoughdimensions    文件:CommandTeleportJED.java   
@Override
public void placeInPortal(Entity entityIn, float rotationYaw)
{
    BlockPos spawnCoord = this.world.provider.getSpawnCoordinate();

    // For End type dimensions, generate the platform and place the entity there,
    // UNLESS the world has a different spawn point set.
    if ((this.world.provider.getDimensionType().getId() == 1 || this.world.provider instanceof WorldProviderEnd)
         && this.world.getSpawnPoint().equals(spawnCoord))
    {
        IBlockState obsidian = Blocks.OBSIDIAN.getDefaultState();
        IBlockState air = Blocks.AIR.getDefaultState();
        int spawnX = spawnCoord.getX();
        int spawnY = spawnCoord.getY();
        int spawnZ = spawnCoord.getZ();

        for (int zOff = -2; zOff <= 2; ++zOff)
        {
            for (int xOff = -2; xOff <= 2; ++xOff)
            {
                for (int yOff = -1; yOff < 3; yOff++)
                {
                    this.world.setBlockState(new BlockPos(spawnX + xOff, spawnY + yOff, spawnZ + zOff), yOff < 0 ? obsidian : air);
                }
            }
        }

        entityIn.setLocationAndAngles((double)spawnX, (double)spawnY, (double)spawnZ, entityIn.rotationYaw, 0.0F);
        entityIn.motionX = 0.0D;
        entityIn.motionY = 0.0D;
        entityIn.motionZ = 0.0D;
    }
}
项目:NeptuneMod    文件:MixinAnvilSaveHandler.java   
/**
 * @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()));
    }
}
项目:ExpandedRailsMod    文件:EntityEnderCrystal.java   
private void onCrystalDestroyed(DamageSource source)
{
    if (this.worldObj.provider instanceof WorldProviderEnd)
    {
        WorldProviderEnd worldproviderend = (WorldProviderEnd)this.worldObj.provider;
        DragonFightManager dragonfightmanager = worldproviderend.getDragonFightManager();

        if (dragonfightmanager != null)
        {
            dragonfightmanager.onCrystalDestroyed(this, source);
        }
    }
}
项目:Corundum    文件:World.java   
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);
}