mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Improve JavaDoc links, fix some broken JavaDocs (#2833)
Improve JavaDoc links, fix broken JavaDocs
This commit is contained in:
1 parent
9bb927dc64
commit
86baf7462f
62 files changed
+353
-163
No files matched your search
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event;
|
||||
|
||||
import net.minecraft.command.CommandHandler;
|
||||
import net.minecraftforge.client.ClientCommandHandler;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.command.ICommand;
|
||||
@@ -7,8 +10,8 @@ import net.minecraft.command.ICommandSender;
|
||||
|
||||
/**
|
||||
* CommandEvent is fired whenever a command is scheduled to be executed.
|
||||
* This event is fired during the invocation of CommandHandler#executeCommand(ICommandSender, String)
|
||||
* and ClientCommandHandler#executeCommand(ICommandSender, String). <br>
|
||||
* This event is fired during the invocation of {@link CommandHandler#executeCommand(ICommandSender, String)}
|
||||
* and {@link ClientCommandHandler#executeCommand(ICommandSender, String)}. <br>
|
||||
* <br>
|
||||
* {@link #command} contains the instance of ICommand which is representative of the currently executing command.<br>
|
||||
* {@link #sender} contains the instance of ICommandSender for the given command sender.<br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event;
|
||||
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.network.play.client.CPacketChatMessage;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -7,8 +10,8 @@ import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* ServerChatEvent is fired whenever a C01PacketChatMessage is processed. <br>
|
||||
* This event is fired via {@link ForgeHooks#onServerChatEvent(net.minecraft.network.NetHandlerPlayServer, String, ChatComponentTranslation)},
|
||||
* which is executed by the NetHandlerPlayServer#processChatMessage(net.minecraft.network.play.client.C01PacketChatMessage)<br>
|
||||
* This event is fired via {@link ForgeHooks#onServerChatEvent(NetHandlerPlayServer, String, ITextComponent)},
|
||||
* which is executed by the {@link NetHandlerPlayServer#processChatMessage(CPacketChatMessage)}<br>
|
||||
* <br>
|
||||
* {@link #username} contains the username of the player sending the chat message.<br>
|
||||
* {@link #message} contains the message being sent.<br>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.minecraftforge.event.brewing;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityBrewingStand;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
@@ -38,9 +40,9 @@ public class PotionBrewEvent extends Event
|
||||
* PotionBrewEvent.Pre is fired before vanilla brewing takes place.
|
||||
* All changes made to the event's array will be made to the TileEntity if the event is canceled.
|
||||
* <br>
|
||||
* The event is fired during the TileEntityBrewingStand#brewPotions() method invocation.<br>
|
||||
* The event is fired during the {@link TileEntityBrewingStand#brewPotions()} method invocation.<br>
|
||||
* <br>
|
||||
* {@link #brewingStacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.<br>
|
||||
* {@link #stacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.<br>
|
||||
* <br>
|
||||
* This event is {@link Cancelable}.<br>
|
||||
* If the event is not canceled, the vanilla brewing will take place instead of modded brewing.
|
||||
@@ -63,9 +65,9 @@ public class PotionBrewEvent extends Event
|
||||
/**
|
||||
* PotionBrewEvent.Post is fired when a potion is brewed in the brewing stand.
|
||||
* <br>
|
||||
* The event is fired during the TileEntityBrewingStand#brewPotions() method invocation.<br>
|
||||
* The event is fired during the {@link TileEntityBrewingStand#brewPotions()} method invocation.<br>
|
||||
* <br>
|
||||
* {@link #brewingStacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.<br>
|
||||
* {@link #stacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.<br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -47,7 +51,7 @@ public class EntityEvent extends Event
|
||||
/**
|
||||
* CanUpdate is fired when an Entity is being created. <br>
|
||||
* This event is fired whenever vanilla Minecraft determines that an entity<br>
|
||||
* cannot update in World#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean) <br>
|
||||
* cannot update in {@link World#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean)} <br>
|
||||
* <br>
|
||||
* {@link CanUpdate#canUpdate} contains the boolean value of whether this entity can update.<br>
|
||||
* If the modder decides that this Entity can be updated, they may change canUpdate to true, <br>
|
||||
@@ -79,7 +83,7 @@ public class EntityEvent extends Event
|
||||
/**
|
||||
* EnteringChunk is fired when an Entity enters a chunk. <br>
|
||||
* This event is fired whenever vanilla Minecraft determines that an entity <br>
|
||||
* is entering a chunk in Chunk#addEntity(net.minecraft.entity.Entity) <br>
|
||||
* is entering a chunk in {@link Chunk#addEntity(net.minecraft.entity.Entity)} <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* EntityJoinWorldEvent is fired when an Entity joins the world. <br>
|
||||
* This event is fired whenever an Entity is added to the world in
|
||||
* World#addLoadedEntities(java.util.List), World#joinEntityInSurroundings(Entity), and World#spawnEntityInWorld(Entity). <br>
|
||||
* {@link World#loadEntities(Collection)}, {@link WorldServer#loadEntities(Collection)} {@link World#joinEntityInSurroundings(Entity)}, and {@link World#spawnEntityInWorld(Entity)}. <br>
|
||||
* <br>
|
||||
* {@link #world} contains the world in which the entity is to join.<br>
|
||||
* <br>
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
@@ -7,7 +9,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
/**
|
||||
* EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.<br>
|
||||
* This event is fired whenever an EntityLightningBolt is updated to strike an Entity in
|
||||
* EntityLightningBolt#onUpdate() via {@link ForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt)}.<br>
|
||||
* {@link EntityLightningBolt#onUpdate()} via {@link ForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt)}.<br>
|
||||
* <br>
|
||||
* {@link #lightning} contains the instance of EntityLightningBolt attempting to strike an entity.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraftforge.event.entity;
|
||||
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
@@ -8,8 +13,7 @@ import net.minecraft.util.SoundEvent;
|
||||
/**
|
||||
* PlaySoundAtEntityEvent is fired a sound is to be played at an Entity<br>
|
||||
* This event is fired whenever a sound is set to be played at an Entity such as in
|
||||
* EntityPlayerSP#playSound(String, float, float), World#playSoundAtEntity(Entity, String, float, float),
|
||||
* and World#playerSoundToNearExcept(EntityPlayer, String, float, float).<br>
|
||||
* {@link EntityPlayerSP#playSound(SoundEvent, float, float)} and {@link World#playSound(EntityPlayer, double, double, double, SoundEvent, SoundCategory, float, float)}.<br>
|
||||
* <br>
|
||||
* {@link #name} contains the name of the sound to be played at the Entity.<br>
|
||||
* {@link #volume} contains the volume at which the sound is to be played originally.<br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -7,8 +10,8 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
/**
|
||||
* LivingAttackEvent is fired when a living Entity is attacked. <br>
|
||||
* This event is fired whenever an Entity is attacked in
|
||||
* EntityLivingBase#attackEntityFrom(DamageSource, float) and
|
||||
* EntityPlayer#attackEntityFrom(DamageSource, float). <br>
|
||||
* {@link EntityLivingBase#attackEntityFrom(DamageSource, float)} and
|
||||
* {@link EntityPlayer#attackEntityFrom(DamageSource, float)}. <br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingAttack(EntityLivingBase, DamageSource, float)}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -7,9 +11,9 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
/**
|
||||
* LivingDeathEvent is fired when an Entity dies. <br>
|
||||
* This event is fired whenever an Entity dies in
|
||||
* EntityLivingBase#onDeath(DamageSource),
|
||||
* EntityPlayer#onDeath(DamageSource), and
|
||||
* EntityPlayerMP#onDeath(DamageSource). <br>
|
||||
* {@link EntityLivingBase#onDeath(DamageSource)},
|
||||
* {@link EntityPlayer#onDeath(DamageSource)}, and
|
||||
* {@link EntityPlayerMP#onDeath(DamageSource)}. <br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingDeath(EntityLivingBase, DamageSource)}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -10,9 +13,9 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
/**
|
||||
* LivingDropsEvent is fired when an Entity's death causes dropped items to appear.<br>
|
||||
* This event is fired whenever an Entity dies and drops items in
|
||||
* EntityLivingBase#onDeath(DamageSource).<br>
|
||||
* {@link EntityLivingBase#onDeath(DamageSource)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList<EntityItem>, int, boolean, int)}.<br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean)}.<br>
|
||||
* <br>
|
||||
* {@link #source} contains the DamageSource that caused the drop to occur.<br>
|
||||
* {@link #drops} contains the ArrayList of EntityItems that will be dropped.<br>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityMagmaCube;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
|
||||
/**
|
||||
@@ -28,7 +33,7 @@ public class LivingEvent extends EntityEvent
|
||||
/**
|
||||
* LivingUpdateEvent is fired when an Entity is updated. <br>
|
||||
* This event is fired whenever an Entity is updated in
|
||||
* EntityLivingBase#onUpdate(). <br>
|
||||
* {@link EntityLivingBase#onUpdate()}. <br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingUpdate(EntityLivingBase)}.<br>
|
||||
* <br>
|
||||
@@ -48,8 +53,8 @@ public class LivingEvent extends EntityEvent
|
||||
/**
|
||||
* LivingJumpEvent is fired when an Entity jumps.<br>
|
||||
* This event is fired whenever an Entity jumps in
|
||||
* EntityLivingBase#jump(), EntityMagmaCube#jump(),
|
||||
* and EntityHorse#jump().<br>
|
||||
* {@link EntityLivingBase#jump()}, {@link EntityMagmaCube#jump()},
|
||||
* and {@link EntityHorse#jump()}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingJump(EntityLivingBase)}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
/**
|
||||
* LivingFallEvent is fired when an Entity is set to be falling.<br>
|
||||
* This event is fired whenever an Entity is set to fall in
|
||||
* EntityLivingBase#fall(float).<br>
|
||||
* {@link EntityLivingBase#fall(float, float)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingFall(EntityLivingBase, float)}.<br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingFall(EntityLivingBase, float, float)}.<br>
|
||||
* <br>
|
||||
* {@link #distance} contains the distance the Entity is to fall. If this event is canceled, this value is set to 0.0F.
|
||||
* <br>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
/**
|
||||
* LivingHealEvent is fired when an Entity is set to be healed. <br>
|
||||
* This event is fired whenever an Entity is healed in EntityLivingBase#heal(float)<br>
|
||||
* This event is fired whenever an Entity is healed in {@link EntityLivingBase#heal(float)}<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingHeal(EntityLivingBase, float)}.<br>
|
||||
* This event is fired via the {@link ForgeEventFactory#onLivingHeal(EntityLivingBase, float)}.<br>
|
||||
* <br>
|
||||
* {@link #amount} contains the amount of healing done to the Entity that was healed. <br>
|
||||
* <br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -7,8 +10,8 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
/**
|
||||
* LivingHurtEvent is fired when an Entity is set to be hurt. <br>
|
||||
* This event is fired whenever an Entity is hurt in
|
||||
* EntityLivingBase#damageEntity(DamageSource, float) and
|
||||
* EntityPlayer#damageEntity(DamageSource, float).<br>
|
||||
* {@link EntityLivingBase#damageEntity(DamageSource, float)} and
|
||||
* {@link EntityPlayer#damageEntity(DamageSource, float)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingHurt(EntityLivingBase, DamageSource, float)}.<br>
|
||||
* <br>
|
||||
|
||||
+6
-2
@@ -1,12 +1,16 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
/**
|
||||
* LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.<br>
|
||||
* This event is fired whenever an Entity sets a target to attack in
|
||||
* EntityLiving#setAttackTarget(EntityLivingBase) and
|
||||
* EntityLivingBase#setRevengeTarget(EntityLivingBase).<br>
|
||||
* {@link EntityLiving#setAttackTarget(EntityLivingBase)} and
|
||||
* {@link EntityLivingBase#setRevengeTarget(EntityLivingBase)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase)}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.world.WorldEntitySpawner;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -58,9 +62,9 @@ public class LivingSpawnEvent extends LivingEvent
|
||||
/**
|
||||
* SpecialSpawn is fired when an Entity is to be spawned from a mob spawner.<br>
|
||||
* This event is fired whenever an Entity is spawned in a mob spawner in<br>
|
||||
* SpawnerAnimals#findChunksForSpawning(WorldServer, boolean, boolean, boolean).<br>
|
||||
* {@link WorldEntitySpawner#findChunksForSpawning(WorldServer, boolean, boolean, boolean)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeHooks#doSpecialSpawn(EntityLiving, World, float, float, float)}.<br>
|
||||
* This event is fired via the {@link ForgeEventFactory#doSpecialSpawn(EntityLiving, World, float, float, float)}.<br>
|
||||
* <br>
|
||||
* This event is {@link Cancelable}.<br>
|
||||
* If this event is canceled, the Entity is not spawned.<br>
|
||||
|
||||
@@ -2,8 +2,14 @@ package net.minecraftforge.event.entity.living;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* ZombieEvent is fired whenever a zombie is spawned for aid.
|
||||
@@ -27,9 +33,9 @@ public class ZombieEvent extends EntityEvent {
|
||||
/**
|
||||
* SummonAidEvent is fired when a Zombie Entity is summoned.
|
||||
* This event is fired whenever a Zombie Entity is summoned in
|
||||
* EntityZombie#attackEntityFrom(DamageSource, float).
|
||||
* {@link EntityZombie#attackEntityFrom(DamageSource, float)}.
|
||||
*
|
||||
* This event is fired via the {@link ForgeHooks#fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double)}.
|
||||
* This event is fired via the {@link ForgeEventFactory#fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double)}.
|
||||
*
|
||||
* {@link #customSummonedAid} remains null, but can be populated with a custom EntityZombie which will be spawned.
|
||||
* {@link #world} contains the world that this summoning is occurring in.
|
||||
|
||||
@@ -2,11 +2,13 @@ package net.minecraftforge.event.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
/**
|
||||
* MinecartCollisionEvent is fired when a minecart collides with an Entity.
|
||||
* This event is fired whenever a minecraft collides in
|
||||
* EntityMinecart#applyEntityCollision(Entity).
|
||||
* {@link EntityMinecart#applyEntityCollision(Entity)}.
|
||||
*
|
||||
* {@link #collider} contains the Entity the Minecart collided with.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package net.minecraftforge.event.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* MinecartEvent is fired whenever an event involving minecart entities occurs. <br>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraftforge.event.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecartContainer;
|
||||
import net.minecraft.entity.item.EntityMinecartEmpty;
|
||||
import net.minecraft.entity.item.EntityMinecartFurnace;
|
||||
import net.minecraft.entity.item.EntityMinecartHopper;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -9,10 +14,11 @@ import net.minecraft.util.EnumHand;
|
||||
/**
|
||||
* MinecartInteractEvent is fired when a player interacts with a minecart. <br>
|
||||
* This event is fired whenever a player interacts with a minecart in
|
||||
* EntityMinecartContainer#interactFirst(EntityPlayer),
|
||||
* EntityMinecartEmpty#interactFirst(EntityPlayer)
|
||||
* EntityMinecartFurnace#interactFirst(EntityPlayer)
|
||||
* EntityMinecartHopper#interactFirst(EntityPlayer).<br>
|
||||
* {@link EntityMinecartContainer#processInitialInteract(EntityPlayer, ItemStack, EnumHand)},
|
||||
* {@link EntityMinecartEmpty#processInitialInteract(EntityPlayer, ItemStack, EnumHand)},
|
||||
* {@link EntityMinecartFurnace#processInitialInteract(EntityPlayer, ItemStack, EnumHand)},
|
||||
* {@link EntityMinecartHopper#processInitialInteract(EntityPlayer, ItemStack, EnumHand)},
|
||||
* etc.<br>
|
||||
* <br>
|
||||
* {@link #player} contains the EntityPlayer that is involved with this minecart interaction.<br>
|
||||
* <br>
|
||||
|
||||
@@ -2,11 +2,13 @@ package net.minecraftforge.event.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
/**
|
||||
* MinecartUpdateEvent is fired when a minecart is updated.<br>
|
||||
* This event is fired whenever a minecart is updated in
|
||||
* EntityMinecart#onUpdate().<br>
|
||||
* {@link EntityMinecart#onUpdate()}.<br>
|
||||
* <br>
|
||||
* {@link #pos} contains the coordinate of the track the entity is on {if applicable}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -8,7 +11,7 @@ import net.minecraft.world.World;
|
||||
/**
|
||||
* ArrowLooseEvent is fired when a player stops using a bow.<br>
|
||||
* This event is fired whenever a player stops using a bow in
|
||||
* ItemBow#onPlayerStoppedUsing(ItemStack, World, EntityPlayer, int).<br>
|
||||
* {@link ItemBow#onPlayerStoppedUsing(ItemStack, World, EntityLivingBase, int)}.<br>
|
||||
* <br>
|
||||
* {@link #bow} contains the ItemBow ItemStack that was used in this event.<br>
|
||||
* {@link #charge} contains the value for how much the player had charged before stopping the shot.<br>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
/**
|
||||
* ArrowNockEvent is fired when a player begins using a bow.<br>
|
||||
* This event is fired whenever a player begins using a bow in
|
||||
* ItemBow#onItemRightClick(ItemStack, World, EntityPlayer).<br>
|
||||
* {@link ItemBow#onItemRightClick(ItemStack, World, EntityPlayer, EnumHand)}.<br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -7,7 +8,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
/**
|
||||
* AttackEntityEvent is fired when a player attacks an Entity.<br>
|
||||
* This event is fired whenever a player attacks an Entity in
|
||||
* EntityPlayer#attackTargetEntityWithCurrentItem(Entity).<br>
|
||||
* {@link EntityPlayer#attackTargetEntityWithCurrentItem(Entity)}.<br>
|
||||
* <br>
|
||||
* {@link #target} contains the Entity that was damaged by the player. <br>
|
||||
* <br>
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.network.NetHandlerPlayServer;
|
||||
import net.minecraft.network.play.client.CPacketPlayerBlockPlacement;
|
||||
import net.minecraft.network.play.client.CPacketPlayerTryUseItem;
|
||||
import net.minecraft.server.management.PlayerInteractionManager;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -8,12 +22,13 @@ import net.minecraft.util.EnumHand;
|
||||
/**
|
||||
* PlayerDestroyItemEvent is fired when a player destroys an item.<br>
|
||||
* This event is fired whenever a player destroys an item in
|
||||
* PlayerControllerMP#onPlayerRightClick(EntityPlayer, World, ItemStack, int, int, int, int, Vec3),
|
||||
* PlayerControllerMP#sendUseItem(EntityPlayer, World, ItemStack),
|
||||
* EntityPlayer#destroyCurrentEquippedItem(),
|
||||
* SlotCrafting#onPickupFromSlot(EntityPlayer, ItemStack),
|
||||
* ItemInWorldManager#tryUseItem(EntityPlayer, World, ItemStack),
|
||||
* and ItemInWorldManager#activateBlockOrUseItem(EntityPlayer, World, ItemStack, int, int, int, int, float, float, float).<br>
|
||||
* {@link PlayerControllerMP#processRightClick(EntityPlayer, World, ItemStack, EnumHand)},
|
||||
* {@link PlayerControllerMP#processRightClickBlock(EntityPlayerSP, WorldClient, ItemStack, BlockPos, EnumFacing, Vec3d, EnumHand)},
|
||||
* {@link EntityPlayer#damageShield(float)},
|
||||
* {@link ForgeHooks#getContainerItem(ItemStack)},
|
||||
* {@link PlayerInteractionManager#processRightClick(EntityPlayer, World, ItemStack, EnumHand)},
|
||||
* {@link NetHandlerPlayServer#processPlayerBlockPlacement(CPacketPlayerBlockPlacement)}
|
||||
* and {@link NetHandlerPlayServer#processRightClickBlock(CPacketPlayerTryUseItem)}.<br>
|
||||
* <br>
|
||||
* {@link #original} contains the original ItemStack before the item was destroyed. <br>
|
||||
* (@link #hand) contains the hand that the current item was held in.<br>
|
||||
@@ -22,6 +37,7 @@ import net.minecraft.util.EnumHand;
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult}<br>
|
||||
* <br>
|
||||
* This event is fired from {@link ForgeEventFactory#onPlayerDestroyItem(EntityPlayer, ItemStack, EnumHand)}.<br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
public class PlayerDestroyItemEvent extends PlayerEvent
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -8,6 +11,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* PlayerEvent is fired whenever an event involving Living entities occurs. <br>
|
||||
@@ -33,11 +37,11 @@ public class PlayerEvent extends LivingEvent
|
||||
/**
|
||||
* HarvestCheck is fired when a player attempts to harvest a block.<br>
|
||||
* This event is fired whenever a player attempts to harvest a block in
|
||||
* EntityPlayer#canHarvestBlock(Block).<br>
|
||||
* {@link EntityPlayer#canHarvestBlock(IBlockState)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, Block, boolean)}.<br>
|
||||
* This event is fired via the {@link ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean)}.<br>
|
||||
* <br>
|
||||
* {@link #block} contains the Block that is being checked for harvesting. <br>
|
||||
* {@link #state} contains the {@link IBlockState} that is being checked for harvesting. <br>
|
||||
* {@link #success} contains the boolean value for whether the Block will be successfully harvested. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
@@ -66,7 +70,7 @@ public class PlayerEvent extends LivingEvent
|
||||
/**
|
||||
* BreakSpeed is fired when a player attempts to harvest a block.<br>
|
||||
* This event is fired whenever a player attempts to harvest a block in
|
||||
* EntityPlayer#canHarvestBlock(Block).<br>
|
||||
* {@link EntityPlayer#canHarvestBlock(IBlockState)}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeEventFactory#getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos)}.<br>
|
||||
* <br>
|
||||
@@ -109,7 +113,7 @@ public class PlayerEvent extends LivingEvent
|
||||
/**
|
||||
* NameFormat is fired when a player's display name is retrieved.<br>
|
||||
* This event is fired whenever a player's name is retrieved in
|
||||
* EntityPlayer#getDisplayName() or EntityPlayer#refreshDisplayName().<br>
|
||||
* {@link EntityPlayer#getDisplayName()} or {@link EntityPlayer#refreshDisplayName()}.<br>
|
||||
* <br>
|
||||
* This event is fired via the {@link ForgeEventFactory#getPlayerDisplayName(EntityPlayer, String)}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -3,12 +3,14 @@ package net.minecraftforge.event.entity.player;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
|
||||
/**
|
||||
* PlayerSleepInBedEvent is fired when a player sleeps in a bed.
|
||||
* <br>
|
||||
* This event is fired whenever a player sleeps in a bed in
|
||||
* EntityPlayer#sleepInBedAt(BlockPos).<br>
|
||||
* {@link EntityPlayer#trySleep(BlockPos)}.<br>
|
||||
* <br>
|
||||
* {@link #result} contains whether the player is able to sleep. <br>
|
||||
* <br>
|
||||
|
||||
+5
-1
@@ -1,7 +1,11 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
|
||||
/**
|
||||
@@ -11,7 +15,7 @@ import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
* This event has a result. {@link HasResult}<br>
|
||||
*
|
||||
* setResult(ALLOW) informs game that player is still "in bed"<br>
|
||||
* setResult(DEFAULT) causes game to check {@link net.minecraft.block.Block#isBed(net.minecraft.world.IBlockAccess, BlockPos, net.minecraft.entity.Entity)} instead
|
||||
* setResult(DEFAULT) causes game to check {@link Block#isBed(IBlockState, IBlockAccess, BlockPos, Entity)} instead
|
||||
*/
|
||||
@HasResult
|
||||
public class SleepingLocationCheckEvent extends PlayerEvent
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
@@ -29,7 +31,7 @@ public class BiomeEvent extends Event
|
||||
/**
|
||||
* CreateDecorator is fired when a BiomeDecorator is created.<br>
|
||||
* This event is fired whenever a BiomeDecorator is created in
|
||||
* DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase).<br>
|
||||
* {@link DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase)}.<br>
|
||||
* <br>
|
||||
* {@link #originalBiomeDecorator} contains the original BiomeDecorator that would be used in vanilla.
|
||||
* {@link #newBiomeDecorator} contains the new BiomeDecoration to be used by Minecraft.
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -9,7 +13,7 @@ import net.minecraft.world.World;
|
||||
/**DecorateBiomeEvent is fired when a BiomeDecorator is created.
|
||||
* <br>
|
||||
* This event is fired whenever a BiomeDecorator is created in
|
||||
* DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase).<br>
|
||||
* {@link DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase)}.<br>
|
||||
* <br>
|
||||
* {@link #world} contains the world that is being decorated. <br>
|
||||
* {@link #rand} contains an instance of Random to be used. <br>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -49,7 +53,7 @@ public class OreGenEvent extends Event
|
||||
/**
|
||||
* OreGenEvent.Pre is fired just before a chunk is populated with ores.<br>
|
||||
* This event is fired just before ore generation in
|
||||
* BiomeDecorator#generateOres().<br>
|
||||
* {@link BiomeDecorator#generateOres(World, Random)}.<br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -68,7 +72,7 @@ public class OreGenEvent extends Event
|
||||
/**
|
||||
* OreGenEvent.Post is fired just after a chunk is populated with ores.<br>
|
||||
* This event is fired just after ore generation in
|
||||
* BiomeDecorator#generateOres().<br>
|
||||
* {@link BiomeDecorator#generateOres(World, Random)}.<br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -87,7 +91,7 @@ public class OreGenEvent extends Event
|
||||
/**
|
||||
* GenerateMinable is fired when a mineable block is generated in a chunk.<br>
|
||||
* This event is fired just after ore generation in
|
||||
* BiomeDecorator#generateOres().<br>
|
||||
* {@link BiomeDecorator#generateOres(World, Random)}.<br>
|
||||
* <br>
|
||||
* {@link #type} contains the enum value for the Ore attempting to be generated.<br>
|
||||
* {@link #generator} contains the WorldGenerator generating this ore. <br>
|
||||
|
||||
@@ -4,6 +4,9 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.gen.ChunkProviderEnd;
|
||||
import net.minecraft.world.gen.ChunkProviderHell;
|
||||
import net.minecraft.world.gen.ChunkProviderOverworld;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
@@ -47,9 +50,9 @@ public class PopulateChunkEvent extends ChunkGeneratorEvent
|
||||
/**
|
||||
* PopulateChunkEvent.Pre is fired just before a chunk is populated a terrain feature.<br>
|
||||
* This event is fired just before terrain feature generation in
|
||||
* ChunkProviderEnd#populate(IChunkProvider, int, int),
|
||||
* ChunkProviderGenerate#populate(IChunkProvider, int, int),
|
||||
* and ChunkProviderHell#populate(IChunkProvider, int, int). <br>
|
||||
* {@link ChunkProviderEnd#populate(int, int)},
|
||||
* {@link ChunkProviderOverworld#populate(int, int)},
|
||||
* and {@link ChunkProviderHell#populate(int, int)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -68,9 +71,9 @@ public class PopulateChunkEvent extends ChunkGeneratorEvent
|
||||
/**
|
||||
* PopulateChunkEvent.Post is fired just after a chunk is populated with a terrain feature.<br>
|
||||
* This event is fired just after terrain feature generation in
|
||||
* ChunkProviderEnd#populate(IChunkProvider, int, int),
|
||||
* ChunkProviderGenerate#populate(IChunkProvider, int, int),
|
||||
* and ChunkProviderHell#populate(IChunkProvider, int, int). <br>
|
||||
* {@link ChunkProviderEnd#populate(int, int)},
|
||||
* {@link ChunkProviderOverworld#populate(int, int)},
|
||||
* and {@link ChunkProviderHell#populate(int, int)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -89,9 +92,9 @@ public class PopulateChunkEvent extends ChunkGeneratorEvent
|
||||
/**
|
||||
* PopulateChunkEvent.Populate is fired when a chunk is populated with a terrain feature.<br>
|
||||
* This event is fired during terrain feature generation in
|
||||
* ChunkProviderEnd#populate(IChunkProvider, int, int),
|
||||
* ChunkProviderGenerate#populate(IChunkProvider, int, int),
|
||||
* and ChunkProviderHell#populate(IChunkProvider, int, int). <br>
|
||||
* {@link ChunkProviderEnd#populate(int, int)},
|
||||
* {@link ChunkProviderOverworld#populate(int, int)},
|
||||
* and {@link ChunkProviderHell#populate(int, int)}. <br>
|
||||
* <br>
|
||||
* {@link #type} contains the enum value for the terrain feature being generated. <br>
|
||||
* <br>
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
@@ -9,7 +14,7 @@ import net.minecraftforge.event.world.WorldEvent;
|
||||
/**
|
||||
* SaplingGrowTreeEvent is fired when a sapling grows into a tree.<br>
|
||||
* This event is fired during sapling growth in
|
||||
* BlockSapling#func_149878_d(World, BlockPos, Random).<br>
|
||||
* {@link BlockSapling#generateTree(World, BlockPos, IBlockState, Random)}.<br>
|
||||
* <br>
|
||||
* {@link #pos} contains the coordinates of the growing sapling. <br>
|
||||
* {@link #rand} contains an instance of Random for use. <br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event.terraingen;
|
||||
|
||||
import net.minecraft.world.biome.BiomeProvider;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.world.gen.layer.GenLayer;
|
||||
import net.minecraft.world.WorldType;
|
||||
@@ -30,7 +33,7 @@ public class WorldTypeEvent extends Event
|
||||
/**
|
||||
* BiomeSize is fired when vanilla Minecraft attempts to generate biomes.<br>
|
||||
* This event is fired during biome generation in
|
||||
* GenLayer#initializeAllBiomeGenerators(long, WorldType). <br>
|
||||
* {@link GenLayer#initializeAllBiomeGenerators(long, WorldType, String)}. <br>
|
||||
* <br>
|
||||
* {@link #originalSize} the original size of the Biome. <br>
|
||||
* {@link #newSize} the new size of the biome. Initially set to the {@link #originalSize}. <br>
|
||||
@@ -71,9 +74,9 @@ public class WorldTypeEvent extends Event
|
||||
}
|
||||
|
||||
/**
|
||||
* InitBiomeGens is fired when vanilla Minecraft attempts to initialize the biome generators.<br>
|
||||
* This event is fired just during biome generator initialization in
|
||||
* WorldChunkManager#WorldChunkManager(long, WorldType). <br>
|
||||
* InitBiomeGens is fired when vanilla Minecraft attempts to initialize the biome providers.<br>
|
||||
* This event is fired just during biome provider initialization in
|
||||
* {@link BiomeProvider#BiomeProvider(long, WorldType, String)}. <br>
|
||||
* <br>
|
||||
* {@link #seed} the seed of the world. <br>
|
||||
* {@link #originalBiomeGens} the array of GenLayers original intended for this Biome generation. <br>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package net.minecraftforge.event.world;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.storage.AnvilChunkLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* ChunkDataEvent is fired when an event involving chunk data occurs.<br>
|
||||
@@ -30,7 +35,7 @@ public class ChunkDataEvent extends ChunkEvent
|
||||
/**
|
||||
* ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.<br>
|
||||
* This event is fired during chunk loading in
|
||||
* ChunkIOProvider#callStage2(QueuedChunk, Chunk). <br>
|
||||
* {@link net.minecraftforge.common.chunkio.ChunkIOProvider#syncCallback()}.<br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -49,7 +54,7 @@ public class ChunkDataEvent extends ChunkEvent
|
||||
/**
|
||||
* ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.<br>
|
||||
* This event is fired during chunk saving in
|
||||
* AnvilChunkLoader#saveChunk(World, Chunk). <br>
|
||||
* {@link AnvilChunkLoader#saveChunk(World, Chunk)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package net.minecraftforge.event.world;
|
||||
|
||||
import net.minecraft.client.multiplayer.ChunkProviderClient;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* ChunkEvent is fired when an event involving a chunk occurs.<br>
|
||||
@@ -29,7 +33,7 @@ public class ChunkEvent extends WorldEvent
|
||||
/**
|
||||
* ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.<br>
|
||||
* This event is fired during chunk loading in <br>
|
||||
* ChunkProviderClient#loadChunk(int, int), <br>
|
||||
* {@link ChunkProviderClient#loadChunk(int, int)}, <br>
|
||||
* Chunk.onChunkLoad(). <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package net.minecraftforge.event.world;
|
||||
|
||||
import net.minecraft.server.management.PlayerManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -38,7 +41,7 @@ public class ChunkWatchEvent extends Event
|
||||
/**
|
||||
* ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.<br>
|
||||
* This event is fired when a chunk is added to the watched chunks of an EntityPlayer in
|
||||
* EntityPlayerMP#onUpdate(). <br>
|
||||
* {@link EntityPlayerMP#onUpdate()}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -54,7 +57,7 @@ public class ChunkWatchEvent extends Event
|
||||
/**
|
||||
* ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.<br>
|
||||
* This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in
|
||||
* PlayerInstance#removePlayer(EntityPlayerMP). <br>
|
||||
* {@link PlayerManager.PlayerInstance#removePlayer(EntityPlayerMP)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.minecraftforge.event.world;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
package net.minecraftforge.event.world;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.integrated.IntegratedServer;
|
||||
import net.minecraft.util.IProgressUpdate;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.ForgeInternalHandler;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@@ -37,10 +51,11 @@ public class WorldEvent extends Event
|
||||
/**
|
||||
* WorldEvent.Load is fired when Minecraft loads a world.<br>
|
||||
* This event is fired when a world is loaded in
|
||||
* WorldClient#WorldClient(NetHandlerPlayClient, WorldSettings, int, EnumDifficulty, Profiler),
|
||||
* MinecraftServer#loadAllWorlds(String, String, long, WorldType, String),
|
||||
* DimensionManager#initDimension(int),
|
||||
* and ForgeInternalHandler#onDimensionLoad(Load). <br>
|
||||
* {@link WorldClient#WorldClient(NetHandlerPlayClient, WorldSettings, int, EnumDifficulty, Profiler)},
|
||||
* {@link MinecraftServer#loadAllWorlds(String, String, long, WorldType, String)},
|
||||
* {@link IntegratedServer#loadAllWorlds(String, String, long, WorldType, String)}
|
||||
* {@link DimensionManager#initDimension(int)},
|
||||
* and {@link ForgeInternalHandler#onDimensionLoad(Load)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -56,11 +71,10 @@ public class WorldEvent extends Event
|
||||
/**
|
||||
* WorldEvent.Unload is fired when Minecraft unloads a world.<br>
|
||||
* This event is fired when a world is unloaded in
|
||||
* Minecraft#loadWorld(WorldClient, String),
|
||||
* MinecraftServer#deleteWorldAndStopServer(),
|
||||
* MinecraftServer#stopServer(),
|
||||
* DimensionManager#unloadWorlds(Hashtable<Integer, long[]>),
|
||||
* ForgeInternalHandler#onDimensionUnload(Unload). <br>
|
||||
* {@link Minecraft#loadWorld(WorldClient, String)},
|
||||
* {@link MinecraftServer#stopServer()},
|
||||
* {@link DimensionManager#unloadWorlds(Hashtable)},
|
||||
* {@link ForgeInternalHandler#onDimensionUnload(Unload)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -76,8 +90,8 @@ public class WorldEvent extends Event
|
||||
/**
|
||||
* WorldEvent.Save is fired when Minecraft saves a world.<br>
|
||||
* This event is fired when a world is saved in
|
||||
* WorldServer#saveAllChunks(boolean, IProgressUpdate),
|
||||
* ForgeInternalHandler#onDimensionSave(Save). <br>
|
||||
* {@link WorldServer#saveAllChunks(boolean, IProgressUpdate)},
|
||||
* {@link ForgeInternalHandler#onDimensionSave(Save)}. <br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
@@ -93,8 +107,8 @@ public class WorldEvent extends Event
|
||||
/**
|
||||
* Called by WorldServer to gather a list of all possible entities that can spawn at the specified location.
|
||||
* If an entry is added to the list, it needs to be a globally unique instance.
|
||||
* The event is called in WorldServer#getSpawnListEntryForTypeAt(EnumCreatureType, BlockPos) as well as
|
||||
* WorldServer#canCreatureTypeSpawnHere(EnumCreatureType creatureType, BiomeGenBase.SpawnListEntry spawnListEntry, BlockPos pos)
|
||||
* The event is called in {@link WorldServer#getSpawnListEntryForTypeAt(EnumCreatureType, BlockPos)} as well as
|
||||
* {@link WorldServer#canCreatureTypeSpawnHere(EnumCreatureType, SpawnListEntry, BlockPos)}
|
||||
* where the latter checks for identity, meaning both events must add the same instance.
|
||||
* Canceling the event will result in a empty list, meaning no entity will be spawned.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user