-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore: Port to 1.20.5/1.20.6 #44
Conversation
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work pretty well in general. However there is a critical bug when quitting to the main menu from a singleplayer world. The singleplayer worlds a no longer listed because of
a NullPointerException that occurs because of the SimpleRegistryMixin.
You didn't change code related to that, it just seems like 1.20.5 doesn't really like null values in the registry :)
Also, some warnings are logged when using the "Update 1.21" experiment and loading runtime worlds:
[21:38:08] [Worker-Main-6/WARN] (Minecraft) Empty or non-existent pool: minecraft:trial_chambers/chamber/addon/c6
[21:38:08] [Worker-Main-6/WARN] (Minecraft) Empty or non-existent pool: minecraft:trial_chambers/chamber/addon/c6
[21:39:05] [Worker-Main-16/WARN] (Minecraft) Empty height range: [0 above bottom--8 absolute]
Im not sure if it is the fault of this mod, or a vanilla issues though.
I also noticed trial chambers not generating properly, but this is likely because of the default dimension configs that temporary worlds have (minimum height etc.).
src/main/java/xyz/nucleoid/fantasy/mixin/registry/DimensionOptionsRegistryHolderMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/xyz/nucleoid/fantasy/mixin/registry/SimpleRegistryMixin.java
Outdated
Show resolved
Hide resolved
I'm a bot busy today, but I'll look more into it tomorrow, thanks |
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
…e from entryToRawId Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
If a 1.20.5 branch is made I can change the PR to point to it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working fine!
Your solution to the null value problem is fine I think.
Temporary worlds are also correctly deleted now.
I don't really see an issue with the rest of the code.
But I realized there is an outdated gradle dependency: modLocalRuntime "eu.pb4:polymer-reg-sync-manipulator:0.7.0+1.20.3-rc1"
.
Actually, I am not really sure if it is actually used in this mod...
Maybe it can be removed? Otherwise I suggest updating to version 0.8.0-beta.6+1.20.5
.
Other than that, I think the port it done! 🎉
src/main/java/xyz/nucleoid/fantasy/mixin/registry/SimpleRegistryMixin.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
No difference was noticed with and without it Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
oh crap |
it turns out that PRs don't like branch renaming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, hopefully this will be merged soon.
I realized 1.20.6 is coming out next week... There should be very few changes and this is probably compatible with this PR
Bump the mod version as the PR has a small behavior change (RuntimeWorldConfig.java:78) Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Oops, I forgot about this Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Minecraft 1.20.6 came out today. I tested your version with the latest dependency versions and it seems to work perfectly fine. minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
loader_version=0.15.10
fabric_version=0.97.8+1.20.6 Also, I scanned the version for any occurrence of "17", to see where Java version adjustments have to be done.
-"java": ">=17"
+"java": ">=21"
-java-version: 17
+java-version: 21
-java-version: 17
+java-version: 21
-"compatibilityLevel": "JAVA_17",
+"compatibilityLevel": "JAVA_21", Could you adjust these and maybe change the PR to "Port to 1.20.6"? |
Mixins doesn't seem to like JAVA_21 as compatibilityLevel |
should I also bump the min required loader version? |
It seems that all versions of fabric-api for 1.20.6 require at least fabric-loader 0.15.6. I'd say upgrade it as well... |
The problem with the JAVA_21 mixin compatibility seems to be solved when upgrading to the latest versions...
|
I missed some stuff Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
Update to 1.20.6, bumping mc ver as modders should use it over 1.20.5, not bumping required mc ver for compatibility Signed-off-by: Awakened-Redstone <40528665+Awakened-Redstone@users.noreply.github.com>
I tested fantasy for 1.20.5+ for a while now. Yesterday I found that permanent dimensions are saved to the I think the issue is in I tried to patch the fabric api mixin to also use a modified getter, but I couldn't target code from their mixin... package xyz.nucleoid.fantasy.mixin.registry;
import com.google.common.collect.Maps;
import net.minecraft.world.dimension.DimensionOptionsRegistryHolder;
import net.minecraft.world.level.WorldGenSettings;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import xyz.nucleoid.fantasy.FantasyDimensionOptions;
@Mixin(WorldGenSettings.class)
public class WorldGenSettingsMixin {
@ModifyArg(method = "encode(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/world/gen/GeneratorOptions;Lnet/minecraft/world/dimension/DimensionOptionsRegistryHolder;)Lcom/mojang/serialization/DataResult;", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/WorldGenSettings;<init>(Lnet/minecraft/world/gen/GeneratorOptions;Lnet/minecraft/world/dimension/DimensionOptionsRegistryHolder;)V"), index = 1)
private static DimensionOptionsRegistryHolder fantasy$wrapWorldGenSettings(DimensionOptionsRegistryHolder original) {
var dimensions = original.dimensions();
var saveDimensions = Maps.filterEntries(dimensions, entry -> FantasyDimensionOptions.SAVE_PROPERTIES_PREDICATE.test(entry.getValue()));
return new DimensionOptionsRegistryHolder(saveDimensions);
}
} It targets the method that is invoked when encoding the generator options to the Maybe you could check my approach and include it in your PR if you approve it. |
Fix DimensionOption encoding predicate of runtime worlds
A 1.20.5/1.20.6 port
While I did test the mod, I recommend more tests and checking, specially as I had some weird crashes, but after adding debug it didn't happen again
PR content