-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Comments
I highly suspect this to be an issue with 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 This registry manages intrusive holders, which Vane registers to; Vane already starts up with a related error on my machine: 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.
|
Yes I also get this error on startup. |
Then I would highly recommend you trying to create a separate issue at |
Will do when I am at home, I just posted this on their Discord in BugReports. Maybe I get a response. |
Hi, vane dev here :)
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
I don't know what you are referring to here, do you have the full context? Never seen this before |
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. |
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..
Sure, or can you maybe reach someone in your team who's been more involved with this specifically?
No worries, it's entirely possible that vane is doing something here that it shouldn't. Seems to me like a non-trivial problem |
@creatorfromhell told me on Discord that this is done in this code: |
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
Download Vane by oddlame
/vane-core:customitem give vane_trifles:file
Try to make a shop with this item
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
/quickshop paste
URLhttps://ghost-chu.github.io/quickshop-hikari-paste-viewer/?remote=https%3A%2F%2Fbytebin.lucko.me%2FGHYV6c6jyi
Additional Context
Checklist
The text was updated successfully, but these errors were encountered: