1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-07 07:50:27 +00:00

Merge pull request #540 from SquidDev-CC/ComputerCraft/hotfix/fakeplayer-stubs

Add additional method stubs to the TurtlePlayer
This commit is contained in:
SquidDev 2018-04-16 09:39:15 +01:00
commit 20a47a7f88

View File

@ -11,10 +11,16 @@ import dan200.computercraft.api.turtle.ITurtleAccess;
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.Entity;
import net.minecraft.entity.IMerchant;
import net.minecraft.entity.passive.AbstractHorse;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntitySign; import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IInteractionObject;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldServer; import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayer;
@ -87,6 +93,12 @@ public class TurtlePlayer extends FakePlayer
return results; return results;
} }
@Override
public Vec3d getPositionVector()
{
return new Vec3d( posX, posY, posZ );
}
@Override @Override
public float getEyeHeight() public float getEyeHeight()
{ {
@ -99,6 +111,63 @@ public class TurtlePlayer extends FakePlayer
return 0.0f; return 0.0f;
} }
@Override
public void sendEnterCombat()
{
}
@Override
public void sendEndCombat()
{
}
@Nonnull
@Override
public SleepResult trySleep( @Nonnull BlockPos bedLocation )
{
return SleepResult.OTHER_PROBLEM;
}
@Override
public void openEditSign( TileEntitySign signTile )
{
}
@Override
public void displayGui( IInteractionObject guiOwner )
{
}
@Override
public void displayGUIChest( IInventory chestInventory )
{
}
@Override
public void displayVillagerTradeGui( IMerchant villager )
{
}
@Override
public void openGuiHorseInventory( AbstractHorse horse, IInventory inventoryIn )
{
}
@Override
public void openBook( ItemStack stack, @Nonnull EnumHand hand )
{
}
@Override
public void updateHeldItem()
{
}
@Override
protected void onItemUseFinish()
{
}
@Override @Override
public void mountEntityAndWakeUp() public void mountEntityAndWakeUp()
{ {
@ -108,9 +177,4 @@ public class TurtlePlayer extends FakePlayer
public void dismountEntity( @Nonnull Entity entity ) public void dismountEntity( @Nonnull Entity entity )
{ {
} }
@Override
public void openEditSign( TileEntitySign signTile )
{
}
} }