本文整理汇总了Java中net.minecraft.network.play.server.S26PacketMapChunkBulk类的典型用法代码示例。如果您正苦于以下问题:Java S26PacketMapChunkBulk类的具体用法?Java S26PacketMapChunkBulk怎么用?Java S26PacketMapChunkBulk使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
S26PacketMapChunkBulk类属于net.minecraft.network.play.server包,在下文中一共展示了S26PacketMapChunkBulk类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
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();
}
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:NetHandlerPlayClient.java
示例2: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
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();
}
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:NetHandlerPlayClient.java
示例3: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
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();
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:19,代码来源:NetHandlerPlayClient.java
示例4: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
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();
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:NetHandlerPlayClient.java
示例5: sendChunkMapDataToPlayer
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
void sendChunkMapDataToPlayer(EntityPlayerMP target) {
DimensionSliceEntity dse = dimensionSlice.get();
if (dse == null) return;
// Inspired by EntityPlayerMP.onUpdate. Shame we can't just add chunks directly to target's chunkwatcher... but there'd be no wrapper for the packets.
final ArrayList<Chunk> chunks = new ArrayList<Chunk>();
final ArrayList<TileEntity> tileEntities = new ArrayList<TileEntity>();
World world = DeltaChunk.getServerShadowWorld();
Coord low = dse.getMinCorner().add(-16, 0, -16);
Coord far = dse.getMaxCorner().add(+16, 0, +16);
Coord.iterateChunks(low, far, new ICoordFunction() {
@Override
public void handle(Coord here) {
if (!here.blockExists()) return;
Chunk chunk = here.getChunk();
chunks.add(chunk);
tileEntities.addAll(chunk.getTileEntityMap().values());
}
});
// NOTE: This has the potential to go badly if there's a large amount of data in the chunks.
if (!chunks.isEmpty()) {
Packet toSend = new S26PacketMapChunkBulk(chunks);
addNettyMessageForPlayer(target, toSend);
}
if (!tileEntities.isEmpty()) {
for (TileEntity te : tileEntities) {
Packet description = te.getDescriptionPacket();
if (description == null) {
continue;
}
addNettyMessageForPlayer(target, description);
}
}
}
开发者ID:purpleposeidon,项目名称:Factorization,代码行数:36,代码来源:PacketProxyingPlayer.java
示例6: addPlayer
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
/**
* Adds an EntityPlayerMP to the PlayerManager.
*/
public void addPlayer(EntityPlayerMP par1EntityPlayerMP)
{
int var2 = (int)par1EntityPlayerMP.posX >> 4;
int var3 = (int)par1EntityPlayerMP.posZ >> 4;
par1EntityPlayerMP.managedPosX = par1EntityPlayerMP.posX;
par1EntityPlayerMP.managedPosZ = par1EntityPlayerMP.posZ;
ArrayList spawnList = new ArrayList(1);
for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)
{
for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)
{
this.getOrCreateChunkWatcher(var4, var5, true).addPlayer(par1EntityPlayerMP);
if (var4 >= var2 - 1 && var4 <= var2 + 1 && var5 >= var3 - 1 && var5 <= var3 + 1)
{
Chunk spawnChunk = this.getWorldServer().theChunkProviderServer.loadChunk(var4, var5);
spawnList.add(spawnChunk);
}
}
}
par1EntityPlayerMP.playerNetServerHandler.sendPacket(new S26PacketMapChunkBulk(spawnList));
this.players.add(par1EntityPlayerMP);
this.filterChunkLoadQueue(par1EntityPlayerMP);
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:30,代码来源:PlayerManager.java
示例7: sendThisChunkToAllPlayers
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
public void sendThisChunkToAllPlayers()
{
for (int i = 0; i < this.playersWatchingChunk.size(); ++i)
{
EntityPlayerMP player = (EntityPlayerMP)this.playersWatchingChunk.get(i);
Chunk chunk = PlayerManager.this.getWorldServer().getChunkFromChunkCoords(this.chunkLocation.chunkXPos, this.chunkLocation.chunkZPos);
ArrayList list = new ArrayList(1);
list.add(chunk);
player.playerNetServerHandler.sendPacket(new S26PacketMapChunkBulk(list));
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:12,代码来源:PlayerManager.java
示例8: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:2,代码来源:INetHandlerPlayClient.java
示例9: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
void handleMapChunkBulk(S26PacketMapChunkBulk var1);
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:2,代码来源:INetHandlerPlayClient.java
示例10: handleMapChunkBulk
import net.minecraft.network.play.server.S26PacketMapChunkBulk; //导入依赖的package包/类
void handleMapChunkBulk(S26PacketMapChunkBulk p_147269_1_);
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:2,代码来源:INetHandlerPlayClient.java
注:本文中的net.minecraft.network.play.server.S26PacketMapChunkBulk类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论