How would i make a bullet break a glass block?

Started by supermj767 on

Topic category: Help with modding (Java Edition)

Last seen on 14:18, 29. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would i make a bullet break a glass block?

I want to make my guns in my gun mod be able to break glass when the bullet hits it but it doesent work iv'e tried everything, i made a procedure on "when bullet hits block" Break block (If is type "Glass") but it just breaks only at the players position not where the bullet landed,

Its tracking the players position not the bullets position,

so basically i need a procedure that will break a glass block when a bullet hits it 

Thank you!
 

Last seen on 19:13, 3. Apr 2022
Joined Jul 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure Trigger (2020.1):…
Tue, 03/24/2020 - 16:16

Procedure Trigger (2020.1): When bullet hits block

In procedure: "If Get block at x y z = glass: Place air at x y z"

Looks like this:

https://cdn.discordapp.com/attachments/348149652505231381/692044101708808202/unknown.png

Last seen on 19:13, 3. Apr 2022
Joined Jul 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh wait it's tracking player…
Tue, 03/24/2020 - 16:18

Oh wait it's tracking player position instead of bullet position for you... strange

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can't really do this…
Tue, 03/24/2020 - 16:39

You can't really do this effectively without using custom code, really. The only way to do this would be to remove a 3x3 area while the bullet is flying.

Last seen on 14:18, 29. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah it is but thanks anyway…
Tue, 03/24/2020 - 17:32

Yeah it is but thanks anyway :)

Last seen on 14:18, 29. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay that's fine Thank you
Tue, 03/24/2020 - 17:33

Okay that's fine Thank you

Last seen on 19:52, 13. Mar 2023
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can also use explosion…
Sat, 01/16/2021 - 17:15

You can also use explosion with very small power it's 0,3. It will break glass and other things which will broke in reality like comparators, lamps etc. Personally I use this trick. You can check more in minecraft wiki about explosions here: https://minecraft.gamepedia.com/Explosion

Last seen on 14:18, 29. Mar 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I cant check the position of…
Mon, 01/18/2021 - 03:07

I cant check the position of the bullet, so this will not work.

Last seen on 10:47, 23. Aug 2021
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did same but it effect…
Sat, 03/06/2021 - 13:09

I did same but it effect random nearby blocks instead the one that i hitted