Jump to content

Recommended Posts

Posted

Describe what you want to achieve, not how you intend to code it and we can help you.

In MC there is a class known as village.class which contains much of the village calculations. I'm trying to figure out how to replace the MC one with my own version of the file. The ideal end result is that the part of villages that are handled by MC village.class should be handled by mine.

Posted

You again described how you intend to code things.

Let me give you an example:

 

Intended outcome: The player can no longer use their hands to mine dirt.

Intended way to code it: Use

PlayerEvent.HarvestCheck

.

 

Ah, I misunderstood. Players can use a config file to change the amount of iron golems can spawn.

Posted

You can use

WorldTickEvent

and then manually spawn additional iron golems if needed.

 

Alright, sure I could use an event however I would like to modify (using a modified copy) the village.class file so I could easily change a variable in it (as my current task takes two variables, the min doors required and nu villagers required).

Posted

You could make a modified copy, yes. But Minecraft would not care about it at all. The proper way to do what you want is to modify the existing behavior using events.

Alright, thanks. How would I use events to modify needed doors and needed villagers to spawn an iron golem?

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.