Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Quick question. I created my own Ghost Slot for my Cointainer. It works, except for one thing... FIrst things first, how is it supposed to work?

Whenever the slot is clicked with an itemstack, instead of putting said itemstack in the slot, it creates a copy of the itemstack, with stackSize = 1 and sets it to the slot. All of this without modifying the stackSize of the itemstack that the player clicked the slot with.

 

I tried to be clear on that. Now my problem is the last part, the "not editing the itemstack currently held" part. Do i have to override something in the slot class, with my custom slot? If so, would someone point me to that? Thanks ^^

 

And i don't think I need to provide any source for this, since it's more of a question than an issue, and there's not much to show actually..

I try my best, so apologies if I said something obviously stupid!

  • Author

Aaanyone? Bump!

I try my best, so apologies if I said something obviously stupid!

  • Author

Yep, definitely sorted out..

I try my best, so apologies if I said something obviously stupid!

  • 2 weeks later...
  • Author

You should open a new thread, instead of necrobumping..

I try my best, so apologies if I said something obviously stupid!

The method handling slot clicks is

	 public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer player){}

in the Container class

but it's somewhat hard to read into it I guess..

 

You should open a new thread, instead of necrobumping..

 

I hardly consider posting in a thread that hasn't had a post for 10 days to be necrobumping. Relavent XKCD

 

The method handling slot clicks is

	 public ItemStack slotClick(int par1, int par2, int par3, EntityPlayer player){}

in the Container class

but it's somewhat hard to read into it I guess..

 

Yeah I mostly figured it out by looking at forestry's code. GUIs in minecraft could be a bit more intuitive

I like trains.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.