Skip to content
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

Map with ID 2 causes exceptions in console #21

Open
galexrt opened this issue Jan 17, 2022 · 2 comments
Open

Map with ID 2 causes exceptions in console #21

galexrt opened this issue Jan 17, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@galexrt
Copy link

galexrt commented Jan 17, 2022

I'm using the ItemJoin plugin to give users a map with ID 2, but when looking at the map we get the following exception spammed in console:

[16:58:01 ERROR]: Could not render map using renderer io.github.bananapuncher714.cartographer.core.renderer.CartographerRenderer
java.lang.IllegalStateException: Item does not have map associated - check hasMapView() first!
	at com.google.common.base.Preconditions.checkState(Preconditions.java:502) ~[guava-31.0.1-jre.jar:?]
	at org.bukkit.craftbukkit.v1_18_R1.inventory.CraftMetaMap.getMapId(CraftMetaMap.java:147) ~[paper-1.18.1.jar:git-Paper-152]
	at io.github.bananapuncher714.cartographer.core.internal.Util_1_13.getMapViewFrom(Util_1_13.java:34) ~[Cartographer2-2.15.3.jar:?]
	at io.github.bananapuncher714.cartographer.core.renderer.CartographerRenderer.render(CartographerRenderer.java:565) ~[Cartographer2-2.15.3.jar:?]
	at org.bukkit.craftbukkit.v1_18_R1.map.CraftMapView.render(CraftMapView.java:159) ~[paper-1.18.1.jar:git-Paper-152]
	at net.minecraft.world.level.saveddata.maps.MapItemSavedData$HoldingPlayer.nextUpdatePacket(MapItemSavedData.java:629) ~[?:?]
	at net.minecraft.world.level.saveddata.maps.MapItemSavedData.getUpdatePacket(MapItemSavedData.java:433) ~[?:?]
	at net.minecraft.world.item.MapItem.getUpdatePacket(MapItem.java:375) ~[?:?]
	at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:676) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:317) ~[?:?]
	at net.minecraft.network.Connection.tick(Connection.java:526) ~[?:?]
	at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:201) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1636) ~[paper-1.18.1.jar:git-Paper-152]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:480) ~[paper-1.18.1.jar:git-Paper-152]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1470) ~[paper-1.18.1.jar:git-Paper-152]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1264) ~[paper-1.18.1.jar:git-Paper-152]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-152]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

This seems to correctly give users a map item ingame but the map is not working. I'm not sure if it is ItemJoin causing an issue here or Cartographer unable to use the map item ItemJoin created.

If you need more information (e.g., minimap config file), please let me know.

@galexrt galexrt changed the title ItemJoin Map with ID 2 causes exceptions in console Map with ID 2 causes exceptions in console Feb 5, 2022
@galexrt
Copy link
Author

galexrt commented Feb 5, 2022

Giving myself a filled_map (also map) item with the id 2 using the command: /give Galexrt filled_map{map:2} causes the exceptions in the console as well.

The only way to get a working map is to use /cartographer get 1

@BananaPuncher714
Copy link
Owner

Thanks, I'll take a look and see what I can do.

@BananaPuncher714 BananaPuncher714 added the bug Something isn't working label Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants