Jump to content

[Solved] Get the block the Player is mining.


Busti

Recommended Posts

Hello,

is it possible to have a custom tool "know" about the Block the player is currently Mining with it and from what direction he is doing it?

I could calculate it with the onUsingTick() function but I was hoping that there would be a Method for it.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

I basically want to get the coordinates of the block and the side im looking at, while im mining / left-clicking it.

I colored it in this screenshot:

 

 

iA041.jpg

 

 

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

I am creating one of those common mining tool that mines more than a single block and I want the other blocks to display cracks as well.

I also would like to retrieve the Information once the block is mined as well since the onBlockDestroyed() method in ItemTool does not pass a the side of the mined block. I could of course raytrace the given players view but perhaps there are any easier solutions.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Is there actually a function that gets called while an item is used to mine something?

I misunderstood onItemUseTick() for such a method but as it turns out its for eating.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.