Need help with a trigger related issue

Started by CaptainShark on Wed, 06/15/2022 - 15:48

Topic category: Help with modding (Java Edition)

Last seen on 08:32, 8. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Need help with a trigger related issue
Wed, 06/15/2022 - 16:20 (edited)

I have it set up so light is being created based off entity tick updates for 2 mobs which works. The issue is as soon as they get in water it lags and crashes the game, the way I have been killing other versions of this type of mob when touching water was based off the same trigger that makes the light. I tried making it check if the mob is in water but then it stopped being compatible.

Is there a way to use "if" blocks to not trigger the light procedure while in water?

123

Edit: It also seems to destroy blocks it is on if it is half blocks/ dirt path blocks and crashes the game as well which is sort of fixed but then it still crashes in water/worlds crash while loading them back in + it can now delete the block above itself which is not ideal

Edited by CaptainShark on Wed, 06/15/2022 - 16:20
Last seen on 02:47, 17. Jul 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Using wait blocks on tick…
Wed, 06/29/2022 - 13:51

Using wait blocks on tick updates always seems sketchy to me, I'd personally stay away from that. As for testing if the entity is in water - I'm pretty sure you can check if submerged height > height of event entity. I'm not able to access the software to check this for validity but these blocks should be in the entity data tab?

Using wait blocks on tick…
Wed, 06/29/2022 - 14:17

Using wait blocks on tick updates always seems sketchy to me, I'd personally stay away from that.

200% agree, it is calling for trouble in 99.9% of cases

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Algorithm:-   step1: first…
Fri, 07/15/2022 - 13:06

Algorithm:-

 

step1: first check the block and save it in a block-state variable 

step2: place light block in its place

step3: replace the block with the block-state variable instantly

===========================================================================

it might cause lag and flickering 

 

I haven't tested it 

 

might work

Last seen on 08:32, 8. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
At the moment I have it…
Fri, 07/15/2022 - 13:09

At the moment I have it working and am not coming across any bugs/issues yet. I am going to come back to previous mods to touch them up when I understand coding better/ get more advice/examples on my updated post

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
also instead of drown…
Fri, 07/15/2022 - 14:03

also instead of drown damaging it 200x you can just make it despawn which creates no particles and reduces lag

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
and doesn't play the death…
Fri, 07/15/2022 - 14:04

and doesn't play the death animation

Last seen on 08:32, 8. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Despawning a mob won't make…
Fri, 07/15/2022 - 14:11

Despawning a mob won't make it drop it's loot though will it? The mobs it is damaging drop their summon item whenever they die so they aren't lost

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
no it won't
Fri, 07/15/2022 - 14:21

no it won't

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
but why exactly do you want…
Fri, 07/15/2022 - 14:22

but why exactly do you want them to drop stuff from contact with water anyways?? 

Last seen on 16:20, 4. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
its okay if you do
Fri, 07/15/2022 - 14:22

its okay if you do

Last seen on 08:32, 8. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
there are 5 slime mobs, 3…
Fri, 07/15/2022 - 14:30

there are 5 slime mobs, 3 die when they make contact with water. every way the slimes die they always drop their summon item