Is there a way to toggle a block's collision on/off?

Started by Zilver on

Topic category: User side tutorials

Last seen on 16:27, 16. May 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to toggle a block's collision on/off?

So, recently I had an idea for a block that involves it having its collision toggled off when powered by a redstone signal. Is there any way to achieve the desired effect using a set of procedures? Or would it have to be manually coded?

 

An explanation or solution would be appreciated.

 

 

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block.Properties…
Mon, 06/01/2020 - 14:42
Block.Properties#doesNotBlockMovement

That is how you turn off Collison, now in MCreator. You may want to make 2 blocks, 1 with and without Collison. 

Last seen on 16:27, 16. May 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah, so 2 options. 1)…
Mon, 06/01/2020 - 21:21

Ah, so 2 options.

1). Manually code it in to toggle.
2). Set an identical block at the block's coordinates, but this copy of the block has collision disabled.

Got it. But any idea how that first option would be packaged? I'm not too familiar with Java.

Last seen on 16:27, 16. May 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright. I've found a…
Tue, 06/02/2020 - 11:24

Alright. I've found a working solution to this problem. Thanks again.

Last seen on 17:13, 28. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey Zilver! did you achive?
Fri, 02/23/2024 - 16:24

Hey Zilver! did you achive?