Logic doesn't work in Mcreator!

Started by Kisonix on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Logic doesn't work in Mcreator!

I just can't understand why? It doesn't work.
After all, according to LOGIC, everything is done correctly.

Screenshot - https://imgur.com/RpLmRqI 

I need that when passing through a block of arable land, if there are no other blocks above the arable land and the player has a stone in his inventory, then a block of stone is placed on the block of arable land.

But for some reason the logic does not work.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what triggers this?
Fri, 03/28/2025 - 22:06

what triggers this?

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Updating the entity tick…
Fri, 03/28/2025 - 22:14

Updating the entity tick. 

The entity is a 3D model of a tractor that you can drive and plant crops if there are seeds in the tractor’s internal inventory. - That's the basic idea of ​​logic.

And I still managed to make it so that the check for the presence of an item in the entity's inventory worked.
But now there is the next problem.
I need that after the entity's tick is updated, the item disappears from the internal inventory of the entity one by one. For example, I put 64 items and after I drove my entity (tractor) across the field, it sowed the field with seeds and one item (seed) should disappear from the inventory of the entity. 

New screenshot - https://imgur.com/1RgZCYd

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
didn't this block do that?
Fri, 03/28/2025 - 22:23

didn't this block do that?

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unfortunately no, this block…
Fri, 03/28/2025 - 22:31

Unfortunately no, this block refers to the player, and if it is applied to an entity, for some reason it does not work.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh huh, I see Ig you have…
Fri, 03/28/2025 - 22:48

Oh huh, I see

Ig you have to do something like this,

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That might not work since it…
Fri, 03/28/2025 - 22:53

That might not work since it's "get contents copy as" if so try,

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your last option worked, but…
Fri, 03/28/2025 - 23:40

Your last option worked, but for some reason if I have 1 item in my inventory slot, and when I sow the arable land, it is sown not once but twice, and in survival 4 beds were sown... o_0.  
Image: https://imgur.com/a/SZhelyc

 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
um... How many slots does…
Fri, 03/28/2025 - 23:44

um...

How many slots does the entity have?

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The entity has 1 slots.For…
Fri, 03/28/2025 - 23:54

The entity has 1 slots.

For example, there are 3 items in the entity's inventory.
When I walk on one block of arable land, 2 items out of 3 are spent, not 1. This is strange.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try doing just this without…
Fri, 03/28/2025 - 23:57

try doing just this without big for each then

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The it taking multiple items…
Sat, 03/29/2025 - 00:04

The it taking multiple items could also be caused by, both the server and the client taking an item,

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's very strange, if there…
Sat, 03/29/2025 - 00:16

It's very strange, if there is 1 item in the inventory cell, then it plants 2 fields.
And if there are 3 items, then all 6 fields.

hmm. Both server and client, maybe I'll try to export the mod and try it on minecraft without Mcreator.

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried it on pure minecraft…
Sat, 03/29/2025 - 00:32

I tried it on pure minecraft and unfortunately the item count doesn't work.
If there are 2 items in the slot, it plants 4.
And if there are 3 items, it plants 6.
Hmm, I don't understand why it multiplies...

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you use a block: If / not…
Sat, 03/29/2025 - 00:50

If you use a block: If / not / Is provided world client-side.  
Even if there is one item in the inventory cell, the imprisonment can be eternal until I stop the entity. o_0