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

Remapping failed on Paper 1.20.6 #9

Closed
SlimeDog opened this issue May 7, 2024 · 11 comments
Closed

Remapping failed on Paper 1.20.6 #9

SlimeDog opened this issue May 7, 2024 · 11 comments

Comments

@SlimeDog
Copy link

SlimeDog commented May 7, 2024

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
Copy link
Author

SlimeDog commented May 9, 2024

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
Copy link
Owner

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
Copy link
Owner

danirod12 commented May 10, 2024

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
Copy link
Owner

neoforged/AutoRenamingTool#9
Therefore if they approve it and then PaperMC update to new version the problem will be fixed

@danirod12
Copy link
Owner

danirod12 commented May 16, 2024

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
Copy link
Author

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
Copy link
Owner

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

@SlimeDog
Copy link
Author

OK.

@danirod12
Copy link
Owner

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

@SlimeDog
Copy link
Author

I don't Discord.

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

@danirod12
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants