本文整理汇总了Java中net.minecraft.server.management.PreYggdrasilConverter类的典型用法代码示例。如果您正苦于以下问题:Java PreYggdrasilConverter类的具体用法?Java PreYggdrasilConverter怎么用?Java PreYggdrasilConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PreYggdrasilConverter类属于net.minecraft.server.management包,在下文中一共展示了PreYggdrasilConverter类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
super.readEntityFromNBT(tagCompund);
String s = "";
if (tagCompund.hasKey("OwnerUUID", 8))
{
s = tagCompund.getString("OwnerUUID");
}
else
{
String s1 = tagCompund.getString("Owner");
s = PreYggdrasilConverter.getStringUUIDFromName(s1);
}
if (s.length() > 0)
{
this.setOwnerId(s);
this.setTamed(true);
}
this.aiSit.setSitting(tagCompund.getBoolean("Sitting"));
this.setSitting(tagCompund.getBoolean("Sitting"));
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:EntityTameable.java
示例2: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
super.readEntityFromNBT(tagCompund);
String s = "";
if (tagCompund.hasKey("OwnerUUID", 8))
{
s = tagCompund.getString("OwnerUUID");
}
else
{
String s1 = tagCompund.getString("Owner");
s = PreYggdrasilConverter.func_152719_a(s1);
}
if (s.length() > 0)
{
this.setOwnerId(s);
this.setTamed(true);
}
// this.aiSit.setSitting(tagCompund.getBoolean("Sitting"));
// this.setSitting(tagCompund.getBoolean("Sitting"));
}
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:25,代码来源:DinoTameableTest.java
示例3: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
{
super.readEntityFromNBT(p_70037_1_);
String s = "";
if (p_70037_1_.hasKey("OwnerUUID", 8))
{
s = p_70037_1_.getString("OwnerUUID");
}
else
{
String s1 = p_70037_1_.getString("Owner");
s = PreYggdrasilConverter.func_152719_a(s1);
}
if (s.length() > 0)
{
this.func_152115_b(s);
this.setTamed(true);
}
this.aiSit.setSitting(p_70037_1_.getBoolean("Sitting"));
this.setSitting(p_70037_1_.getBoolean("Sitting"));
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:25,代码来源:EntityTameable.java
示例4: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound);
String s;
if (compound.hasKey("OwnerUUID", 8))
{
s = compound.getString("OwnerUUID");
}
else
{
String s1 = compound.getString("Owner");
s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1);
}
if (!s.isEmpty())
{
try
{
this.setOwnerId(UUID.fromString(s));
this.setTamed(true);
}
catch (Throwable var4)
{
this.setTamed(false);
}
}
if (this.aiSit != null)
{
this.aiSit.setSitting(compound.getBoolean("Sitting"));
}
this.setSitting(compound.getBoolean("Sitting"));
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:39,代码来源:EntityTameable.java
示例5: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
@Override
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
super.readEntityFromNBT(tagCompund);
String s = "";
if (tagCompund.hasKey("OwnerUUID", 8))
{
s = tagCompund.getString("OwnerUUID");
}
else
{
String s1 = tagCompund.getString("Owner");
s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1);
}
if (!s.isEmpty())
{
try
{
this.setOwnerId(UUID.fromString(s));
this.setTamed(true);
}
catch (Throwable var4)
{
this.setTamed(false);
}
}
this.aiSit.setSitting(tagCompund.getBoolean("Sitting"));
this.setSitting(tagCompund.getBoolean("Sitting"));
}
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:36,代码来源:EntityOwnable.java
示例6: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
super.readEntityFromNBT(tagCompund);
this.setEatingHaystack(tagCompund.getBoolean("EatingHaystack"));
this.setBreeding(tagCompund.getBoolean("Bred"));
this.setChested(tagCompund.getBoolean("ChestedHorse"));
this.setHasReproduced(tagCompund.getBoolean("HasReproduced"));
this.setHorseType(tagCompund.getInteger("Type"));
this.setHorseVariant(tagCompund.getInteger("Variant"));
this.setTemper(tagCompund.getInteger("Temper"));
this.setHorseTamed(tagCompund.getBoolean("Tame"));
String s = "";
if (tagCompund.hasKey("OwnerUUID", 8))
{
s = tagCompund.getString("OwnerUUID");
}
else
{
String s1 = tagCompund.getString("Owner");
s = PreYggdrasilConverter.getStringUUIDFromName(s1);
}
if (s.length() > 0)
{
this.setOwnerId(s);
}
IAttributeInstance iattributeinstance = this.getAttributeMap().getAttributeInstanceByName("Speed");
if (iattributeinstance != null)
{
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(iattributeinstance.getBaseValue() * 0.25D);
}
if (this.isChested())
{
NBTTagList nbttaglist = tagCompund.getTagList("Items", 10);
this.initHorseChest();
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 2 && j < this.horseChest.getSizeInventory())
{
this.horseChest.setInventorySlotContents(j, ItemStack.loadItemStackFromNBT(nbttagcompound));
}
}
}
if (tagCompund.hasKey("ArmorItem", 10))
{
ItemStack itemstack = ItemStack.loadItemStackFromNBT(tagCompund.getCompoundTag("ArmorItem"));
if (itemstack != null && isArmorItem(itemstack.getItem()))
{
this.horseChest.setInventorySlotContents(1, itemstack);
}
}
if (tagCompund.hasKey("SaddleItem", 10))
{
ItemStack itemstack1 = ItemStack.loadItemStackFromNBT(tagCompund.getCompoundTag("SaddleItem"));
if (itemstack1 != null && itemstack1.getItem() == Items.saddle)
{
this.horseChest.setInventorySlotContents(0, itemstack1);
}
}
else if (tagCompund.getBoolean("Saddle"))
{
this.horseChest.setInventorySlotContents(0, new ItemStack(Items.saddle));
}
this.updateHorseSlots();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:82,代码来源:EntityHorse.java
示例7: convertFiles
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
protected boolean convertFiles() throws IOException
{
boolean flag = false;
for (int i = 0; !flag && i <= 2; ++i)
{
if (i > 0)
{
logger.warn("Encountered a problem while converting the user banlist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag = PreYggdrasilConverter.convertUserBanlist(this);
}
boolean flag1 = false;
for (int j = 0; !flag1 && j <= 2; ++j)
{
if (j > 0)
{
logger.warn("Encountered a problem while converting the ip banlist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag1 = PreYggdrasilConverter.convertIpBanlist(this);
}
boolean flag2 = false;
for (int k = 0; !flag2 && k <= 2; ++k)
{
if (k > 0)
{
logger.warn("Encountered a problem while converting the op list, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag2 = PreYggdrasilConverter.convertOplist(this);
}
boolean flag3 = false;
for (int l = 0; !flag3 && l <= 2; ++l)
{
if (l > 0)
{
logger.warn("Encountered a problem while converting the whitelist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag3 = PreYggdrasilConverter.convertWhitelist(this);
}
boolean flag4 = false;
for (int i1 = 0; !flag4 && i1 <= 2; ++i1)
{
if (i1 > 0)
{
logger.warn("Encountered a problem while converting the player save files, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag4 = PreYggdrasilConverter.convertSaveFiles(this, this.settings);
}
return flag || flag1 || flag2 || flag3 || flag4;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:70,代码来源:DedicatedServer.java
示例8: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound);
this.setEatingHaystack(compound.getBoolean("EatingHaystack"));
this.setBreeding(compound.getBoolean("Bred"));
this.setTemper(compound.getInteger("Temper"));
this.setHorseTamed(compound.getBoolean("Tame"));
String s;
if (compound.hasKey("OwnerUUID", 8))
{
s = compound.getString("OwnerUUID");
}
else
{
String s1 = compound.getString("Owner");
s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1);
}
if (!s.isEmpty())
{
this.setOwnerUniqueId(UUID.fromString(s));
}
IAttributeInstance iattributeinstance = this.getAttributeMap().getAttributeInstanceByName("Speed");
if (iattributeinstance != null)
{
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(iattributeinstance.getBaseValue() * 0.25D);
}
if (compound.hasKey("SaddleItem", 10))
{
ItemStack itemstack = new ItemStack(compound.getCompoundTag("SaddleItem"));
if (itemstack.getItem() == Items.SADDLE)
{
this.horseChest.setInventorySlotContents(0, itemstack);
}
}
this.updateHorseSlots();
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:47,代码来源:AbstractHorse.java
示例9: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound);
this.setEatingHaystack(compound.getBoolean("EatingHaystack"));
this.setBreeding(compound.getBoolean("Bred"));
this.setChested(compound.getBoolean("ChestedHorse"));
this.setHasReproduced(compound.getBoolean("HasReproduced"));
this.setType(HorseType.getArmorType(compound.getInteger("Type")));
this.setHorseVariant(compound.getInteger("Variant"));
this.setTemper(compound.getInteger("Temper"));
this.setHorseTamed(compound.getBoolean("Tame"));
this.setSkeletonTrap(compound.getBoolean("SkeletonTrap"));
this.skeletonTrapTime = compound.getInteger("SkeletonTrapTime");
String s;
if (compound.hasKey("OwnerUUID", 8))
{
s = compound.getString("OwnerUUID");
}
else
{
String s1 = compound.getString("Owner");
s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1);
}
if (!s.isEmpty())
{
this.setOwnerUniqueId(UUID.fromString(s));
}
IAttributeInstance iattributeinstance = this.getAttributeMap().getAttributeInstanceByName("Speed");
if (iattributeinstance != null)
{
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(iattributeinstance.getBaseValue() * 0.25D);
}
if (this.isChested())
{
NBTTagList nbttaglist = compound.getTagList("Items", 10);
this.initHorseChest();
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
if (j >= 2 && j < this.horseChest.getSizeInventory())
{
this.horseChest.setInventorySlotContents(j, ItemStack.loadItemStackFromNBT(nbttagcompound));
}
}
}
if (compound.hasKey("ArmorItem", 10))
{
ItemStack itemstack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("ArmorItem"));
if (itemstack != null && HorseArmorType.isHorseArmor(itemstack.getItem()))
{
this.horseChest.setInventorySlotContents(1, itemstack);
}
}
if (compound.hasKey("SaddleItem", 10))
{
ItemStack itemstack1 = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("SaddleItem"));
if (itemstack1 != null && itemstack1.getItem() == Items.SADDLE)
{
this.horseChest.setInventorySlotContents(0, itemstack1);
}
}
this.updateHorseSlots();
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:80,代码来源:EntityHorse.java
示例10: convertFiles
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
protected boolean convertFiles() throws IOException
{
boolean flag = false;
for (int i = 0; !flag && i <= 2; ++i)
{
if (i > 0)
{
LOGGER.warn("Encountered a problem while converting the user banlist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag = PreYggdrasilConverter.convertUserBanlist(this);
}
boolean flag1 = false;
for (int j = 0; !flag1 && j <= 2; ++j)
{
if (j > 0)
{
LOGGER.warn("Encountered a problem while converting the ip banlist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag1 = PreYggdrasilConverter.convertIpBanlist(this);
}
boolean flag2 = false;
for (int k = 0; !flag2 && k <= 2; ++k)
{
if (k > 0)
{
LOGGER.warn("Encountered a problem while converting the op list, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag2 = PreYggdrasilConverter.convertOplist(this);
}
boolean flag3 = false;
for (int l = 0; !flag3 && l <= 2; ++l)
{
if (l > 0)
{
LOGGER.warn("Encountered a problem while converting the whitelist, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag3 = PreYggdrasilConverter.convertWhitelist(this);
}
boolean flag4 = false;
for (int i1 = 0; !flag4 && i1 <= 2; ++i1)
{
if (i1 > 0)
{
LOGGER.warn("Encountered a problem while converting the player save files, retrying in a few seconds");
this.sleepFiveSeconds();
}
flag4 = PreYggdrasilConverter.convertSaveFiles(this, this.settings);
}
return flag || flag1 || flag2 || flag3 || flag4;
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:70,代码来源:DedicatedServer.java
示例11: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
@Override
public void readEntityFromNBT( NBTTagCompound tag )
{
super.readEntityFromNBT( tag );
String str;
if ( ( str = tag.getString( "Owner" ) ) != null )
{
setOwnerUUID( PreYggdrasilConverter.func_152719_a( str ) );
}
if ( ( str = tag.getString( "OwnerID" ) ) != null )
{
setOwnerUUID( tag.getString( "OwnerID" ) );
}
setPetType( PetType.forName( tag.getString( "Type" ) ) );
setLevel( tag.getInteger( "Level" ) );
setFreeSkillPoints( tag.getInteger( "FreeSkillPoints" ) );
skills.clear();
int[] theSkills = ( ( NBTTagIntArray ) tag.getTag( "Skills" ) ).func_150302_c();
for ( int id : theSkills )
{
skills.add( id );
}
dataWatcher.updateObject( DATA_SKILLS, getSkillsStack() );
if ( tag.getTag( "Inventory" ) != null )
{
NBTTagList list = ( NBTTagList ) tag.getTag( "Inventory" );
for ( int i = 0; i < Math.min( 12, list.tagCount() ); ++i )
{
NBTTagCompound compound = ( NBTTagCompound ) list.getCompoundTagAt( i );
if ( compound.hasNoTags() )
{
continue;
}
ItemStack stack = ItemStack.loadItemStackFromNBT( compound );
inv.setInventorySlotContents( i, stack );
}
}
setSitting( tag.getBoolean( "Sitting" ) );
setHunger( tag.getFloat( "Hunger" ) );
setSaturation( tag.getFloat( "Saturation" ) );
// New with 1.0
if ( tag.hasKey( "Texture" ) )
{
setTexture( tag.getString( "Texture" ) );
}
else
{
setTexture( type.textures.get( 0 ) );
}
}
开发者ID:spacechase0,项目名称:UsefulPets,代码行数:55,代码来源:PetEntity.java
示例12: func_152368_aE
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
protected boolean func_152368_aE() throws IOException
{
boolean flag = false;
int i;
for (i = 0; !flag && i <= 2; ++i)
{
if (i > 0)
{
field_155771_h.warn("Encountered a problem while converting the user banlist, retrying in a few seconds");
this.func_152369_aG();
}
flag = PreYggdrasilConverter.func_152724_a(this);
}
boolean flag1 = false;
for (i = 0; !flag1 && i <= 2; ++i)
{
if (i > 0)
{
field_155771_h.warn("Encountered a problem while converting the ip banlist, retrying in a few seconds");
this.func_152369_aG();
}
flag1 = PreYggdrasilConverter.func_152722_b(this);
}
boolean flag2 = false;
for (i = 0; !flag2 && i <= 2; ++i)
{
if (i > 0)
{
field_155771_h.warn("Encountered a problem while converting the op list, retrying in a few seconds");
this.func_152369_aG();
}
flag2 = PreYggdrasilConverter.func_152718_c(this);
}
boolean flag3 = false;
for (i = 0; !flag3 && i <= 2; ++i)
{
if (i > 0)
{
field_155771_h.warn("Encountered a problem while converting the whitelist, retrying in a few seconds");
this.func_152369_aG();
}
flag3 = PreYggdrasilConverter.func_152710_d(this);
}
boolean flag4 = false;
for (i = 0; !flag4 && i <= 2; ++i)
{
if (i > 0)
{
field_155771_h.warn("Encountered a problem while converting the player save files, retrying in a few seconds");
this.func_152369_aG();
}
flag4 = PreYggdrasilConverter.func_152723_a(this, this.settings);
}
return flag || flag1 || flag2 || flag3 || flag4;
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:71,代码来源:DedicatedServer.java
示例13: readEntityFromNBT
import net.minecraft.server.management.PreYggdrasilConverter; //导入依赖的package包/类
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound);
setUpsideDown(compound.getBoolean("upsideDown"));
String s;
if (compound.hasKey("OwnerUUID", 8))
{
s = compound.getString("OwnerUUID");
}
else
{
String s1 = compound.getString("Owner");
s = PreYggdrasilConverter.convertMobOwnerIfNeeded(this.getServer(), s1);
}
if (!s.isEmpty())
{
try
{
this.setOwnerId(UUID.fromString(s));
this.setTamed(true);
}
catch (Throwable var4)
{
this.setTamed(false);
}
}
/*
if (this.aiSit != null)
{
this.aiSit.setSitting(compound.getBoolean("Sitting"));
}
this.setSitting(compound.getBoolean("Sitting"));
*/
}
开发者ID:ProBossGamers,项目名称:TurtleMod,代码行数:44,代码来源:EntityTurtle.java
注:本文中的net.minecraft.server.management.PreYggdrasilConverter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论