本文整理匯總了Java中net.minecraft.world.WorldProvider.canRespawnHere方法的典型用法代碼示例。如果您正苦於以下問題:Java WorldProvider.canRespawnHere方法的具體用法?Java WorldProvider.canRespawnHere怎麽用?Java WorldProvider.canRespawnHere使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.world.WorldProvider
的用法示例。
在下文中一共展示了WorldProvider.canRespawnHere方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updatePlayerInstances
import net.minecraft.world.WorldProvider; //導入方法依賴的package包/類
/**
* updates all the player instances that need to be updated
*/
public void updatePlayerInstances()
{
long i = this.theWorldServer.getTotalWorldTime();
if (i - this.previousTotalWorldTime > 8000L)
{
this.previousTotalWorldTime = i;
for (int j = 0; j < this.playerInstanceList.size(); ++j)
{
PlayerManager.PlayerInstance playermanager$playerinstance = (PlayerManager.PlayerInstance)this.playerInstanceList.get(j);
playermanager$playerinstance.onUpdate();
playermanager$playerinstance.processChunk();
}
}
else
{
for (int k = 0; k < this.playerInstancesToUpdate.size(); ++k)
{
PlayerManager.PlayerInstance playermanager$playerinstance1 = (PlayerManager.PlayerInstance)this.playerInstancesToUpdate.get(k);
playermanager$playerinstance1.onUpdate();
}
}
this.playerInstancesToUpdate.clear();
if (this.players.isEmpty())
{
WorldProvider worldprovider = this.theWorldServer.provider;
if (!worldprovider.canRespawnHere())
{
this.theWorldServer.theChunkProviderServer.unloadAllChunks();
}
}
}
示例2: updatePlayerInstances
import net.minecraft.world.WorldProvider; //導入方法依賴的package包/類
public void updatePlayerInstances()
{
long i = this.theWorldServer.getTotalWorldTime();
int j;
PlayerManager.PlayerInstance playerinstance;
if (i - this.previousTotalWorldTime > 8000L)
{
this.previousTotalWorldTime = i;
for (j = 0; j < this.playerInstanceList.size(); ++j)
{
playerinstance = (PlayerManager.PlayerInstance)this.playerInstanceList.get(j);
playerinstance.sendChunkUpdate();
playerinstance.processChunk();
}
}
else
{
for (j = 0; j < this.chunkWatcherWithPlayers.size(); ++j)
{
playerinstance = (PlayerManager.PlayerInstance)this.chunkWatcherWithPlayers.get(j);
playerinstance.sendChunkUpdate();
}
}
this.chunkWatcherWithPlayers.clear();
if (this.players.isEmpty())
{
WorldProvider worldprovider = this.theWorldServer.provider;
if (!worldprovider.canRespawnHere())
{
this.theWorldServer.theChunkProviderServer.unloadAllChunks();
}
}
}
示例3: updatePlayerInstances
import net.minecraft.world.WorldProvider; //導入方法依賴的package包/類
/**
* updates all the player instances that need to be updated
*/
public void updatePlayerInstances()
{
long i = this.theWorldServer.getTotalWorldTime();
int j;
PlayerInstance playerinstance;
if (i - this.previousTotalWorldTime > 8000L)
{
this.previousTotalWorldTime = i;
for (j = 0; j < this.playerInstanceList.size(); ++j)
{
playerinstance = (PlayerInstance)this.playerInstanceList.get(j);
playerinstance.sendChunkUpdate();
playerinstance.processChunk();
}
}
else
{
for (j = 0; j < this.chunkWatcherWithPlayers.size(); ++j)
{
playerinstance = (PlayerInstance)this.chunkWatcherWithPlayers.get(j);
playerinstance.sendChunkUpdate();
}
}
this.chunkWatcherWithPlayers.clear();
if (this.players.isEmpty())
{
WorldProvider worldprovider = this.theWorldServer.provider;
if (!worldprovider.canRespawnHere())
{
this.theWorldServer.theChunkProviderServer.unloadAllChunks();
}
}
}