MineSharp.Physics 0.1.7

dotnet add package MineSharp.Physics --version 0.1.7
NuGet\Install-Package MineSharp.Physics -Version 0.1.7
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MineSharp.Physics" Version="0.1.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MineSharp.Physics --version 0.1.7
#r "nuget: MineSharp.Physics, 0.1.7"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MineSharp.Physics as a Cake Addin
#addin nuget:?package=MineSharp.Physics&version=0.1.7

// Install MineSharp.Physics as a Cake Tool
#tool nuget:?package=MineSharp.Physics&version=0.1.7

MineSharp.Physics

Logic to simulate a Minecraft Player in a minecraft world. The following things are supported:

  • Gravity
  • Walking in all directions
  • Sprinting
  • Crouching (Can't crouch under a slap yet)
  • Water current pushing (Still a bit buggy)

The following things should be implemented at some point:

  • Swimming
  • Elytra?
  • Riding vehicles
  • Climbing must be tested

The code follows the same checks the vanilla minecraft client does.
Only client side checks are done.

Example

    var input = new InputControls();
    var physics = new PlayerPhysics(data, player, world, input);
    physics.Tick(); // Calculates movement for one single tick.
                    // Updates the position and velocity of the player's entity object.
                    // The vanilla client calls this every 50ms
    
    input.ForwardKeyDown = true; // Start walking forward
    input.BackwardKeyDown = true; // Start walking backwards
    input.LeftKeyDown = true; // Start walking to the left
    input.RightKeyDown = true; // Start walking to the right
    input.JumpingKeyDown = true; // Start jumping (also used for swimming when implemented)
    input.SneakingKeyDown = true; // Start sneaking
    input.SprintingKeyDown = true; // Start sprinting
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MineSharp.Physics:

Package Downloads
MineSharp.Bot

Create minecraft bots with ease using C#.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.7 90 5/5/2024
0.1.6 99 5/4/2024
0.1.5 119 4/1/2024
0.1.4 144 1/26/2024
0.1.3 133 1/7/2024
0.1.2 112 12/30/2023
0.1.1 78 12/28/2023
0.1.0 99 12/28/2023