Make block react when arrow hits it

Started by LuckyBacon on Tue, 09/17/2019 - 01:44

Topic category: Help with MCreator's application

Last seen on 22:52, 17. Oct 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Make block react when arrow hits it
Tue, 09/17/2019 - 01:44

How can i make a block react and do things when an arrow (or bullet) is shot at it? For example, emit a redstone signal?

Last seen on 03:25, 18. Oct 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
hmm, i dont think this is…
Tue, 09/17/2019 - 02:25

hmm, i dont think this is possible.

You might be able to achieve…
Tue, 09/17/2019 - 09:26

You might be able to achieve this using on entity collides with block trigger and check if the entity is subtype of arrow and if it is, execute your desired action.

Last seen on 22:52, 17. Oct 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
There's no "Entity Collides…
Tue, 09/17/2019 - 22:52

There's no "Entity Collides With Block". And "Entity Collides In Block" wont do.
forgot to mention, this is for MC 1.12.

Last seen on 22:52, 17. Oct 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Since i cannot edit my post,…
Tue, 09/17/2019 - 23:24

Since i cannot edit my post, ill add one.
There is also no "arrow" for subtype. And if i try to change it to EntityArrow in the code, i get an error pointing at it.

If you add it in code, make…
Wed, 09/18/2019 - 06:20

If you add it in code, make sure to import it or press Ctrl + W for MCreator to import it for you.

I forgot that 1.9.0 is missing some entities from the list. All entities will be added in MCreator 1.9.1.

Last seen on 22:52, 17. Oct 2019
Joined Jan 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Yeah, i got it to compile…
Wed, 09/18/2019 - 23:34

Yeah, i got it to compile.
But it is not working. Block says "Entity Collides In Block", but in the code, it says "onEntityCollidedWithBlock" 
"With". Problem is, i need my block to be solid, and this will only work if i check the "pass through" box.

We do plan to add in block…
Thu, 09/19/2019 - 08:11

We do plan to add in block collision support in the future updates.