Need Help! How to Spawn Entity form of Item?

Started by Lil Shoosh on

Topic category: Help with modding (Java Edition)

Last seen on 18:22, 1. Jun 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need Help! How to Spawn Entity form of Item?

Heyo!

Here is what I am looking to do: 

 

(1) when I right-click a certain block with any item, it will spawn the floating/dropped entity form of the item above the block

(2) make the item entity not able to be interacted with (it will float above the block like a dropped item, but will not be able to be picked up)

 

Here is what I tried:

 

  • I tried using the "Spawn Entity:" block in the World Procedures as "Spawn Entity: (Item) at:..." but I couldn't figure out how to make it work
  • I tried finding the Data ID of the entity form of an item (Minecraft wiki shows it as "entity.minecraft.item") but I don't know how I can summon based on an ID

 

If you can figure out any of this, please let me know!

 

Thanks!

Last seen on 22:04, 23. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The possible solution I can…
Thu, 05/16/2024 - 21:22

The possible solution I can imagine is to create a custom animated entity a similar size to vanilla dropped items with a constant y axis rotation and height loop, and disable movement, health and collision on it.(Maybe hit box too?) Though it would difficult to create and code those for ANY(Every?) item.
I know if you remove a custom blocks bounding boxes the player cannot break it once placed.

Last seen on 18:22, 1. Jun 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the suggestion! I…
Fri, 05/17/2024 - 10:07

Thanks for the suggestion!

I was considering that as a last resort, but just looking to see if it's possible to use the "Spawn Entity" and using the "Item" choice (in that block) to get the item entity of a specific item.