MineSharp.Physics
0.1.8
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MineSharp.Physics --version 0.1.8
NuGet\Install-Package MineSharp.Physics -Version 0.1.8
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.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MineSharp.Physics --version 0.1.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MineSharp.Physics, 0.1.8"
#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.8 // Install MineSharp.Physics as a Cake Tool #tool nuget:?package=MineSharp.Physics&version=0.1.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net7.0
- MineSharp.Core (>= 0.1.8)
- MineSharp.Data (>= 0.1.8)
- MineSharp.World (>= 0.1.8)
-
net8.0
- MineSharp.Core (>= 0.1.8)
- MineSharp.Data (>= 0.1.8)
- MineSharp.World (>= 0.1.8)
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.