Procedure Ideas

Started by Yui3012 on

Topic category: Plugins and third-party tools

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure Ideas
Sun, 06/08/2025 - 19:28 (edited)

Firstly, Hello everyone! I'm currently developing a plugin (MCreator 2025.1 and NeoForge 1.21.1)
I haven’t tested it on other versions yet, but there’s a chance it might work.

If you have any suggestions like “Hey, this would be cool!” before I release it, feel free to write on comments.
As long as it’s possible within NeoForge (and ChatGPT xd), I’d be happy to include it before releasing the plugin!



Here the procedures I've added so far:
 


Converts a given number to an integer.
 


Returns the block position at the specified coordinates.

 


Returns the X,Y,Z coordinate from the specified block position.
 


Checks if the specified block has a facing direction property.
Only North, South, East, West, Up, Down properties are included.
Blocks that use axis, such as logs, will return false.

 


Checks if the player has pressed a specific movement key.
It only works on the client side. Because it actually takes the player's movement keys (W A S D original). Then it checks if they are pressed.

So yes, it will detect even if the W A S D keybinds are changed.
 


Returns the block state of the block at the given position.
to compare blockpos with the original mcreator block procedures.
 


Returns the highest slot index in the inventory of the specified block, or -1 if the block does not have an inventory.
For example, a chest's slot count is 27, that block will return 26 (because that's how the index works.)
Extra information: it also works in connected inventories (like double chest). So you will get an index value of 53.
 


Returns the position of the block that the specified block is facing. Returns a second value if no facing block exists.
I have no idea how to explain this, simply: it checks if the block in the first given position has a facing property.

If it has: it takes the block that the block is facing. In other words, it takes the position of the block that the block is facing.

If it hasn't: it returns the position at the second given position. (I added this because it makes it easier to compare)


Simulates breaking the block with a given Fortune enchantment level and returns the expected number of dropped items.
Note: This is not breaking block, just calculating the drop count.
Note2: The results may be slightly or impressively diffrent because of RNG.
 



Fluid tank procedures!
I don't think I need to explain these blocks. They work in the same way as the original MCreator liquid tank procedures. I made them string based and added a option to get fluid from tank as a string. So we can go beyond the MCreator restrictions of just water, lava and custom liquid in that workspace.



Returns the block position that the specified entity is looking at

 


Transfers items from a slot in one block’s inventory to another block’s inventory.
An example I can give is the hopper. It automatically places it in the right place like hopper in vanilla minecraft.



BlockPos Iterator and Number Iterator
This good boys are helpers for the blocks below.


Loops through all blocks within a cube centered at the specified coordinates with the given radius.
Note: It's a radius. When size set to 5, it will check 11x11x11 sized area. (extra 1 is the central block itself)

 


Loops through every inventory slot of the block at the specified position, allowing access to the items and slot index.

It can be used to search for items in a block with an inventory.

For example, you can check if there is a netherite sword in chest.
and if you find it, you can also get which slot it is found in with the number iterator.
or you can even skip some slots with number iterator.

 

Edited by Yui3012 on Sun, 06/08/2025 - 19:28