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

Started by Zilver on Mon, 06/01/2020 - 11:34

Topic category: User side tutorials

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is there a way to toggle a block's collision on/off?
Mon, 06/01/2020 - 11:34

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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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.