danirod12 / NTD-LuckyBlock

https://www.spigotmc.org/resources/92026/
0 stars 0 forks source link

Remapping failed on Paper 1.20.6 #9

Closed SlimeDog closed 6 months ago

SlimeDog commented 6 months ago

Paper 1.20.6-49 ntdLuckyBlock-2.8.19.1

On server start-up

[03:09:29] [Paper Plugin Remapper Thread - 1/INFO]: [PluginRemapper] Remapping plugin 'plugins/ntdLuckyBlock-2.8.19.1.jar'...
[03:09:29] [ServerMain/ERROR]: [PluginRemapper] Encountered exception remapping plugins
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to remap plugin jar 'plugins/ntdLuckyBlock-2.8.19.1.jar'
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]
Caused by: java.lang.RuntimeException: Failed to remap plugin jar 'plugins/ntdLuckyBlock-2.8.19.1.jar'
        at io.papermc.paper.pluginremap.PluginRemapper.lambda$remap$7(PluginRemapper.java:358) ~[paper-1.20.6.jar:git-Paper-49]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        ... 4 more
Caused by: java.lang.RuntimeException: Failed to execute task me/DenBeKKer/ntdLuckyBlock/api/events/CustomItemAddedEvent
        at net.neoforged.art.internal.AsyncHelper.invokeAll(AsyncHelper.java:56) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.AsyncHelper.consumeAll(AsyncHelper.java:36) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.RenamerImpl.run(RenamerImpl.java:177) ~[paper-1.20.6.jar:?]
        at net.neoforged.art.internal.RenamerImpl.run(RenamerImpl.java:95) ~[paper-1.20.6.jar:?]
        at io.papermc.paper.pluginremap.PluginRemapper.lambda$remap$7(PluginRemapper.java:355) ~[paper-1.20.6.jar:git-Paper-49]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        ... 4 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Duplicate key do (attempted merging values private static final me/DenBeKKer/ntdLuckyBlock/api/events/CustomItemAddedEvent/do Lorg/bukkit/event/HandlerList; and private final me/DenBeKKer/ntdLuckyBlock/api/events/CustomItemAddedEvent/do Lme/DenBeKKer/ntdLuckyBlock/customitem/BekkerItemStack;)
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
        at net.neoforged.art.internal.AsyncHelper.invokeAll(AsyncHelper.java:52) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.AsyncHelper.consumeAll(AsyncHelper.java:36) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.RenamerImpl.run(RenamerImpl.java:177) ~[paper-1.20.6.jar:?]
        at net.neoforged.art.internal.RenamerImpl.run(RenamerImpl.java:95) ~[paper-1.20.6.jar:?]
        at io.papermc.paper.pluginremap.PluginRemapper.lambda$remap$7(PluginRemapper.java:355) ~[paper-1.20.6.jar:git-Paper-49]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
        ... 4 more
Caused by: java.lang.IllegalStateException: Duplicate key do (attempted merging values private static final me/DenBeKKer/ntdLuckyBlock/api/events/CustomItemAddedEvent/do Lorg/bukkit/event/HandlerList; and private final me/DenBeKKer/ntdLuckyBlock/api/events/CustomItemAddedEvent/do Lme/DenBeKKer/ntdLuckyBlock/customitem/BekkerItemStack;)
        at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) ~[?:?]
        at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) ~[?:?]
        at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:212) ~[?:?]
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:556) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546) ~[?:?]
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265) ~[?:?]
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:702) ~[?:?]
        at net.neoforged.art.internal.ClassProviderImpl$ClassInfo.<init>(ClassProviderImpl.java:122) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.ClassProviderBuilderImpl.lambda$addClass$1(ClassProviderBuilderImpl.java:64) ~[AutoRenamingTool-2.0.3.jar:?]
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1710) ~[?:?]
        at net.neoforged.art.internal.ClassProviderBuilderImpl.addClass(ClassProviderBuilderImpl.java:64) ~[AutoRenamingTool-2.0.3.jar:?]
        at net.neoforged.art.internal.RenamerImpl.lambda$run$2(RenamerImpl.java:178) ~[paper-1.20.6.jar:?]
        at net.neoforged.art.internal.AsyncHelper.lambda$null$0(AsyncHelper.java:33) ~[AutoRenamingTool-2.0.3.jar:?]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
        ... 3 more
