#Is It Possible To...

1 messages · Page 1 of 1 (latest)

main solar
#

Hi, I am new to Datapacks and Java. Been taking a Udemy course on Java Minecraft Modding, but wanted to get some experience with Datapacks as well, as people say that is easier/the future? But I am still alittle confused on the limitations of datapacks.

I am a BIGG cobblemon fan. And wanted to eventually optimize riding pokemon. Specifically wanting to make riding pokemon like driving a kart in Mario Kart. Where each pokemon has a different stat for Speed, Acceleration, Handling, Traction, as well as have a drift functionality (so we can have CobbleTriathlons Races!). And that these stats can be raised (via EVs) by time spent riding the pokemon much like IVs & EVs in pokemon.

Big project I know.

BUT, is there a way to apply this idea to horses with a datapack?

My thought: Boats slide ("drift") on ice. Can that code be applied to horses with a modifier that decreases the effect of the sliding ("drifting") as you ride the horse more. This for the "Traction" stat.

Could you also then turn on a variation of this sliding mechanism by holding down a button, this could be the "Drift" functionality.

Could you change how responsive the horse is to directional input? This would be "Handling".

Could you change the acceleration/speed of the horse.

Then have a modifier for all of the stats the changes to make the horse respond more to input, hold tighter turns, accelerate more, and have a faster max speed?

Could this all be in a datapack? (for the horses, at least)

molten mistBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1729094352:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

torn onyx
#

The important distinction between mods and data packs is that, where mods can add to or modify the actual code of the game (including taking the boat ice code, for example, and applying it to horses), data packs cannot. Data packs are not traditional coding or programming, though they can borrow concepts from it. Instead, they use Minecraft's commands, in combination witha a handful of files that Mojang has made data driven like advancements and loot tables, to essentially simulate changes or additions to the game.

Now this can be done at a scale and level of quality that rivals mods, but there are some, even many things that are either not possible with data packs, or require significant workarounds, effort, and performance impacts to implement, compared to if you were going to do it with a mod

#

So to answer your questions as posed:

  1. No, you can't make horses behave like boats do on ice directly, but you could do complicated math to modify their motion NBT
  2. We currently have limited access to detecting buttons that the player is holding. In 1.21.2, we will be able to detect when the player presses or holds the buttons they have mapped to their directional inputs as well as jump, but until then we have only sneak (and indeed, only if they are successfully sneaking), and right and left click detection (done through other workarounds requiring either an item or an entity)
  3. In 1.21.2, technically yes with those directional input detection predicates we'll have access to, but you'd still need to do some calculations to determine what data to apply to its Motion NBT
  4. Speed is one of things that is super easy to control with data packs, via the attribute command
main solar
#

Thank you for this response! I really appreciate it.

torn onyx
#

I hope it wasn't too much of a disappointment 😅 There is still an incredible amount of flexibility in things that data packs can do, but when you're not familiar with the limitations it's completely reasonable to accidentally pick things that they just aren't build to support (yet 🤞)