How to lock function ShiftClick

Started by proxene on Mon, 10/17/2016 - 19:42

Topic category: Help with MCreator modding

Last seen on 10:54, 18. Apr 2019
Joined May 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to lock function ShiftClick
Mon, 10/17/2016 - 19:42

Hello,
I have a problem, I create a chest in which I want a certain type of item to be put in. For example, I want there to be as stone inside.
The problem is that I find how to do it with Mcreator and nikel running except when I do a ShiftClick on the item in my inventory is still placed in the chest.

this.addSlotToContainer(new Slot(inherited, 0, 31, 39){
public boolean isItemValid(ItemStack stack){return ((stack != null)&&stack.getItem()==mcreator_vingtcredits.block );}
public void onSlotChanged(){
super.onSlotChanged();if(getHasStack()){
EntityPlayer entity = Minecraft.getMinecraft().thePlayer;
int i = (int)entity.posX;
int j = (int)entity.posY;
int k = (int)entity.posZ;
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
World world = server.worldServers[0];

}}
});

Can you help me ?

Best Regards ,
Proxene