The bug
When you have already a map with id 0 and create a new map, the map with id 0 stops updating. Reloading the world fixes this.
How top reproduce
If a map with id 0 exists already you can use
/give @p filled_map
Otherwise create a new map by right clicking with an empty map
Make sure the player marker moves when you move
Create another map
Look at the map with id 0 again and move around
→ It does not update anymore
The reason
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The reason for this is that the method net.minecraft.item.ItemEmptyMap.onItemRightClick(ItemStack, World, EntityPlayer, EnumHand)
currently creates server- and client-side a MapData
object and stores it. This should not happen client-side because the client does not store the map id and uses therefor always 0. The problem is that if a map with the id 0 already existed, the net.minecraft.client.gui.MapItemRenderer
registered it already, but because of the new map being generated with the id 0, the old map gets overridden. The MapItemRenderer refers however still to the old MapData which is not updated anymore (intended). The client should probably not create a MapData object in the first place.
Possible fix
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
{
// The following is the new method content
--itemStackIn.stackSize;
if (worldIn.isRemote) {
return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
}
else {
ItemStack itemstack = new ItemStack(Items.FILLED_MAP, 1, worldIn.getUniqueDataId("map"));
String s = "map_" + itemstack.getMetadata();
MapData mapdata = new MapData(s);
worldIn.setItemData(s, mapdata);
mapdata.scale = 0;
mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
mapdata.dimension = (byte)worldIn.provider.getDimensionType().getId();
mapdata.trackingPosition = true;
mapdata.markDirty();
if (itemStackIn.stackSize <= 0)
{
return new ActionResult(EnumActionResult.SUCCESS, itemstack);
}
else
{
if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
{
playerIn.dropItem(itemstack, false);
}
playerIn.addStat(StatList.getObjectUseStats(this));
return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
}
}
}
Related issues
is duplicated by
relates to
Comments


sry i can only german. and this is whit Translater

could you then perhaps add screenshots showing the issue?

give me time i make it
5min

ähm can i make a video? it better to show

sure

i can the video not uplode. is to big

have you a email ? i sent you
or have you a idee?

upload it to youtube or something, you can mark it is "not shown", if you can't, then a message again, I'll give you my g-mail and I'll upload it then

i have a Facebook Gaming fanpage. name is eisklinge20
is this ok?

send a message

OK on facebook it lasts too long. would be to be made nevertheless better about Gmail

ahhh ok ok i understood . now I will send the video via Gmail . have the address

ok, I see you're having trouble sending the mail too (took over 8 minutes) so could you perhaps attach screenshots of the issue?

it is equally ready. then this is a left too goggle drive says Gmail.

access...

ok would be released

over 1GB, a bit much, isn't it?

sry say it fraps. or know you a better program?

I use FRAPS too when I record, but 20 seconds is 900MB, so your recording is absurbly long for a bug report

ah ok sry is me first video for Bug report. the next is better

ah, at least the problem is clear in your video

this is good

there, reworded for you, and linked the video in the description

yes

Was the first map you created in this setup also the very first map you created in this world? If you can't remember, press F3
+ H
and hover over the map, the name should contains "(#0358/0)".

The following assumes that this report is about the first map created in a world, which stops working after another map is created. A better summary would be "Client overrides map data of map with id 0 when a new map is created"
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The reason for this is that the method net.minecraft.item.ItemEmptyMap.onItemRightClick(ItemStack, World, EntityPlayer, EnumHand)
currently creates server- and client-side a MapData
object and stores it. This should not happen client-side because the client does not store the map id and uses therefor always 0. The problem is that if a map with the id 0 already existed, the net.minecraft.client.gui.MapItemRenderer
registered it already, but because of the new map being generated with the id 0, the old map gets overridden. The MapItemRenderer refers however still to the old MapData which is not updated anymore (intended). The client should probably not create a MapData object in the first place.
Possible fix
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
{
// The following is the new method content
--itemStackIn.stackSize;
if (worldIn.isRemote) {
return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
}
else {
ItemStack itemstack = new ItemStack(Items.FILLED_MAP, 1, worldIn.getUniqueDataId("map"));
String s = "map_" + itemstack.getMetadata();
MapData mapdata = new MapData(s);
worldIn.setItemData(s, mapdata);
mapdata.scale = 0;
mapdata.calculateMapCenter(playerIn.posX, playerIn.posZ, mapdata.scale);
mapdata.dimension = (byte)worldIn.provider.getDimensionType().getId();
mapdata.trackingPosition = true;
mapdata.markDirty();
if (itemStackIn.stackSize <= 0)
{
return new ActionResult(EnumActionResult.SUCCESS, itemstack);
}
else
{
if (!playerIn.inventory.addItemStackToInventory(itemstack.copy()))
{
playerIn.dropItem(itemstack, false);
}
playerIn.addStat(StatList.getObjectUseStats(this));
return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
}
}
}
Note: This change should not cause any problems because the client does not generate a MapData object unless it receives a packet from a server. All rendering methods test as well if the MapData object is not null
before trying to render it. Not creating the new item for the client should work as well because the server sends a packet and the client does not know the meta data anyway.
Edit: Client does not create a filled map, which means this note is redundant.

A better summary would be "Client overrides map data of map with id 0 when a new map is created"
Can I please become the reporter of this report?

Ähm i have Minecraft Not more on my Pc. Sry but Minecraft make me Not more Fun.

Oh sorry, I though you were inactive. Do you mind if I became the reporter (the moderators would change that)?

Provided the translator now right has made, you would like to become you the leading Supporter of my old problem.
Have I understood so properly?

Not quite, I assume you are German so I will try it in German.
Du hast ja diesen Fehlerbericht erstellt. Die Moderatoren hier können der Ersteller des Berichtes ändern, dadurch könnte ich dann den Bericht bearbeiten und weiter verwalten 🙂
Ich hoffe du hast nichts dagegen

ahhhh ok.
I see no problem. That you are welcome to make

and yes i am german. my englisch is not good.
that is the reason why I have to rely on translators

Changed reporter to @unknown.

@unknown, @unknown is still the reporter

My phone didn't save the edit 😞 fixed.

Is ok

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.

Confirmed for 1.13.1.

Cannot reproduce in 21w40a.
This was fixed in version 20w46a 🙂
Your description is very hard to understand. Please provide a better one.