public class ForgeEventFactory
extends java.lang.Object
Constructor and Description |
---|
ForgeEventFactory() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canCreateFluidSource(World world,
BlockPos pos,
BlockState state,
boolean def) |
static net.minecraftforge.eventbus.api.Event.Result |
canEntityDespawn(MobEntity entity) |
static net.minecraftforge.eventbus.api.Event.Result |
canEntitySpawn(MobEntity entity,
IWorld world,
double x,
double y,
double z,
AbstractSpawner spawner,
SpawnReason spawnReason) |
static boolean |
canEntitySpawnSpawner(MobEntity entity,
World world,
float x,
float y,
float z,
AbstractSpawner spawner) |
static boolean |
canEntityUpdate(Entity entity) |
static boolean |
canMountEntity(Entity entityMounting,
Entity entityBeingMounted,
boolean isMounting) |
static boolean |
doPlayerHarvestCheck(PlayerEntity player,
BlockState state,
boolean success) |
static boolean |
doSpecialSpawn(MobEntity entity,
World world,
float x,
float y,
float z,
AbstractSpawner spawner,
SpawnReason spawnReason) |
static float |
fireBlockHarvesting(NonNullList<ItemStack> drops,
World world,
BlockPos pos,
BlockState state,
int fortune,
float dropChance,
boolean silkTouch,
PlayerEntity player) |
static void |
fireChunkWatch(boolean wasLoaded,
boolean load,
ServerPlayerEntity entity,
ChunkPos chunkpos,
ServerWorld world) |
static void |
fireChunkWatch(boolean watch,
ServerPlayerEntity entity,
ChunkPos chunkpos,
ServerWorld world) |
static BlockState |
fireFluidPlaceBlockEvent(IWorld world,
BlockPos pos,
BlockPos liquidPos,
BlockState state) |
static void |
firePlayerLoadingEvent(PlayerEntity player,
java.io.File playerDirectory,
java.lang.String uuidString) |
static void |
firePlayerLoadingEvent(PlayerEntity player,
IPlayerFileData playerFileData,
java.lang.String uuidString) |
static void |
firePlayerSavingEvent(PlayerEntity player,
java.io.File playerDirectory,
java.lang.String uuidString) |
static boolean |
fireSleepingLocationCheck(LivingEntity player,
BlockPos sleepingLocation) |
static boolean |
fireSleepingTimeCheck(PlayerEntity player,
java.util.Optional<BlockPos> sleepingLocation) |
static ZombieEvent.SummonAidEvent |
fireZombieSummonAid(ZombieEntity zombie,
World world,
int x,
int y,
int z,
LivingEntity attacker,
double summonChance) |
private static CapabilityDispatcher |
gatherCapabilities(AttachCapabilitiesEvent<?> event,
ICapabilityProvider parent) |
static <T extends ICapabilityProvider> |
gatherCapabilities(java.lang.Class<? extends T> type,
T provider) |
static <T extends ICapabilityProvider> |
gatherCapabilities(java.lang.Class<? extends T> type,
T provider,
ICapabilityProvider parent) |
static boolean |
gatherCollisionBoxes(World world,
Entity entity,
AxisAlignedBB aabb,
java.util.List<AxisAlignedBB> outList) |
static float |
getBreakSpeed(PlayerEntity player,
BlockState state,
float original,
BlockPos pos) |
static int |
getExperienceDrop(LivingEntity entity,
PlayerEntity attackingPlayer,
int originalExperience) |
static int |
getItemBurnTime(ItemStack itemStack,
int burnTime) |
static int |
getMaxSpawnPackSize(MobEntity entity) |
static boolean |
getMobGriefingEvent(World world,
Entity entity) |
static ITextComponent |
getPlayerDisplayName(PlayerEntity player,
ITextComponent username) |
static java.lang.String |
getPlayerDisplayName(PlayerEntity player,
java.lang.String username)
Deprecated.
|
static java.util.List<Biome.SpawnListEntry> |
getPotentialSpawns(IWorld world,
EntityClassification type,
BlockPos pos,
java.util.List<Biome.SpawnListEntry> oldList) |
static LootTable |
loadLootTable(ResourceLocation name,
LootTable table,
LootTableManager lootTableManager) |
static boolean |
onAnimalTame(AnimalEntity animal,
PlayerEntity tamer) |
static int |
onApplyBonemeal(PlayerEntity player,
World world,
BlockPos pos,
BlockState state,
ItemStack stack) |
static int |
onArrowLoose(ItemStack stack,
World world,
PlayerEntity player,
int charge,
boolean hasAmmo) |
static ActionResult<ItemStack> |
onArrowNock(ItemStack item,
World world,
PlayerEntity player,
Hand hand,
boolean hasAmmo) |
static boolean |
onBlockPlace(Entity entity,
BlockSnapshot blockSnapshot,
Direction direction) |
static ActionResult<ItemStack> |
onBucketUse(PlayerEntity player,
World world,
ItemStack stack,
RayTraceResult target) |
static ITextComponent |
onClientChat(ChatType type,
ITextComponent message) |
static java.lang.String |
onClientSendMessage(java.lang.String message) |
static boolean |
onCreateWorldSpawn(World world,
WorldSettings settings) |
static int |
onEnchantmentLevelSet(World world,
BlockPos pos,
int enchantRow,
int power,
ItemStack itemStack,
int level) |
static boolean |
onEntityDestroyBlock(LivingEntity entity,
BlockPos pos,
BlockState state) |
static boolean |
onEntityStruckByLightning(Entity entity,
LightningBoltEntity bolt) |
static void |
onExplosionDetonate(World world,
Explosion explosion,
java.util.List<Entity> list,
double diameter) |
static boolean |
onExplosionStart(World world,
Explosion explosion) |
static int |
onHoeUse(ItemUseContext context) |
static int |
onItemExpire(ItemEntity entity,
ItemStack item) |
static int |
onItemPickup(ItemEntity entityItem,
PlayerEntity player) |
static ItemTooltipEvent |
onItemTooltip(ItemStack itemStack,
PlayerEntity entityPlayer,
java.util.List<ITextComponent> list,
ITooltipFlag flags) |
static ItemStack |
onItemUseFinish(LivingEntity entity,
ItemStack item,
int duration,
ItemStack result) |
static int |
onItemUseStart(LivingEntity entity,
ItemStack item,
int duration) |
static int |
onItemUseTick(LivingEntity entity,
ItemStack item,
int duration) |
static float |
onLivingHeal(LivingEntity entity,
float amount) |
static boolean |
onMultiBlockPlace(Entity entity,
java.util.List<BlockSnapshot> blockSnapshots,
Direction direction) |
static BlockEvent.NeighborNotifyEvent |
onNeighborNotify(World world,
BlockPos pos,
BlockState state,
java.util.EnumSet<Direction> notifiedSides,
boolean forceRedstoneUpdate) |
static boolean |
onPistonMovePost(World world,
BlockPos pos,
Direction direction,
boolean extending) |
static boolean |
onPistonMovePre(World world,
BlockPos pos,
Direction direction,
boolean extending) |
static void |
onPlayerBrewedPotion(PlayerEntity player,
ItemStack stack) |
static void |
onPlayerClone(PlayerEntity player,
PlayerEntity oldPlayer,
boolean wasDeath) |
static void |
onPlayerDestroyItem(PlayerEntity player,
ItemStack stack,
Hand hand) |
static void |
onPlayerFall(PlayerEntity player,
float distance,
float multiplier) |
static PlayerEntity.SleepResult |
onPlayerSleepInBed(PlayerEntity player,
java.util.Optional<BlockPos> pos) |
static boolean |
onPlayerSpawnSet(PlayerEntity player,
BlockPos pos,
boolean forced) |
static void |
onPlayerWakeup(PlayerEntity player,
boolean wakeImmediately,
boolean updateWorldFlag) |
static PlaySoundAtEntityEvent |
onPlaySoundAtEntity(Entity entity,
SoundEvent name,
SoundCategory category,
float volume,
float pitch) |
static boolean |
onPotionAttemptBrew(NonNullList<ItemStack> stacks) |
static void |
onPotionBrewed(NonNullList<ItemStack> brewingItemStacks) |
static boolean |
onProjectileImpact(AbstractArrowEntity arrow,
RayTraceResult ray) |
static boolean |
onProjectileImpact(DamagingProjectileEntity fireball,
RayTraceResult ray) |
static boolean |
onProjectileImpact(Entity entity,
RayTraceResult ray) |
static boolean |
onProjectileImpact(FireworkRocketEntity fireworkRocket,
RayTraceResult ray) |
static boolean |
onProjectileImpact(ThrowableEntity throwable,
RayTraceResult ray) |
static long |
onSleepFinished(ServerWorld world,
long newTime,
long minTime) |
static void |
onStartEntityTracking(Entity entity,
PlayerEntity player) |
static void |
onStopEntityTracking(Entity entity,
PlayerEntity player) |
static boolean |
onTrySpawnPortal(IWorld world,
BlockPos pos,
NetherPortalBlock.Size size) |
static boolean |
onUseItemStop(LivingEntity entity,
ItemStack item,
int duration) |
static boolean |
renderBlockOverlay(PlayerEntity player,
MatrixStack mat,
RenderBlockOverlayEvent.OverlayType type,
BlockState block,
BlockPos pos) |
static boolean |
renderFireOverlay(PlayerEntity player,
MatrixStack mat) |
static boolean |
renderWaterOverlay(PlayerEntity player,
MatrixStack mat) |
static boolean |
saplingGrowTree(IWorld world,
java.util.Random rand,
BlockPos pos) |
public static boolean onMultiBlockPlace(@Nullable Entity entity, java.util.List<BlockSnapshot> blockSnapshots, Direction direction)
public static boolean onBlockPlace(@Nullable Entity entity, @Nonnull BlockSnapshot blockSnapshot, @Nonnull Direction direction)
public static BlockEvent.NeighborNotifyEvent onNeighborNotify(World world, BlockPos pos, BlockState state, java.util.EnumSet<Direction> notifiedSides, boolean forceRedstoneUpdate)
public static boolean doPlayerHarvestCheck(PlayerEntity player, BlockState state, boolean success)
public static float getBreakSpeed(PlayerEntity player, BlockState state, float original, BlockPos pos)
public static void onPlayerDestroyItem(PlayerEntity player, @Nonnull ItemStack stack, @Nullable Hand hand)
public static net.minecraftforge.eventbus.api.Event.Result canEntitySpawn(MobEntity entity, IWorld world, double x, double y, double z, AbstractSpawner spawner, SpawnReason spawnReason)
public static boolean canEntitySpawnSpawner(MobEntity entity, World world, float x, float y, float z, AbstractSpawner spawner)
public static boolean doSpecialSpawn(MobEntity entity, World world, float x, float y, float z, AbstractSpawner spawner, SpawnReason spawnReason)
public static net.minecraftforge.eventbus.api.Event.Result canEntityDespawn(MobEntity entity)
public static int getItemBurnTime(@Nonnull ItemStack itemStack, int burnTime)
public static int getExperienceDrop(LivingEntity entity, PlayerEntity attackingPlayer, int originalExperience)
@Nullable public static java.util.List<Biome.SpawnListEntry> getPotentialSpawns(IWorld world, EntityClassification type, BlockPos pos, java.util.List<Biome.SpawnListEntry> oldList)
public static int getMaxSpawnPackSize(MobEntity entity)
@Deprecated public static java.lang.String getPlayerDisplayName(PlayerEntity player, java.lang.String username)
getPlayerDisplayName(PlayerEntity, ITextComponent)
public static ITextComponent getPlayerDisplayName(PlayerEntity player, ITextComponent username)
public static float fireBlockHarvesting(NonNullList<ItemStack> drops, World world, BlockPos pos, BlockState state, int fortune, float dropChance, boolean silkTouch, PlayerEntity player)
public static BlockState fireFluidPlaceBlockEvent(IWorld world, BlockPos pos, BlockPos liquidPos, BlockState state)
public static ItemTooltipEvent onItemTooltip(ItemStack itemStack, @Nullable PlayerEntity entityPlayer, java.util.List<ITextComponent> list, ITooltipFlag flags)
public static ZombieEvent.SummonAidEvent fireZombieSummonAid(ZombieEntity zombie, World world, int x, int y, int z, LivingEntity attacker, double summonChance)
public static boolean onEntityStruckByLightning(Entity entity, LightningBoltEntity bolt)
public static int onItemUseStart(LivingEntity entity, ItemStack item, int duration)
public static int onItemUseTick(LivingEntity entity, ItemStack item, int duration)
public static boolean onUseItemStop(LivingEntity entity, ItemStack item, int duration)
public static ItemStack onItemUseFinish(LivingEntity entity, ItemStack item, int duration, ItemStack result)
public static void onStartEntityTracking(Entity entity, PlayerEntity player)
public static void onStopEntityTracking(Entity entity, PlayerEntity player)
public static void firePlayerLoadingEvent(PlayerEntity player, java.io.File playerDirectory, java.lang.String uuidString)
public static void firePlayerSavingEvent(PlayerEntity player, java.io.File playerDirectory, java.lang.String uuidString)
public static void firePlayerLoadingEvent(PlayerEntity player, IPlayerFileData playerFileData, java.lang.String uuidString)
@Nullable public static ITextComponent onClientChat(ChatType type, ITextComponent message)
@Nonnull public static java.lang.String onClientSendMessage(java.lang.String message)
public static int onHoeUse(ItemUseContext context)
public static int onApplyBonemeal(@Nonnull PlayerEntity player, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState state, @Nonnull ItemStack stack)
@Nullable public static ActionResult<ItemStack> onBucketUse(@Nonnull PlayerEntity player, @Nonnull World world, @Nonnull ItemStack stack, @Nullable RayTraceResult target)
public static boolean canEntityUpdate(Entity entity)
public static PlaySoundAtEntityEvent onPlaySoundAtEntity(Entity entity, SoundEvent name, SoundCategory category, float volume, float pitch)
public static int onItemExpire(ItemEntity entity, @Nonnull ItemStack item)
public static int onItemPickup(ItemEntity entityItem, PlayerEntity player)
public static boolean canMountEntity(Entity entityMounting, Entity entityBeingMounted, boolean isMounting)
public static boolean onAnimalTame(AnimalEntity animal, PlayerEntity tamer)
public static PlayerEntity.SleepResult onPlayerSleepInBed(PlayerEntity player, java.util.Optional<BlockPos> pos)
public static void onPlayerWakeup(PlayerEntity player, boolean wakeImmediately, boolean updateWorldFlag)
public static void onPlayerFall(PlayerEntity player, float distance, float multiplier)
public static boolean onPlayerSpawnSet(PlayerEntity player, BlockPos pos, boolean forced)
public static void onPlayerClone(PlayerEntity player, PlayerEntity oldPlayer, boolean wasDeath)
public static void onExplosionDetonate(World world, Explosion explosion, java.util.List<Entity> list, double diameter)
public static boolean onCreateWorldSpawn(World world, WorldSettings settings)
public static float onLivingHeal(LivingEntity entity, float amount)
public static boolean onPotionAttemptBrew(NonNullList<ItemStack> stacks)
public static void onPotionBrewed(NonNullList<ItemStack> brewingItemStacks)
public static void onPlayerBrewedPotion(PlayerEntity player, ItemStack stack)
public static boolean renderFireOverlay(PlayerEntity player, MatrixStack mat)
public static boolean renderWaterOverlay(PlayerEntity player, MatrixStack mat)
public static boolean renderBlockOverlay(PlayerEntity player, MatrixStack mat, RenderBlockOverlayEvent.OverlayType type, BlockState block, BlockPos pos)
@Nullable public static <T extends ICapabilityProvider> CapabilityDispatcher gatherCapabilities(java.lang.Class<? extends T> type, T provider)
@Nullable public static <T extends ICapabilityProvider> CapabilityDispatcher gatherCapabilities(java.lang.Class<? extends T> type, T provider, @Nullable ICapabilityProvider parent)
@Nullable private static CapabilityDispatcher gatherCapabilities(AttachCapabilitiesEvent<?> event, @Nullable ICapabilityProvider parent)
public static boolean fireSleepingLocationCheck(LivingEntity player, BlockPos sleepingLocation)
public static boolean fireSleepingTimeCheck(PlayerEntity player, java.util.Optional<BlockPos> sleepingLocation)
public static ActionResult<ItemStack> onArrowNock(ItemStack item, World world, PlayerEntity player, Hand hand, boolean hasAmmo)
public static int onArrowLoose(ItemStack stack, World world, PlayerEntity player, int charge, boolean hasAmmo)
public static boolean onProjectileImpact(Entity entity, RayTraceResult ray)
public static boolean onProjectileImpact(AbstractArrowEntity arrow, RayTraceResult ray)
public static boolean onProjectileImpact(DamagingProjectileEntity fireball, RayTraceResult ray)
public static boolean onProjectileImpact(ThrowableEntity throwable, RayTraceResult ray)
public static boolean onProjectileImpact(FireworkRocketEntity fireworkRocket, RayTraceResult ray)
public static LootTable loadLootTable(ResourceLocation name, LootTable table, LootTableManager lootTableManager)
public static boolean canCreateFluidSource(World world, BlockPos pos, BlockState state, boolean def)
public static boolean onTrySpawnPortal(IWorld world, BlockPos pos, NetherPortalBlock.Size size)
public static int onEnchantmentLevelSet(World world, BlockPos pos, int enchantRow, int power, ItemStack itemStack, int level)
public static boolean onEntityDestroyBlock(LivingEntity entity, BlockPos pos, BlockState state)
public static boolean gatherCollisionBoxes(World world, Entity entity, AxisAlignedBB aabb, java.util.List<AxisAlignedBB> outList)
public static boolean saplingGrowTree(IWorld world, java.util.Random rand, BlockPos pos)
public static void fireChunkWatch(boolean watch, ServerPlayerEntity entity, ChunkPos chunkpos, ServerWorld world)
public static void fireChunkWatch(boolean wasLoaded, boolean load, ServerPlayerEntity entity, ChunkPos chunkpos, ServerWorld world)
public static boolean onPistonMovePre(World world, BlockPos pos, Direction direction, boolean extending)
public static boolean onPistonMovePost(World world, BlockPos pos, Direction direction, boolean extending)
public static long onSleepFinished(ServerWorld world, long newTime, long minTime)