Unicopia/src/main/java/com/minelittlepony/unicopia/spell/IUseAction.java

44 lines
1.3 KiB
Java
Raw Normal View History

2018-09-12 01:29:49 +02:00
package com.minelittlepony.unicopia.spell;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
/**
* Interface for right-click actions.
*
*/
public interface IUseAction {
/**
* Triggered when the player right clicks a block
*
* @param stack The current itemstack
* @param player The player
* @param world The player's world
* @param pos The location clicked
* @param side The side of the block clicked
* @param hitX X offset inside the block
* @param hitY Y offset inside the block
* @param hitZ Z offset inside the block
*
* @return ActionResult for the type of action to perform
*/
2018-09-20 22:49:10 +02:00
public SpellCastResult onUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ);
2018-09-12 01:29:49 +02:00
/**
* Triggered when the player right clicks
*
* @param stack The current itemstack
* @param player The player
* @param world The player's world
* @param hitEntity The entity in focus, if any
*
* @return ActionResult for the type of action to perform
*/
2018-09-20 22:49:10 +02:00
public SpellCastResult onUse(ItemStack stack, EntityPlayer player, World world, Entity hitEntity);
2018-09-12 01:29:49 +02:00
}