MineSharp.Physics 0.1.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package MineSharp.Physics --version 0.1.9                
NuGet\Install-Package MineSharp.Physics -Version 0.1.9                
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.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MineSharp.Physics --version 0.1.9                
#r "nuget: MineSharp.Physics, 0.1.9"                
#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.9

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

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.11 132 7/28/2024
0.1.10 131 7/20/2024
0.1.9 109 7/8/2024
0.1.8 144 5/18/2024
0.1.7 129 5/5/2024
0.1.6 134 5/4/2024
0.1.5 152 4/1/2024
0.1.4 177 1/26/2024
0.1.3 164 1/7/2024
0.1.2 142 12/30/2023
0.1.1 113 12/28/2023
0.1.0 126 12/28/2023