Posted March 1, 20169 yr 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?
March 1, 20169 yr 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
March 1, 20169 yr 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.
March 1, 20169 yr 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.