Please help me how to make such a mechanic?

Started by MisterSmeet on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please help me how to make such a mechanic?

I need if a player throws a certain block and an item to the ground, they disappear and a mob appears.  I need if a player throws a certain block and an object to the ground, they disappear and a mob appears. How to do it?

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My guess would be to run a…
Wed, 04/16/2025 - 17:20

My guess would be to run a procedure on entity tick update, check if the entity is of type item entity. If it is, check all nearby entities in a cube around it with size of 1. Check each one to see if it is an item entity, and compare the item that it converts to with a set item that you want to check for, such as a moss block, using a variable to keep track of what items have been found. Then, if the variable for the moss block and the item you want are both true, go back through the item entities and despawn the first moss block item entity (setting its variable back to false to track this) and the first other specified item entity. Finally, in the same if block as the despawning, spawn in the new entity you want to spawn.

I am not able to provide a screenshot of the procedure.

You will need to use the global trigger for entity tick updates, the procedure block that gets entity iterator in a cube, the procedure block to convert an item entity into an item stack, a lot of if blocks, the procedure block that checks if an entity is a certain type, and the mob summoning procedure block.

Overall, it is complicated, but it can be done.

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It would be nice if I had it…
Wed, 04/16/2025 - 17:32

It would be nice if I had it uploaded to Google Drive, I need to see it, or I need to be provided with the procedure with a link to it.