Skip to content

Commit

Permalink
fix binding to a player after autocrafting
Browse files Browse the repository at this point in the history
  • Loading branch information
LemmaEOF committed Jul 2, 2018
1 parent 5cfabbb commit 770102b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player
MinecraftServer server = world.getMinecraftServer();

if (!world.isRemote) {
if (item.getTagCompound() == null) {
item.setTagCompound(new NBTTagCompound());
if (!item.hasTagCompound() || !item.getTagCompound().hasKey("PlayerID")) {
if (!item.hasTagCompound()) item.setTagCompound(new NBTTagCompound());
item.getTagCompound().setUniqueId("PlayerID", player.getPersistentID());
TextComponentTranslation bracelet = new TextComponentTranslation("item.friendship_bracelet.rename");
String name = "§r"+player.getName()+bracelet.getUnformattedComponentText();
Expand Down

0 comments on commit 770102b

Please sign in to comment.