本文整理汇总了Java中net.minecraft.util.com.mojang.authlib.properties.Property类的典型用法代码示例。如果您正苦于以下问题:Java Property类的具体用法?Java Property怎么用?Java Property使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Property类属于net.minecraft.util.com.mojang.authlib.properties包,在下文中一共展示了Property类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: a
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public void a(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
this.a = packetdataserializer.a();
UUID uuid = UUID.fromString(packetdataserializer.c(36));
this.b = new GameProfile(uuid, packetdataserializer.c(16));
int i = packetdataserializer.a();
for (int j = 0; j < i; ++j) {
String s = packetdataserializer.c(32767);
String s1 = packetdataserializer.c(32767);
String s2 = packetdataserializer.c(32767);
this.b.getProperties().put(s, new Property(s, s1, s2));
}
this.c = packetdataserializer.readInt();
this.d = packetdataserializer.readInt();
this.e = packetdataserializer.readInt();
this.f = packetdataserializer.readByte();
this.g = packetdataserializer.readByte();
this.h = packetdataserializer.readShort();
this.j = DataWatcher.b(packetdataserializer);
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:24,代码来源:PacketPlayOutNamedEntitySpawn.java
示例2: b
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
packetdataserializer.b(this.a);
UUID uuid = this.b.getId();
packetdataserializer.a(uuid == null ? "" : uuid.toString());
packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName()); // CraftBukkit - Limit name length to 16 characters
packetdataserializer.b(this.b.getProperties().size());
Iterator iterator = this.b.getProperties().values().iterator();
while (iterator.hasNext()) {
Property property = (Property) iterator.next();
packetdataserializer.a(property.getName());
packetdataserializer.a(property.getValue());
packetdataserializer.a(property.getSignature());
}
packetdataserializer.writeInt(this.c);
packetdataserializer.writeInt(this.d);
packetdataserializer.writeInt(this.e);
packetdataserializer.writeByte(this.f);
packetdataserializer.writeByte(this.g);
packetdataserializer.writeShort(this.h);
this.i.a(packetdataserializer);
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:26,代码来源:PacketPlayOutNamedEntitySpawn.java
示例3: d
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
private void d() {
if (this.j != null && !UtilColor.b(this.j.getName())) {
if (!this.j.isComplete() || !this.j.getProperties().containsKey("textures")) {
GameProfile gameprofile = MinecraftServer.getServer().getUserCache().getProfile(this.j.getName());
if (gameprofile != null) {
Property property = (Property) Iterables.getFirst(gameprofile.getProperties().get("textures"), null);
if (property == null) {
gameprofile = MinecraftServer.getServer().av().fillProfileProperties(gameprofile, true);
}
this.j = gameprofile;
this.update();
}
}
}
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:19,代码来源:TileEntitySkull.java
示例4: initUUID
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public void initUUID()
{
UUID uuid;
if ( networkManager.spoofedUUID != null )
{
uuid = networkManager.spoofedUUID;
} else
{
uuid = UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + this.i.getName() ).getBytes( Charsets.UTF_8 ) );
}
this.i = new GameProfile( uuid, this.i.getName() );
if (networkManager.spoofedProfile != null)
{
for ( Property property : networkManager.spoofedProfile )
{
this.i.getProperties().put( property.getName(), property );
}
}
}
开发者ID:pvginkel,项目名称:Tweakkit-Server,代码行数:22,代码来源:LoginListener.java
示例5: updateSkin
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
private void updateSkin(WrappedGameProfile profile, String skinOwner) {
try {
JSONObject json = (JSONObject) new JSONParser().parse(profileCache.get(skinOwner));
JSONArray properties = (JSONArray) json.get("properties");
for (int i = 0; i < properties.size(); i++) {
JSONObject property = (JSONObject) properties.get(i);
String name = (String) property.get("name");
String value = (String) property.get("value");
String signature = (String) property.get("signature"); // May be NULL
// Uncomment for ProtocolLib 3.4.0
//profile.getProperties().put(name, new WrappedSignedProperty(name, value, signature));
((GameProfile) profile.getHandle()).getProperties().put(name, new Property(name, value, signature));
}
} catch (Exception e) {
// ProtocolLib will throttle the number of exceptions printed to the console log
}
}
开发者ID:KingFaris10,项目名称:SkinChanger,代码行数:20,代码来源:PlayerDisplayModifier.java
示例6: makeProfile
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public static GameProfile makeProfile(String name, UUID skinId) {
GameProfile profile = new GameProfile(UUID.randomUUID(), name);
if (skinId != null) {
GameProfile skin = new GameProfile(skinId, null);
skin = NMS.getServer().av().fillProfileProperties(skin, true); //Srg = func_147130_as
if (skin.getProperties().get("textures") == null || !skin.getProperties().get("textures").isEmpty()) {
Property textures = skin.getProperties().get("textures").iterator().next();
profile.getProperties().put("textures", textures);
}
}
return profile;
}
开发者ID:MrLittleKitty,项目名称:AnnihilationPro,代码行数:13,代码来源:EntityNPCPlayer.java
示例7: NPCProfile
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
/**
* Create NPCProfile based on game profile
*
* @param profile Mojang's game profile
*/
public NPCProfile(GameProfile profile) {
this();
this.uuid = profile.getId();
this.name = profile.getName();
for (Entry<String, Collection<Property>> entry : profile.getProperties().asMap().entrySet()) {
profile.getProperties().putAll(entry.getKey(), entry.getValue());
}
}
开发者ID:johnnywoof,项目名称:NoHack,代码行数:14,代码来源:NPCProfile.java
示例8: b
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws
packetdataserializer.b(this.a);
UUID uuid = this.b.getId();
packetdataserializer.a( uuid == null ? "" : ( ( packetdataserializer.version >= 5 ) ? uuid.toString() : uuid.toString().replaceAll( "-", "" ) ) ); // Spigot
packetdataserializer.a(this.b.getName().length() > 16 ? this.b.getName().substring(0, 16) : this.b.getName()); // CraftBukkit - Limit name length to 16 characters
if (packetdataserializer.version >= 5 ) { // Spigot
packetdataserializer.b(this.b.getProperties().size());
Iterator iterator = this.b.getProperties().values().iterator();
while (iterator.hasNext()) {
Property property = (Property) iterator.next();
packetdataserializer.a(property.getName());
packetdataserializer.a(property.getValue());
packetdataserializer.a(property.getSignature());
}
} // Spigot
packetdataserializer.writeInt(this.c);
packetdataserializer.writeInt(this.d);
packetdataserializer.writeInt(this.e);
packetdataserializer.writeByte(this.f);
packetdataserializer.writeByte(this.g);
packetdataserializer.writeShort(this.h);
this.i.a(packetdataserializer);
}
开发者ID:pvginkel,项目名称:Tweakkit-Server,代码行数:28,代码来源:PacketPlayOutNamedEntitySpawn.java
示例9: doActualSpawn
import net.minecraft.util.com.mojang.authlib.properties.Property; //导入依赖的package包/类
public void doActualSpawn(Location inLocation, GameProfile profile)
{
Property property = Iterables.getFirst(profile.getProperties().get("textures"), null);
if(property == null)
profile = MinecraftServer.getServer().av().fillProfileProperties(profile, true);
WorldServer worldServer = ((CraftWorld)inLocation.getWorld()).getHandle();
this.m_entity = new RemotePlayerEntity(worldServer.getMinecraftServer(), worldServer, profile, new PlayerInteractManager(worldServer), this);
worldServer.addEntity(m_entity);
this.m_entity.world.players.remove(this.m_entity);
Player player = this.getBukkitEntity();
if(player != null)
{
player.teleport(inLocation);
player.setMetadata("remoteentity", new FixedMetadataValue(this.m_manager.getPlugin(), this));
}
this.setHeadYaw(inLocation.getYaw());
this.setYaw(inLocation.getYaw());
((RemotePlayerEntity)this.m_entity).updateSpawn();
if(!inLocation.getBlock().getRelative(BlockFace.DOWN).isEmpty())
this.m_entity.onGround = true;
if(this.m_speed != -1)
this.setSpeed(this.m_speed);
else
this.setSpeed(1d);
if(this.m_speedModifier != null)
{
this.addSpeedModifier(this.m_speedModifier.d(), (this.m_speedModifier.c() == 0));
this.m_speedModifier = null;
}
}
开发者ID:MeRPG2,项目名称:EndHQ-Libraries,代码行数:36,代码来源:RemotePlayer.java
注:本文中的net.minecraft.util.com.mojang.authlib.properties.Property类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论