public class ForgeHooks
extends java.lang.Object
Constructor and Description |
---|
ForgeHooks() |
Modifier and Type | Method and Description |
---|---|
static float |
blockStrength(IBlockState state,
EntityPlayer player,
World world,
BlockPos pos) |
static boolean |
canHarvestBlock(Block block,
EntityPlayer player,
IBlockAccess world,
BlockPos pos) |
static boolean |
canToolHarvestBlock(IBlockAccess world,
BlockPos pos,
ItemStack stack) |
static NonNullList<ItemStack> |
defaultRecipeGetRemainingItems(InventoryCrafting inv)
Default implementation of IRecipe.func_179532_b {getRemainingItems} because
this is just copy pasted over a lot of recipes.
|
static LootEntry |
deserializeJsonLootEntry(java.lang.String type,
com.google.gson.JsonObject json,
int weight,
int quality,
LootCondition[] conditions) |
static ItemStack |
getContainerItem(ItemStack stack) |
static EntityPlayer |
getCraftingPlayer() |
static float |
getEnchantPower(World world,
BlockPos pos) |
static ItemStack |
getGrassSeed(java.util.Random rand,
int fortune) |
static java.lang.String |
getLootEntryType(LootEntry entry) |
static int |
getLootingLevel(Entity target,
Entity killer,
DamageSource cause) |
static int |
getLootingLevel(EntityLivingBase target,
DamageSource cause,
int level) |
static double |
getPlayerVisibilityDistance(EntityPlayer player,
double xzDistance,
double maxXZDistance) |
static int |
getTotalArmorValue(EntityPlayer player) |
static boolean |
isInsideOfMaterial(Material material,
Entity entity,
BlockPos pos) |
static boolean |
isLivingOnLadder(IBlockState state,
World world,
BlockPos pos,
EntityLivingBase entity) |
static boolean |
isToolEffective(IBlockAccess world,
BlockPos pos,
ItemStack stack) |
static LootTable |
loadLootTable(com.google.gson.Gson gson,
ResourceLocation name,
java.lang.String data,
boolean custom) |
static ITextComponent |
newChatWithLinks(java.lang.String string) |
static ITextComponent |
newChatWithLinks(java.lang.String string,
boolean allowMissingHeader) |
static boolean |
onAnvilChange(ContainerRepair container,
ItemStack left,
ItemStack right,
IInventory outputSlot,
java.lang.String name,
int baseCost) |
static float |
onAnvilRepair(EntityPlayer player,
ItemStack output,
ItemStack left,
ItemStack right) |
static int |
onBlockBreakEvent(World world,
GameType gameType,
EntityPlayerMP entityPlayer,
BlockPos pos) |
static void |
onCropsGrowPost(World worldIn,
BlockPos pos,
IBlockState state,
IBlockState blockState) |
static boolean |
onCropsGrowPre(World worldIn,
BlockPos pos,
IBlockState state,
boolean def) |
static void |
onEmptyClick(EntityPlayer player,
EnumHand hand) |
static void |
onEmptyLeftClick(EntityPlayer player) |
static void |
onEmptyLeftClick(EntityPlayer player,
ItemStack stack)
Deprecated.
|
static boolean |
onInteractEntity(EntityPlayer player,
Entity entity,
EnumHand hand) |
static boolean |
onInteractEntityAt(EntityPlayer player,
Entity entity,
RayTraceResult ray,
EnumHand hand) |
static boolean |
onInteractEntityAt(EntityPlayer player,
Entity entity,
Vec3d vec3d,
EnumHand hand) |
static boolean |
onItemRightClick(EntityPlayer player,
EnumHand hand) |
static PlayerInteractEvent.LeftClickBlock |
onLeftClickBlock(EntityPlayer player,
BlockPos pos,
EnumFacing face,
Vec3d hitVec) |
static boolean |
onLivingAttack(EntityLivingBase entity,
DamageSource src,
float amount) |
static boolean |
onLivingDeath(EntityLivingBase entity,
DamageSource src) |
static boolean |
onLivingDrops(EntityLivingBase entity,
DamageSource source,
java.util.ArrayList<EntityItem> drops,
int lootingLevel,
boolean recentlyHit) |
static float[] |
onLivingFall(EntityLivingBase entity,
float distance,
float damageMultiplier) |
static float |
onLivingHurt(EntityLivingBase entity,
DamageSource src,
float amount) |
static void |
onLivingJump(EntityLivingBase entity) |
static void |
onLivingSetAttackTarget(EntityLivingBase entity,
EntityLivingBase target) |
static boolean |
onLivingUpdate(EntityLivingBase entity) |
static boolean |
onNoteChange(TileEntityNote te,
byte old) |
static boolean |
onPickBlock(RayTraceResult target,
EntityPlayer player,
World world)
Called when a player uses 'pick block', calls new Entity and Block hooks.
|
static EnumActionResult |
onPlaceItemIntoWorld(ItemStack itemstack,
EntityPlayer player,
World world,
BlockPos pos,
EnumFacing side,
float hitX,
float hitY,
float hitZ,
EnumHand hand) |
static boolean |
onPlayerAttackTarget(EntityPlayer player,
Entity target) |
static EntityItem |
onPlayerTossEvent(EntityPlayer player,
ItemStack item,
boolean includeName) |
static PlayerInteractEvent.RightClickBlock |
onRightClickBlock(EntityPlayer player,
EnumHand hand,
BlockPos pos,
EnumFacing face,
Vec3d hitVec) |
static ITextComponent |
onServerChatEvent(NetHandlerPlayServer net,
java.lang.String raw,
ITextComponent comp) |
static boolean |
onThrowableImpact(EntityThrowable throwable,
RayTraceResult ray) |
static boolean |
onTravelToDimension(Entity entity,
int dimension) |
static Vec3d |
rayTraceEyeHitVec(EntityLivingBase entity,
double length) |
static RayTraceResult |
rayTraceEyes(EntityLivingBase entity,
double length) |
static java.lang.String |
readLootEntryName(com.google.gson.JsonObject json,
java.lang.String type) |
static java.lang.String |
readPoolName(com.google.gson.JsonObject json) |
static void |
setCraftingPlayer(EntityPlayer player) |
@Nonnull public static ItemStack getGrassSeed(java.util.Random rand, int fortune)
public static boolean canHarvestBlock(@Nonnull Block block, @Nonnull EntityPlayer player, @Nonnull IBlockAccess world, @Nonnull BlockPos pos)
public static boolean canToolHarvestBlock(IBlockAccess world, BlockPos pos, @Nonnull ItemStack stack)
public static float blockStrength(@Nonnull IBlockState state, @Nonnull EntityPlayer player, @Nonnull World world, @Nonnull BlockPos pos)
public static boolean isToolEffective(IBlockAccess world, BlockPos pos, @Nonnull ItemStack stack)
public static int getTotalArmorValue(EntityPlayer player)
public static boolean onPickBlock(RayTraceResult target, EntityPlayer player, World world)
public static void onLivingSetAttackTarget(EntityLivingBase entity, EntityLivingBase target)
public static boolean onLivingUpdate(EntityLivingBase entity)
public static boolean onLivingAttack(EntityLivingBase entity, DamageSource src, float amount)
public static float onLivingHurt(EntityLivingBase entity, DamageSource src, float amount)
public static boolean onLivingDeath(EntityLivingBase entity, DamageSource src)
public static boolean onLivingDrops(EntityLivingBase entity, DamageSource source, java.util.ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit)
@Nullable public static float[] onLivingFall(EntityLivingBase entity, float distance, float damageMultiplier)
public static int getLootingLevel(Entity target, @Nullable Entity killer, DamageSource cause)
public static int getLootingLevel(EntityLivingBase target, DamageSource cause, int level)
public static double getPlayerVisibilityDistance(EntityPlayer player, double xzDistance, double maxXZDistance)
public static boolean isLivingOnLadder(@Nonnull IBlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EntityLivingBase entity)
public static void onLivingJump(EntityLivingBase entity)
@Nullable public static EntityItem onPlayerTossEvent(@Nonnull EntityPlayer player, @Nonnull ItemStack item, boolean includeName)
@Nullable public static ITextComponent onServerChatEvent(NetHandlerPlayServer net, java.lang.String raw, ITextComponent comp)
public static ITextComponent newChatWithLinks(java.lang.String string)
public static ITextComponent newChatWithLinks(java.lang.String string, boolean allowMissingHeader)
public static int onBlockBreakEvent(World world, GameType gameType, EntityPlayerMP entityPlayer, BlockPos pos)
public static EnumActionResult onPlaceItemIntoWorld(@Nonnull ItemStack itemstack, @Nonnull EntityPlayer player, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ, @Nonnull EnumHand hand)
public static boolean onAnvilChange(ContainerRepair container, @Nonnull ItemStack left, @Nonnull ItemStack right, IInventory outputSlot, java.lang.String name, int baseCost)
public static float onAnvilRepair(EntityPlayer player, @Nonnull ItemStack output, @Nonnull ItemStack left, @Nonnull ItemStack right)
public static boolean onNoteChange(TileEntityNote te, byte old)
public static NonNullList<ItemStack> defaultRecipeGetRemainingItems(InventoryCrafting inv)
inv
- Crafting inventorypublic static void setCraftingPlayer(EntityPlayer player)
public static EntityPlayer getCraftingPlayer()
public static boolean isInsideOfMaterial(Material material, Entity entity, BlockPos pos)
public static boolean onPlayerAttackTarget(EntityPlayer player, Entity target)
public static boolean onTravelToDimension(Entity entity, int dimension)
@Nullable public static RayTraceResult rayTraceEyes(EntityLivingBase entity, double length)
@Nullable public static Vec3d rayTraceEyeHitVec(EntityLivingBase entity, double length)
public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, RayTraceResult ray, EnumHand hand)
public static boolean onInteractEntityAt(EntityPlayer player, Entity entity, Vec3d vec3d, EnumHand hand)
public static boolean onInteractEntity(EntityPlayer player, Entity entity, EnumHand hand)
public static boolean onItemRightClick(EntityPlayer player, EnumHand hand)
public static PlayerInteractEvent.LeftClickBlock onLeftClickBlock(EntityPlayer player, BlockPos pos, EnumFacing face, Vec3d hitVec)
public static PlayerInteractEvent.RightClickBlock onRightClickBlock(EntityPlayer player, EnumHand hand, BlockPos pos, EnumFacing face, Vec3d hitVec)
public static void onEmptyClick(EntityPlayer player, EnumHand hand)
public static void onEmptyLeftClick(EntityPlayer player)
@Deprecated public static void onEmptyLeftClick(EntityPlayer player, @Nonnull ItemStack stack)
onEmptyLeftClick(EntityPlayer)
@Nullable public static LootTable loadLootTable(com.google.gson.Gson gson, ResourceLocation name, java.lang.String data, boolean custom)
public static java.lang.String readPoolName(com.google.gson.JsonObject json)
public static java.lang.String readLootEntryName(com.google.gson.JsonObject json, java.lang.String type)
public static LootEntry deserializeJsonLootEntry(java.lang.String type, com.google.gson.JsonObject json, int weight, int quality, LootCondition[] conditions)
public static java.lang.String getLootEntryType(LootEntry entry)
public static boolean onThrowableImpact(EntityThrowable throwable, RayTraceResult ray)
public static boolean onCropsGrowPre(World worldIn, BlockPos pos, IBlockState state, boolean def)
public static void onCropsGrowPost(World worldIn, BlockPos pos, IBlockState state, IBlockState blockState)