MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / writeMountToNBT

Method writeMountToNBT

src/main/java/net/minecraft/entity/Entity.java:1621–1635  ·  view source on GitHub ↗

Like writeToNBTOptional but does not check if the entity is ridden. Used for saving ridden entities with their riders.

(NBTTagCompound tagCompund)

Source from the content-addressed store, hash-verified

1619 * riders.
1620 */
1621 public boolean writeMountToNBT(NBTTagCompound tagCompund)
1622 {
1623 String s = this.getEntityString();
1624
1625 if (!this.isDead && s != null)
1626 {
1627 tagCompund.setString("id", s);
1628 this.writeToNBT(tagCompund);
1629 return true;
1630 }
1631 else
1632 {
1633 return false;
1634 }
1635 }
1636
1637 /**
1638 * Either write this entity to the NBT tag given and return true, or return false without doing anything. If this

Callers 1

writeToNBTMethod · 0.80

Calls 3

getEntityStringMethod · 0.95
writeToNBTMethod · 0.95
setStringMethod · 0.80

Tested by

no test coverage detected