Jump to content

Recommended Posts

Posted

well I have a gui but when you go to pick up an item it just goes back down, so its impossible to move the item

 

here is the code for the container part of it please ask if youd like to see another class

 

package neg2013.acsension.inventory;

import neg2013.acsension.slot.CrusherInputSlot;
import neg2013.acsension.slot.GenericSlot;
import neg2013.acsension.tile_entity.TECrusher;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;

public class CrusherContainer extends Container{

private TECrusher crusher;
private int slotId = -1;



private int nextId(){
	slotId++;
	return slotId;
}

public CrusherContainer(InventoryPlayer invPlayer, TECrusher crusher){

	this.crusher = crusher;



	// player inv
	//hot bar
	for(int x = 0; x < 9; x++){
		addSlotToContainer(new Slot(invPlayer, x, 8 + (18 * x), 146));
	}

	for(int x = 0; x < 9; x++){
		for(int y = 0; y < 3; y++){
			addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 88 + 18 * y));

			addSlotToContainer(new CrusherInputSlot(crusher, nextId(), 33, 26));			


		}

	}
	// player inv













}



//mid



@Override
public boolean canInteractWith(EntityPlayer player) {

	return true;
}



}

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.