Skip to content

update paper 1.20.6#220

Closed
ColdeZhang wants to merge 22 commits into
PaperMC:masterfrom
ColdeZhang:ver/1.20.6
Closed

update paper 1.20.6#220
ColdeZhang wants to merge 22 commits into
PaperMC:masterfrom
ColdeZhang:ver/1.20.6

Conversation

@ColdeZhang
Copy link
Copy Markdown

@ColdeZhang ColdeZhang commented May 8, 2024

Try to update for 1.20.6.

Known problems:

  • kyori:adventure versions doesnt match, and 4.17.0 is not available;
  • ChunkStatus.java class missing;
  • Some more typing error happened by migration;

@MiniDigger
Copy link
Copy Markdown
Member

https://github.com/KyoriPowered/adventure/releases/tag/v4.17.0 was just released

@Luuzzi
Copy link
Copy Markdown

Luuzzi commented May 8, 2024

btw

remapper - net.fabricmc:tiny-remapper:0.10.1:fat -> net.fabricmc:tiny-remapper:0.10.2:fat
decompiler - net.minecraftforge:forgeflower:2.0.627.2 -> org.vineflower:vineflower:1.10.1

I think the changes are minor, but it still seems necessary

@ColdeZhang
Copy link
Copy Markdown
Author

https://github.com/KyoriPowered/adventure/releases/tag/v4.17.0 was just released

I found it. But upstream paper using 4.17.0-snapshot in api, and 4.16.0 in server. I noticed in server build script have a commnet saying "Keep in sync with adventureVersion from Paper-API build file".

So I'm not sure if it should be modified in folia patch, I think maybe its belonging to paper's patch?

@Leguan16
Copy link
Copy Markdown

Leguan16 commented May 8, 2024

Are you sure? It has been updated an hour ago or so.

@ColdeZhang
Copy link
Copy Markdown
Author

btw

remapper - net.fabricmc:tiny-remapper:0.10.1:fat -> net.fabricmc:tiny-remapper:0.10.2:fat decompiler - net.minecraftforge:forgeflower:2.0.627.2 -> org.vineflower:vineflower:1.10.1

I think the changes are minor, but it still seems necessary

Yes, UR right. It vital for some class to be decompiled.

@ColdeZhang
Copy link
Copy Markdown
Author

https://github.com/KyoriPowered/adventure/releases/tag/v4.17.0 was just released

I found it. But upstream paper using 4.17.0-snapshot in api, and 4.16.0 in server. I noticed in server build script have a commnet saying "Keep in sync with adventureVersion from Paper-API build file".

So I'm not sure if it should be modified in folia patch, I think maybe its belonging to paper's patch?

This has been fixed by Paper

@ColdeZhang
Copy link
Copy Markdown
Author

ColdeZhang commented May 9, 2024

Migrations from folia's patch are done, there still a syntax err in net/minecraft/core/dispenser/ProjectileDispenseBehavior.java line 48 DispenserBlock.eventFired should use get() to fetch bollen type. I leave it alone, because it doesnt changed in folias patch, I think it's upstream's work.

Anyway, patches can be compiled allreday.

@ColdeZhang
Copy link
Copy Markdown
Author

image

Greetings, maintainers. I'm done with 1.20.6 update. Could you review it please?

@ColdeZhang
Copy link
Copy Markdown
Author

Fine, I got new problem.

Any commands send by client will cause "Internal Exception: java.lang.UnsupportedOperationException", and then kicked.
Commands send my console is ok.

This fault has no stacktrace, just "Internal Exception", I dont know how to debug it.

@electronicboy
Copy link
Copy Markdown
Member

enable debug in server.properties or attach a profiler which can do exception recording

but, large PRs should generally be cleared by leaf first, not sure how much acceptance there is towards pulling in an update from somebody else

@Luuzzi
Copy link
Copy Markdown

Luuzzi commented May 9, 2024

enable debug in server.properties or attach a profiler which can do exception recording

but, large PRs should generally be cleared by leaf first, not sure how much acceptance there is towards pulling in an update from somebody else

Is he on vacation now? There is no information when we will be able to get a review of this PR or update to 1.20.6?

@PedroMPagani
Copy link
Copy Markdown

PedroMPagani commented May 9, 2024

Fine, I got new problem.

Any commands send by client will cause "Internal Exception: java.lang.UnsupportedOperationException", and then kicked. Commands send my console is ok.

This fault has no stacktrace, just "Internal Exception", I dont know how to debug it.

