本文整理汇总了Java中net.minecraft.scoreboard.ServerScoreboard类的典型用法代码示例。如果您正苦于以下问题:Java ServerScoreboard类的具体用法?Java ServerScoreboard怎么用?Java ServerScoreboard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServerScoreboard类属于net.minecraft.scoreboard包,在下文中一共展示了ServerScoreboard类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendScoreboard
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void sendScoreboard(ServerScoreboard scoreboardIn, EntityPlayerMP playerIn)
{
Set<ScoreObjective> set = Sets.<ScoreObjective>newHashSet();
for (ScorePlayerTeam scoreplayerteam : scoreboardIn.getTeams())
{
playerIn.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 19; ++i)
{
ScoreObjective scoreobjective = scoreboardIn.getObjectiveInDisplaySlot(i);
if (scoreobjective != null && !set.contains(scoreobjective))
{
for (Packet packet : scoreboardIn.func_96550_d(scoreobjective))
{
playerIn.playerNetServerHandler.sendPacket(packet);
}
set.add(scoreobjective);
}
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:ServerConfigurationManager.java
示例2: sendScoreboard
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void sendScoreboard(ServerScoreboard scoreboardIn, EntityPlayerMP playerIn)
{
Set<ScoreObjective> set = Sets.<ScoreObjective>newHashSet();
for (ScorePlayerTeam scoreplayerteam : scoreboardIn.getTeams())
{
playerIn.connection.sendPacket(new SPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 19; ++i)
{
ScoreObjective scoreobjective = scoreboardIn.getObjectiveInDisplaySlot(i);
if (scoreobjective != null && !set.contains(scoreobjective))
{
for (Packet<?> packet : scoreboardIn.getCreatePackets(scoreobjective))
{
playerIn.connection.sendPacket(packet);
}
set.add(scoreobjective);
}
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:PlayerList.java
示例3: func_96456_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) {
HashSet var3 = new HashSet();
Iterator var4 = p_96456_1_.func_96525_g().iterator();
while(var4.hasNext()) {
ScorePlayerTeam var5 = (ScorePlayerTeam)var4.next();
p_96456_2_.field_71135_a.func_72567_b(new Packet209SetPlayerTeam(var5, 0));
}
for(int var9 = 0; var9 < 3; ++var9) {
ScoreObjective var10 = p_96456_1_.func_96539_a(var9);
if(var10 != null && !var3.contains(var10)) {
List var6 = p_96456_1_.func_96550_d(var10);
Iterator var7 = var6.iterator();
while(var7.hasNext()) {
Packet var8 = (Packet)var7.next();
p_96456_2_.field_71135_a.func_72567_b(var8);
}
var3.add(var10);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:26,代码来源:ServerConfigurationManager.java
示例4: func_96456_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard par1ServerScoreboard, EntityPlayerMP par2EntityPlayerMP)
{
HashSet var3 = new HashSet();
Iterator var4 = par1ServerScoreboard.getTeams().iterator();
while (var4.hasNext())
{
ScorePlayerTeam var5 = (ScorePlayerTeam)var4.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacket(new S3EPacketTeams(var5, 0));
}
for (int var9 = 0; var9 < 3; ++var9)
{
ScoreObjective var10 = par1ServerScoreboard.func_96539_a(var9);
if (var10 != null && !var3.contains(var10))
{
List var6 = par1ServerScoreboard.func_96550_d(var10);
Iterator var7 = var6.iterator();
while (var7.hasNext())
{
Packet var8 = (Packet)var7.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacket(var8);
}
var3.add(var10);
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:31,代码来源:ServerConfigurationManager.java
示例5: func_96456_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
public void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) // CraftBukkit - protected -> public
{
HashSet hashset = new HashSet();
Iterator iterator = p_96456_1_.getTeams().iterator();
while (iterator.hasNext())
{
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
p_96456_2_.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 3; ++i)
{
ScoreObjective scoreobjective = p_96456_1_.func_96539_a(i);
if (scoreobjective != null && !hashset.contains(scoreobjective))
{
List list = p_96456_1_.func_96550_d(scoreobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext())
{
Packet packet = (Packet)iterator1.next();
p_96456_2_.playerNetServerHandler.sendPacket(packet);
}
hashset.add(scoreobjective);
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:31,代码来源:ServerConfigurationManager.java
示例6: func_96456_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_)
{
HashSet hashset = new HashSet();
Iterator iterator = p_96456_1_.getTeams().iterator();
while (iterator.hasNext())
{
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
p_96456_2_.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 3; ++i)
{
ScoreObjective scoreobjective = p_96456_1_.func_96539_a(i);
if (scoreobjective != null && !hashset.contains(scoreobjective))
{
List list = p_96456_1_.func_96550_d(scoreobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext())
{
Packet packet = (Packet)iterator1.next();
p_96456_2_.playerNetServerHandler.sendPacket(packet);
}
hashset.add(scoreobjective);
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:31,代码来源:ServerConfigurationManager.java
示例7: func_96456_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard par1ServerScoreboard, EntityPlayerMP par2EntityPlayerMP)
{
HashSet hashset = new HashSet();
Iterator iterator = par1ServerScoreboard.func_96525_g().iterator();
while (iterator.hasNext())
{
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet209SetPlayerTeam(scoreplayerteam, 0));
}
for (int i = 0; i < 3; ++i)
{
ScoreObjective scoreobjective = par1ServerScoreboard.func_96539_a(i);
if (scoreobjective != null && !hashset.contains(scoreobjective))
{
List list = par1ServerScoreboard.func_96550_d(scoreobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext())
{
Packet packet = (Packet)iterator1.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacketToPlayer(packet);
}
hashset.add(scoreobjective);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:31,代码来源:ServerConfigurationManager.java
示例8: sendScoreboard
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
@Shadow
protected abstract void sendScoreboard(ServerScoreboard scoreboardIn, EntityPlayerMP playerIn);
开发者ID:NeptunePowered,项目名称:NeptuneCommon,代码行数:3,代码来源:MixinServerConfigurationManager.java
示例9: initializeConnectionToPlayer
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
public void initializeConnectionToPlayer(NetworkManager par1INetworkManager, EntityPlayerMP par2EntityPlayerMP)
{
NBTTagCompound var3 = this.readPlayerDataFromFile(par2EntityPlayerMP);
par2EntityPlayerMP.setWorld(this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension));
par2EntityPlayerMP.theItemInWorldManager.setWorld((WorldServer)par2EntityPlayerMP.worldObj);
String var4 = "local";
if (par1INetworkManager.getSocketAddress() != null)
{
var4 = par1INetworkManager.getSocketAddress().toString();
}
logger.info(par2EntityPlayerMP.getCommandSenderName() + "[" + var4 + "] logged in with entity id " + par2EntityPlayerMP.getEntityId() + " at (" + par2EntityPlayerMP.posX + ", " + par2EntityPlayerMP.posY + ", " + par2EntityPlayerMP.posZ + ")");
WorldServer var5 = this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension);
ChunkCoordinates var6 = var5.getSpawnPoint();
this.func_72381_a(par2EntityPlayerMP, (EntityPlayerMP)null, var5);
NetHandlerPlayServer var7 = new NetHandlerPlayServer(this.mcServer, par1INetworkManager, par2EntityPlayerMP);
var7.sendPacket(new S01PacketJoinGame(par2EntityPlayerMP.getEntityId(), par2EntityPlayerMP.theItemInWorldManager.getGameType(), var5.getWorldInfo().isHardcoreModeEnabled(), var5.provider.dimensionId, var5.difficultySetting, this.getMaxPlayers(), var5.getWorldInfo().getTerrainType()));
var7.sendPacket(new S3FPacketCustomPayload("MC|Brand", this.getServerInstance().getServerModName().getBytes(Charsets.UTF_8)));
var7.sendPacket(new S05PacketSpawnPosition(var6.posX, var6.posY, var6.posZ));
var7.sendPacket(new S39PacketPlayerAbilities(par2EntityPlayerMP.capabilities));
var7.sendPacket(new S09PacketHeldItemChange(par2EntityPlayerMP.inventory.currentItem));
par2EntityPlayerMP.func_147099_x().func_150877_d();
par2EntityPlayerMP.func_147099_x().func_150884_b(par2EntityPlayerMP);
this.func_96456_a((ServerScoreboard)var5.getScoreboard(), par2EntityPlayerMP);
this.mcServer.func_147132_au();
ChatComponentTranslation var8 = new ChatComponentTranslation("multiplayer.player.joined", new Object[] {par2EntityPlayerMP.func_145748_c_()});
var8.getChatStyle().setColor(EnumChatFormatting.YELLOW);
this.func_148539_a(var8);
this.playerLoggedIn(par2EntityPlayerMP);
var7.setPlayerLocation(par2EntityPlayerMP.posX, par2EntityPlayerMP.posY, par2EntityPlayerMP.posZ, par2EntityPlayerMP.rotationYaw, par2EntityPlayerMP.rotationPitch);
this.updateTimeAndWeatherForPlayer(par2EntityPlayerMP, var5);
if (this.mcServer.func_147133_T().length() > 0)
{
par2EntityPlayerMP.func_147095_a(this.mcServer.func_147133_T());
}
Iterator var9 = par2EntityPlayerMP.getActivePotionEffects().iterator();
while (var9.hasNext())
{
PotionEffect var10 = (PotionEffect)var9.next();
var7.sendPacket(new S1DPacketEntityEffect(par2EntityPlayerMP.getEntityId(), var10));
}
par2EntityPlayerMP.addSelfToInternalCraftingInventory();
if (var3 != null && var3.func_150297_b("Riding", 10))
{
Entity var11 = EntityList.createEntityFromNBT(var3.getCompoundTag("Riding"), var5);
if (var11 != null)
{
var11.forceSpawn = true;
var5.spawnEntityInWorld(var11);
par2EntityPlayerMP.mountEntity(var11);
var11.forceSpawn = false;
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:62,代码来源:ServerConfigurationManager.java
示例10: func_72355_a
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
public void func_72355_a(INetworkManager p_72355_1_, EntityPlayerMP p_72355_2_) {
NBTTagCompound var3 = this.func_72380_a(p_72355_2_);
p_72355_2_.func_70029_a(this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK));
p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
String var4 = "local";
if(p_72355_1_.func_74430_c() != null) {
var4 = p_72355_1_.func_74430_c().toString();
}
this.field_72400_f.func_98033_al().func_98233_a(p_72355_2_.func_70005_c_() + "[" + var4 + "] logged in with entity id " + p_72355_2_.field_70157_k + " at (" + p_72355_2_.field_70165_t + ", " + p_72355_2_.field_70163_u + ", " + p_72355_2_.field_70161_v + ")");
WorldServer var5 = this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK);
ChunkCoordinates var6 = var5.func_72861_E();
this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, var5);
NetServerHandler var7 = new NetServerHandler(this.field_72400_f, p_72355_1_, p_72355_2_);
var7.func_72567_b(new Packet1Login(p_72355_2_.field_70157_k, var5.func_72912_H().func_76067_t(), p_72355_2_.field_71134_c.func_73081_b(), var5.func_72912_H().func_76093_s(), var5.field_73011_w.field_76574_g, var5.field_73013_u, var5.func_72800_K(), this.func_72352_l()));
var7.func_72567_b(new Packet250CustomPayload("MC|Brand", this.func_72365_p().getServerModName().getBytes(Charsets.UTF_8)));
var7.func_72567_b(new Packet6SpawnPosition(var6.field_71574_a, var6.field_71572_b, var6.field_71573_c));
var7.func_72567_b(new Packet202PlayerAbilities(p_72355_2_.field_71075_bZ));
var7.func_72567_b(new Packet16BlockItemSwitch(p_72355_2_.field_71071_by.field_70461_c));
this.func_96456_a((ServerScoreboard)var5.func_96441_U(), p_72355_2_);
this.func_72354_b(p_72355_2_, var5);
this.func_92062_k(ChatMessageComponent.func_111082_b("multiplayer.player.joined", new Object[]{p_72355_2_.func_96090_ax()}).func_111059_a(EnumChatFormatting.YELLOW));
this.func_72377_c(p_72355_2_);
var7.func_72569_a(p_72355_2_.field_70165_t, p_72355_2_.field_70163_u, p_72355_2_.field_70161_v, p_72355_2_.field_70177_z, p_72355_2_.field_70125_A);
this.field_72400_f.func_71212_ac().func_71745_a(var7);
var7.func_72567_b(new Packet4UpdateTime(var5.func_82737_E(), var5.func_72820_D(), var5.func_82736_K().func_82766_b("doDaylightCycle")));
if(this.field_72400_f.func_71202_P().length() > 0) {
p_72355_2_.func_71115_a(this.field_72400_f.func_71202_P(), this.field_72400_f.func_71227_R());
}
Iterator var8 = p_72355_2_.func_70651_bq().iterator();
while(var8.hasNext()) {
PotionEffect var9 = (PotionEffect)var8.next();
var7.func_72567_b(new Packet41EntityEffect(p_72355_2_.field_70157_k, var9));
}
p_72355_2_.func_71116_b();
if(var3 != null && var3.func_74764_b("Riding")) {
Entity var10 = EntityList.func_75615_a(var3.func_74775_l("Riding"), var5);
if(var10 != null) {
var10.field_98038_p = true;
var5.func_72838_d(var10);
p_72355_2_.func_70078_a(var10);
var10.field_98038_p = false;
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:50,代码来源:ServerConfigurationManager.java
示例11: initializeConnectionToPlayer
import net.minecraft.scoreboard.ServerScoreboard; //导入依赖的package包/类
public void initializeConnectionToPlayer(INetworkManager par1INetworkManager, EntityPlayerMP par2EntityPlayerMP)
{
NBTTagCompound nbttagcompound = this.readPlayerDataFromFile(par2EntityPlayerMP);
par2EntityPlayerMP.setWorld(this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension));
par2EntityPlayerMP.theItemInWorldManager.setWorld((WorldServer)par2EntityPlayerMP.worldObj);
String s = "local";
if (par1INetworkManager.getSocketAddress() != null)
{
s = par1INetworkManager.getSocketAddress().toString();
}
this.mcServer.getLogAgent().logInfo(par2EntityPlayerMP.getCommandSenderName() + "[" + s + "] logged in with entity id " + par2EntityPlayerMP.entityId + " at (" + par2EntityPlayerMP.posX + ", " + par2EntityPlayerMP.posY + ", " + par2EntityPlayerMP.posZ + ")");
WorldServer worldserver = this.mcServer.worldServerForDimension(par2EntityPlayerMP.dimension);
ChunkCoordinates chunkcoordinates = worldserver.getSpawnPoint();
this.func_72381_a(par2EntityPlayerMP, (EntityPlayerMP)null, worldserver);
NetServerHandler netserverhandler = new NetServerHandler(this.mcServer, par1INetworkManager, par2EntityPlayerMP);
netserverhandler.sendPacketToPlayer(new Packet1Login(par2EntityPlayerMP.entityId, worldserver.getWorldInfo().getTerrainType(), par2EntityPlayerMP.theItemInWorldManager.getGameType(), worldserver.getWorldInfo().isHardcoreModeEnabled(), worldserver.provider.dimensionId, worldserver.difficultySetting, worldserver.getHeight(), this.getMaxPlayers()));
netserverhandler.sendPacketToPlayer(new Packet250CustomPayload("MC|Brand", this.getServerInstance().getServerModName().getBytes(Charsets.UTF_8)));
netserverhandler.sendPacketToPlayer(new Packet6SpawnPosition(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ));
netserverhandler.sendPacketToPlayer(new Packet202PlayerAbilities(par2EntityPlayerMP.capabilities));
netserverhandler.sendPacketToPlayer(new Packet16BlockItemSwitch(par2EntityPlayerMP.inventory.currentItem));
this.func_96456_a((ServerScoreboard)worldserver.getScoreboard(), par2EntityPlayerMP);
this.updateTimeAndWeatherForPlayer(par2EntityPlayerMP, worldserver);
this.sendChatMsg(ChatMessageComponent.createFromTranslationWithSubstitutions("multiplayer.player.joined", new Object[] {par2EntityPlayerMP.getTranslatedEntityName()}).setColor(EnumChatFormatting.YELLOW));
this.playerLoggedIn(par2EntityPlayerMP);
netserverhandler.setPlayerLocation(par2EntityPlayerMP.posX, par2EntityPlayerMP.posY, par2EntityPlayerMP.posZ, par2EntityPlayerMP.rotationYaw, par2EntityPlayerMP.rotationPitch);
this.mcServer.getNetworkThread().addPlayer(netserverhandler);
netserverhandler.sendPacketToPlayer(new Packet4UpdateTime(worldserver.getTotalWorldTime(), worldserver.getWorldTime(), worldserver.getGameRules().getGameRuleBooleanValue("doDaylightCycle")));
if (this.mcServer.getTexturePack().length() > 0)
{
par2EntityPlayerMP.requestTexturePackLoad(this.mcServer.getTexturePack(), this.mcServer.textureSize());
}
Iterator iterator = par2EntityPlayerMP.getActivePotionEffects().iterator();
while (iterator.hasNext())
{
PotionEffect potioneffect = (PotionEffect)iterator.next();
netserverhandler.sendPacketToPlayer(new Packet41EntityEffect(par2EntityPlayerMP.entityId, potioneffect));
}
par2EntityPlayerMP.addSelfToInternalCraftingInventory();
FMLNetworkHandler.handlePlayerLogin(par2EntityPlayerMP, netserverhandler, par1INetworkManager);
if (nbttagcompound != null && nbttagcompound.hasKey("Riding"))
{
Entity entity = EntityList.createEntityFromNBT(nbttagcompound.getCompoundTag("Riding"), worldserver);
if (entity != null)
{
entity.forceSpawn = true;
worldserver.spawnEntityInWorld(entity);
par2EntityPlayerMP.mountEntity(entity);
entity.forceSpawn = false;
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:61,代码来源:ServerConfigurationManager.java
注:本文中的net.minecraft.scoreboard.ServerScoreboard类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论