Giter Club home page Giter Club logo

gravitychanger's Introduction

GravityChanger

A fabric mod and api that lets you change player gravity direction.

Features

This mod adds 6 items that let you change your gravity to any of the 6 axis directions.
These items are currently uncraftable and can be found in the tools tab of creative menu.
This mod can also be used as an api to let other mods change player gravity.

Required Dependencies

Fabric Api
Cloth Config

Optional Dependencies

Mod Menu

Config

This mod has a config located in .minecraft/config/gravitychanger.json. You can edit it manually or in game using modmenu.
The config has 2 categories: Client and Server.
Client category contains options that only take effect on the client and need to be set on the client.
Server category contains options that only take effect on the server and need to be set in the server config. If you are playing in singleplayer your server uses the same config as your client and you can change it from modmenu. If you are playing on a server the server config is not updated when you change it on your client, it can only be edited using the server config file.

Importing

First clone this repo and run gradlew build.
Copy the resulting dev jar from build/libs/ into libs/ inside your project.
Then add the following to your project:

grable.properties

gravitychanger_version = 0.0.1-1.17.1

Replace 0.0.1-1.17.1 with the version of the jar you have in libs/.

build.gradle

repositories {
    flatDir {
        dirs "libs"
    }
}

dependencies {
    modImplementation ":GravityChanger-${project.gravitychanger_version}-dev"
}

fabric.mod.json

"depends": {
    "gravitychanger": "^0.0.1"
}

Replace 0.0.1 with the lowest version you need

Now you should be able to cast a PlayerEntity instance into RotatableEntityAccessor and use it's methods gravitychanger$getGravityDirection and gravitychanger$setGravityDirection to get and set gravity for that player.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.