Created
December 28, 2021 06:28
-
-
Save WOSAJ/6e4516f6e97fc9eb0476f9360982f2c7 to your computer and use it in GitHub Desktop.
Don't work...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package discord.wosaj.zen_horizon.items.ranged; | |
import net.minecraft.world.entity.LivingEntity; | |
import net.minecraft.world.entity.projectile.LargeFireball; | |
import net.minecraft.world.item.*; | |
import net.minecraft.world.level.Level; | |
public class ZENSpear extends Item { | |
public ZENSpear() { | |
super(new Properties() | |
.tab(CreativeModeTab.TAB_COMBAT) | |
.durability(1024)); | |
} | |
@Override | |
public void onUseTick(Level level, LivingEntity entity, ItemStack p_41430_, int p_41431_) { | |
LargeFireball fireball = new LargeFireball( | |
level, | |
entity, | |
entity.getX(), | |
entity.getY(), | |
entity.getZ(), | |
4); | |
fireball.shootFromRotation( | |
entity, | |
entity.getXRot(), | |
entity.getYRot(), | |
(float) entity.getX(), | |
(float) entity.getY(), | |
(float) entity.getZ()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment