How to make item combining on floor

Started by EnderDremurr on

Topic category: Help with modding (Java Edition)

Last seen on 13:55, 24. Feb 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make item combining on floor

HI, i`m new in mcreator and i want to create procedure that must consume items dropped on floor (or into water) and create other item
for example: you throw in 1 block of water a stack of redstone and a stack of glowstone, procedure destroys that redstone&glowstone and drops an other item instead

 

Last seen on 17:15, 28. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
YEESSS, I need this for my…
Sun, 01/30/2022 - 01:27

YEESSS, I need this for my mod. I'm making an anime mod which includes Fullmetal Alchemist. When you place a transmutation circle on the ground and two objects, they will combine into something else. But it has to be certain objects. How would we go about doing this?

Last seen on 10:59, 25. Mar 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ik this is doable with…
Sun, 01/30/2022 - 01:37

Ik this is doable with commands. I just don't know how. But I think there's a tutorial in YouTube just search Minecraft floor crafting tutorial

Last seen on 19:33, 28. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is an example of floor…
Sun, 01/30/2022 - 03:51

This is an example of floor crafting: (example of 4 items one output - should be a tick function)

 

execute as @e[type=minecraft:item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b},OnGround:1b}] at @s run execute as @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b},OnGround:1b},distance=..1] at @s run execute as @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b},OnGround:1b},distance=..1] at @s run execute as @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b},OnGround:1b},distance=..1] at @s run function name_space:function

 

The next function should have: (This should be the output function from the previous command/function)

##-------------------------------------------------------------------------------------------------
## summon items - you can add name, attributes, etc.
##-------------------------------------------------------------------------------------------------

summon item ~ ~ ~ {Item:{id:"minecraft:iron_sword",Count:1b}}

##-------------------------------------------------------------------------------------------------
## kill items
##-------------------------------------------------------------------------------------------------

kill @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b}}]
kill @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b}}]
kill @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b}}]
kill @e[type=item,nbt={Item:{id:"minecraft:an_item/block_here",Count:1b}}]

##-------------------------------------------------------------------------------------------------
##effects - optional
##-------------------------------------------------------------------------------------------------

particle minecraft:dragon_breath ~ ~ ~ 0.4 0.5 0.4 0.01 10 normal

##-------------------------------------------------------------------------------------------------
##sounds - optional
##-------------------------------------------------------------------------------------------------

execute as @a[distance=..5] at @s run playsound minecraft:block.bamboo.hit master @s ~ ~ ~ 1 0 1

 

You can modify it as much as you like

Last seen on 17:15, 28. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, I was hoping not to…
Sun, 01/30/2022 - 14:22

Well, I was hoping not to have to do it with commands, but if that's the only way then it works. How would I do it an Mcreator tho? For my transmutation circle, I made a custom block that has almost no length so that it looks like it's just a circle on the ground. But anyway, how would I make the transmutation block sense the blocks that are on top of it? And would I have to get the execute command block in order to execute that command?

Last seen on 19:33, 28. Mar 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That is the only way I know …
Sun, 01/30/2022 - 22:21

That is the only way I know (not the only way it is done). The tick function does not depend on blocks or location. These functions go in a datapack, Use a test world (with your mod), create a datapack which uses your modded items/blocks, once you are happy with the results, inject/merge the datapack into your mod. You can use any item/block/armor. Maybe you could do it with procedures, but I have never tried.

A datapack is per world, but a mod with the custom datapack in it works in every world.

Let's say you want to spawn a Boss entity: the tick function can include vanilla and modded items/blocks, and the output is to summon your custom modded entity or many entities or maybe an entity in a custom structure ... anything goes.

I did something very similar here with the minecarts - it has custom minecarts and minecarts going up with custom rails.

https://mcreator.net/modification/78806/custom-3d-elytraarmor