fake-players-falling-fix:

* Fix fake players not accumulating fallDistance or ever 'hitting the ground'
 * Fixes #1586 (Fake player does not take fall damage)
 * Should Fix #1478 (fake players cannot use critical hits)
 * Should Fix Unreported/Unconfirmed (fake players can not engage Elytras)
This commit is contained in:
silnarm authored and gnembon committed 2023-02-22 01:33:07 +01:00
1 parent 29afb8761e
commit 23ed35a398
1 file changed
+7
@@ -2,6 +2,7 @@ package carpet.patches;
import carpet.CarpetSettings;
import com.mojang.authlib.GameProfile;
import net.minecraft.core.BlockPos;
import net.minecraft.core.UUIDUtil;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.PacketFlow;
@@ -23,6 +24,7 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.SkullBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import carpet.fakes.ServerPlayerInterface;
import carpet.utils.Messenger;
@@ -175,4 +177,9 @@ public class EntityPlayerMPFake extends ServerPlayer
{
return "127.0.0.1";
}
@Override
protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) {
doCheckFallDamage(y, onGround);
}
}