SwitchCraftCC / Plethora-Fabric

A peripheral provider for ComputerCraft, ported to Fabric
MIT License
16 stars 13 forks source link

Kinetic Augment: Launch Method - Unit of Power #38

Open BlackAsLight opened 1 year ago

BlackAsLight commented 1 year ago

I am struggling to find any documentation on the launch method that tells me how much power 1 unit of power is. mod.launch(0, -90, 1) Doesn't seem to be enough for a block while mod.launch(0, -90, 2) is a lot more than 2 blocks.

Kan18 commented 1 year ago

The kinetic augment launch method does not actually target a certain number of blocks to travel, but increases your velocity. "1 unit of power" could approximately be described as "an increase of 1 meter/tick" (1 meter being 1 block here, and 1 tick being 0.05 seconds.) You can get this value by checking the motionX, motionY, and motionZ values in getMetaOwner().

A couple things to note here:

  1. Minecraft does gravity slightly weirdly, you might want to reference the falling speed section of this minecraft wiki page
  2. In this case (launching straight up) it would actually be an increase of 0.5 meters/tick for a power of 1, since the Y velocity is scaled (see the Plethora source code). This would also change if you were using an elytra.
  3. Motion in Minecraft is basically handled by the client, so there might be inconsistencies/lag when testing on servers.