Backport 0.17.0 to 1.21

This commit is contained in:
Moulberry committed 2025-02-11 18:37:46 +08:00
1 parent 2d43b9d54c
commit 89201e682c
3 files changed
+6 -15

No files matched your search

@@ -33,15 +33,6 @@ public abstract class MixinEntity {
@Shadow
public abstract UUID getUUID();
// Force entities to be able to ride players on servers
@WrapOperation(method = "startRiding(Lnet/minecraft/world/entity/Entity;Z)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;isClientSide()Z"))
public boolean startRiding_isClientSide(Level instance, Operation<Boolean> original) {
if (Flashback.isInReplay()) {
return true; // Always pretend we're clientside so mounting players is allowed
}
return original.call(instance);
}
@Inject(method = "isInvisibleTo", at = @At("HEAD"), cancellable = true)
public void isInvisibleTo(Player player, CallbackInfoReturnable<Boolean> cir) {
ReplayServer replayServer = Flashback.getReplayServer();