Jump to content

Recommended Posts

Posted

Hello there, I'm an intermediate Java programmer making a Minecraft mod that does various things. Currently I'm trying to make an item that replicates the /locate command - in this particular case, I want the item to tell the player the coordinates of the nearest jungle temple.

However, I've ran into some confusion whilst doing the code for this. I looked at the code for the /locate command and my head is spinning a bit with some of these complications. The method I'm using to find the structure (findNearestMapStructure) requires a HolderSet argument. I've been browsing the javadocs for a good while now and I'm very confused as to how to create one of these - the vanilla code for /locate seems to pull information from a resource map to make one, but I don't need to use a resource map since I'm not accepting a structure as an argument like the command, correct? In that case how would I create a HolderSet for this purpose? Is there simply a way to construct one from a ResourceKey or something similar, so that the code points to a jungle temple structure?

Thanks for the help.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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