Jump to content

(1.16.5/1.16.4) How can I create a interactable vending machine?


GhostGamesFSM

Recommended Posts

Hello everyone! A few days ago someone asked for a working vending machine in my mod, but I don't know how I do that. my vending machine is now only decoration but I want it to be interactable. Like a real vending machine. I have custom money in my mod that I want to use in the vending machine.

 

 

I also don't know how to get a vending machine hitbox 2 blocks high. only on the bottom side the hitbox is 2 blocks high, but on the upper part there's nothing. I can even place something there. I have uploaded my vending machine class here. (I've seen that I need a "vending_machine_upper" block but I don't know what I need to do with that.)

vending machine.png

class1.png

class2.png

Edited by GhostGamesFSM
Link to comment
Share on other sites

Never post code as screenshots, that is probably the #1 worst way to share it (maybe besides a video).

Best way is to create a github, and post your project on there, then share a link here.

If you're just sharing a small portion, copy & paste directly to your forum post inside code tags (the < > button at the top of the composition part of the screen)

Edited by Ugdhar
Link to comment
Share on other sites

31 minutes ago, Ugdhar said:

Never post code as screenshots, that is probably the #1 worst way to share it (maybe besides a video).

Best way is to create a github, and post your project on there, then share a link here.

If you're just sharing a small portion, copy & paste directly to your forum post inside code tags (the < > button at the top of the composition part of the 

https://github.com/GhostgamesDHG/MinetopiaMod/blob/master/src/main/java/com/ghostgamesdhg/minetopia/blocks/Vending_Machine.java

 

Here's the code on github. Thank you for the reaction.

Link to comment
Share on other sites

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.