Jump to content

Recommended Posts

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!

  • 2 weeks later...
Posted

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

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