Search in sources :

Example 46 with PlayerEntity

use of net.minecraft.entity.player.PlayerEntity in project AgriCraft by AgriCraft.

the class PlayerAngleLocker method forcePlayerAngles.

public static void forcePlayerAngles() {
    PlayerEntity player = AgriCraft.instance.getClientPlayer();
    player.rotationYaw = yaw;
    player.prevRotationYaw = yaw;
    player.cameraYaw = yawCamera;
    player.prevCameraYaw = yawCamera;
    player.renderYawOffset = yawOffset;
    player.prevRenderYawOffset = yawOffset;
    player.rotationYawHead = yawHead;
    player.prevRotationYawHead = yawHead;
    player.rotationPitch = pitch;
    player.prevRotationPitch = pitch;
}
Also used : PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

PlayerEntity (net.minecraft.entity.player.PlayerEntity)46 ItemStack (net.minecraft.item.ItemStack)22 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)19 World (net.minecraft.world.World)17 BlockPos (net.minecraft.util.math.BlockPos)16 CompoundNBT (net.minecraft.nbt.CompoundNBT)13 ServerPlayerEntity (net.minecraft.entity.player.ServerPlayerEntity)12 BlockState (net.minecraft.block.BlockState)10 ResourceLocation (net.minecraft.util.ResourceLocation)7 AgriApi (com.infinityraider.agricraft.api.v1.AgriApi)6 Nonnull (javax.annotation.Nonnull)6 AgriCraft (com.infinityraider.agricraft.AgriCraft)5 TileEntity (net.minecraft.tileentity.TileEntity)5 IAgriCrop (com.infinityraider.agricraft.api.v1.crop.IAgriCrop)4 IAgriPlant (com.infinityraider.agricraft.api.v1.plant.IAgriPlant)4 AgriTabs (com.infinityraider.agricraft.content.AgriTabs)4 Names (com.infinityraider.agricraft.reference.Names)4 ItemBase (com.infinityraider.infinitylib.item.ItemBase)4 Nullable (javax.annotation.Nullable)4 Blocks (net.minecraft.block.Blocks)4