Jump to content

Recommended Posts

Posted

I've been working on having a custom dispenser-block in my mod and have came to the conclusion that I can't have dispensing-behavior without the block using a Dispenser as it's tile entity and having the dispensing-related code use the Dispenser TE in the block as a result, i.e in the dispense() method if I want it to be able to dispense items. This is maybe the only way it's doable in 1.12 for having custom Dispenser/Dropper blocks, since I've checked out the source code for a few mods that use custom dispenser-blocks and they do it the same way. Unless I'm missing something, is this the only way if I want a custom Dispenser-like block?

 

This complicates another issue as a direct result, I can't do EntitiesWithinAABB checks (specifically to auto-fire if an entity walks near the southface, preferably with ITickable) without attaching a custom tile entity and doing so/replacing all the Dispenser behavior with my own Dispenser-based TE breaks the dispensing itself.

 

My Block (don't mind the vanilla code, I'm just fiddling with stuff)

https://pastebin.com/gTvsVu8n

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.