24w06a porting fixes (#3578)

* Bump yarn

* Fix TagsLoaded event again

* Resource Loader: internal refactor (name to ID)

* More refactors

* Reset ignoreFallDamageAboveY when using custom elytra

* fix checkstyle
This commit is contained in:
apple502j
2024-02-10 02:36:06 +09:00
committed by GitHub
parent ab78bd8247
commit 109a837c6e
23 changed files with 126 additions and 85 deletions

View File

@@ -16,6 +16,7 @@
package net.fabricmc.fabric.mixin.entity.event.elytra;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -40,6 +41,10 @@ abstract class PlayerEntityMixin extends LivingEntity {
@Shadow
public abstract void startFallFlying();
@Shadow
@Nullable
public Double ignoreFallDamageAboveY;
/**
* Allow the server-side and client-side elytra checks to fail when {@link EntityElytraEvents#ALLOW} blocks flight,
* and otherwise to succeed for elytra flight through {@link EntityElytraEvents#CUSTOM}.
@@ -56,6 +61,7 @@ abstract class PlayerEntityMixin extends LivingEntity {
if (EntityElytraEvents.CUSTOM.invoker().useCustomElytra(self, false)) {
startFallFlying();
this.ignoreFallDamageAboveY = null;
cir.setReturnValue(true);
}
}