Jump to content

Recommended Posts

Posted

I'm not too sure if this is a bug, or just a mis-use of a GuiContainer. I am trying to make a gui open on an item's right click, with a couple extra custom slots. I got the player's inventory put into it, and decided to try it out, to make sure it was working so far, because I have not made a gui in the past. Everything seemed to be working, but when I try to click an Item, it doesn't let me pick it up, it just picks it up for a second, then puts it back. If I click an item that has another item in the slot above it, it will pick up the item from the slot above it, and empty both slots.

 

Thinking that maybe my code is conflicting with the gui somehow, I made a test mod with a gui, same thing.

I then decided to experiment a bit, so I added a few more slots (9 regular slots), and I was able to pick up items from my inventory, but not some of the 9 slots.

 

Thinking that maybe it has something to do with trying to use an item to call the gui, I made a block that would open the gui, and the exact same thing happened.

 

Can anyone please tell me if something is wrong with my code, or if this is just a bug? I have attached the source code for my test mod, with the 2 items, and 2 blocks

Posted

So...I was scouring the internet (literally, looking at everything, trying to figure out why this is happening), and everyone else's code, tutorials, and examples all looked to be the same (minus mod-specific details). The only difference I could find (after scratching my head and searching for hours) is that the examples all are @NetworkMod. Sure enough, reverted all my code back to what is in the file I posted on the OP (literally copied and pasted), and made it a NetworkMod.....and it works! Seriously? Why does it even let you make a GuiContainer if it won't work?

 

Any thoughts Forge programmers?

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, Thank you so much for the suggestion, I will create a post.
    • You're using the wrong FACING property in Mechanism#getStateForPlacement, BlockStateProperties.FACING instead of Mechanism.FACING, HorizontalDirectionalBlock.FACING or BlockStateProperties.HORIZONTAL_FACING (which all refer to the same value). The former includes all six Direction values, the latter only includes the four horizontal values.
    • quiero que me digan como hago para instalar bien el java y forge nada mas hasta el momento lo hice pero java no ejecuta el forge   
    • Mod Idea: Server-Specific Mod Disabler & Anti-Cheat Helper Overview: This mod allows players to seamlessly play on Minecraft servers without worrying about banned or incompatible mods. It automatically disables specific mods based on the server's configuration, ensuring that players are only using allowed mods. Additionally, it provides a safeguard against hacking mods by instantly blocking them from being used, promoting fair gameplay on multiplayer servers. Key Features: 1. Server-Specific Mod Disabling: Automatic Mod Detection: The mod will automatically detect which mods are allowed or blocked on a particular server. Server Configurable Lists: Server admins can maintain a list of banned or whitelisted mods, which will be dynamically applied when a player joins. Player Customization: Players can choose whether the mod should automatically disable specific mods when joining servers, or allow them to be used based on the server's settings. 2. Anti-Cheat and Hack Protection: Instant Hack Detection: The mod will automatically identify and block known hacking mods when joining a server. If a player attempts to join with a hacking mod, the server can receive an alert, and the mod will prevent the player from joining until the mod is removed. Real-Time Monitoring: The mod will continuously monitor the player's mods while on the server, ensuring that no banned or suspicious mods are activated. 3. Community-Driven Mod Management: Custom Blocklists and Whitelists: Server admins can manage custom mod lists directly through a configuration file or via an in-game interface. These lists would allow mods to be either whitelisted, banned, or marked for temporary disabling. Integration with Modding Communities: The mod can gather mod compatibility reports from other players, sharing knowledge about which mods work together and which are problematic. 4. Player-Friendly Experience: Less Hassle for Players: With this mod, players no longer need to manually disable or enable mods when switching between servers. The mod takes care of everything for them. Seamless Gameplay: Players can freely switch between servers with different rules and mod requirements without worrying about compatibility issues or getting banned for using the wrong mods. 5. Open-Source and Extensible: Community Contributions: The mod will be open-source, allowing the Minecraft community to contribute by adding new features, bug fixes, and support for more mods. Customizable for Future Versions: The mod will be updated to support future Minecraft versions, ensuring long-term usability. Additional Ideas for Future Expansion: 1. Integration with Minecraft Servers (Optional): Server-Side Mod Configuration: In addition to client-side mod management, server owners can opt to install a server-side version of this mod, which can enforce mod restrictions for all players. Server Feedback System: When a mod is disabled, the server can automatically provide feedback to the player about why it was disabled and whether they need to install an alternative. 2. Donation and Support System: Monetization for Future Development: The mod could offer a donation-based system or a paid premium version with advanced features like real-time support or a larger mod compatibility database. Community Support: Players could report issues directly through the mod, ensuring faster resolutions and support from the mod development community. Benefits: 1. For Players: No Need for Constant Mod Configuration: Players no longer need to manually switch between different mod sets based on the server they join. Reduced Risk of Getting Banned: The mod automatically prevents the use of banned or incompatible mods, reducing the risk of being kicked or banned from servers. Hassle-Free Experience: The mod removes the need for players to learn about different server mod policies, providing a smoother experience overall. 2. For Server Owners: Simplified Server Management: Server admins no longer need to constantly monitor which mods players are using. The mod ensures players are only using compliant mods. Better Anti-Cheat Measures: Server owners can trust that hacking mods will be automatically blocked, improving server security. Easy Integration: With a simple configuration file, server owners can quickly set up their mod policies and get started. 3. For the Minecraft Community: Encourages Fair Play: The mod promotes fair gameplay by automatically preventing the use of cheating mods, ensuring a better multiplayer environment. Better Mod Compatibility: As the mod grows, it can help players and server owners discover which mods are compatible with others, making the modding ecosystem more reliable. Potential Challenges and Solutions: 1. Resistance from Players Using Hacking Mods: Solution: Allow server admins to configure a warning system where players can receive notifications about the mod being blocked before they are kicked. This gives them a chance to fix their setup. 2. Keeping Mod Lists Up-to-Date: Solution: Implement a community-driven reporting system where players and server owners can submit their mod lists, keeping the database current with new mods and changes in mod compatibility. 3. Cross-Platform Compatibility: Solution: Ensure that the mod is built to support both Java and Bedrock editions (if applicable) by using cross-platform modding tools and making the mod adaptable to both versions. Conclusion: This mod has the potential to significantly improve the Minecraft multiplayer experience by making it easier for players to manage mods and preventing hacks from ruining gameplay. By focusing on server-specific mod management and providing automated protection from cheating mods, this mod could change how Minecraft servers handle modding and create a safer, more enjoyable experience for everyone involved.
  • Topics

×
×
  • Create New...

Important Information

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