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

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

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.