Jump to content

Recommended Posts

Posted

Hello everybody! I'm new to modding, and I have some questions. First of all, how does one create a block that can interact with a bucket? I'm trying to creat a block that when right clicked on with a bucket, it fills the bucket like a water source block. However, i don't want this block to dissapear. Does anybody know how to go about doing this? Help would be much appreciated. Thanks!

Posted

You can do it in the onBlockActivated in the block class

you just check if there where right clicked with a bucket.

 

you can find a example on pretty much what you are looking for in my mod:

https://github.com/simwir/Creative-supplier/blob/1.7/main/java/simwir/cs/blocks/BlockFluidSupplier.java

or mayby if you're looking for a block that only can fill one type of fluid you might want to look at my other mod:

https://github.com/simwir/Compact-Tanks/blob/master/main/java/simwir/ct/blocks/BlockWaterSource.java

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.