How to make a custom block do damage to a player standing on it even if they are sneaking

Started by RoboMan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a custom block do damage to a player standing on it even if they are sneaking

I am aware how to make a block that does damage to entities standing on it, but not entities that are sneaking on it. How would I do this?

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
player tick update if block…
Sun, 10/03/2021 - 02:31

player tick update

if block at X Y - 1 Z = BLOCK

do damage event target entity etc etc

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried this, but it does…
Sun, 10/03/2021 - 05:19

I tried this, but it does constant damage to me regardless if I'm standing on the block or not.

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it shouldn't do that, but…
Sun, 10/03/2021 - 05:24

it shouldn't do that, but can't you just put it on trigger Entity steps on Block?

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I could, but regardless of…
Sun, 10/03/2021 - 05:26

I could, but regardless of what I do, it always makes it so that when you sneak, you don't take damage. 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then make the trigger as I…
Sun, 10/03/2021 - 05:34

then

make the trigger as I said

and on Player Tick Update if event target entity is sneaking AND block at X Y - 1 Z BLOCK

etc etc etc

but make sure to have both procedures

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Strange. That did not work…
Sun, 10/03/2021 - 06:01

Strange. That did not work either. I will continue to try and find a solution, but if you have any more suggestions, I'm all ears.