APDevTeam / Movecraft

The original movement plugin for Paper. Reloaded. Again.
GNU General Public License v3.0
123 stars 79 forks source link

Add craft methods to get the block amount of a craft #678

Closed Intybyte closed 3 months ago

Intybyte commented 4 months ago

Describe the solution you'd like A way to get informations about the amount of blocks in a craft, for instance:

Block Amount Move Block Amount Flyblock Amount

This might be useful for addons, a simple use might be getting the Block Amount on Pilot and then using that amount to calculate the amount of blocks left on the craft, or if there are few moveblocks on the craft while piloting it.

TylerS1066 commented 3 months ago

Block Amount This one already exists: Craft.getDataTag(Craft.MATERIALS).

The other two would be a good idea, and would be able to combine the StatusSign calculation with the official calculations caching their value in StatusManager. My initial thought is that we should have a Map<RequiredBlockEntry, Integer> as Craft.MOVE_BLOCKS and Craft.FLY_BLOCKS.