Vat1n Posted August 17, 2022 Posted August 17, 2022 Hello, Recently, I asked myself the following question : "What is the maximal distance you can reach with a bow?" Imagine you shoot with a bow from X:0 in the X positive axis. With the perfect angle, what could be the longest distance X? So, I asking you which files should I check in order to calculate the longest X. Would it be better to search in the files about the Minecraft physics? Quote
warjort Posted August 17, 2022 Posted August 17, 2022 (edited) AbstractArrow.tick() has the "physics" The calculation is an iteration and uses floating point so it won't match exactly simple equations using calculus. The initial velocity calculation can be found in for example BowItem.releaseUsing() or CrossBowItem.shootProjectile() For at least the crossbow this has a random component, see Projectile.shoot() There is a kind of cheat answer to your question. The server stops ticking entities at the "simulation distance". So if the arrow reaches that distance, it will be the maximum, assuming the player stands still and never moves towards the arrow to make it tick again. 馃檪 Edited August 17, 2022 by warjort Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.