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

项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.func_149274_i())
    {
        if (packetIn.getExtractedSize() == 0)
        {
            this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), false);
            return;
        }

        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.func_149272_d(), packetIn.getExtractedSize(), packetIn.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }
}
项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i)
    {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.func_149274_i())
    {
        if (packetIn.getExtractedSize() == 0)
        {
            this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), false);
            return;
        }

        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.func_149272_d(), packetIn.getExtractedSize(), packetIn.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i)
    {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering
 * and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.func_149274_i()) {
        if (packetIn.getExtractedSize() == 0) {
            this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), false);
            return;
        }

        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4,
            (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.func_149272_d(), packetIn.getExtractedSize(), packetIn.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0,
            packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface)) {
        chunk.resetRelightChecks();
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk packetIn) {
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    for (int i = 0; i < packetIn.getChunkCount(); ++i) {
        int j = packetIn.getChunkX(i);
        int k = packetIn.getChunkZ(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256,
                (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(packetIn.getChunkBytes(i), packetIn.getChunkSize(i), true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256,
                (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface)) {
            chunk.resetRelightChecks();
        }
    }
}
项目: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);
}
项目:BlockSystems    文件:ChunkMessage.java   
@Override
public void onReceiveClient(Minecraft client, WorldClient world, EntityPlayerSP player, MessageContext context) {
    BlockSystem blockSystem = BlockSystems.PROXY.getBlockSystemHandler(world).getBlockSystem(this.blockSystem);
    if (blockSystem != null) {
        BlockSystemClient clientSystem = (BlockSystemClient) blockSystem;
        if (this.loadChunk) {
            clientSystem.loadChunkAction(this.x, this.z, true);
        }
        BlockSystemChunk chunk = (BlockSystemChunk) clientSystem.getChunkFromChunkCoords(this.x, this.z);
        chunk.setPartitionPosition(this.partitionPosition);
        chunk.fillChunk(this.getReadBuffer(), this.availableSections, this.loadChunk);
        clientSystem.markBlockRangeForRenderUpdate(this.x << 4, 0, this.z << 4, (this.x << 4) + 15, 256, (this.z << 4) + 15);
        if (!this.loadChunk || !(clientSystem.provider instanceof WorldProviderSurface)) {
            chunk.resetRelightChecks();
        }
        for (NBTTagCompound tag : this.tileEntityTags) {
            BlockPos pos = new BlockPos(tag.getInteger("x"), tag.getInteger("y"), tag.getInteger("z"));
            TileEntity tile = clientSystem.getTileEntity(pos);
            if (tile != null) {
                tile.handleUpdateTag(tag);
            }
        }
    }
}
项目:DungeonDimension    文件:MonumentTeleporter.java   
@Override
public boolean placeInExistingPortal(Entity entity, float f) {
  if (entity instanceof EntityPlayerMP) {
    EntityPlayerMP player = (EntityPlayerMP)entity;
    if(world.provider instanceof WorldProviderSurface){
        int x, y, z;
        BlockPos pos = player.getBedLocation(0);
        if(pos == null){
            MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
            WorldServer overworld = server.worldServerForDimension(0);
            x = overworld.getSpawnPoint().getX();
            y = overworld.getTopSolidOrLiquidBlock(overworld.getSpawnPoint()).getY();
            z = overworld.getSpawnPoint().getZ();
        }else{
            x = pos.getX();
            y = pos.getY();
            z = pos.getZ();
        }
        player.setPosition(x, y, z);
    }else{
        player.setPosition(75.5d, 63d, 75.5d);
    }
    return true;
  }
  return false;
}
项目: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    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(S21PacketChunkData p_147263_1_)
{
    if (p_147263_1_.func_149274_i())
    {
        if (p_147263_1_.func_149276_g() == 0)
        {
            this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), false);
            return;
        }

        this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);
    Chunk var2 = this.clientWorldController.getChunkFromChunkCoords(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f());
    var2.fillChunk(p_147263_1_.func_149272_d(), p_147263_1_.func_149276_g(), p_147263_1_.func_149270_h(), p_147263_1_.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);

    if (!p_147263_1_.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        var2.resetRelightChecks();
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int var2 = 0; var2 < p_147269_1_.func_149254_d(); ++var2)
    {
        int var3 = p_147269_1_.func_149255_a(var2);
        int var4 = p_147269_1_.func_149253_b(var2);
        this.clientWorldController.doPreChunk(var3, var4, true);
        this.clientWorldController.invalidateBlockReceiveRegion(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);
        Chunk var5 = this.clientWorldController.getChunkFromChunkCoords(var3, var4);
        var5.fillChunk(p_147269_1_.func_149256_c(var2), p_147269_1_.func_149252_e()[var2], p_147269_1_.func_149257_f()[var2], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            var5.resetRelightChecks();
        }
    }
}
项目: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    文件:NetHandlerPlayClient.java   
public void handleChunkData(S21PacketChunkData p_147263_1_)
{
    if (p_147263_1_.func_149274_i())
    {
        if (p_147263_1_.func_149276_g() == 0)
        {
            this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), false);
            return;
        }

        this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f());
    chunk.fillChunk(p_147263_1_.func_149272_d(), p_147263_1_.func_149276_g(), p_147263_1_.func_149270_h(), p_147263_1_.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);

    if (!p_147263_1_.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int i = 0; i < p_147269_1_.func_149254_d(); ++i)
    {
        int j = p_147269_1_.func_149255_a(i);
        int k = p_147269_1_.func_149253_b(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(p_147269_1_.func_149256_c(i), p_147269_1_.func_149252_e()[i], p_147269_1_.func_149257_f()[i], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目: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    文件:NetHandlerPlayClient.java   
public void handleChunkData(S21PacketChunkData p_147263_1_)
{
    if (p_147263_1_.func_149274_i())
    {
        if (p_147263_1_.func_149276_g() == 0)
        {
            this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), false);
            return;
        }

        this.clientWorldController.doPreChunk(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(p_147263_1_.func_149273_e(), p_147263_1_.func_149271_f());
    chunk.fillChunk(p_147263_1_.func_149272_d(), p_147263_1_.func_149276_g(), p_147263_1_.func_149270_h(), p_147263_1_.func_149274_i());
    this.clientWorldController.markBlockRangeForRenderUpdate(p_147263_1_.func_149273_e() << 4, 0, p_147263_1_.func_149271_f() << 4, (p_147263_1_.func_149273_e() << 4) + 15, 256, (p_147263_1_.func_149271_f() << 4) + 15);

    if (!p_147263_1_.func_149274_i() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_)
{
    for (int i = 0; i < p_147269_1_.func_149254_d(); ++i)
    {
        int j = p_147269_1_.func_149255_a(i);
        int k = p_147269_1_.func_149253_b(i);
        this.clientWorldController.doPreChunk(j, k, true);
        this.clientWorldController.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(j, k);
        chunk.fillChunk(p_147269_1_.func_149256_c(i), p_147269_1_.func_149252_e()[i], p_147269_1_.func_149257_f()[i], true);
        this.clientWorldController.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

        if (!(this.clientWorldController.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:N-API    文件:WorldProviderRegistry.java   
/**
 * Returns a provider with the specified id.
 * @param id
 * @return
 */
public static final WorldProvider getProvider(int id)
{
    try
    {
        return providerMap.get(id).newInstance();
    }
    catch (IllegalAccessException | InstantiationException e)
    {
        e.printStackTrace();

        if (e instanceof IllegalAccessException)
        {
            NAPILogHelper.instance.logError("If your provider has a constructor, make it public!");
        }

        if (e instanceof InstantiationException)
        {
            NAPILogHelper.instance.logError("Please make sure your provider is NOT abstract and that your constructor does not take any args!");
        }

        //Default to avoid nasty errors Minecraft side.
        return new WorldProviderSurface();
    }
}
项目:RuneCraftery    文件:NetClientHandler.java   
public void func_72463_a(Packet51MapChunk p_72463_1_) {
   if(p_72463_1_.field_73598_e) {
      if(p_72463_1_.field_73600_c == 0) {
         this.field_72564_i.func_73025_a(p_72463_1_.field_73601_a, p_72463_1_.field_73599_b, false);
         return;
      }

      this.field_72564_i.func_73025_a(p_72463_1_.field_73601_a, p_72463_1_.field_73599_b, true);
   }

   this.field_72564_i.func_73031_a(p_72463_1_.field_73601_a << 4, 0, p_72463_1_.field_73599_b << 4, (p_72463_1_.field_73601_a << 4) + 15, 256, (p_72463_1_.field_73599_b << 4) + 15);
   Chunk var2 = this.field_72564_i.func_72964_e(p_72463_1_.field_73601_a, p_72463_1_.field_73599_b);
   if(p_72463_1_.field_73598_e && var2 == null) {
      this.field_72564_i.func_73025_a(p_72463_1_.field_73601_a, p_72463_1_.field_73599_b, true);
      var2 = this.field_72564_i.func_72964_e(p_72463_1_.field_73601_a, p_72463_1_.field_73599_b);
   }

   if(var2 != null) {
      var2.func_76607_a(p_72463_1_.func_73593_d(), p_72463_1_.field_73600_c, p_72463_1_.field_73597_d, p_72463_1_.field_73598_e);
      this.field_72564_i.func_72909_d(p_72463_1_.field_73601_a << 4, 0, p_72463_1_.field_73599_b << 4, (p_72463_1_.field_73601_a << 4) + 15, 256, (p_72463_1_.field_73599_b << 4) + 15);
      if(!p_72463_1_.field_73598_e || !(this.field_72564_i.field_73011_w instanceof WorldProviderSurface)) {
         var2.func_76613_n();
      }
   }

}
项目:RuneCraftery    文件:NetClientHandler.java   
public void func_72453_a(Packet56MapChunks p_72453_1_) {
   for(int var2 = 0; var2 < p_72453_1_.func_73581_d(); ++var2) {
      int var3 = p_72453_1_.func_73582_a(var2);
      int var4 = p_72453_1_.func_73580_b(var2);
      this.field_72564_i.func_73025_a(var3, var4, true);
      this.field_72564_i.func_73031_a(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);
      Chunk var5 = this.field_72564_i.func_72964_e(var3, var4);
      if(var5 == null) {
         this.field_72564_i.func_73025_a(var3, var4, true);
         var5 = this.field_72564_i.func_72964_e(var3, var4);
      }

      if(var5 != null) {
         var5.func_76607_a(p_72453_1_.func_73583_c(var2), p_72453_1_.field_73590_a[var2], p_72453_1_.field_73588_b[var2], true);
         this.field_72564_i.func_72909_d(var3 << 4, 0, var4 << 4, (var3 << 4) + 15, 256, (var4 << 4) + 15);
         if(!(this.field_72564_i.field_73011_w instanceof WorldProviderSurface)) {
            var5.func_76613_n();
         }
      }
   }

}
项目: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);
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.readFromNBT(nbttagcompound);
        }
    }
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.readFromNBT(nbttagcompound);
        }
    }
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.handleUpdateTag(nbttagcompound);
        }
    }
}
项目:4Space-5    文件:GalacticraftRegistry.java   
public static ITeleportType getTeleportTypeForDimension(Class<? extends WorldProvider> clazz)
{
    if (!IGalacticraftWorldProvider.class.isAssignableFrom(clazz))
    {
        clazz = WorldProviderSurface.class;
    }
    return GalacticraftRegistry.teleportTypeMap.get(clazz);
}
项目:4Space-5    文件:GalacticraftRegistry.java   
@SideOnly(Side.CLIENT)
public static ResourceLocation getResouceLocationForDimension(Class<? extends WorldProvider> clazz)
{
    if (!IGalacticraftWorldProvider.class.isAssignableFrom(clazz))
    {
        clazz = WorldProviderSurface.class;
    }
    return GalacticraftRegistry.rocketGuiMap.get(clazz);
}
项目:placementpreview    文件:PlacementPreview.java   
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
    //dimId = DimensionManager.getNextFreeDimId();
    dimId = Integer.MIN_VALUE + (int)(3.14159 * 1337);
    DimensionManager.registerDimension(dimId, DimensionType.register("pp_fake", "", dimId, WorldProviderSurface.class, false));
    fakeServer = new FakeServer(Minecraft.getMinecraft(), "saves", "pp_fake", new WorldSettings(new WorldInfo(new NBTTagCompound())), null, null, null, null);
}
项目:DungeonDimension    文件:TileEntityMonumentTeleporter.java   
public void teleport(EntityPlayer ent){
    if(!worldObj.isRemote && !broken){
        ent.setPortal(getPos());
        MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
        PlayerList list = server.getPlayerList();
        if(worldID == -1){
            if(worldObj.provider instanceof WorldProviderSurface){
                worldID = DungeonDimension.getNextDimensionForWorld(worldObj);
            }else{
                worldID = 0;
            }
        }
        list.transferPlayerToDimension((EntityPlayerMP) ent, worldID, new MonumentTeleporter(server.worldServerForDimension(worldID))); 
    }
}
项目:LookingGlass    文件:PacketChunkInfo.java   
public void handle(EntityPlayer player, byte[] chunkData, int dim, int xPos, int zPos, boolean reqinit, short yPos, short yMSBPos) {
    WorldClient proxyworld = ProxyWorldManager.getProxyworld(dim);
    if (proxyworld == null) return;
    if (proxyworld.provider.dimensionId != dim) return;

    //TODO: Test to see if this first part is even necessary
    Chunk chunk = proxyworld.getChunkProvider().provideChunk(xPos, zPos);
    if (reqinit && (chunk == null || chunk.isEmpty())) {
        if (yPos == 0) {
            proxyworld.doPreChunk(xPos, zPos, false);
            return;
        }
        proxyworld.doPreChunk(xPos, zPos, true);
    }
    // End possible removal section
    proxyworld.invalidateBlockReceiveRegion(xPos << 4, 0, zPos << 4, (xPos << 4) + 15, 256, (zPos << 4) + 15);
    chunk = proxyworld.getChunkFromChunkCoords(xPos, zPos);
    if (reqinit && (chunk == null || chunk.isEmpty())) {
        proxyworld.doPreChunk(xPos, zPos, true);
        chunk = proxyworld.getChunkFromChunkCoords(xPos, zPos);
    }
    if (chunk != null) {
        chunk.fillChunk(chunkData, yPos, yMSBPos, reqinit);
        receivedChunk(proxyworld, xPos, zPos);
        if (!reqinit || !(proxyworld.provider instanceof WorldProviderSurface)) {
            chunk.resetRelightChecks();
        }
    }
}
项目:Connection    文件:WorldUtil.java   
public static Vec3 getFogColorHook(World world)
/*     */   {
/* 193 */     if (((world.field_73011_w instanceof WorldProviderSurface)) && (FMLClientHandler.instance().getClient().field_71439_g.field_70163_u >= 200.0D))
/*     */     {
/* 195 */       float var20 = (float)(FMLClientHandler.instance().getClient().field_71439_g.field_70163_u - 200.0D) / 1000.0F;
/* 196 */       float var21 = Math.max(1.0F - var20 * 4.0F, 0.0F);
/*     */ 
/* 198 */       Vec3 vec = world.func_72948_g(1.0F);
/*     */ 
/* 200 */       return Vec3.func_72443_a(vec.field_72450_a * var21, vec.field_72448_b * var21, vec.field_72449_c * var21);
/*     */     }
/*     */ 
/* 203 */     return world.func_72948_g(1.0F);
/*     */   }
项目:Connection    文件:WorldUtil.java   
public static Vec3 getSkyColorHook(World world)
/*     */   {
/* 208 */     if (((world.field_73011_w instanceof WorldProviderSurface)) && (FMLClientHandler.instance().getClient().field_71439_g.field_70163_u >= 200.0D))
/*     */     {
/* 210 */       float var20 = (float)(FMLClientHandler.instance().getClient().field_71439_g.field_70163_u - 200.0D) / 1000.0F;
/* 211 */       float var21 = Math.max(1.0F - var20 * 2.0F, 0.0F);
/*     */ 
/* 213 */       Vec3 vec = world.func_72833_a(FMLClientHandler.instance().getClient().field_71451_h, 1.0F);
/*     */ 
/* 215 */       return Vec3.func_72443_a(vec.field_72450_a * var21, vec.field_72448_b * var21, vec.field_72449_c * var21);
/*     */     }
/*     */ 
/* 218 */     return world.func_72833_a(FMLClientHandler.instance().getClient().field_71451_h, 1.0F);
/*     */   }
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
 */