You can attach exception catchers on the netty threads, that'll be usually it unless you're testing with plugins iirc you're not it seems, I'll get on development in your branch too, to help test out and get it ready.

@ColdeZhang
Copy link
Copy Markdown
Author

ColdeZhang commented May 9, 2024

Fine, I got new problem.
Any commands send by client will cause "Internal Exception: java.lang.UnsupportedOperationException", and then kicked. Commands send my console is ok.
This fault has no stacktrace, just "Internal Exception", I dont know how to debug it.

You can attach exception catchers on the netty threads, that'll be usually it unless you're testing with plugins iirc you're not it seems, I'll get on development in your branch too, to help test out and get it ready.

enable debug in server.properties or attach a profiler which can do exception recording

but, large PRs should generally be cleared by leaf first, not sure how much acceptance there is towards pulling in an update from somebody else

Thanks for your guide, I have solved it. Look like works fine :)

image

@PedroMPagani
Copy link
Copy Markdown

Are you missing something on ProjectileDispenseBehavior? it doesn't build, it's missing .get()

@ColdeZhang
Copy link
Copy Markdown
Author

ColdeZhang commented May 9, 2024

Are you missing something on ProjectileDispenseBehavior? it doesn't build, it's missing .get()

Yes I leave it alone, because I thought that's upstream's work. It doesnt caused by folia patch, so I keep it out of folia's patch.

For now I change it manually each time before I build.

Do you guys think it should be in folia's patch? If so, I may add it.

@PedroMPagani
Copy link
Copy Markdown

Yes, that's a folia change, it should be changed, on paper that's a boolean, on folia for thread safety that's a thread local. IT should be on the patch

@ColdeZhang
Copy link
Copy Markdown
Author

Yes, that's a folia change, it should be changed, on paper that's a boolean, on folia for thread safety that's a thread local. IT should be on the patch

Ok , got it. I may have a missing.

@ColdeZhang
Copy link
Copy Markdown
Author

Things should be looks better now.

@PedroMPagani
Copy link
Copy Markdown

this all lgtm, seems to be working already tested the majority of the features, including experimental.

+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL,
+ (chunks) -> {
+ try {
+ // Folia end - region threading
+
PlaceCommand.checkLoaded(worldserver, chunkcoordintpair, chunkcoordintpair);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load check should be before chunk load

Comment thread patches/server/0003-Threaded-Regions.patch
@Override
public void handleChatCommand(ServerboundChatCommandPacket packet) {
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
this.tryHandleChat(packet.command(), () -> {
+ this.player.getBukkitEntity().taskScheduler.schedule((ServerPlayer player) -> { // Folia - region threading
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff is not needed

@@ -15870,6 +15902,7 @@ index 1e5f709115007ff19901c0a6c3cf884d9e4d3a6c..08daa5ed0b4b599836b97eef1e53e630
+ ServerLevel worldserver1 = ((CraftWorld)selectedSpawn.getWorld()).getHandle();
+ player.setPosRaw(selectedSpawn.getX(), selectedSpawn.getY(), selectedSpawn.getZ());
+ player.lastSave = System.nanoTime(); // changed to nanoTime
+ Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error // Folia - region threading - rewrite login process
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be double-loading the data

long l = entity.level().getGameTime();

- for(BehaviorControl<? super E> behaviorControl : this.getRunningBehaviors()) {
+ for(BehaviorControl<? super E> behaviorControl : behaviors) { // Folia - region threading
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this diff is needed

+
}

- private <T> ScheduledTick<T> createTick(BlockPos pos, T type, int delay) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't be changing the visibility unless required

if (optional.isPresent() && optional.get() == world.dimension() && compoundTag.contains("LodestonePos")) {
BlockPos blockPos = NbtUtils.readBlockPos(compoundTag.getCompound("LodestonePos"));
- if (!world.isInWorldBounds(blockPos) || (world.hasChunkAt(blockPos) && !((ServerLevel)world).getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos))) { // Paper - Prevent compass from loading chunks
+ // Folia start - do not access the POI data off-region
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this patch is needed, as the logic was just moved elsewhere

@Spottedleaf
Copy link
Copy Markdown
Member

In general we (Paper included) don't take external work for updates, since there's a lot of things involved that can go wrong

https://github.com/PaperMC/Folia/tree/dev/1.20.6

@Euphillya Euphillya mentioned this pull request Oct 13, 2024
@Leguan16 Leguan16 mentioned this pull request Dec 15, 2025
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

Successfully merging this pull request may close these issues.

7 participants