Started by
RedWirePlatinum
on
Topic category: Feature requests and ideas for MCreator
As I previously mentioned in another post, you are currently unable to set an attack target of an entity to nothing. Changing it to itself will actually try making it attack itself
(Examples: Creepers will automatically ignite when the attack target is itself since it is TECHNICALLY close to its target.. which is itself. Ghasts and Skeletons will try shooting at itself but will not deal any damage)
Edited by RedWirePlatinum on Sat, 08/26/2023 - 03:33
In the meantime, this plugin has what you are looking for.
https://mcreator.net/plugin/95170/procedures-plus-forge-1165-1182-1192
First section has a block that changes an entities attack target to none. You need to pair it with the global trigger "Entity Sets its attack target"
It also says that it works on a tick update, so this works. thank u
So in the newest version of Mcreator (mcreator version 2023.2, and minecraft version 1.20 I believe) this plugin does not work, for the "selected generator does not support _______ block line will be skipped" error. However if you use the block
Set the attack target of (*event/target entity) to (Get nearest entity at x: (x) y: (y) z: (z) in square cube with size (0.1) of type (**Block display))
* You can change Event/target entity to whatever the F*** you want.
** You can change this drop down to be anything you want too, but making it something like a block display, which are very rarely going to be within 0.1 block of your entity, will ensure you don't get bugs (but what do I know?)
Doing these things will trick the game into making it a Null value almost every time which technically it doesn't want you to do that bc IDK but in this case we can just force it
P.S. If you didn't know null bascally stands for nothing
I've been trying forever to make a Bee smoker to make the bees not aggroed at you if you have angered them. NOTHING was working. Then I came to this little forum and it helped me come up with the code idea you see above, so I would like to thank all of the above members that wrote something (excluding myself) you ultimately lead to my idea.
UPDATE:
You don't need the procedures plus plugin (technically), you can just use a custom code snippet and paste this into it:
if (entity instanceof Mob _entity) _entity.setTarget(null);
this will set the attack target of the target entity to nothing. to make it the source entity, replace
if (entity
withif sourceentity
Sorry to bring this again but i tried that code and didnt work for me
what am i doing wrong?
the if condition is working as intended but mobs are still able to see me from beyond.
I tried to make a procedure that reduces mobs awareness of a player sneaking to 4 blocks.