// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.core.event.events.player;

import com.hypixel.hytale.server.core.entity.entities.Player;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.protocol.MouseMotionEvent;
import com.hypixel.hytale.protocol.Vector2f;
import com.hypixel.hytale.server.core.entity.Entity;
import com.hypixel.hytale.math.vector.Vector3i;
import com.hypixel.hytale.server.core.asset.type.item.config.Item;
import com.hypixel.hytale.event.ICancellable;

public class PlayerMouseMotionEvent extends PlayerEvent<Void> implements ICancellable
{
    private final long clientUseTime;
    private final Item itemInHand;
    private final Vector3i targetBlock;
    private final Entity targetEntity;
    private final Vector2f screenPoint;
    private final MouseMotionEvent mouseMotion;
    private boolean cancelled;
    
    public PlayerMouseMotionEvent(@Nonnull final Ref<EntityStore> ref, @Nonnull final Player player, final long clientUseTime, final Item itemInHand, final Vector3i targetBlock, final Entity targetEntity, final Vector2f screenPoint, final MouseMotionEvent mouseMotion) {
        super(ref, player);
        this.clientUseTime = clientUseTime;
        this.itemInHand = itemInHand;
        this.targetBlock = targetBlock;
        this.targetEntity = targetEntity;
        this.screenPoint = screenPoint;
        this.mouseMotion = mouseMotion;
    }
    
    @Override
    public boolean isCancelled() {
        return this.cancelled;
    }
    
    @Override
    public void setCancelled(final boolean cancelled) {
        this.cancelled = cancelled;
    }
    
    public long getClientUseTime() {
        return this.clientUseTime;
    }
    
    public Item getItemInHand() {
        return this.itemInHand;
    }
    
    public Vector3i getTargetBlock() {
        return this.targetBlock;
    }
    
    public Entity getTargetEntity() {
        return this.targetEntity;
    }
    
    public Vector2f getScreenPoint() {
        return this.screenPoint;
    }
    
    public MouseMotionEvent getMouseMotion() {
        return this.mouseMotion;
    }
    
    @Nonnull
    @Override
    public String toString() {
        return "PlayerMouseMotionEvent{clientUseTime=" + this.clientUseTime + ", itemInHand=" + String.valueOf(this.itemInHand) + ", targetBlock=" + String.valueOf(this.targetBlock) + ", targetEntity=" + String.valueOf(this.targetEntity) + ", screenPoint=" + String.valueOf(this.screenPoint) + ", mouseMotion=" + String.valueOf(this.mouseMotion) + ", cancelled=" + this.cancelled + "} " + super.toString();
    }
}
