Skip to content

Instantly share code, notes, and snippets.

@WOSAJ
Created December 28, 2021 06:28
Show Gist options
  • Save WOSAJ/6e4516f6e97fc9eb0476f9360982f2c7 to your computer and use it in GitHub Desktop.
Save WOSAJ/6e4516f6e97fc9eb0476f9360982f2c7 to your computer and use it in GitHub Desktop.
Don't work...
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