public void handleChunkData(SPacketChunkData packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (packetIn.doChunkLoad())
    {
        this.clientWorldController.doPreChunk(packetIn.getChunkX(), packetIn.getChunkZ(), true);
    }

    this.clientWorldController.invalidateBlockReceiveRegion(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);
    Chunk chunk = this.clientWorldController.getChunkFromChunkCoords(packetIn.getChunkX(), packetIn.getChunkZ());
    chunk.fillChunk(packetIn.getReadBuffer(), packetIn.getExtractedSize(), packetIn.doChunkLoad());
    this.clientWorldController.markBlockRangeForRenderUpdate(packetIn.getChunkX() << 4, 0, packetIn.getChunkZ() << 4, (packetIn.getChunkX() << 4) + 15, 256, (packetIn.getChunkZ() << 4) + 15);

    if (!packetIn.doChunkLoad() || !(this.clientWorldController.provider instanceof WorldProviderSurface))
    {
        chunk.resetRelightChecks();
    }

    for (NBTTagCompound nbttagcompound : packetIn.getTileEntityTags())
    {
        BlockPos blockpos = new BlockPos(nbttagcompound.getInteger("x"), nbttagcompound.getInteger("y"), nbttagcompound.getInteger("z"));
        TileEntity tileentity = this.clientWorldController.getTileEntity(blockpos);

        if (tileentity != null)
        {
            tileentity.handleUpdateTag(nbttagcompound);
        }
    }
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
public void handleMapChunk(Packet51MapChunk mapChunk)
{
    if (wc == null)
    {
        wc = (WorldClient)Reflexion.stealField(NetClientHandler.class, WorldClient.class).get(nch);
    }

    if (mapChunk.includeInitialize)
    {
        if (mapChunk.yChMin == 0)
        {
            doPreChunk(mapChunk.xCh, mapChunk.zCh, false);
            return;
        }

        doPreChunk(mapChunk.xCh, mapChunk.zCh, true);
    }

    wc.invalidateBlockReceiveRegion(mapChunk.xCh << 4, 0, mapChunk.zCh << 4, (mapChunk.xCh << 4) + 15, 256, (mapChunk.zCh << 4) + 15);
    Chunk chunk = wc.getChunkFromChunkCoords(mapChunk.xCh, mapChunk.zCh);

    if (mapChunk.includeInitialize && chunk == null)
    {
        doPreChunk(mapChunk.xCh, mapChunk.zCh, true);
        chunk = wc.getChunkFromChunkCoords(mapChunk.xCh, mapChunk.zCh);
    }

    if (chunk != null)
    {
        chunk.fillChunk(mapChunk.getCompressedChunkData(), mapChunk.yChMin, mapChunk.yChMax, mapChunk.includeInitialize);
        wc.markBlockRangeForRenderUpdate(mapChunk.xCh << 4, 0, mapChunk.zCh << 4, (mapChunk.xCh << 4) + 15, 256, (mapChunk.zCh << 4) + 15);

        if (!mapChunk.includeInitialize || !(wc.provider instanceof WorldProviderSurface))
        {
            chunk.resetRelightChecks();
        }
    }
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
@Override
public void handleMapChunks(Packet56MapChunks par1Packet56MapChunks)
{
    if (wc == null)
    {
        wc = (WorldClient)Reflexion.stealField(NetClientHandler.class, WorldClient.class).get(nch);
    }

    //nch.handleMapChunks(par1Packet56MapChunks);
    for (int i = 0; i < par1Packet56MapChunks.getNumberOfChunkInPacket(); ++i)
    {
        int j = par1Packet56MapChunks.getChunkPosX(i);
        int k = par1Packet56MapChunks.getChunkPosZ(i);
        doPreChunk(j, k, true);
        wc.invalidateBlockReceiveRegion(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);
        Chunk chunk = wc.getChunkFromChunkCoords(j, k);

        if (chunk == null)
        {
            doPreChunk(j, k, true);
            chunk = wc.getChunkFromChunkCoords(j, k);
        }

        if (chunk != null)
        {
            chunk.fillChunk(par1Packet56MapChunks.getChunkCompressedData(i), par1Packet56MapChunks.field_73590_a[i], par1Packet56MapChunks.field_73588_b[i], true);
            wc.markBlockRangeForRenderUpdate(j << 4, 0, k << 4, (j << 4) + 15, 256, (k << 4) + 15);

            if (!(wc.provider instanceof WorldProviderSurface))
            {
                    chunk.resetRelightChecks();
            }
        }
    }
}
项目: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);
}
项目:WearableBackpacks    文件:GuiEntityRender.java   
public DummyWorld(WorldSettings settings) {
    super(new DummySaveHandler(),
          new WorldInfo(settings, "DummyWorld"),
          new WorldProviderSurface(), null, true);
    provider.setWorld(this);
    player = new DummyPlayerSP(this);
}