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

[BUG] Vane by oddlama breaks QuickShop Virtual Display #1788

Open
6 of 7 tasks
dandud100 opened this issue Oct 24, 2024 · 8 comments
Open
6 of 7 tasks

[BUG] Vane by oddlama breaks QuickShop Virtual Display #1788

dandud100 opened this issue Oct 24, 2024 · 8 comments
Labels
bug Something isn't working outside scope not a QuickShop issue.

Comments

@dandud100
Copy link

dandud100 commented Oct 24, 2024

Description

When i tried to sell an Item from the Vane Plugin i noticed that the Name of the Item is wrong and that the fake item above the chest is missing. Also i got error messages in the server console.

I uses Vane with the Reremake Plugin a while ago and that worked without any problems out of the box so i have hope that this can be fixed in Hikari aswell.

Steps to reproduce

  1. Download Vane by oddlame

  2. /vane-core:customitem give vane_trifles:file

  3. Try to make a shop with this item

  4. Try to make a shop with a normal vanilla item, it will be broke too till server restart

Expected Behaviour

QuickShop should use the correct name and item model to display the item.

Screenshots

2024-10-24_18 42 18

/quickshop paste URL

https://ghost-chu.github.io/quickshop-hikari-paste-viewer/?remote=https%3A%2F%2Fbytebin.lucko.me%2FGHYV6c6jyi

Additional Context

[18:39:15] [Server thread/INFO]: Pokemoon issued server command: /qs create 1
[18:39:15] [Server thread/WARN]: [QuickShop-Hikari] Failed to init the displayItem for shop ContainerShop{location=Location{world=CraftWorld{name=world},x=1.0,y=100.0,z=-6.0,pitch=0.0,yaw=0.0}, plugin=com.ghostchu.quickshop.QuickShop@28d28ffa, runtimeRandomUniqueId=d5ee8830-a658-4e20-bdc9-8607f8ffff40, playerGroup={}, isDeleted=false, extra=YamlConfiguration[path='', root='YamlConfiguration'], shopId=-1, owner=Pokemoon, price=1.0, shopType=SELLING, unlimited=false, item=ItemStack{WARPED_FUNGUS_ON_A_STICK x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, item-name={"text":"Feile","italic":false}, custom-model-data=7733251, max-damage=4000, PublicBukkitValues={
    "vane:custom_item_identifier": "vane_trifles:file",
    "vane:custom_item_version": 1
}}}, originalItem=ItemStack{WARPED_FUNGUS_ON_A_STICK x 1, UNSPECIFIC_META:{meta-type=UNSPECIFIC, item-name={"text":"Feile","italic":false}, custom-model-data=7733251, max-damage=4000, PublicBukkitValues={
    "vane:custom_item_identifier": "vane_trifles:file",
    "vane:custom_item_version": 1
}}}, displayItem=null, isLoaded=true, createBackup=false, inventoryPreview=null, dirty=false, updating=false, currency='null', disableDisplay=false, taxAccount=null, inventoryWrapperProvider='QuickShop-Hikari', symbolLink='2;1;100;-6;world', shopName='null', benefit=com.ghostchu.quickshop.economy.SimpleBenefit@7f4765a0}, the display now disabled for this shop. Did you have ProtocolLib installed?
java.lang.IllegalStateException: Unable to construct new instance using public net.minecraft.world.entity.EntityType(net.minecraft.world.entity.EntityType$EntityFactory,net.minecraft.world.entity.MobCategory,boolean,boolean,boolean,boolean,com.google.common.collect.ImmutableSet,net.minecraft.world.entity.EntityDimensions,float,int,int,net.minecraft.world.flag.FeatureFlagSet)
	at ProtocolLib.jar/com.comphenix.protocol.reflect.accessors.DefaultConstrutorAccessor.invoke(DefaultConstrutorAccessor.java:21) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.instances.InstanceCreator.get(InstanceCreator.java:76) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newInstance(StructureCache.java:97) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.writeDefaults(StructureModifier.java:405) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:364) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:357) ~[ProtocolLib.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.packetfactory.v1_21_R1.createFakeItemSpawnPacket(v1_21_R1.java:93) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.VirtualDisplayItem.<init>(VirtualDisplayItem.java:47) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.VirtualDisplayItemManager.createVirtualDisplayItem(VirtualDisplayItemManager.java:104) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ContainerShop.checkDisplay(ContainerShop.java:334) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ContainerShop.handleLoading(ContainerShop.java:1061) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.AbstractShopManager.loadShop(AbstractShopManager.java:145) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.SimpleShopManager.createShop(SimpleShopManager.java:589) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.SimpleShopManager.actionCreate(SimpleShopManager.java:318) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.SimpleShopManager.lambda$handleChat$2(SimpleShopManager.java:686) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.util.Util.mainThreadRun(Util.java:1037) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.SimpleShopManager.handleChat(SimpleShopManager.java:675) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.command.subcommand.SubCommand_Create.onCommand(SubCommand_Create.java:76) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.command.subcommand.SubCommand_Create.onCommand(SubCommand_Create.java:21) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.api.command.CommandHandler.onCommand_Internal(CommandHandler.java:76) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.command.SimpleCommandManager.onCommand(SimpleCommandManager.java:446) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.command.QuickShopCommand.execute(QuickShopCommand.java:22) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.Commands.performCommand(Commands.java:350) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.Commands.performCommand(Commands.java:337) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.commands.Commands.performCommand(Commands.java:332) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2218) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2192) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1535) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1512) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1505) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1464) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1471) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1316) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalStateException: Registry is already frozen
	at net.minecraft.core.MappedRegistry.validateWrite(MappedRegistry.java:105) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.core.MappedRegistry.createIntrusiveHolder(MappedRegistry.java:359) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.world.entity.EntityType.<init>(EntityType.java:351) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at net.minecraft.world.entity.EntityType.<init>(EntityType.java:343) ~[paper-1.21.1.jar:1.21.1-128-d348cb8]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.accessors.DefaultConstrutorAccessor.invoke(DefaultConstrutorAccessor.java:19) ~[ProtocolLib.jar:?]
	... 48 more

Checklist

  • I'm running Paper or Spigot, and not a fork
  • I confirm that Paper/Spigot has been updated to the latest build
  • I confirm that QuickShop-Hikari has been updated to the latest stable version released on Modrinth (or the latest CI version)
  • I confirm that I have not read these checkboxes and therefore I just ticked them all.
  • I confirm that I'm using QuickShop-Hikari, not QuickShop-Reremake, and I'm well aware that they're maintained by different people, and that Reremake issues shouldn't be reported here.
  • I confirm that I am running a server that is not a Hybird Server, (e.g. Mohist, Magma, CatServer, Banner, etc.), and I am aware that QuickShop-Hikari may not function properly on a Forge/Fabric hybrid server, and I am running at my own risk on such a server program, and I am aware that the I run such server-side programs at my own risk and know that I will not receive any support or help for this behavior.
  • I am well aware that if the Issue Ticket is not filled out correctly and completely, it will simply be closed without any response or reason.
@BlvckBytes
Copy link
Contributor

I highly suspect this to be an issue with Vane itself: try to hand out the custom item by executing /vane-core:customitem give vane_trifles:file, then, without doing anything else with it, create a Shop for any other vanilla item - the exact same error occurs.

The exception is not thrown within QuickShop itself; it stems from trying to create a fake-item spawn packet, which in turn calls ProtocolLib's createPacket-method, which tries to call the constructor of net.minecraft.world.entity.EntityType, which then throws "Registry is already frozen".

This registry manages intrusive holders, which Vane registers to; Vane already starts up with a related error on my machine: "Some intrusive holders were not registered". This error is thrown in net.minecraft.core.RegistryMaterials.

Do you also get this error logged by Vane on your startup? This could explain why the registry remains frozen, so that ProtocolLib cannot access it later on.

[01:13:52 WARN]: [vane-core] Task #19 for vane-core v1.15.0 generated an exception
java.lang.IllegalStateException: Some intrusive holders were not registered: [Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}]
	at net.minecraft.core.MappedRegistry.freeze(MappedRegistry.java:343) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at vane-core-1.15.0.jar/org.oddlama.vane.core.Core.freeze_registries(Core.java:174) ~[vane-core-1.15.0.jar:?]
	at vane-core-1.15.0.jar/org.oddlama.vane.core.Core.lambda$on_enable$1(Core.java:152) ~[vane-core-1.15.0.jar:?]
	at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@dandud100
