-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix colony map #10171
Fix colony map #10171
Conversation
c8d88e2
to
b57d0cf
Compare
|
||
public record MapEntry(MapId mapId, MapItemSavedData mapData) | ||
{ | ||
public static final StreamCodec<RegistryFriendlyByteBuf, MapEntry> STREAM_CODEC = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a custom codec for vanilla maps? shouldnt we be able to use the vanilla codec for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first is item dataComp and has both codecs, the second is level savedData which doesnt have any codec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then I dont see why we dont simply sent the int and nbt via buffer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because in first comment you want to me to use vanilla codec? (for mapid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just do:
buf.writeNbt(data.save(new CompoundTag(), buf.registryAccess()))
- Use the mapId codec from vanilla?
I think that was what Sam meant
@@ -2485,7 +2485,7 @@ | |||
"com.minecolonies.coremod.gui.townhall.stats.items_delivered": "Delivered Items: %d", | |||
"com.minecolonies.coremod.gui.townhall.stats.food_served": "Served Food: %d", | |||
"com.minecolonies.coremod.gui.townHall.map": "Town Map", | |||
"com.minecolonies.coremod.townhall.map.warning": "Drop-off a normal scale Minecraft map in the Town Hall inventory first to unlock the map.", | |||
"com.minecolonies.coremod.townhall.map.warning": "Drop-off a Minecraft map(s) in the Town Hall inventory first to unlock the map.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to make sure they only drop the small ones off, not the big ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the PR doc :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but that was gameplay intentional to have maps only of a fixed size in there =D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder
@@ -2485,8 +2485,6 @@ | |||
"com.minecolonies.coremod.gui.interval.lastweek": "Last Week", | |||
"com.minecolonies.coremod.gui.interval.100days": "Last 100 Days", | |||
"com.minecolonies.coremod.gui.interval.alltime": "All Time", | |||
"com.minecolonies.coremod.gui.townhall.stats.items_delivered": "Delivered Items: %d", | |||
"com.minecolonies.coremod.gui.townhall.stats.food_served": "Served Food: %d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dupe keys same values, see few lines above
Changes proposed in this pull request:
(will port after merging)
[x] Yes I tested this before submitting it.
[ ] I also did a multiplayer test.
Review please