diff --git a/conf/build.gradle.forge b/conf/build.gradle.forge index 68ad728..be0731f 100644 --- a/conf/build.gradle.forge +++ b/conf/build.gradle.forge @@ -30,7 +30,6 @@ compile 'org.ow2.asm:asm-debug-all:4.1' compile 'com.typesafe.akka:akka-actor_2.11:2.3.3' compile 'com.typesafe:config:1.2.1' - compile 'org.scala-lang:jline:2.11' compile 'org.scala-lang:scala-actors-migration_2.11:1.1.0' compile 'org.scala-lang:scala-compiler:2.11.1' compile 'org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2' diff --git a/src/main/java/net/minecraft/client/renderer/entity/RenderItem.java b/src/main/java/net/minecraft/client/renderer/entity/RenderItem.java index 888adea..d8b6f22 100644 --- a/src/main/java/net/minecraft/client/renderer/entity/RenderItem.java +++ b/src/main/java/net/minecraft/client/renderer/entity/RenderItem.java @@ -704,7 +704,7 @@ this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, 13, 2, 0); this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, 12, 1, i1); this.renderQuad(tessellator, p_94148_4_ + 2, p_94148_5_ + 13, j1, 1, l); - GL11.glEnable(GL11.GL_BLEND); + //GL11.glEnable(GL11.GL_BLEND); // Forge: Disable Bled because it screws with a lot of things down the line. GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_LIGHTING); diff --git a/src/main/java/net/minecraftforge/client/GuiIngameForge.java b/src/main/java/net/minecraftforge/client/GuiIngameForge.java index ced2d5a..645d607 100644 --- a/src/main/java/net/minecraftforge/client/GuiIngameForge.java +++ b/src/main/java/net/minecraftforge/client/GuiIngameForge.java @@ -498,6 +498,7 @@ bind(icons); if (pre(EXPERIENCE)) return; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); if (mc.playerController.gameIsSurvivalOrAdventure()) { @@ -537,6 +538,7 @@ mc.mcProfiler.endSection(); } } + GL11.glEnable(GL11.GL_BLEND); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); post(EXPERIENCE); @@ -547,6 +549,7 @@ bind(icons); if (pre(JUMPBAR)) return; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_BLEND); mc.mcProfiler.startSection("jumpBar"); float charge = mc.thePlayer.getHorseJumpPower(); @@ -562,6 +565,7 @@ this.drawTexturedModalRect(x, top, 0, 89, filled, 5); } + GL11.glEnable(GL11.GL_BLEND); mc.mcProfiler.endSection(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/net/minecraftforge/event/CommandEvent.java b/src/main/java/net/minecraftforge/event/CommandEvent.java index 2d68bc7..1f4a1e4 100644 --- a/src/main/java/net/minecraftforge/event/CommandEvent.java +++ b/src/main/java/net/minecraftforge/event/CommandEvent.java @@ -5,6 +5,23 @@ import net.minecraft.command.ICommand; 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).
+ *
+ * {@link #command} contains the instance of ICommand which is representative of the currently executing command.
+ * {@link #sender} contains the instance of ICommandSender for the given command sender.
+ * {@link #parameters} contains the arguments passed for the command execution.
+ * {@link #exception} begins null, but can be populated with an exception to be thrown within the command.
+ *
+ * This event is {@link Cancelable}.
+ * If the event is canceled, the execution of the command does not occur.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ @Cancelable public class CommandEvent extends Event { diff --git a/src/main/java/net/minecraftforge/event/ServerChatEvent.java b/src/main/java/net/minecraftforge/event/ServerChatEvent.java index f820e53..7edb06d 100644 --- a/src/main/java/net/minecraftforge/event/ServerChatEvent.java +++ b/src/main/java/net/minecraftforge/event/ServerChatEvent.java @@ -5,6 +5,23 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.util.ChatComponentTranslation; +/** + * ServerChatEvent is fired whenever a C01PacketChatMessage is processed.
+ * 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)
+ *
+ * {@link #username} contains the username of the player sending the chat message.
+ * {@link #message} contains the message being sent.
+ * {@link #player} the instance of EntityPlayerMP for the player sending the chat message.
+ * {@link #component} contains the instance of ChatComponentTranslation for the sent message.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the chat message is never distributed to all clients.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class ServerChatEvent extends Event { diff --git a/src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java b/src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java index dcffeab..8bca355 100644 --- a/src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java +++ b/src/main/java/net/minecraftforge/event/brewing/PotionBrewedEvent.java @@ -3,6 +3,19 @@ import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.item.ItemStack; +/** + * PotionBrewedEvent is fired when a potion is brewed in the brewing stand. + *
+ * The event is fired during the TileEntityBrewingStand#brewPotions() method invocation.
+ *
+ * {@link #brewingStacks} contains the itemstack array from the TileEntityBrewer holding all items in Brewer.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class PotionBrewedEvent extends Event { /** diff --git a/src/main/java/net/minecraftforge/event/entity/EntityEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityEvent.java index b34765d..5a276b4 100644 --- a/src/main/java/net/minecraftforge/event/entity/EntityEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/EntityEvent.java @@ -3,6 +3,15 @@ import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.entity.Entity; +/** + * EntityEvent is fired when an event involving any Entity occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #entity} contains the entity that caused this event to occur.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class EntityEvent extends Event { public final Entity entity; @@ -11,7 +20,17 @@ { this.entity = entity; } - + + /** + * EntityConstructing is fired when an Entity is being created.
+ * This event is fired within the constructor of the Entity.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class EntityConstructing extends EntityEvent { public EntityConstructing(Entity entity) @@ -20,6 +39,19 @@ } } + /** + * CanUpdate is fired when an Entity is being created.
+ * This event is fired whenever vanilla Minecraft determines that an entity
+ * cannot update in World#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean)
+ *
+ * {@link CanUpdate#canUpdate} contains the boolean value of whether this entity can update.
+ * If the modder decides that this Entity can be updated, they may change canUpdate to true,
+ * and the entity with then be updated.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class CanUpdate extends EntityEvent { public boolean canUpdate = false; @@ -28,7 +60,18 @@ super(entity); } } - + + /** + * EnteringChunk is fired when an Entity enters a chunk.
+ * This event is fired whenever vanilla Minecraft determines that an entity
+ * is entering a chunk in Chunk#addEntity(net.minecraft.entity.Entity)
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult} + *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class EnteringChunk extends EntityEvent { public int newChunkX; diff --git a/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java index 6e5850d..2b3c841 100644 --- a/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/EntityJoinWorldEvent.java @@ -4,6 +4,20 @@ import net.minecraft.entity.Entity; import net.minecraft.world.World; +/** + * EntityJoinWorldEvent is fired when an Entity joins the world.
+ * 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).
+ *
+ * {@link #world} contains the world in which the entity is to join.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity is not added to the world.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class EntityJoinWorldEvent extends EntityEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java index ddf88b5..0a6e08f 100644 --- a/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/EntityStruckByLightningEvent.java @@ -4,6 +4,20 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.effect.EntityLightningBolt; +/** + * EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.
+ * This event is fired whenever an EntityLightningBolt is updated to strike an Entity in + * EntityLightningBolt#onUpdate() via {@link ForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt)}.
+ *
+ * {@link #lightning} contains the instance of EntityLightningBolt attempting to strike an entity.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity is not struck by the lightening.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ @Cancelable public class EntityStruckByLightningEvent extends EntityEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java index b40aed6..48f69cb 100644 --- a/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/PlaySoundAtEntityEvent.java @@ -3,6 +3,24 @@ import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.Entity; +/** + * PlaySoundAtEntityEvent is fired a sound is to be played at an Entity
+ * 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).
+ *
+ * {@link #name} contains the name of the sound to be played at the Entity.
+ * {@link #volume} contains the volume at which the sound is to be played.
+ * {@link #pitch} contains the pitch at which the sound is to be played.
+ * Changing the {@link #name} field will cause the sound of this name to be played instead of the originally intended sound.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the sound is not played.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ @Cancelable public class PlaySoundAtEntityEvent extends EntityEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java index 445f0b0..4835e27 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingAttackEvent.java @@ -4,6 +4,24 @@ import net.minecraft.util.DamageSource; import net.minecraft.entity.EntityLivingBase; +/** + * LivingAttackEvent is fired when a living Entity is attacked.
+ * This event is fired whenever an Entity is attacked in + * EntityLivingBase#attackEntityFrom(DamageSource, float) and + * EntityPlayer#attackEntityFrom(DamageSource, float).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingAttack(EntityLivingBase, DamageSource, float)}.
+ *
+ * {@link #source} contains the DamageSource of the attack.
+ * {@link #amount} contains the amount of damage dealt to the entity.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity does not take attack damage.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class LivingAttackEvent extends LivingEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java index b0b5c7e..1421bf9 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDeathEvent.java @@ -4,6 +4,24 @@ import net.minecraft.util.DamageSource; import net.minecraft.entity.EntityLivingBase; +/** + * LivingDeathEvent is fired when an Entity dies.
+ * This event is fired whenever an Entity dies in + * EntityLivingBase#onDeath(DamageSource), + * EntityPlayer#onDeath(DamageSource), and + * EntityPlayerMP#onDeath(DamageSource).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingDeath(EntityLivingBase, DamageSource)}.
+ *
+ * {@link #source} contains the DamageSource that caused the entity to die.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity does not die.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class LivingDeathEvent extends LivingEvent { @@ -13,5 +31,4 @@ super(entity); this.source = source; } - } diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java index bd445a1..aa26f80 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingDropsEvent.java @@ -3,11 +3,30 @@ import java.util.ArrayList; import cpw.mods.fml.common.eventhandler.Cancelable; - import net.minecraft.util.DamageSource; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.EntityLivingBase; +/** + * LivingDropsEvent is fired when an Entity's death causes dropped items to appear.
+ * This event is fired whenever an Entity dies and drops items in + * EntityLivingBase#onDeath(DamageSource).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean, int)}.
+ *
+ * {@link #source} contains the DamageSource that caused the drop to occur.
+ * {@link #drops} contains the ArrayList of EntityItems that will be dropped.
+ * {@link #lootingLevel} contains the amount of loot that will be dropped.
+ * {@link #recentlyHit} determines whether the Entity doing the drop has recently been damaged.
+ * {@link #specialDropValue} contains the special drop value for this even.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity does not drop anything.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class LivingDropsEvent extends LivingEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java index 508187a..f5d2e84 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingEvent.java @@ -4,6 +4,13 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraftforge.event.entity.EntityEvent; +/** + * LivingEvent is fired whenever an event involving Living entities occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class LivingEvent extends EntityEvent { public final EntityLivingBase entityLiving; @@ -13,12 +20,40 @@ entityLiving = entity; } + /** + * LivingUpdateEvent is fired when an Entity is updated.
+ * This event is fired whenever an Entity is updated in + * EntityLivingBase#onUpdate().
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingUpdate(EntityLivingBase)}.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity does not update.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public static class LivingUpdateEvent extends LivingEvent { public LivingUpdateEvent(EntityLivingBase e){ super(e); } } - + + /** + * LivingJumpEvent is fired when an Entity jumps.
+ * This event is fired whenever an Entity jumps in + * EntityLivingBase#jump(), EntityMagmaCube#jump(), + * and EntityHorse#jump().
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingJump(EntityLivingBase)}.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public static class LivingJumpEvent extends LivingEvent { public LivingJumpEvent(EntityLivingBase e){ super(e); } diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java index e0d9960..73c292c 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingFallEvent.java @@ -3,6 +3,22 @@ import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.EntityLivingBase; +/** + * LivingFallEvent is fired when an Entity is set to be falling.
+ * This event is fired whenever an Entity is set to fall in + * EntityLivingBase#fall(float).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingFall(EntityLivingBase, float)}.
+ *
+ * {@link #distance} contains the distance the Entity is to fall. If this event is canceled, this value is set to 0.0F. + *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity does not fall.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class LivingFallEvent extends LivingEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java index 3df63aa..7b26501 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingHurtEvent.java @@ -4,6 +4,24 @@ import net.minecraft.util.DamageSource; import net.minecraft.entity.EntityLivingBase; +/** + * LivingHurtEvent is fired when an Entity is set to be hurt.
+ * This event is fired whenever an Entity is hurt in + * EntityLivingBase#damageEntity(DamageSource, float) and + * EntityPlayer#damageEntity(DamageSource, float).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingHurt(EntityLivingBase, DamageSource, float)}.
+ *
+ * {@link #source} contains the DamageSource that caused this Entity to be hurt.
+ * {@link #amount} contains the amount of damage dealt to the Entity that was hurt.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity is not hurt.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class LivingHurtEvent extends LivingEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java index 6877550..a5ad992 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingSetAttackTargetEvent.java @@ -2,6 +2,22 @@ import net.minecraft.entity.EntityLivingBase; +/** + * LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.
+ * This event is fired whenever an Entity sets a target to attack in + * EntityLiving#setAttackTarget(EntityLivingBase) and + * EntityLivingBase#setRevengeTarget(EntityLivingBase).
+ *
+ * This event is fired via the {@link ForgeHooks#onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase)}.
+ *
+ * {@link #target} contains the newly targeted Entity.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class LivingSetAttackTargetEvent extends LivingEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java b/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java index 7176187..555b9da 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/LivingSpawnEvent.java @@ -1,9 +1,22 @@ package net.minecraftforge.event.entity.living; import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.entity.EntityLiving; import net.minecraft.world.World; +/** + * LivingSpawnEvent is fired whenever a living Entity is spawned.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #world} contains the world in which this living Entity is being spawned.
+ * {@link #x} contains the x-coordinate this entity is being spawned at.
+ * {@link #y} contains the y-coordinate this entity is being spawned at.
+ * {@link #z} contains the z-coordinate this entity is being spawned at.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class LivingSpawnEvent extends LivingEvent { public final World world; @@ -38,6 +51,20 @@ } } + /** + * SpecialSpawn is fired when an Entity is to be spawned from a mob spawner.
+ * This event is fired whenever an Entity is spawned in a mob spawner in
+ * SpawnerAnimals#findChunksForSpawning(WorldServer, boolean, boolean, boolean).
+ *
+ * This event is fired via the {@link ForgeHooks#doSpecialSpawn(EntityLiving, World, float, float, float)}.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the Entity is not spawned.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public static class SpecialSpawn extends LivingSpawnEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java index 8330196..b3fc785 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java @@ -1,10 +1,18 @@ package net.minecraftforge.event.entity.living; +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.world.World; import net.minecraftforge.event.entity.EntityEvent; +/** + * ZombieEvent is fired whenever a zombie is spawned for aid. + * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class. + * + * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class ZombieEvent extends EntityEvent { public ZombieEvent(EntityZombie entity) @@ -16,7 +24,30 @@ { return (EntityZombie) entity; } - + + /** + * SummonAidEvent is fired when a Zombie Entity is summoned. + * This event is fired whenever a Zombie Entity is summoned in + * EntityZombie#attackEntityFrom(DamageSource, float). + * + * This event is fired via the {@link ForgeHooks#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. + * {@link #x} contains the x-coordinate at which this summoning event is occurring. + * {@link #y} contains the y-coordinate at which this summoning event is occurring. + * {@link #z} contains the z-coordinate at which this summoning event is occurring. + * {@link #attacker} contains the living Entity that attacked and caused this event to fire. + * {@link #summonChance} contains the likelihood that a Zombie would successfully be summoned. + * + * This event is not {@link Cancelable}. + * + * This event has a result. {@link HasResult} + * {@link Result#ALLOW} Zombie is summoned. + * {@link Result#DENY} Zombie is not summoned. + * + * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @HasResult public static class SummonAidEvent extends ZombieEvent { /** diff --git a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java index 3f13aa5..9fe04b3 100644 --- a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartCollisionEvent.java @@ -3,6 +3,19 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityMinecart; +/** + * MinecartCollisionEvent is fired when a minecart collides with an Entity. + * This event is fired whenever a minecraft collides in + * EntityMinecart#applyEntityCollision(Entity). + * + * {@link #collider} contains the Entity the Minecart collided with. + * + * This event is not {@link Cancelable}. + * + * This event does not have a result. {@link HasResult} + * + * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class MinecartCollisionEvent extends MinecartEvent { public final Entity collider; diff --git a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java index a58ef50..f29d6fc 100644 --- a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartEvent.java @@ -3,6 +3,15 @@ import net.minecraft.entity.item.EntityMinecart; import net.minecraftforge.event.entity.EntityEvent; +/** + * MinecartEvent is fired whenever an event involving minecart entities occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will
+ * receive every child event of this class.
+ *
+ * {@link #minecart} contains the minecart entity involved with this event.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class MinecartEvent extends EntityEvent { public final EntityMinecart minecart; diff --git a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java index 98a93fa..d436268 100644 --- a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartInteractEvent.java @@ -4,6 +4,23 @@ import net.minecraft.entity.item.EntityMinecart; import net.minecraft.entity.player.EntityPlayer; +/** + * MinecartInteractEvent is fired when a player interacts with a minecart.
+ * This event is fired whenever a player interacts with a minecart in + * EntityMinecartContainer#interactFirst(EntityPlayer), + * EntityMinecartEmpty#interactFirst(EntityPlayer) + * EntityMinecartFurnace#interactFirst(EntityPlayer) + * EntityMinecartHopper#interactFirst(EntityPlayer).
+ *
+ * {@link #player} contains the EntityPlayer that is involved with this minecart interaction.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not interact with the minecart.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class MinecartInteractEvent extends MinecartEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java index e809796..c5710fc 100644 --- a/src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/minecart/MinecartUpdateEvent.java @@ -2,6 +2,21 @@ import net.minecraft.entity.item.EntityMinecart; +/** + * MinecartUpdateEvent is fired when a minecart is updated.
+ * This event is fired whenever a minecart is updated in + * EntityMinecart#onUpdate().
+ *
+ * {@link #x} contains the x-coordinate of the minecart Entity.
+ * {@link #y} contains the y-coordinate of the minecart Entity.
+ * {@link #z} contains the z-coordinate of the minecart Entity.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class MinecartUpdateEvent extends MinecartEvent { public final float x; diff --git a/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java index 2792a42..95dbc3c 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/ArrowLooseEvent.java @@ -4,6 +4,21 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +/** + * ArrowLooseEvent is fired when a player stops using a bow.
+ * This event is fired whenever a player stops using a bow in + * ItemBow#onPlayerStoppedUsing(ItemStack, World, EntityPlayer, int).
+ *
+ * {@link #bow} contains the ItemBow ItemStack that was used in this event.
+ * {@link #charge} contains the value for how much the player had charged before stopping the shot.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not stop using the bow.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class ArrowLooseEvent extends PlayerEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java b/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java index cf3500f..a1b4e65 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/ArrowNockEvent.java @@ -4,6 +4,20 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +/** + * ArrowNockEvent is fired when a player begins using a bow.
+ * This event is fired whenever a player begins using a bow in + * ItemBow#onItemRightClick(ItemStack, World, EntityPlayer).
+ *
+ * {@link #result} contains the resulting ItemStack due to the use of the bow.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not begin using the bow.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class ArrowNockEvent extends PlayerEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java index de27733..09ba147 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/AttackEntityEvent.java @@ -4,6 +4,20 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; +/** + * AttackEntityEvent is fired when a player attacks an Entity.
+ * This event is fired whenever a player attacks an Entity in + * EntityPlayer#attackTargetEntityWithCurrentItem(Entity).
+ *
+ * {@link #target} contains the Entity that was damaged by the player.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not attack the Entity.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class AttackEntityEvent extends PlayerEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java index 40883e5..a61add6 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/EntityInteractEvent.java @@ -1,9 +1,24 @@ package net.minecraftforge.event.entity.player; import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; +/** + * EntityInteractEvent is fired when a player interacts with an Entity.
+ * This event is fired whenever a player interacts with an Entity in + * EntityPlayer#interactWith(Entity).
+ *
+ * {@link #target} contains the Entity the player interacted with.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not interact with the Entity.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class EntityInteractEvent extends PlayerEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java index 7c3cbd1..8e9c3f6 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java @@ -1,8 +1,27 @@ package net.minecraftforge.event.entity.player; +import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +/** + * PlayerDestroyItemEvent is fired when a player destroys an item.
+ * 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).
+ *
+ * {@link #original} contains the original ItemStack before the item was destroyed.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class PlayerDestroyItemEvent extends PlayerEvent { public final ItemStack original; diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java index bcc1700..ca68cb7 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java @@ -1,12 +1,20 @@ package net.minecraftforge.event.entity.player; import java.io.File; + import cpw.mods.fml.common.eventhandler.Cancelable; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.event.entity.living.LivingEvent; +/** + * PlayerEvent is fired whenever an event involving Living entities occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class PlayerEvent extends LivingEvent { public final EntityPlayer entityPlayer; @@ -16,6 +24,22 @@ entityPlayer = player; } + /** + * HarvestCheck is fired when a player attempts to harvest a block.
+ * This event is fired whenever a player attempts to harvest a block in + * EntityPlayer#canHarvestBlock(Block).
+ *
+ * This event is fired via the {@link ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, Block, boolean)}.
+ *
+ * {@link #block} contains the Block that is being checked for harvesting.
+ * {@link #success} contains the boolean value for whether the Block will be successfully harvested.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public static class HarvestCheck extends PlayerEvent { public final Block block; @@ -29,6 +53,28 @@ } } + /** + * BreakSpeed is fired when a player attempts to harvest a block.
+ * This event is fired whenever a player attempts to harvest a block in + * EntityPlayer#canHarvestBlock(Block).
+ *
+ * This event is fired via the {@link ForgeEventFactory#getBreakSpeed(EntityPlayer, Block, int, float, int, int, int)}.
+ *
+ * {@link #block} contains the block being broken.
+ * {@link #metadata} contains the metadata of the block being broken.
+ * {@link #originalSpeed} contains the original speed at which the player broke the block.
+ * {@link #newSpeed} contains the newSpeed at which the player will break the block.
+ * {@link #x} contains the x-coordinate at which this event is occurring.
+ * {@link #y} contains the y-coordinate at which this event is occurring.
+ * {@link #z} contains the z-coordinate at which this event is occurring.
+ *
+ * This event is {@link Cancelable}.
+ * If it is canceled, the player is unable to break the block.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public static class BreakSpeed extends PlayerEvent { @@ -59,6 +105,22 @@ } } + /** + * NameFormat is fired when a player's display name is retrieved.
+ * This event is fired whenever a player's name is retrieved in + * EntityPlayer#getDisplayName() or EntityPlayer#refreshDisplayName().
+ *
+ * This event is fired via the {@link ForgeEventFactory#getPlayerDisplayName(EntityPlayer, String)}.
+ *
+ * {@link #username} contains the username of the player. + * {@link #displayname} contains the display name of the player. + *
+ * This event is not {@link Cancelable}. + *
+ * This event does not have a result. {@link HasResult} + *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public static class NameFormat extends PlayerEvent { public final String username; diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java index 06ccf2b..bfdf319 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java @@ -6,6 +6,31 @@ import net.minecraft.world.World; import cpw.mods.fml.common.eventhandler.Cancelable; +/** + * PlayerInteractEvent is fired when a player interacts in some way. + *
+ * This event is fired whenever a player interacts in + * Minecraft#func_147121_ag(), + * NetHandlerPlayServer#processPlayerBlockPlacement(C08PacketPlayerBlockPlacement), + * ItemInWorldManager#activateBlockOrUseItem(EntityPlayer, World, ItemStack, int, int, int, int, float, float, float), + * ItemInWorldManager#onBlockClicked(int, int, int, int).
+ *
+ * This event is fired via the {@link ForgeEventFactory#onPlayerInteract(EntityPlayer, Action, int, int, int, int)}. + *
+ * {@link #action} contains the Action the player performed durin this interaction.
+ * {@link #x} contains the x-coordinate of where this event occurred.
+ * {@link #y} contains the y-coordinate of where this event occurred.
+ * {@link #z} contains the z-coordinate of where this event occurred.
+ * {@link #face} contains the face of the block that was interacted with.
+ * {@link #world} contains the world in which this event is occurring.
+ *
+ * This event is {@link Cancelable}.
+ * If this event is canceled, the player does not interact.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ @Cancelable public class PlayerInteractEvent extends PlayerEvent { diff --git a/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java b/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java index df76794..5d6f666 100644 --- a/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/player/PlayerSleepInBedEvent.java @@ -3,6 +3,20 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer.EnumStatus; +/** + * PlayerSleepInBedEvent is fired when a player sleeps in a bed. + *
+ * This event is fired whenever a player sleeps in a bed in + * EntityPlayer#sleepInBedAt(int, int, int).
+ *
+ * {@link #result} contains whether the player is able to sleep.
+ *
+ * This event is not {@link Cancelable}. + *
+ * This event does not have a result. {@link HasResult} + *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}. + **/ public class PlayerSleepInBedEvent extends PlayerEvent { public EnumStatus result = null; diff --git a/src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java index 82fe7f5..b6df0a4 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/BiomeEvent.java @@ -1,10 +1,18 @@ package net.minecraftforge.event.terraingen; import cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.block.Block; import net.minecraft.world.biome.BiomeDecorator; import net.minecraft.world.biome.BiomeGenBase; +/** + * BiomeEvent is fired whenever an event involving biomes occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}. + **/ public class BiomeEvent extends Event { public final BiomeGenBase biome; @@ -14,6 +22,20 @@ this.biome = biome; } + /** + * CreateDecorator is fired when a BiomeDecorator is created.
+ * This event is fired whenever a BiomeDecorator is created in + * DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase).
+ *
+ * {@link #originalBiomeDecorator} contains the original BiomeDecorator that would be used in vanilla. + * {@link #newBiomeDecorator} contains the new BiomeDecoration to be used by Minecraft. + *
+ * This event is not {@link Cancelable}. + *
+ * This event does not have a result. {@link HasResult} + *
+ * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}. + **/ public static class CreateDecorator extends BiomeEvent { public final BiomeDecorator originalBiomeDecorator; @@ -27,6 +49,13 @@ } } + /** + * BiomeColor is fired whenever an event involving biome colors occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}. + **/ public static class BiomeColor extends BiomeEvent { public final int originalColor; diff --git a/src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java index 4c36fb0..15a577b 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/DecorateBiomeEvent.java @@ -3,9 +3,25 @@ import java.util.Random; import cpw.mods.fml.common.eventhandler.Event; - +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.world.World; +/**DecorateBiomeEvent is fired when a BiomeDecorator is created. + *
+ * This event is fired whenever a BiomeDecorator is created in + * DeferredBiomeDecorator#fireCreateEventAndReplace(BiomeGenBase).
+ *
+ * {@link #world} contains the world that is being decorated.
+ * {@link #rand} contains an instane of Random to be used.
+ * {@link #chunkX} contains the x-coordinate of the Chunk being decorated.
+ * {@link #chunkZ} contains the z-coordinate of the Chunk being decorated.
+ *
+ * This event is not {@link Cancelable}. + *
+ * This event does not have a result. {@link HasResult} + *
+ * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}. + **/ public class DecorateBiomeEvent extends Event { public final World world; @@ -21,6 +37,9 @@ this.chunkZ = worldZ; } + /** + * This event is fired before a chunk is decorated with a biome feature. + */ public static class Pre extends DecorateBiomeEvent { public Pre(World world, Random rand, int worldX, int worldZ) @@ -29,6 +48,9 @@ } } + /** + * This event is fired after a chunk is decorated with a biome feature. + */ public static class Post extends DecorateBiomeEvent { public Post(World world, Random rand, int worldX, int worldZ) diff --git a/src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java b/src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java index 43036df..5219df5 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/OreGenEvent.java @@ -3,10 +3,22 @@ import java.util.Random; import cpw.mods.fml.common.eventhandler.Event; - +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenerator; +/** + * OreGenEvent is fired when an event involving ore generation occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #world} contains the world this event is occurring in.
+ * {@link #rand} contains an instance of random that can be used in this event.
+ * {@link #worldX} contains the x-coordinate of the block position currently being populated with ores.
+ * {@link #worldZ} contains the z-coordinate of the block position currently being populated with ores.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#ORE_GEN_BUS}.
+ **/ public class OreGenEvent extends Event { public final World world; @@ -22,6 +34,17 @@ this.worldZ = worldZ; } + /** + * OreGenEvent.Pre is fired just before a chunk is populated with ores.
+ * This event is fired just before ore generation in + * BiomeDecorator#generateOres().
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#ORE_GEN_BUS}.
+ **/ public static class Pre extends OreGenEvent { public Pre(World world, Random rand, int worldX, int worldZ) @@ -30,6 +53,17 @@ } } + /** + * OreGenEvent.Post is fired just after a chunk is populated with ores.
+ * This event is fired just after ore generation in + * BiomeDecorator#generateOres().
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#ORE_GEN_BUS}.
+ **/ public static class Post extends OreGenEvent { public Post(World world, Random rand, int worldX, int worldZ) @@ -39,10 +73,20 @@ } /** - * This event is fired when an ore is generated in a chunk. - * - * You can set the result to DENY to prevent the default ore generation. - */ + * GenerateMinable is fired when a mineable block is generated in a chunk.
+ * This event is fired just after ore generation in + * BiomeDecorator#generateOres().
+ *
+ * {@link #type} contains the enum value for the Ore attempting to be generated.
+ * {@link #generator} contains the WorldGenerator generating this ore.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event has a result. {@link HasResult}
+ * This result determines whether the ore is allowed to be generated.
+ *
+ * This event is fired on the {@link MinecraftForge#ORE_GEN_BUS}.
+ **/ @HasResult public static class GenerateMinable extends OreGenEvent { diff --git a/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java b/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java index 6e33036..62094bc 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/PopulateChunkEvent.java @@ -2,9 +2,24 @@ import java.util.Random; +import cpw.mods.fml.common.eventhandler.Event; +import cpw.mods.fml.common.eventhandler.Event.HasResult; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; +/** + * PopulateChunkEvent is fired when an event involving chunk terrain feature population occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #world} contains the world this event is occurring in.
+ * {@link #rand} contains an instance of random that can be used in this event.
+ * {@link #chunkX} contains the x-coordinate of the chunk currently being populated with a terrain feature.
+ * {@link #chunkZ} contains the z-coordinate of the chunk currently being populated with ores.
+ * {@link #hasVillageGenerated} contains the boolean value stating if the chunk already has a village spawned in it.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}, except {@link Populate}, which fires on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ **/ public class PopulateChunkEvent extends ChunkProviderEvent { public final World world; @@ -23,6 +38,19 @@ this.hasVillageGenerated = hasVillageGenerated; } + /** + * PopulateChunkEvent.Pre is fired just before a chunk is populated a terrain feature.
+ * 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).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Pre extends PopulateChunkEvent { public Pre(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated) @@ -31,6 +59,19 @@ } } + /** + * PopulateChunkEvent.Post is fired just after a chunk is populated with a terrain feature.
+ * 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).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Post extends PopulateChunkEvent { public Post(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated) @@ -40,11 +81,21 @@ } /** - * This event is fired when a chunk is populated with a terrain feature. - * - * You can set the result to DENY to prevent the default generation - * of a terrain feature. - */ + * PopulateChunkEvent.Populate is fired when a chunk is populated with a terrain feature.
+ * 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).
+ *
+ * {@link #type} contains the enum value for the terrain feature being generated.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event has a result. {@link HasResult}
+ * This result determines if the chunk is populated with the terrain feature.
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ @HasResult public static class Populate extends PopulateChunkEvent { diff --git a/src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java index 8c5604f..0a79118 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/SaplingGrowTreeEvent.java @@ -3,15 +3,26 @@ import java.util.Random; import cpw.mods.fml.common.eventhandler.Event.HasResult; - import net.minecraft.world.World; import net.minecraftforge.event.world.WorldEvent; /** - * This event is fired when a sapling grows a tree. - * - * You can set the result to DENY to prevent the default tree growth. - */ + * SaplingGrowTreeEvent is fired when a spling grows into a tree.
+ * This event is fired during sapling growth in + * BlockSapling#func_149878_d(World, int, int, int, Random).
+ *
+ * {@link #x} contains the x-coordinate of the growing sapling.
+ * {@link #y} contains the y-coordinate of the growing sapling.
+ * {@link #z} contains the z-coordinate of the growing sapling.
+ * {@link #rand} contains an instance of Random for use.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event has a result. {@link HasResult}
+ * This result determines if the sapling is allowed to grow.
+ *
+ * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ **/ @HasResult public class SaplingGrowTreeEvent extends WorldEvent { diff --git a/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java b/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java index ab35cc1..2b10a76 100644 --- a/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java +++ b/src/main/java/net/minecraftforge/event/terraingen/WorldTypeEvent.java @@ -4,6 +4,15 @@ import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.WorldType; +/** + * WorldTypeEvent is fired when an event involving the world occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #worldType} contains the WorldType of the world this event is occurring in.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ **/ public class WorldTypeEvent extends Event { public final WorldType worldType; @@ -13,6 +22,21 @@ this.worldType = worldType; } + /** + * BiomeSize is fired when vanilla Minecraft attempts to generate biomes.
+ * This event is fired during biome generation in + * GenLayer#initializeAllBiomeGenerators(long, WorldType).
+ *
+ * {@link #originalSize} the original size of the Biome.
+ * {@link #newSize} the new size of the biome. Initially set to the {@link #originalSize}.
+ * If {@link #newSize} is set to a new value, that value will be used for the Biome size.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ **/ public static class BiomeSize extends WorldTypeEvent { public final byte originalSize; @@ -26,6 +50,22 @@ } } + /** + * InitBiomeGens is fired when vanilla Minecraft attempts to initialize the biome generators.
+ * This event is fired just during biome generator initialization in + * WorldChunkManager#WorldChunkManager(long, WorldType).
+ *
+ * {@link #seed} the seed of the world.
+ * {@link #originalBiomeGens} the array of GenLayers original intended for this Biome generation.
+ * {@link #newBiomeGens} the array of GenLayers that will now be used for this Biome generation.
+ * If {@link #newBiomeGens} is set to a new value, that value will be used for the Biome generator.
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#TERRAIN_GEN_BUS}.
+ **/ public static class InitBiomeGens extends WorldTypeEvent { public final long seed; diff --git a/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java index c339c53..c56e0d2 100644 --- a/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java +++ b/src/main/java/net/minecraftforge/event/world/ChunkDataEvent.java @@ -3,6 +3,15 @@ import net.minecraft.world.chunk.Chunk; import net.minecraft.nbt.NBTTagCompound; +/** + * ChunkDataEvent is fired when an event involving chunk data occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #data} contains the NBTTagCompound containing the chunk data for this event.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class ChunkDataEvent extends ChunkEvent { private final NBTTagCompound data; @@ -18,6 +27,17 @@ return data; } + /** + * ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
+ * This event is fired during chunk loading in + * ChunkIOProvider#callStage2(QueuedChunk, Chunk).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Load extends ChunkDataEvent { public Load(Chunk chunk, NBTTagCompound data) @@ -25,7 +45,18 @@ super(chunk, data); } } - + + /** + * ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
+ * This event is fired during chunk saving in + * AnvilChunkLoader#saveChunk(World, Chunk).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Save extends ChunkDataEvent { public Save(Chunk chunk, NBTTagCompound data) diff --git a/src/main/java/net/minecraftforge/event/world/ChunkEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkEvent.java index c59f2ea..f261636 100644 --- a/src/main/java/net/minecraftforge/event/world/ChunkEvent.java +++ b/src/main/java/net/minecraftforge/event/world/ChunkEvent.java @@ -2,6 +2,15 @@ import net.minecraft.world.chunk.Chunk; +/** + * ChunkEvent is fired when an event involving a chunk occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #chunk} contains the Chunk this event is affecting.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class ChunkEvent extends WorldEvent { private final Chunk chunk; @@ -17,6 +26,18 @@ return chunk; } + /** + * ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.
+ * This event is fired during chunk loading in
+ * ChunkProviderClient#loadChunk(int, int),
+ * Chunk.onChunkLoad().
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Load extends ChunkEvent { public Load(Chunk chunk) @@ -24,7 +45,18 @@ super(chunk); } } - + + /** + * ChunkEvent.Unload is fired when vanilla Minecraft attempts to unload a Chunk from the world.
+ * This event is fired during chunk unloading in
+ * Chunk.onChunkUnload().
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Unload extends ChunkEvent { public Unload(Chunk chunk) diff --git a/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java b/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java index d3fd8f6..9185db0 100644 --- a/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java +++ b/src/main/java/net/minecraftforge/event/world/ChunkWatchEvent.java @@ -4,6 +4,16 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.entity.player.EntityPlayerMP; +/** + * ChunkWatchEvent is fired when an event involving a chunk being watched occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #chunk} contains the ChunkCoordIntPair of the Chunk this event is affecting.
+ * {@link #player} contains the EntityPlayer that is involved with this chunk being watched.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class ChunkWatchEvent extends Event { public final ChunkCoordIntPair chunk; @@ -15,11 +25,33 @@ this.player = player; } + /** + * ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.
+ * This event is fired when a chunk is added to the watched chunks of an EntityPlayer in + * EntityPlayerMP#onUpdate().
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Watch extends ChunkWatchEvent { public Watch(ChunkCoordIntPair chunk, EntityPlayerMP player) { super(chunk, player); } } + /** + * ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.
+ * This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in + * PlayerInstance#removePlayer(EntityPlayerMP).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class UnWatch extends ChunkWatchEvent { public UnWatch(ChunkCoordIntPair chunkLocation, EntityPlayerMP player) { super(chunkLocation, player); } diff --git a/src/main/java/net/minecraftforge/event/world/WorldEvent.java b/src/main/java/net/minecraftforge/event/world/WorldEvent.java index 860a45e..72ef857 100644 --- a/src/main/java/net/minecraftforge/event/world/WorldEvent.java +++ b/src/main/java/net/minecraftforge/event/world/WorldEvent.java @@ -3,12 +3,21 @@ import java.util.ArrayList; import java.util.List; -import cpw.mods.fml.common.eventhandler.Cancelable; -import cpw.mods.fml.common.eventhandler.Event; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; +import cpw.mods.fml.common.eventhandler.Cancelable; +import cpw.mods.fml.common.eventhandler.Event; +/** + * WorldEvent is fired when an event involving the world occurs.
+ * If a method utilizes this {@link Event} as its parameter, the method will + * receive every child event of this class.
+ *
+ * {@link #world} contains the World this event is occuring in.
+ *
+ * All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public class WorldEvent extends Event { public final World world; @@ -18,16 +27,57 @@ this.world = world; } + /** + * WorldEvent.Load is fired when Minecraft loads a world.
+ * 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).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Load extends WorldEvent { public Load(World world) { super(world); } } + /** + * WorldEvent.Unload is fired when Minecraft unloads a world.
+ * This event is fired when a world is unloaded in + * Minecraft#loadWorld(WorldClient, String), + * MinecraftServer#deleteWorldAndStopServer(), + * MinecraftServer#stopServer(), + * DimensionManager#unloadWorlds(Hashtable), + * ForgeInternalHandler#onDimensionUnload(Unload).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Unload extends WorldEvent { public Unload(World world) { super(world); } } + /** + * WorldEvent.Save is fired when Minecraft saves a world.
+ * This event is fired when a world is saved in + * WorldServer#saveAllChunks(boolean, IProgressUpdate), + * ForgeInternalHandler#onDimensionSave(Save).
+ *
+ * This event is not {@link Cancelable}.
+ *
+ * This event does not have a result. {@link HasResult}
+ *
+ * This event is fired on the {@link MinecraftForge#EVENT_BUS}.
+ **/ public static class Save extends WorldEvent { public Save(World world) { super(world); } diff --git a/src/main/resources/fmlversion.properties b/src/main/resources/fmlversion.properties index d5293c5..ddad185 100644 --- a/src/main/resources/fmlversion.properties +++ b/src/main/resources/fmlversion.properties @@ -1,6 +1,6 @@ fmlbuild.major.number=7 fmlbuild.minor.number=10 -fmlbuild.revision.number=10 -fmlbuild.build.number=51 +fmlbuild.revision.number=11 +fmlbuild.build.number=52 fmlbuild.mcversion=1.7.10 fmlbuild.mcpversion=9.05