Custom Suspicious Sand?

Started by Mythic.py on

Topic category: Help with modding (Java Edition)

Last seen on 10:47, 17. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Suspicious Sand?

How can you exactly make a custom suspicious sand? like i mean one with all the animations etc. etc. has anyone discovered a way of doing so? any sort of solution that involves modifying a element's cdde is welcome!

Last seen on 20:10, 21. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't necessarily need…
Wed, 04/10/2024 - 04:15

You don't necessarily need to modify the code, it is a bit tedious though, and it won't look exactly like vanilla sus sand. And if you do this before the archeology update, be aware Mojang will likely decide to finish adding archeology to the game after your mod releases. Just, uh, fair warning. X)

 But you can mimic the behavior- the way my system works is that when the player right clicks a suspicious block, it transforms into another, lower level block, and repeatedly right clicking slowly decreases the layers a random amount. (The goal is to get as close to one layer without going over, with better loot for more layers, sort of like the demo archeology system.) I'm not entirely sure how you'd detect a continuous right click, as in the current system, but it may be possible.

Otherwise, the basic idea is to replace the block with an increasingly-mined variant every time it's right clicked, and then when the block breaks, you can run a /loot command to drop a random item from any loot table you've made. 

I'd be interested if you find a solution to the sustained right click thing though. There's presumably some method to do it- you might try investigating the suspicious sand code, you can locate minecraft source files if you go to the file tab on the far left of the workspace, and navigate to external libraries/gradle forge 1.20.1/net/minecraft/world. Otherwise I'm not 100% sure.