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

Hello guys (Again :( )

 

I'm now on a problem. I made a Gui which is a GuiContainer designed to be like the inventory. I can open it without problem but then, i cant take any items to move to another slots (It gets quickly taken by the mouse then it get back to his slot) and the second is i dont know how make a slot part of my ExtendedEntityProperties player. I made a ItemStack array which is saved by the NBT but i dont know how to use it in a slot, because the first parameter of a slot is the "InventoryPlayer" so it get the slot from an ID and i cant use mine :( I tried to make my own Slot class but it did'nt worked :(

 

Thanks for awnsers

  • Author

Ok so I made a packet which open the Gui serverside and its work !

The items seems to work too :) Thanks man !

 

The last problem is that i dont know where is it saved. I printedout the itemstack that Ive made in my ext player and hes empty ...

 

Mh I thinks its saved in the player's inventory ..  Its the first armor slot ;_;

If you want to open the GUI on key press, you need a) a KeyHandler (not a TickHandler) and b) Packets

 

no actually "openGui(Object, int, World, int, int, int)" from class EntityPlayer doesnt required packet to allow gui to open.

 

example of my code:

@Override
public void keyDown(EnumSet<TickType> types, KeyBinding kb,
		boolean tickEnd, boolean isRepeat) {
	if (Minecraft.getMinecraft().inGameHasFocus && tickEnd) {
		if (kb.keyCode == Keyboard.KEY_P) {
			Minecraft.getMinecraft().thePlayer.openGui(TheMod.instance, PartyGUI.GUI_ID,
					Minecraft.getMinecraft().theWorld, 0, 0, 0);

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

oh ... good point never tried with containers :\

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Guest
This topic is now closed to further replies.

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.