Copy link
Author

Yes I also get this error on startup.

@BlvckBytes
Copy link
Contributor

Then I would highly recommend you trying to create a separate issue at Vane's repository, possibly pointing to this thread, for context.

@dandud100
Copy link
Author

Will do when I am at home, I just posted this on their Discord in BugReports. Maybe I get a response.

@oddlama
Copy link

oddlama commented Oct 28, 2024

Hi, vane dev here :)

The exception is not thrown within QuickShop itself; it stems from trying to create a fake-item spawn packet, which in turn calls ProtocolLib's createPacket-method, which tries to call the constructor of net.minecraft.world.entity.EntityType, which then throws "Registry is already frozen".

Oh this is quite interesting, do you do anything related to that registry manually? Or is it all handled by ProtocolLib? Vane needs to register a new entity type and so it unfreezes and then re-freezes the ENTITY_TYPE registry. Does ProtocolLib maybe require it to remain unfrozen? (Not sure what the implications would be)

This registry manages intrusive holders, which Vane registers to; Vane already starts up with a related error on my machine: "Some intrusive holders were not registered". This error is thrown in net.minecraft.core.RegistryMaterials.

I don't know what you are referring to here, do you have the full context? Never seen this before

@BlvckBytes
Copy link
Contributor

Hey there, @oddlama!

I just tried to load vane in the absence of QuickShop-Hikari, and the exception as thrown in the context of and thereby logged by vane has disappeared; this suggests some sort of interplay between the two. The full context, or rather the corresponding stack-trace, would be as follows:

[19:50:07 WARN]: [vane-core] Task #19 for vane-core v1.15.0 generated an exception
java.lang.IllegalStateException: Some intrusive holders were not registered: [Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}, Reference{null=entity.minecraft.pig}]
	at net.minecraft.core.MappedRegistry.freeze(MappedRegistry.java:343) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at vane-core-1.15.0.jar/org.oddlama.vane.core.Core.freeze_registries(Core.java:174) ~[vane-core-1.15.0.jar:?]
	at vane-core-1.15.0.jar/org.oddlama.vane.core.Core.lambda$on_enable$1(Core.java:152) ~[vane-core-1.15.0.jar:?]
	at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

I believe that this exception hinders your plugin in completing the operation, thereby causing subsequent calls by ProtocolLib to fail:

[19:50:08 WARN]: [QuickShop-Hikari] Failed to init the displayItem for shop ContainerShop{location=Location{world=CraftWorld{name=skaiblock},x=-770.0,y=81.0,z=-2850.0,pitch=0.0,yaw=0.0}, plugin=com.ghostchu.quickshop.QuickShop@168cf1d9, runtimeRandomUniqueId=d1a13169-ab96-441a-b93d-635b36f972ae, playerGroup={b293e0a7-3d8c-444f-bd0b-b2c1ca392b32=quickshop-hikari.administrator}, isDeleted=false, extra=YamlConfiguration[path='', root='YamlConfiguration'], shopId=1, owner=BlvckBytes, price=200.0, shopType=SELLING, unlimited=false, item=ItemStack{DIAMOND x 1}, originalItem=ItemStack{DIAMOND x 1}, displayItem=null, isLoaded=true, createBackup=false, inventoryPreview=null, dirty=false, updating=false, currency='null', disableDisplay=false, taxAccount=null, inventoryWrapperProvider='QuickShop-Hikari', symbolLink='2;-770;81;-2850;skaiblock', shopName='null', benefit=com.ghostchu.quickshop.economy.SimpleBenefit@43c683f}, the display now disabled for this shop. Did you have ProtocolLib installed?
java.lang.IllegalStateException: Unable to construct new instance using public net.minecraft.world.entity.EntityType(net.minecraft.world.entity.EntityType$EntityFactory,net.minecraft.world.entity.MobCategory,boolean,boolean,boolean,boolean,com.google.common.collect.ImmutableSet,net.minecraft.world.entity.EntityDimensions,float,int,int,net.minecraft.world.flag.FeatureFlagSet)
	at ProtocolLib.jar/com.comphenix.protocol.reflect.accessors.DefaultConstrutorAccessor.invoke(DefaultConstrutorAccessor.java:21) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.instances.InstanceCreator.get(InstanceCreator.java:76) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newInstance(StructureCache.java:97) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.writeDefaults(StructureModifier.java:405) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:364) ~[ProtocolLib.jar:?]
	at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:357) ~[ProtocolLib.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.packetfactory.v1_21_R1.createFakeItemSpawnPacket(v1_21_R1.java:92) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.VirtualDisplayItem.<init>(VirtualDisplayItem.java:53) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.display.virtual.VirtualDisplayItemManager.createVirtualDisplayItem(VirtualDisplayItemManager.java:117) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ContainerShop.checkDisplay(ContainerShop.java:372) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ContainerShop.handleLoading(ContainerShop.java:1167) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.AbstractShopManager.loadShop(AbstractShopManager.java:163) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader.lambda$loadShops$1(ShopLoader.java:109) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) ~[?:?]
	at QuickShop-Hikari-6.2.0.7.jar/com.ghostchu.quickshop.shop.ShopLoader.lambda$loadShops$2(ShopLoader.java:107) ~[QuickShop-Hikari-6.2.0.7.jar:?]
	at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalStateException: Registry is already frozen
	at net.minecraft.core.MappedRegistry.validateWrite(MappedRegistry.java:105) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.core.MappedRegistry.createIntrusiveHolder(MappedRegistry.java:359) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.world.entity.EntityType.<init>(EntityType.java:351) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at net.minecraft.world.entity.EntityType.<init>(EntityType.java:343) ~[paper-1.21.1.jar:1.21.1-99-1bc02e6]
	at ProtocolLib.jar/com.comphenix.protocol.reflect.accessors.DefaultConstrutorAccessor.invoke(DefaultConstrutorAccessor.java:19) ~[ProtocolLib.jar:?]
	... 19 more

Please note that I'm just an independent developer, who works on a revolutionary browser for QuickShop-Hikari, thereby I'm around a lot, and try to help when I can - that's why I was looking into the situation in the first place. I don't know from the top of my head what kind of manipulations QuickShop-Hikari does to the entity-registry, so I'd have to investigate further.

By the way, I'm sorry for having been accusing your plugin so quickly, that was a bit naive of me, ^^"! I'm sure it's not as simple as I made it out to be at first.

@oddlama
Copy link

oddlama commented Oct 28, 2024

I just tried to load vane in the absence of QuickShop-Hikari, and the exception as thrown in the context of and thereby logged by vane has disappeared; this suggests some sort of interplay between the two. The full context, or rather the corresponding stack-trace, would be as follows: [..]

I see. I would guess that the two plugins start at the same time but one of the two freezes the registries before the other and then the errors start happening. But it's hard to judge whether this is really what is happening or if there's something else going on deeper down..

Please note that I'm just an independent developer, who works on a revolutionary browser for QuickShop-Hikari, thereby I'm around a lot, and try to help when I can - that's why I was looking into the situation in the first place. I don't know from the top of my head what kind of manipulations QuickShop-Hikari does to the entity-registry, so I'd have to investigate further.

Sure, or can you maybe reach someone in your team who's been more involved with this specifically?

By the way, I'm sorry for having been accusing your plugin so quickly, that was a bit naive of me, ^^"! I'm sure it's not as simple as I made it out to be at first.

No worries, it's entirely possible that vane is doing something here that it shouldn't. Seems to me like a non-trivial problem

@dandud100
Copy link
Author

dandud100 commented Nov 2, 2024

I don't know from the top of my head what kind of manipulations QuickShop-Hikari does to the entity-registry, so I'd have to investigate further.

Sure, or can you maybe reach someone in your team who's been more involved with this specifically?

@creatorfromhell told me on Discord that this is done in this code:

https://github.com/QuickShop-Community/QuickShop-Hikari/blob/hikari/quickshop-bukkit/src/main/java/com/ghostchu/quickshop/shop/display/virtual/packetfactory/v1_20_R4_TO_V1_21_R1.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working outside scope not a QuickShop issue.
Projects
None yet
Development

No branches or pull requests

5 participants