Skip to content

Commit

Permalink
Fix 1.19 Water Physics (#88)
Browse files Browse the repository at this point in the history
* Support 1.19

* if ! liquid gravity settings, throw error

This should help us to remember to update it in future major releases.

* fix(): Follow linter suggestions
  • Loading branch information
ATXLtheAxolotl committed Jan 1, 2023
1 parent 7970d49 commit caa83a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ function Physics (mcData, world) {
} else if (supportFeature('proportionalLiquidGravity')) {
physics.waterGravity = physics.gravity / 16
physics.lavaGravity = physics.gravity / 4
} else {
throw new Error('No liquid gravity settings, have you made sure the liquid gravity features are up to date?')
}

function getPlayerBB (pos) {
Expand Down
2 changes: 1 addition & 1 deletion lib/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "proportionalLiquidGravity",
"description": "Liquid gravity is a proportion of normal gravity",
"versions": ["1.13", "1.14", "1.15", "1.16", "1.17", "1.18"]
"versions": ["1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "1.19"]
},
{
"name": "velocityBlocksOnCollision",
Expand Down

0 comments on commit caa83a6

Please sign in to comment.