Topic category: Help with MCreator software
Halloj. I really like this Mcreator idea. Making modding easier for the average person is a stroke of genius.
Though I am brand new to this and can't really seem to get a grasp on how to make my mod. So I thought I'd ask for help :)
Here's the idea where I stumbled: An enchantment 'Picky' for the Bundle. Any item stored in a 'Picky Bundle' won't get picked up by the player. The concept's simple but I'm at a loss at how to do it 🤷♂️
So that's one☝ And the ✌ idea is for Bundles in general - While moving things around in inventory you'd shift + left/right click a Bundle to cycle the selected item with the next/previous bundled item (so shift + right click would give you the item at the bottom of the Bundle). It's just so clunky to have to take out every overlying item of what you're after.
The shift + right/left click can be any button combination really. To me that just felt like the most intuitive.
That's all! 😃
Thank you beforehand ! 😄
If you're looking for some good tutorials, NorthWestTrees is a great way to get started with MCreator. Sometimes the best way to learn is to watch someone else work their way through stuff. Can't guarantee they'll have specifically what you need, but very useful just for some general stuff!
For your specific problem... item pickups are pretty difficult to mess with, they're one of those parts of the game that's kind of hard coded. There is probably a way to do this with custom code, but it's honestly above both of our paygrades.
Normally you would use itemstack iterators for something like this, (a special kind of function that lets you target every slot in the player's inventory), but this quickly gets really complicated: you would need one iterator to check if the player has an enchanted bundle, a second iterator to check the contents of that bundle, and then a third iterator to run back through the player's inventory for each slot in the bundle and check for matching items. This quickly gets horribly complicated, so you might wanna simplify it a bit by splitting it up into multiple procedures. (Partly 'cause I'm not totally sure myself if this many nested itemstack iterators would actually work.)
...Suffice it to say, way more complicated than even I expected going into this. I promise not all modding stuff is this elaborate, you just happened to pick a really complicated issue! I can send some example screenshots if that would help.
Oh, and if you want a slightly simpler way of doing this, you could just do procedures 1 and 2, (up to the point where you're going through each individual item from the bundle), but then just do an entity iterator and despawn an entities in a small radius that are both an itemstack and the same itemstack as the player's 'current_item,' essentially just despawning any itemstacks that are also in the player's bundle.
And for procedure 2, you don't need a 'current_Item' local variable, just the global one, that's a mistake.
This is a lot of info. Thank you so much, Mind!