How to make ranged item projectiles break through blocks

Started by Kvngsavage118 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make ranged item projectiles break through blocks
Wed, 08/30/2023 - 20:17 (edited)

So I'm making a mod where I have a ranged weapon that shoots a projectile and said projectile is supposed to break through blocks.  An example of what I am trying to reproduce would be something similar to hollow purple from orca's jujutsucraft mod, where the projectile launches and breaks through all blocks it touches rather than exploding on impact.  I would appreciate if I got some help on how to reproduce this.  I've tried the "remove block" command when projectile touches block procedure in conjunction with "wait x ticks to despawn" block as well.

Edited by Kvngsavage118 on Wed, 08/30/2023 - 20:17
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Kvngsavage118 did you…
Tue, 05/28/2024 - 12:32

@Kvngsavage118 did you figure this out? I need the same thing

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can remove blocks in a…
Tue, 05/28/2024 - 13:05

You can remove blocks in a small area around the projectile in the tick update trigger, so as the projectile is moving it will remove any blocks it gets close to

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think orca uses an entity…
Tue, 05/28/2024 - 13:20

I think orca uses an entity tho, do you know how I could push it forward?

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't find the tick…
Tue, 06/18/2024 - 11:27

I can't find the tick trigger can you please explain more about it ?

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I figured this out a while…
Sun, 06/23/2024 - 23:08

I figured this out a while ago.  You need to use the "attempt to override motion vector" of entity on its tick update.  You also need to override it based on your x,y, and z angle look vectors.