i want to add a trident at player position but nothing happen.
@SubscribeEvent
public void onClientTickEvent(final TickEvent.ClientTickEvent event)
{
if(event.phase != TickEvent.Phase.END) return;
Minecraft minecraft = Minecraft.getInstance();
if(minecraft.player == null) return;
PlayerEntity player = minecraft.player;
ItemStack mainHand = player.getHeldItemMainhand();
if(KeyBindingHandler.throw_saber.isPressed() && mainHand.getItem() instanceof BeamSaber)
{
TridentEntity trident = new TridentEntity(minecraft.world,player,mainHand);
minecraft.world.addEntity(trident);
}
}