SlimeDog commented 6 months ago

This may be helpful...

Per this from Paper developers

Once again, please also see the following forum post to make sure your plugins don't break: <https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/>

note that with the test Paper server paper-paperclip-1.20.4-R0.1-SNAPSHOT-mojmap.jar

Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to remap plugin jar 'plugins/FancyHolograms-2.0.6.66.jar'
Caused by: java.lang.RuntimeException: Failed to remap plugin jar 'plugins/FancyHolograms-2.0.6.66.jar'

Recommended fixes are described in the cited post: https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/

danirod12 commented 6 months ago

The problem is caused by obfuscation. My obfuscation is allowed on byte-code level, but their remapper threats it incorrect and fails. Without obfuscation getting their error java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 around CB package

danirod12 commented 6 months ago

This TODO closes the problem above and I believe it is vital for most obfuscated plugins https://github.com/neoforged/AutoRenamingTool/blob/main/src/main/java/net/neoforged/art/api/ClassProvider.java#L170 I will check it out how hard to implement it

danirod12 commented 6 months ago

https://github.com/neoforged/AutoRenamingTool/pull/9 Therefore if they approve it and then PaperMC update to new version the problem will be fixed

danirod12 commented 6 months ago

Should be fixed since 2.8.19.2. Btw, they are ignoring and does not fix this problem around obfuscation. I just changed obfuscation algorithms

SlimeDog commented 6 months ago

Paper 1.20.6-79 ntdLB 2.8.19.2

On server start-up

[11:27:44] [Server thread/INFO]: [ntdLuckyBlock] Loading NMS for your platform (1.20.6-79-f175193 (MC: 1.20.6), v1_20_R4)...
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
[11:27:44] [Server thread/WARN]: [ntdLuckyBlock] Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)! Be aware of any issues!
...
[11:27:45] [Server thread/INFO]: [ntdLuckyBlock] Loaded 0 custom items... (Total)
[11:27:45] [Server thread/ERROR]: [ntdLuckyBlock] Cannot load black.yml/drop.0! Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)
[11:27:45] [Server thread/ERROR]: [ntdLuckyBlock] Cannot load black.yml/drop.1! Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)
[11:27:45] [Server thread/ERROR]: [ntdLuckyBlock] Cannot load black.yml/drop.2! Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)
[11:27:45] [Server thread/ERROR]: [ntdLuckyBlock] Cannot load black.yml/drop.3! Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)
[11:27:45] [Server thread/ERROR]: [ntdLuckyBlock] Cannot load black.yml/drop.4! Current plugin version only partially support v1_20_R4 (1.20.5 - 1.20.6)

black.yml

# LuckyBlock texture into block
texture: c7b187e38b407feabaf190879d98a67f4c7052f3201f72e44571f537ea89d4c7
name: LuckyBlock
lore:
- Sometimes good, sometimes bad
- '[black]'
eco: false
shop: false
price: 0
animation: true
animation_type: SMOKE
drop:
  '0':
    chance: MEDIUM
    items:
      '0':
        class: LuckyItemDrop
        json: '{"type":"BLACK","amount":1}'
  '1':
    chance: MEDIUM
    items:
      '0':
        class: MessageDrop
        json: '{"message":"fire_charge"}'
  '2':
    chance: MEDIUM
    items:
      '0':
        class: MessageDrop
        json: '{"message":"ender_pearl"}'
  '3':
    chance: MEDIUM
    items:
      '0':
        class: MessageDrop
        json: '{"message":"chicken"}'
  '4':
    chance: MEDIUM
    items:
      '0':
        class: MessageDrop
        json: '{"message":"wolf"}'
craft:
  default: false
  custom: false

custom-head:
  enabled: false
  item: PUT HERE JSON ITEM (/lb ii -tag -write)
danirod12 commented 6 months ago

It is listed on SpigotMC page, that premium version does not support 1.20.5/6 yet. It uses free one's formats

SlimeDog commented 6 months ago

OK.

danirod12 commented 6 months ago

Choosing a new storage scheme, if you want to participate, please join discord. You were actively suggesting cool ideas on start

SlimeDog commented 6 months ago

I don't Discord.

What's wrong with the current YAML storage? It works fine, is easy to edit and easy to understand.

danirod12 commented 6 months ago

Free version's format does not support NBT tags for items, premium version's format is complicated and cannot be updated to 1.20.5/6