2018-09-12 01:29:49 +02:00
|
|
|
package com.minelittlepony.unicopia.spell;
|
|
|
|
|
2019-01-20 00:07:59 +01:00
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
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 {
|
2019-01-20 00:07:59 +01:00
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
/**
|
|
|
|
* Triggered when the player right clicks a block
|
2019-01-20 00:07:59 +01:00
|
|
|
*
|
2018-09-12 01:29:49 +02:00
|
|
|
* @param stack The current itemstack
|
2019-01-22 17:39:30 +01:00
|
|
|
* @param affinity The affinity of the casting artifact
|
2018-09-12 01:29:49 +02:00
|
|
|
* @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
|
2019-01-20 00:07:59 +01:00
|
|
|
*
|
2018-09-12 01:29:49 +02:00
|
|
|
* @return ActionResult for the type of action to perform
|
|
|
|
*/
|
2019-01-26 18:28:21 +01:00
|
|
|
SpellCastResult onUse(ItemStack stack, SpellAffinity affinity, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ);
|
2019-01-20 00:07:59 +01:00
|
|
|
|
2018-09-12 01:29:49 +02:00
|
|
|
/**
|
|
|
|
* Triggered when the player right clicks
|
2019-01-20 00:07:59 +01:00
|
|
|
*
|
|
|
|
* @param stack The current itemstack
|
2019-01-22 17:39:30 +01:00
|
|
|
* @param affinity The affinity of the casting artifact
|
2018-09-12 01:29:49 +02:00
|
|
|
* @param player The player
|
|
|
|
* @param world The player's world
|
|
|
|
* @param hitEntity The entity in focus, if any
|
2019-01-20 00:07:59 +01:00
|
|
|
*
|
2018-09-12 01:29:49 +02:00
|
|
|
* @return ActionResult for the type of action to perform
|
|
|
|
*/
|
2019-01-26 18:28:21 +01:00
|
|
|
SpellCastResult onUse(ItemStack stack, SpellAffinity affinity, EntityPlayer player, World world, @Nonnull Entity hitEntity);
|
2018-09-12 01:29:49 +02:00
|
|
|
}
|