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

MyCode:

@SubscribeEvent

public void onEntityRightClicked(EntityInteractEvent e)

{

if (e.target instanceof EntityPlayer)

{

EntityPlayer player = (EntityPlayer)e.target;

 

e.entityPlayer.addChatMessage(new ChatComponentText(player.getDisplayName() +"을 선택했습니다."));

InventoryPlayer inv = player.inventory;

e.entityPlayer.displayGUIChest(inv);

}

}

 

 

I Want to Read-Only InventoryPlayer..  How to?

i do in but 1.8 may is not the same but

 

you have to make a custom Gui class

whith an custom container class  and a

custom slot class designed whith a boolean to enable or dissable the player interacction way the item can be seen in the gui but cannot be taken

 

soo is long work

so bether begins here

 

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571597-forge-1-6-4-1-8-custom-inventories-in-items-and

 

http://jabelarminecraft.blogspot.com.co/p/minecraft-modding-containers.html

I am not sure what is this meant to do, but you can create regular container, but you must create your own slit that  overrides default slot. In the class you must define that it cannot accept any item.

Sorry, if you find mistaches in my posts.

I am not EN.

And when I post anything on Modder support, it means, I can't help myself and I need your help. And when you decide to delete my topic, just PM me with the reason, please.

I made a class for doing this. Simply create new class in your lib(?) package and copy this into it.

 

 

 

public class DisplaySlot extends Slot{

public DisplaySlot(IInventory inv, int id, int x, int y)
{
	super(inv, id, x, y);
}

@Override
public boolean isItemValid(ItemStack item)
    {
        return false;
    }

@Override
public boolean canTakeStack(EntityPlayer player)
    {
        return false;
    }

}

 

 

Sorry, if you find mistaches in my posts.

I am not EN.

And when I post anything on Modder support, it means, I can't help myself and I need your help. And when you decide to delete my topic, just PM me with the reason, please.

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.