1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-27 22:58:20 +00:00

Fix the eye height for turtle fake players

This was causing the eye height of the turtle to be above it when
placing down, causing all sorts of funkiness. Fixes #297
This commit is contained in:
SquidDev 2019-11-23 13:05:26 +00:00
parent bedac71e3d
commit 2d4a87adc9

View File

@ -12,9 +12,7 @@ import dan200.computercraft.api.turtle.ITurtleAccess;
import dan200.computercraft.shared.util.FakeNetHandler; import dan200.computercraft.shared.util.FakeNetHandler;
import dan200.computercraft.shared.util.InventoryUtil; import dan200.computercraft.shared.util.InventoryUtil;
import dan200.computercraft.shared.util.WorldUtil; import dan200.computercraft.shared.util.WorldUtil;
import net.minecraft.entity.Entity; import net.minecraft.entity.*;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.passive.horse.AbstractHorseEntity; import net.minecraft.entity.passive.horse.AbstractHorseEntity;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.inventory.container.INamedContainerProvider;
@ -143,6 +141,19 @@ public final class TurtlePlayer extends FakePlayer
return new Vec3d( posX, posY, posZ ); return new Vec3d( posX, posY, posZ );
} }
@Override
public float getEyeHeight( @Nonnull Pose pose )
{
return 0;
}
@Override
public float getStandingEyeHeight( Pose pose, EntitySize size )
{
return 0;
}
//region Code which depends on the connection //region Code which depends on the connection
@Nonnull @Nonnull
@Override @Override