Merge 1.20 into 1.20.6

This commit is contained in:
embeddedt 2024-06-01 13:38:17 -04:00
commit b4398565a6
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
4 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,22 @@
package org.embeddedt.modernfix.common.mixin.bugfix.restore_old_dragon_movement;
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.Slice;
@Mixin(EnderDragon.class)
public class EnderDragonMixin {
/**
* @author embeddedt (regression identified by Jukitsu in MC-272431)
* @reason Revert dragon vertical movement behavior to how it worked in 1.13 and older. Note: this patches techniques
* that rely on the predictable vertical descent like one-cycling.
*/
@ModifyArg(method = "aiStep",
slice = @Slice(from = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/boss/enderdragon/phases/DragonPhaseInstance;getFlyTargetLocation()Lnet/minecraft/world/phys/Vec3;")),
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/Vec3;add(DDD)Lnet/minecraft/world/phys/Vec3;", ordinal = 0), index = 1)
private double fixVerticalVelocityScale(double y) {
return y * 10;
}
}

View File

@ -165,6 +165,7 @@ public class ModernFixEarlyConfig {
.put("mixin.feature.direct_stack_trace", false)
.put("mixin.feature.stalled_chunk_load_detection", false)
.put("mixin.perf.blast_search_trees.force", false)
.put("mixin.bugfix.restore_old_dragon_movement", false)
.put("mixin.perf.clear_mixin_classinfo", false)
.put("mixin.perf.deduplicate_climate_parameters", false)
.put("mixin.bugfix.packet_leak", false)

View File

@ -37,6 +37,9 @@ public class IntegratedWatchdog extends Thread {
if(!lastTickStart.isPresent()) {
return;
}
if(lastTickStart.getAsLong() < 0) {
continue;
}
long curTime = Util.getMillis();
long delta = curTime - lastTickStart.getAsLong();
if(delta > MAX_TICK_DELTA) {

View File

@ -132,5 +132,6 @@
"modernfix.option.mixin.feature.stalled_chunk_load_detection": "This option may help to detect the cause of chunkloading freezes. However, leaving it enabled may cause slightly worse performance.",
"modernfix.option.mixin.perf.fix_loop_spin_waiting": "Fixes Minecraft's built-in wait function consuming excessive amounts of CPU resources.",
"modernfix.option.mixin.perf.forge_cap_retrieval": "Small micro-optimization that makes retrieving custom entity data slightly more efficient on Forge.",
"modernfix.option.mixin.perf.forge_registry_lambda": "Fixes oversights in Forge that lead to excessive allocation in hot registry methods."
"modernfix.option.mixin.perf.forge_registry_lambda": "Fixes oversights in Forge that lead to excessive allocation in hot registry methods.",
"modernfix.option.mixin.bugfix.restore_old_dragon_movement": "Fixes MC-272431, which tracks the ender dragon being unable to dive to the portal as it did in 1.13 and older. This causes the dragon to fly quite a bit differently from what modern players are used to and also patches out one-cycling, so it's not enabled by default. Thanks to Jukitsu for identifying the regression in the vanilla code."
}