Jump to content

Recommended Posts

Posted

Hello, i am learning to making mods in forge, and i gave myself a challenge to make mod checking if there is opened inventory and if Yes, its stealing pumpkin but i dont know how to check if inventory is opened, loop through slots and move item from other inventory to Player inv. Pls help 

Posted

I would try to use the client tick event to check if the current screen is a container screen and if so get its inventory, loop through all the slots to try to find a pumpkin and attempt to transfer the pumpkin to the player's inventory.

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

 

Hello, i am learning to making mods in forge, and i gave myself a challenge to make mod checking if there is opened inventory and if Yes, its stealing pumpkin but i dont know how to check if inventory is opened, loop through slots and move item from other inventory to Player inv. Pls help here's my code :

https://pastebin.com/9uPs7BTr

 
Posted

Threads merged.

What version are you modding?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

1.8 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.