PrismarineJS / prismarine-physics

Provide the physics engine for minecraft entities
MIT License
35 stars 41 forks source link

Fix incorrect behavior in 1.19+. Improve feature list version condition. #110

Closed szdytom closed 1 year ago

szdytom commented 1 year ago

The problem: I have noticed the bot cannot climb trapdoors that is directly above ladders (#109). I have also noticed that in 1.20.1 the bot cannot jump to climb ladders (#108).

In this pull request:

The new version format is described in the comments beside FeatureList source:

https://github.com/szdytom/prismarine-physics/blob/c524a9b0e655c472e1ecbb4f2193cb26360e8313/index.js#L7-L21

Fixes #108 Fixes #109

extremeheat commented 1 year ago

There is already a feature file inside minecraft-data. It would make more sense to move the features there and use them inside prismarine-physics. There are some features that have disconnected version ranges. This was discussed earlier in another PR, it could instead be implemented with two features.

szdytom commented 1 year ago

It seems that minecraft-data uses a array of 2 elements representing a range.

I am proposing a more complex yet powerful format of that. A range in this format can be: [[">= 1.12", "<= 1.14"]], with disconnected version ranges, it can be: [[">= 1.12", "<= 1.14"], [">= 1.16"]].

szdytom commented 1 year ago

Anyway, I think whether to move the list to minecraft-data can be discussed later, maybe we can have the ladder behavior fixed for now?

extremeheat commented 1 year ago

I am proposing a more complex yet powerful format of that

Yes, this change, if any, should not be done here, but rather in node-minecraft-data. We already are going to remove this, and I believe a previous PR to do this here went stale. So it should definitely not be updated further here.

szdytom commented 1 year ago

Alright, I've just opened a pull request #111 on fixing ladders.