diff --git a/conf/build.gradle.forge b/conf/build.gradle.forge
new file mode 100644
index 0000000..be0731f
--- /dev/null
+++ b/conf/build.gradle.forge
@@ -0,0 +1,135 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+sourceCompatibility = '1.6'
+targetCompatibility = '1.6'
+
+repositories
+{
+ maven
+ {
+ name 'forge'
+ url 'http://files.minecraftforge.net/maven'
+ }
+ mavenCentral()
+ maven
+ {
+ name 'sonatypeSnapshot'
+ url 'https://oss.sonatype.org/content/repositories/snapshots/'
+ }
+ maven
+ {
+ name 'minecraft'
+ url 'https://libraries.minecraft.net/'
+ }
+}
+
+dependencies
+{
+ compile 'net.minecraft:launchwrapper:1.9'
+ 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: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'
+ compile 'org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2'
+ compile 'org.scala-lang:scala-library:2.11.1'
+ compile 'org.scala-lang:scala-parser-combinators_2.11:1.0.1'
+ compile 'org.scala-lang:scala-reflect:2.11.1'
+ compile 'org.scala-lang:scala-swing_2.11:1.0.1'
+ compile 'org.scala-lang:scala-xml_2.11:1.0.2'
+ compile 'net.sf.jopt-simple:jopt-simple:4.5'
+ compile 'lzma:lzma:0.0.1'
+ compile 'com.mojang:realms:1.2.9'
+ compile 'org.apache.commons:commons-compress:1.8.1'
+ compile 'org.apache.httpcomponents:httpclient:4.3.3'
+ compile 'commons-logging:commons-logging:1.1.3'
+ compile 'org.apache.httpcomponents:httpcore:4.3.2'
+ compile 'java3d:vecmath:1.3.1'
+ compile 'net.sf.trove4j:trove4j:3.0.3'
+ compile 'com.ibm.icu:icu4j-core-mojang:51.2'
+ compile 'com.paulscode:codecjorbis:20101023'
+ compile 'com.paulscode:codecwav:20101023'
+ compile 'com.paulscode:libraryjavasound:20101123'
+ compile 'com.paulscode:librarylwjglopenal:20100824'
+ compile 'com.paulscode:soundsystem:20120107'
+ compile 'io.netty:netty-all:4.0.10.Final'
+ compile 'com.google.guava:guava:16.0'
+ compile 'org.apache.commons:commons-lang3:3.2.1'
+ compile 'commons-io:commons-io:2.4'
+ compile 'commons-codec:commons-codec:1.9'
+ compile 'net.java.jinput:jinput:2.0.5'
+ compile 'net.java.jutils:jutils:1.0.0'
+ compile 'com.google.code.gson:gson:2.2.4'
+ compile 'com.mojang:authlib:1.5.13'
+ compile 'org.apache.logging.log4j:log4j-api:2.0-beta9'
+ compile 'org.apache.logging.log4j:log4j-core:2.0-beta9'
+ compile 'org.lwjgl.lwjgl:lwjgl:2.9.1'
+ compile 'org.lwjgl.lwjgl:lwjgl_util:2.9.1'
+ compile 'tv.twitch:twitch:5.16'
+
+ testCompile 'junit:junit:4.5'
+}
+
+sourceSets
+{
+ main
+ {
+ java
+ {
+ srcDir 'src/main/java/'
+ srcDir '/var/lib/jenkins/workspace/froge_update/src/main/java/'
+ }
+ resources
+ {
+ srcDir 'src/main/resources/'
+ srcDir '/var/lib/jenkins/workspace/froge_update/src/main/resources/'
+ }
+ }
+ test
+ {
+ java
+ {
+ srcDir '/var/lib/jenkins/workspace/froge_update/src/test/java/'
+ }
+ resources
+ {
+ srcDir '/var/lib/jenkins/workspace/froge_update/src/test/resources/'
+ }
+ }
+}
+def links = []
+def dupes = []
+eclipse.project.file.withXml { provider ->
+ def node = provider.asNode()
+ links = []
+ dupes = []
+ node.linkedResources.link.each { child ->
+ def path = child.location.text()
+ if (path in dupes) {
+ child.replaceNode {}
+ } else {
+ dupes.add(path)
+ def newName = path.split('/')[-2..-1].join('/')
+ links += newName
+ child.replaceNode {
+ link{
+ name(newName)
+ type('2')
+ location(path)
+ }
+ }
+ }
+ }
+}
+
+eclipse.classpath.file.withXml {
+ def node = it.asNode()
+ node.classpathentry.each { child ->
+ if (child.@kind == 'src' && !child.@path.contains('/')) child.replaceNode {}
+ if (child.@path in links) links.remove(child.@path)
+ }
+ links.each { link -> node.appendNode('classpathentry', [kind:'src', path:link]) }
+}
+tasks.eclipseClasspath.dependsOn 'eclipseProject' //Make them run in correct order
diff --git a/src/main/java/cpw/mods/fml/client/config/GuiEditArray.java b/src/main/java/cpw/mods/fml/client/config/GuiEditArray.java
index f950d38..7a8334b 100644
--- a/src/main/java/cpw/mods/fml/client/config/GuiEditArray.java
+++ b/src/main/java/cpw/mods/fml/client/config/GuiEditArray.java
@@ -129,7 +129,7 @@
}
else if (button.id == 2001)
{
- this.currentValues = (String[]) configElement.getDefaults();
+ this.currentValues = configElement.getDefaults();
this.entryList = new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues);
}
else if (button.id == 2002)
diff --git a/src/main/java/cpw/mods/fml/relauncher/Side.java b/src/main/java/cpw/mods/fml/relauncher/Side.java
index 4b2b159..0f1a21e 100644
--- a/src/main/java/cpw/mods/fml/relauncher/Side.java
+++ b/src/main/java/cpw/mods/fml/relauncher/Side.java
@@ -1,15 +1,41 @@
+/*
+ * Forge Mod Loader
+ * Copyright (c) 2012-2013 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Lesser Public License v2.1
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ *
+ * Contributors:
+ * cpw - implementation
+ */
+
package cpw.mods.fml.relauncher;
-public enum Side
-{
+public enum Side {
+
+ /**
+ * The client side. Specifically, an environment where rendering capability exists.
+ * Usually in the game client.
+ */
CLIENT,
+ /**
+ * The server side. Specifically, an environment where NO rendering capability exists.
+ * Usually on the dedicated server.
+ */
SERVER;
+ /**
+ * @return If this is the server environment
+ */
public boolean isServer()
{
- return !this.isClient();
+ return !isClient();
}
+ /**
+ * @return if this is the Client environment
+ */
public boolean isClient()
{
return this == CLIENT;
diff --git a/src/main/java/cpw/mods/fml/relauncher/SideOnly.java b/src/main/java/cpw/mods/fml/relauncher/SideOnly.java
index 3e21461..cb8a185 100644
--- a/src/main/java/cpw/mods/fml/relauncher/SideOnly.java
+++ b/src/main/java/cpw/mods/fml/relauncher/SideOnly.java
@@ -1,3 +1,15 @@
+/*
+ * Forge Mod Loader
+ * Copyright (c) 2012-2013 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Lesser Public License v2.1
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ *
+ * Contributors:
+ * cpw - implementation
+ */
+
package cpw.mods.fml.relauncher;
import java.lang.annotation.ElementType;
@@ -5,9 +17,25 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import cpw.mods.fml.common.SidedProxy;
+
+
+/**
+ * Marks the associated element as being only available on a certain {@link Side}. This is
+ * generally meant for internal Forge and FML use only and should only be used on mod classes
+ * when other more common mechanisms, such as using a {@link SidedProxy} fail to work.
+ *
+ * Note, this will only apply to the direct element marked. This code:
+ * @SideOnly public MyField field = new MyField();
will not work, as the initializer
+ * is a separate piece of code to the actual field declaration, and will not be able to find
+ * it's field on the wrong side.
+ *
+ * @author cpw
+ *
+ */
@Retention(RetentionPolicy.RUNTIME)
-@Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
public @interface SideOnly
{
- Side value();
+ public Side value();
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/client/gui/inventory/GuiContainerCreative.java b/src/main/java/net/minecraft/client/gui/inventory/GuiContainerCreative.java
index 2652fdf..6684692 100644
--- a/src/main/java/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ b/src/main/java/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -914,6 +914,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glColor3f(1F, 1F, 1F); //Forge: Reset color in case Items change it.
+ GL11.glEnable(GL11.GL_BLEND); //Forge: Make sure blend is enabled else tabs show a white border.
this.drawTexturedModalRect(l, i1, j, k, 28, b0);
this.zLevel = 100.0F;
itemRender.zLevel = 100.0F;
diff --git a/src/main/java/net/minecraft/client/renderer/EntityRenderer.java b/src/main/java/net/minecraft/client/renderer/EntityRenderer.java
index b59c1c6..8e675a8 100644
--- a/src/main/java/net/minecraft/client/renderer/EntityRenderer.java
+++ b/src/main/java/net/minecraft/client/renderer/EntityRenderer.java
@@ -1829,7 +1829,7 @@
net.minecraftforge.client.event.EntityViewRenderEvent.FogColors event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogColors(this, entitylivingbase, block, p_78466_1_, this.fogColorRed, this.fogColorGreen, this.fogColorBlue);
MinecraftForge.EVENT_BUS.post(event);
-
+
this.fogColorRed = event.red;
this.fogColorBlue = event.blue;
this.fogColorGreen = event.green;
@@ -1869,13 +1869,13 @@
Block block = ActiveRenderInfo.getBlockAtEntityViewpoint(this.mc.theWorld, entitylivingbase, p_78468_2_);
float f1;
- net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity(this, entitylivingbase, block, 0.1F, p_78468_2_);
+ net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity event = new net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity(this, entitylivingbase, block, p_78468_2_, 0.1F);
- if (MinecraftForge.EVENT_BUS.post(event))
+ if (MinecraftForge.EVENT_BUS.post(event))
{
GL11.glFogf(GL11.GL_FOG_DENSITY, event.density);
}
- else
+ else
if (entitylivingbase.isPotionActive(Potion.blindness))
{
f1 = 5.0F;
diff --git a/src/main/java/net/minecraft/client/renderer/InventoryEffectRenderer.java b/src/main/java/net/minecraft/client/renderer/InventoryEffectRenderer.java
index a45a9a3..ec010b1 100644
--- a/src/main/java/net/minecraft/client/renderer/InventoryEffectRenderer.java
+++ b/src/main/java/net/minecraft/client/renderer/InventoryEffectRenderer.java
@@ -75,6 +75,8 @@
this.drawTexturedModalRect(i + 6, j + 7, 0 + l % 8 * 18, 198 + l / 8 * 18, 18, 18);
}
+ potion.renderInventoryEffect(i, j, potioneffect, mc);
+ if (!potion.shouldRenderInvText(potioneffect)) continue;
String s1 = I18n.format(potion.getName(), new Object[0]);
if (potioneffect.getAmplifier() == 1)
diff --git a/src/main/java/net/minecraft/client/renderer/ItemRenderer.java b/src/main/java/net/minecraft/client/renderer/ItemRenderer.java
index 2bc5df3..df91689 100644
--- a/src/main/java/net/minecraft/client/renderer/ItemRenderer.java
+++ b/src/main/java/net/minecraft/client/renderer/ItemRenderer.java
@@ -547,6 +547,7 @@
if (this.mc.thePlayer.isBurning())
{
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderBlockOverlayEvent(this.mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.FIRE, Blocks.fire, MathHelper.floor_double(this.mc.thePlayer.posX), MathHelper.floor_double(this.mc.thePlayer.posY), MathHelper.floor_double(this.mc.thePlayer.posZ))))
this.renderFireInFirstPerson(p_78447_1_);
}
@@ -556,9 +557,11 @@
int j = MathHelper.floor_double(this.mc.thePlayer.posY);
int k = MathHelper.floor_double(this.mc.thePlayer.posZ);
Block block = this.mc.theWorld.getBlock(i, j, k);
+ int block2_X = i, block2_Y = j, block2_Z = k;
if (this.mc.theWorld.getBlock(i, j, k).isNormalCube())
{
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderBlockOverlayEvent(this.mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, block, i, j, k)))
this.renderInsideOfBlock(p_78447_1_, block.getBlockTextureFromSide(2));
}
else
@@ -575,18 +578,23 @@
if (this.mc.theWorld.getBlock(i1, j1, k1).isNormalCube())
{
block = this.mc.theWorld.getBlock(i1, j1, k1);
+ block2_X = i;
+ block2_Y = j;
+ block2_Z = k;
}
}
}
if (block.getMaterial() != Material.air)
{
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderBlockOverlayEvent(this.mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.BLOCK, block, block2_X, block2_Y, block2_Z)))
this.renderInsideOfBlock(p_78447_1_, block.getBlockTextureFromSide(2));
}
}
if (this.mc.thePlayer.isInsideOfMaterial(Material.water))
{
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderBlockOverlayEvent(this.mc.thePlayer, p_78447_1_, net.minecraftforge.client.event.RenderBlockOverlayEvent.OverlayType.WATER, Blocks.water, MathHelper.floor_double(this.mc.thePlayer.posX), MathHelper.floor_double(this.mc.thePlayer.posY), MathHelper.floor_double(this.mc.thePlayer.posZ))))
this.renderWarpedTextureOverlay(p_78447_1_);
}
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 b9d6bca..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);
@@ -785,7 +785,7 @@
private static RenderItem instance;
/**
- * Returns a single lazy loaded instance of RenderItem, for use in mods who
+ * Returns a single lazy loaded instance of RenderItem, for use in mods who
* don't care about the interaction of other objects on the current state of the RenderItem they are using.
* @return A global instance of RenderItem
*/
diff --git a/src/main/java/net/minecraft/client/renderer/tileentity/RenderItemFrame.java b/src/main/java/net/minecraft/client/renderer/tileentity/RenderItemFrame.java
index 824fe7a..dfe13ec 100644
--- a/src/main/java/net/minecraft/client/renderer/tileentity/RenderItemFrame.java
+++ b/src/main/java/net/minecraft/client/renderer/tileentity/RenderItemFrame.java
@@ -176,6 +176,9 @@
GL11.glTranslatef(0.16F, -0.16F, 0.0F);
}
+ net.minecraftforge.client.event.RenderItemInFrameEvent event = new net.minecraftforge.client.event.RenderItemInFrameEvent(p_82402_1_, this);
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
+ {
if (item == Items.filled_map)
{
this.renderManager.renderEngine.bindTexture(mapBackgroundTextures);
@@ -244,6 +247,7 @@
}
}
}
+ }
GL11.glPopMatrix();
}
diff --git a/src/main/java/net/minecraft/client/shader/Framebuffer.java b/src/main/java/net/minecraft/client/shader/Framebuffer.java
index d8d3e8b..417c224 100644
--- a/src/main/java/net/minecraft/client/shader/Framebuffer.java
+++ b/src/main/java/net/minecraft/client/shader/Framebuffer.java
@@ -126,7 +126,7 @@
{
OpenGlHelper.func_153186_a(OpenGlHelper.field_153199_f, org.lwjgl.opengl.EXTPackedDepthStencil.GL_DEPTH24_STENCIL8_EXT, this.framebufferTextureWidth, this.framebufferTextureHeight);
OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, OpenGlHelper.field_153199_f, this.depthBuffer);
- OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, OpenGlHelper.field_153199_f, this.depthBuffer);
+ OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, org.lwjgl.opengl.EXTFramebufferObject.GL_STENCIL_ATTACHMENT_EXT, OpenGlHelper.field_153199_f, this.depthBuffer);
}
}
diff --git a/src/main/java/net/minecraft/enchantment/Enchantment.java b/src/main/java/net/minecraft/enchantment/Enchantment.java
index 8d9acfb..ea54c06 100644
--- a/src/main/java/net/minecraft/enchantment/Enchantment.java
+++ b/src/main/java/net/minecraft/enchantment/Enchantment.java
@@ -135,6 +135,7 @@
return canApply(stack);
}
+ private static final java.lang.reflect.Field bookSetter = Enchantment.class.getDeclaredFields()[1];
/**
* Add to the list of enchantments applicable by the anvil from a book
*
@@ -142,7 +143,15 @@
*/
public static void addToBookList(Enchantment enchantment)
{
- com.google.common.collect.ObjectArrays.concat(enchantmentsBookList, enchantment);
+ try
+ {
+ net.minecraftforge.common.util.EnumHelper.setFailsafeFieldValue(bookSetter, null,
+ com.google.common.collect.ObjectArrays.concat(enchantmentsBookList, enchantment));
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e); //Rethrow see what happens
+ }
}
/**
diff --git a/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java b/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java
index b24a3e8..bbd2cf3 100644
--- a/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java
+++ b/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java
@@ -772,6 +772,7 @@
{
if (p_71064_1_ != null)
{
+ if (p_71064_1_.isAchievement() && MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.AchievementEvent(this, (net.minecraft.stats.Achievement) p_71064_1_))) return;
this.field_147103_bO.func_150871_b(this, p_71064_1_, p_71064_2_);
Iterator iterator = this.getWorldScoreboard().func_96520_a(p_71064_1_.func_150952_k()).iterator();
diff --git a/src/main/java/net/minecraft/potion/Potion.java b/src/main/java/net/minecraft/potion/Potion.java
index f1ba611..46a36e3 100644
--- a/src/main/java/net/minecraft/potion/Potion.java
+++ b/src/main/java/net/minecraft/potion/Potion.java
@@ -307,4 +307,27 @@
{
return p_111183_2_.getAmount() * (double)(p_111183_1_ + 1);
}
+
+ /* ======================================== FORGE START =====================================*/
+
+ /**
+ * If the standard PotionEffect text (name and duration) should be drawn when this potion is active.
+ * @param effect the active PotionEffect
+ * @return true to draw the standard text
+ */
+ public boolean shouldRenderInvText(PotionEffect effect)
+ {
+ return true;
+ }
+
+ /**
+ * Called to draw the this Potion onto the player's inventory when it's active.
+ * This can be used to e.g. render Potion icons from your own texture.
+ * @param x the x coordinate
+ * @param y the y coordinate
+ * @param effect the active PotionEffect
+ * @param mc the Minecraft instance, for convenience
+ */
+ @SideOnly(Side.CLIENT)
+ public void renderInventoryEffect(int x, int y, PotionEffect effect, net.minecraft.client.Minecraft mc) { }
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/management/ItemInWorldManager.java b/src/main/java/net/minecraft/server/management/ItemInWorldManager.java
index 1dc31fc..68d6ce5 100644
--- a/src/main/java/net/minecraft/server/management/ItemInWorldManager.java
+++ b/src/main/java/net/minecraft/server/management/ItemInWorldManager.java
@@ -157,13 +157,13 @@
float f = 1.0F;
Block block = this.theWorld.getBlock(p_73074_1_, p_73074_2_, p_73074_3_);
-
+
if (!block.isAir(theWorld, p_73074_1_, p_73074_2_, p_73074_3_))
{
if (event.useBlock != Event.Result.DENY)
{
block.onBlockClicked(theWorld, p_73074_1_, p_73074_2_, p_73074_3_, thisPlayerMP);
- theWorld.extinguishFire(thisPlayerMP, p_73074_1_, p_73074_2_, p_73074_3_, p_73074_4_);
+ theWorld.extinguishFire(null, p_73074_1_, p_73074_2_, p_73074_3_, p_73074_4_);
}
else
{
diff --git a/src/main/java/net/minecraft/world/WorldType.java b/src/main/java/net/minecraft/world/WorldType.java
index c8af9f5..682f194 100644
--- a/src/main/java/net/minecraft/world/WorldType.java
+++ b/src/main/java/net/minecraft/world/WorldType.java
@@ -217,7 +217,7 @@
{
this(getNextID(), name);
}
-
+
/**
* Called when 'Create New World' button is pressed before starting game
*/
@@ -230,7 +230,7 @@
*/
public int getSpawnFuzz()
{
- return 20;
+ return net.minecraftforge.common.ForgeModContainer.defaultSpawnFuzz;
}
/**
@@ -255,7 +255,7 @@
{
return this == FLAT;
}
-
+
/**
* Get the height to render the clouds for this world type
@@ -268,7 +268,7 @@
/**
* Creates the GenLayerBiome used for generating the world
- *
+ *
* @param worldSeed The world seed
* @param parentLayer The parent layer to feed into any layer you return
* @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome
diff --git a/src/main/java/net/minecraft/world/biome/BiomeGenHills.java b/src/main/java/net/minecraft/world/biome/BiomeGenHills.java
index 337d102..badd912 100644
--- a/src/main/java/net/minecraft/world/biome/BiomeGenHills.java
+++ b/src/main/java/net/minecraft/world/biome/BiomeGenHills.java
@@ -55,7 +55,7 @@
j1 = p_76728_2_.nextInt(28) + 4;
int k1 = p_76728_4_ + p_76728_2_.nextInt(16);
- if (p_76728_1_.getBlock(i1, j1, k1) == Blocks.stone)
+ if (p_76728_1_.getBlock(i1, j1, k1).isReplaceableOreGen(p_76728_1_, i1, j1, k1, Blocks.stone))
{
p_76728_1_.setBlock(i1, j1, k1, Blocks.emerald_ore, 0, 2);
}
diff --git a/src/main/java/net/minecraft/world/gen/ChunkProviderEnd.java b/src/main/java/net/minecraft/world/gen/ChunkProviderEnd.java
index b30aa55..111c8ab 100644
--- a/src/main/java/net/minecraft/world/gen/ChunkProviderEnd.java
+++ b/src/main/java/net/minecraft/world/gen/ChunkProviderEnd.java
@@ -125,9 +125,14 @@
}
}
+ @Deprecated // Supply metadata to the below function.
public void func_147421_b(int p_147421_1_, int p_147421_2_, Block[] p_147421_3_, BiomeGenBase[] p_147421_4_)
{
- ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147421_1_, p_147421_2_, p_147421_3_, p_147421_4_);
+ replaceBiomeBlocks(p_147421_1_, p_147421_2_, p_147421_3_, p_147421_4_, new byte[p_147421_3_.length]);
+ }
+ public void replaceBiomeBlocks(int p_147421_1_, int p_147421_2_, Block[] p_147421_3_, BiomeGenBase[] p_147421_4_, byte[] meta)
+ {
+ ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147421_1_, p_147421_2_, p_147421_3_, meta, p_147421_4_, this.endWorld);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
@@ -193,10 +198,11 @@
{
this.endRNG.setSeed((long)p_73154_1_ * 341873128712L + (long)p_73154_2_ * 132897987541L);
Block[] ablock = new Block[32768];
+ byte[] meta = new byte[ablock.length];
this.biomesForGeneration = this.endWorld.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, p_73154_1_ * 16, p_73154_2_ * 16, 16, 16);
this.func_147420_a(p_73154_1_, p_73154_2_, ablock, this.biomesForGeneration);
- this.func_147421_b(p_73154_1_, p_73154_2_, ablock, this.biomesForGeneration);
- Chunk chunk = new Chunk(this.endWorld, ablock, p_73154_1_, p_73154_2_);
+ this.replaceBiomeBlocks(p_73154_1_, p_73154_2_, ablock, this.biomesForGeneration, meta);
+ Chunk chunk = new Chunk(this.endWorld, ablock, meta, p_73154_1_, p_73154_2_);
byte[] abyte = chunk.getBiomeArray();
for (int k = 0; k < abyte.length; ++k)
diff --git a/src/main/java/net/minecraft/world/gen/ChunkProviderGenerate.java b/src/main/java/net/minecraft/world/gen/ChunkProviderGenerate.java
index a67b62f..414705c 100644
--- a/src/main/java/net/minecraft/world/gen/ChunkProviderGenerate.java
+++ b/src/main/java/net/minecraft/world/gen/ChunkProviderGenerate.java
@@ -65,7 +65,7 @@
mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT);
scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);
ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE);
- }
+ }
public ChunkProviderGenerate(World p_i2006_1_, long p_i2006_2_, boolean p_i2006_4_)
{
@@ -182,7 +182,7 @@
public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_)
{
- ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_);
+ ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_, p_147422_2_, p_147422_3_, p_147422_4_, p_147422_5_, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
diff --git a/src/main/java/net/minecraft/world/gen/ChunkProviderHell.java b/src/main/java/net/minecraft/world/gen/ChunkProviderHell.java
index e7e71f4..3107255 100644
--- a/src/main/java/net/minecraft/world/gen/ChunkProviderHell.java
+++ b/src/main/java/net/minecraft/world/gen/ChunkProviderHell.java
@@ -155,9 +155,14 @@
}
}
+ @Deprecated //You should provide meatadata and biome data in the below method
public void func_147418_b(int p_147418_1_, int p_147418_2_, Block[] p_147418_3_)
{
- ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147418_1_, p_147418_2_, p_147418_3_, null);
+ replaceBiomeBlocks(p_147418_1_, p_147418_2_, p_147418_3_, new byte[p_147418_3_.length], null);
+ }
+ public void replaceBiomeBlocks(int p_147418_1_, int p_147418_2_, Block[] p_147418_3_, byte[] meta, BiomeGenBase[] biomes)
+ {
+ ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147418_1_, p_147418_2_, p_147418_3_, meta, biomes, this.worldObj);
MinecraftForge.EVENT_BUS.post(event);
if (event.getResult() == Result.DENY) return;
@@ -261,12 +266,13 @@
{
this.hellRNG.setSeed((long)p_73154_1_ * 341873128712L + (long)p_73154_2_ * 132897987541L);
Block[] ablock = new Block[32768];
+ byte[] meta = new byte[ablock.length];
+ BiomeGenBase[] abiomegenbase = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, p_73154_1_ * 16, p_73154_2_ * 16, 16, 16); //Forge Move up to allow for passing to replaceBiomeBlocks
this.func_147419_a(p_73154_1_, p_73154_2_, ablock);
- this.func_147418_b(p_73154_1_, p_73154_2_, ablock);
+ this.replaceBiomeBlocks(p_73154_1_, p_73154_2_, ablock, meta, abiomegenbase);
this.netherCaveGenerator.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock);
this.genNetherBridge.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock);
- Chunk chunk = new Chunk(this.worldObj, ablock, p_73154_1_, p_73154_2_);
- BiomeGenBase[] abiomegenbase = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, p_73154_1_ * 16, p_73154_2_ * 16, 16, 16);
+ Chunk chunk = new Chunk(this.worldObj, ablock, meta, p_73154_1_, p_73154_2_);
byte[] abyte = chunk.getBiomeArray();
for (int k = 0; k < abyte.length; ++k)
@@ -463,7 +469,7 @@
}
i1 = this.hellRNG.nextInt(this.hellRNG.nextInt(10) + 1);
-
+
doGen = TerrainGen.populate(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false, GLOWSTONE);
for (j1 = 0; doGen && j1 < i1; ++j1)
{
diff --git a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java
index 5302991..37b63a3 100644
--- a/src/main/java/net/minecraftforge/client/ForgeHooksClient.java
+++ b/src/main/java/net/minecraftforge/client/ForgeHooksClient.java
@@ -69,7 +69,7 @@
public class ForgeHooksClient
{
//private static final ResourceLocation ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
-
+
static TextureManager engine()
{
return FMLClientHandler.instance().getClient().renderEngine;
@@ -319,6 +319,12 @@
{
ImageIO.setUseCache(false); //Disable on-disc stream cache should speed up texture pack reloading.
PixelFormat format = new PixelFormat().withDepthBits(24);
+ if (!ForgeModContainer.enableStencilBits)
+ {
+ Display.create(format);
+ stencilBits = 0;
+ return;
+ }
try
{
//TODO: Figure out how to determine the max bits.
@@ -369,7 +375,7 @@
private static boolean skyInit;
private static int skyRGBMultiplier;
-
+
public static int getSkyBlendColour(World world, int playerX, int playerY, int playerZ)
{
if (playerX == skyX && playerZ == skyZ && skyInit)
@@ -385,7 +391,7 @@
{
distance = ranges[settings.renderDistanceChunks];
}
-
+
int r = 0;
int g = 0;
int b = 0;
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/client/event/RenderBlockOverlayEvent.java b/src/main/java/net/minecraftforge/client/event/RenderBlockOverlayEvent.java
new file mode 100644
index 0000000..ed4c8d3
--- /dev/null
+++ b/src/main/java/net/minecraftforge/client/event/RenderBlockOverlayEvent.java
@@ -0,0 +1,51 @@
+package net.minecraftforge.client.event;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import cpw.mods.fml.common.eventhandler.Cancelable;
+import cpw.mods.fml.common.eventhandler.Event;
+
+/**
+ * Called when a block's texture is going to be overlaid on the player's HUD. Cancel this event to prevent the overlay.
+ */
+@Cancelable
+public class RenderBlockOverlayEvent extends Event {
+
+ public static enum OverlayType {
+ FIRE, BLOCK, WATER
+ }
+
+ /**
+ * The player which the overlay will apply to
+ */
+ public final EntityPlayer player;
+ public final float renderPartialTicks;
+ /**
+ * The type of overlay to occur
+ */
+ public final OverlayType overlayType;
+ /**
+ * If the overlay type is BLOCK, then this is the block which the overlay is getting it's icon from
+ */
+ public final Block blockForOverlay;
+ public final int blockX;
+ public final int blockY;
+ public final int blockZ;
+
+ public RenderBlockOverlayEvent(EntityPlayer player, float renderPartialTicks, OverlayType type, Block block, int blockX, int blockY, int blockZ)
+ {
+ this.player = player;
+ this.renderPartialTicks = renderPartialTicks;
+ this.overlayType = type;
+ if (this.overlayType == OverlayType.BLOCK)
+ this.blockForOverlay = block;
+ else
+ this.blockForOverlay = null;
+ this.blockX = blockX;
+ this.blockY = blockY;
+ this.blockZ = blockZ;
+
+ }
+
+}
diff --git a/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java b/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java
new file mode 100644
index 0000000..0ec1689
--- /dev/null
+++ b/src/main/java/net/minecraftforge/client/event/RenderItemInFrameEvent.java
@@ -0,0 +1,27 @@
+package net.minecraftforge.client.event;
+
+import net.minecraft.client.renderer.tileentity.RenderItemFrame;
+import net.minecraft.entity.item.EntityItemFrame;
+import net.minecraft.item.ItemStack;
+import cpw.mods.fml.common.eventhandler.Cancelable;
+import cpw.mods.fml.common.eventhandler.Event;
+
+/**
+ * This event is called when an item is rendered in an item frame.
+ *
+ * You can set canceled to do no further vanilla processing.
+ */
+@Cancelable
+public class RenderItemInFrameEvent extends Event
+{
+ public final ItemStack item;
+ public final EntityItemFrame entityItemFrame;
+ public final RenderItemFrame renderer;
+
+ public RenderItemInFrameEvent(EntityItemFrame itemFrame, RenderItemFrame renderItemFrame)
+ {
+ item = itemFrame.getDisplayedItem();
+ entityItemFrame = itemFrame;
+ renderer = renderItemFrame;
+ }
+}
diff --git a/src/main/java/net/minecraftforge/common/BiomeDictionary.java b/src/main/java/net/minecraftforge/common/BiomeDictionary.java
index e5ee85b..619ec35 100644
--- a/src/main/java/net/minecraftforge/common/BiomeDictionary.java
+++ b/src/main/java/net/minecraftforge/common/BiomeDictionary.java
@@ -3,7 +3,9 @@
import java.util.*;
import cpw.mods.fml.common.FMLLog;
+import net.minecraft.init.Blocks;
import net.minecraft.world.biome.*;
+import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.event.terraingen.DeferredBiomeDecorator;
import static net.minecraft.world.biome.BiomeGenBase.*;
import static net.minecraftforge.common.BiomeDictionary.Type.*;
@@ -12,21 +14,95 @@
{
public enum Type
{
+ /*Temperature-based tags. Specifying neither implies a biome is temperate*/
+ HOT,
+ COLD,
+ /*Tags specifying the amount of vegetation a biome has. Specifying neither implies a biome to have moderate amounts*/
+ SPARSE,
+ DENSE,
+ /*Tags specifying how moist a biome is. Specifying neither implies the biome as having moderate humidity*/
+ WET,
+ DRY,
+ /*Tree-based tags, SAVANNA refers to dry, desert-like trees (Such as Acacia), CONIFEROUS refers to snowy trees (Such as Spruce) and JUNGLE refers to jungle trees.
+ * Specifying no tag implies a biome has temperate trees (Such as Oak)*/
+ SAVANNA,
+ CONIFEROUS,
+ JUNGLE,
+
+ /*Tags specifying the nature of a biome*/
+ SPOOKY,
+ DEAD,
+ LUSH,
+ NETHER,
+ END,
+ MUSHROOM,
+ MAGICAL,
+
+ OCEAN,
+ RIVER,
+ /**A general tag for all water-based biomes. Shown as present if OCEAN or RIVER are.**/
+ WATER(OCEAN, RIVER),
+
+ /*Generic types which a biome can be*/
+ MESA,
FOREST,
PLAINS,
MOUNTAIN,
HILLS,
SWAMP,
- WATER,
- DESERT,
- FROZEN,
- JUNGLE,
+ SANDY,
+ SNOWY,
WASTELAND,
BEACH,
- NETHER,
- END,
- MUSHROOM,
- MAGICAL;
+
+ /*Deprecated tags, kept for compatibility*/
+ @Deprecated
+ /**Replaced by SANDY**/
+ DESERT(SANDY),
+ @Deprecated
+ /**Replaced by SNOWY**/
+ FROZEN(SNOWY);
+
+ private List subTags;
+
+ private Type(Type... subTags)
+ {
+ this.subTags = Arrays.asList(subTags);
+ }
+
+ private boolean hasSubTags()
+ {
+ return subTags != null && !subTags.isEmpty();
+ }
+
+ /**
+ * Retrieves a Type value by name,
+ * if one does not exist already it creates one.
+ * This can be used as interm measure for modders to
+ * add there own category of Biome.
+ *
+ * There are NO naming conventions besides:
+ * MUST be all upper case (enforced by name.toUpper())
+ * NO Special characters. {Unenforced, just don't be a pain, if it becomes a issue I WILL
+ * make this RTE with no worry about backwards compatibility}
+ *
+ * Note: For performance sake, the return value of this function SHOULD be cached.
+ * Two calls with the same name SHOULD return the same value.
+ *
+ *
+ * @param name The name of this Type
+ * @return An instance of Type for this name.
+ */
+ public static Type getType(String name, Type... subTypes)
+ {
+ name = name.toUpperCase();
+ for (Type t : values())
+ {
+ if (t.name().equals(name))
+ return t;
+ }
+ return EnumHelper.addEnum(Type.class, name, new Class[]{Type[].class}, new Object[]{subTypes});
+ }
}
private static final int BIOME_LIST_SIZE = BiomeGenBase.getBiomeGenArray().length;
@@ -55,13 +131,15 @@
/**
* Registers a biome with a specific biome type
- *
+ *
* @param biome the biome to be registered
* @param type the type to register the biome as
* @return returns true if the biome was registered successfully
*/
public static boolean registerBiomeType(BiomeGenBase biome, Type ... types)
- {
+ {
+ types = listSubTags(types);
+
if(BiomeGenBase.getBiomeGenArray()[biome.biomeID] != null)
{
for(Type type : types)
@@ -94,7 +172,7 @@
/**
* Returns a list of biomes registered with a specific type
- *
+ *
* @param type the Type to look for
* @return a list of biomes of the specified type, null if there are none
*/
@@ -110,7 +188,7 @@
/**
* Gets a list of Types that a specific biome is registered with
- *
+ *
* @param biome the biome to check
* @return the list of types, null if there are none
*/
@@ -128,7 +206,7 @@
/**
* Checks to see if two biomes are registered as having the same type
- *
+ *
* @param biomeA
* @param biomeB
* @return returns true if a common type is found, false otherwise
@@ -157,7 +235,7 @@
/**
* Checks to see if the given biome is registered as being a specific type
- *
+ *
* @param biome the biome to be considered
* @param type the type to check for
* @return returns true if the biome is registered as being of type type, false otherwise
@@ -180,7 +258,7 @@
* @return returns true if the biome has been registered, false otherwise
*/
public static boolean isBiomeRegistered(BiomeGenBase biome)
- {
+ {
return biomeList[biome.biomeID] != null;
}
@@ -197,7 +275,7 @@
* Loops through the biome list and automatically adds tags to any biome that does not have any
* This is called by Forge at postinit time. It will additionally dispatch any deferred decorator
* creation events.
- *
+ *
* DO NOT call this during world generation
*/
public static void registerAllBiomesAndGenerateEvents()
@@ -225,22 +303,25 @@
* Automatically looks for and registers a given biome with appropriate tags
* This method is called automatically if a biome has not been registered with any tags,
* And another method requests information about it
- *
- * NOTE: You can opt out of having your biome registered by registering it as type NULL
- *
+ *
* @param biome the biome to be considered
*/
public static void makeBestGuess(BiomeGenBase biome)
- {
- if(biome.theBiomeDecorator.treesPerChunk >= 3)
+ {
+ if (biome.theBiomeDecorator.treesPerChunk >= 3)
{
- if(biome.isHighHumidity() && biome.temperature >= 1.0F)
+ if (biome.isHighHumidity() && biome.temperature >= 0.9F)
{
BiomeDictionary.registerBiomeType(biome, JUNGLE);
}
- else if(!biome.isHighHumidity())
+ else if (!biome.isHighHumidity())
{
BiomeDictionary.registerBiomeType(biome, FOREST);
+
+ if (biome.temperature <= 0.2f)
+ {
+ BiomeDictionary.registerBiomeType(biome, CONIFEROUS);
+ }
}
}
else if(biome.heightVariation <= 0.3F && biome.heightVariation >= 0.0F)
@@ -251,33 +332,87 @@
}
}
- if(biome.isHighHumidity() && biome.rootHeight < 0.0F && (biome.heightVariation <= 0.3F && biome.heightVariation >= 0.0F))
+ if (biome.rainfall > 0.85f)
+ {
+ BiomeDictionary.registerBiomeType(biome, WET);
+ }
+
+ if (biome.rainfall < 0.15f)
+ {
+ BiomeDictionary.registerBiomeType(biome, DRY);
+ }
+
+ if (biome.temperature > 0.85f)
+ {
+ BiomeDictionary.registerBiomeType(biome, HOT);
+ }
+
+ if (biome.temperature < 0.15f)
+ {
+ BiomeDictionary.registerBiomeType(biome, COLD);
+ }
+
+ if (biome.theBiomeDecorator.treesPerChunk > 0 && biome.theBiomeDecorator.treesPerChunk < 3)
+ {
+ BiomeDictionary.registerBiomeType(biome, SPARSE);
+ }
+ else if (biome.theBiomeDecorator.treesPerChunk >= 10)
+ {
+ BiomeDictionary.registerBiomeType(biome, DENSE);
+ }
+
+ if (biome.isHighHumidity() && biome.rootHeight < 0.0F && (biome.heightVariation <= 0.3F && biome.heightVariation >= 0.0F))
{
BiomeDictionary.registerBiomeType(biome, SWAMP);
}
- if(biome.rootHeight <= -0.5F)
+ if (biome.rootHeight <= -0.5F)
{
- BiomeDictionary.registerBiomeType(biome, WATER);
+ if (biome.heightVariation == 0.0F)
+ {
+ BiomeDictionary.registerBiomeType(biome, RIVER);
+ }
+ else
+ {
+ BiomeDictionary.registerBiomeType(biome, OCEAN);
+ }
}
- if(biome.heightVariation >= 1.5F)
+ if (biome.heightVariation >= 0.4F && biome.heightVariation < 1.5F)
+ {
+ BiomeDictionary.registerBiomeType(biome, HILLS);
+ }
+
+ if (biome.heightVariation >= 1.5F)
{
BiomeDictionary.registerBiomeType(biome, MOUNTAIN);
}
-
- if(biome.getEnableSnow() || biome.temperature < 0.2F)
+
+ if (biome.getEnableSnow())
{
- BiomeDictionary.registerBiomeType(biome, FROZEN);
+ BiomeDictionary.registerBiomeType(biome, SNOWY);
}
-
- if(!biome.isHighHumidity() && biome.temperature >= 1.0F)
+
+ if (biome.topBlock != Blocks.sand && biome.temperature >= 1.0f && biome.rainfall < 0.2f)
{
- BiomeDictionary.registerBiomeType(biome, DESERT);
+ BiomeDictionary.registerBiomeType(biome, SAVANNA);
+ }
+
+ if (biome.topBlock == Blocks.sand )
+ {
+ BiomeDictionary.registerBiomeType(biome, SANDY);
+ }
+ else if (biome.topBlock == Blocks.hardened_clay)
+ {
+ BiomeDictionary.registerBiomeType(biome, MESA);
+ }
+ else if (biome.topBlock == Blocks.mycelium)
+ {
+ BiomeDictionary.registerBiomeType(biome, MUSHROOM);
}
}
- //Internal implementation
+ //Internal implementation
private static void checkRegistration(BiomeGenBase biome)
{
if(!isBiomeRegistered(biome))
@@ -288,50 +423,73 @@
private static boolean containsType(BiomeInfo info, Type type)
{
+ if (type.hasSubTags())
+ {
+ for (Type remappedType : listSubTags(type))
+ {
+ if (info.typeList.contains(remappedType)) return true;
+ }
+
+ return false;
+ }
+
return info.typeList.contains(type);
}
+ private static Type[] listSubTags(Type... types)
+ {
+ List subTags = new ArrayList();
+
+ for (Type type : types)
+ {
+ if (type.hasSubTags()) subTags.addAll(type.subTags);
+ else subTags.add(type);
+ }
+
+ return subTags.toArray(new Type[subTags.size()]);
+ }
+
private static void registerVanillaBiomes()
{
- registerBiomeType(ocean, WATER );
- registerBiomeType(plains, PLAINS );
- registerBiomeType(desert, DESERT );
- registerBiomeType(extremeHills, MOUNTAIN );
- registerBiomeType(forest, FOREST );
- registerBiomeType(taiga, FOREST, FROZEN);
- registerBiomeType(taigaHills, FOREST, FROZEN);
- registerBiomeType(swampland, SWAMP );
- registerBiomeType(river, WATER );
- registerBiomeType(frozenOcean, WATER, FROZEN);
- registerBiomeType(frozenRiver, WATER, FROZEN);
- registerBiomeType(icePlains, FROZEN );
- registerBiomeType(iceMountains, FROZEN );
- registerBiomeType(beach, BEACH );
- registerBiomeType(desertHills, DESERT );
- registerBiomeType(jungle, JUNGLE );
- registerBiomeType(jungleHills, JUNGLE );
- registerBiomeType(forestHills, FOREST );
- registerBiomeType(sky, END );
- registerBiomeType(hell, NETHER );
- registerBiomeType(mushroomIsland, MUSHROOM );
- registerBiomeType(extremeHillsEdge, MOUNTAIN );
- registerBiomeType(mushroomIslandShore, MUSHROOM, BEACH);
- registerBiomeType(jungleEdge, JUNGLE );
- registerBiomeType(deepOcean, WATER );
- registerBiomeType(stoneBeach, BEACH );
- registerBiomeType(coldBeach, BEACH, FROZEN);
- registerBiomeType(birchForest, FOREST );
- registerBiomeType(birchForestHills, FOREST );
- registerBiomeType(roofedForest, FOREST );
- registerBiomeType(coldTaiga, FOREST, FROZEN);
- registerBiomeType(coldTaigaHills, FOREST, FROZEN);
- registerBiomeType(megaTaiga, FOREST );
- registerBiomeType(megaTaigaHills, FOREST );
- registerBiomeType(extremeHillsPlus, FOREST );
- registerBiomeType(savanna, PLAINS, DESERT);
- registerBiomeType(savannaPlateau, PLAINS, DESERT);
- registerBiomeType(mesa, DESERT );
- registerBiomeType(mesaPlateau_F, DESERT );
- registerBiomeType(mesaPlateau, DESERT );
+ registerBiomeType(ocean, OCEAN );
+ registerBiomeType(plains, PLAINS );
+ registerBiomeType(desert, HOT, DRY, SANDY );
+ registerBiomeType(extremeHills, MOUNTAIN, HILLS );
+ registerBiomeType(forest, FOREST );
+ registerBiomeType(taiga, COLD, CONIFEROUS, FOREST );
+ registerBiomeType(taigaHills, COLD, CONIFEROUS, FOREST, HILLS );
+ registerBiomeType(swampland, WET, SWAMP );
+ registerBiomeType(river, RIVER );
+ registerBiomeType(frozenOcean, COLD, OCEAN, SNOWY );
+ registerBiomeType(frozenRiver, COLD, RIVER, SNOWY );
+ registerBiomeType(icePlains, COLD, SNOWY, WASTELAND );
+ registerBiomeType(iceMountains, COLD, SNOWY, MOUNTAIN );
+ registerBiomeType(beach, BEACH );
+ registerBiomeType(desertHills, HOT, DRY, SANDY, HILLS );
+ registerBiomeType(jungle, HOT, WET, DENSE, JUNGLE );
+ registerBiomeType(jungleHills, HOT, WET, DENSE, JUNGLE, HILLS);
+ registerBiomeType(forestHills, FOREST, HILLS );
+ registerBiomeType(sky, COLD, DRY, END );
+ registerBiomeType(hell, HOT, DRY, NETHER );
+ registerBiomeType(mushroomIsland, MUSHROOM );
+ registerBiomeType(extremeHillsEdge, MOUNTAIN );
+ registerBiomeType(mushroomIslandShore, MUSHROOM, BEACH );
+ registerBiomeType(jungleEdge, HOT, WET, JUNGLE, FOREST );
+ registerBiomeType(deepOcean, OCEAN );
+ registerBiomeType(stoneBeach, BEACH );
+ registerBiomeType(coldBeach, COLD, BEACH, SNOWY );
+ registerBiomeType(birchForest, FOREST );
+ registerBiomeType(birchForestHills, FOREST, HILLS );
+ registerBiomeType(roofedForest, SPOOKY, DENSE, FOREST );
+ registerBiomeType(coldTaiga, COLD, CONIFEROUS, FOREST, SNOWY );
+ registerBiomeType(coldTaigaHills, COLD, CONIFEROUS, FOREST, SNOWY, HILLS);
+ registerBiomeType(megaTaiga, COLD, CONIFEROUS, FOREST );
+ registerBiomeType(megaTaigaHills, COLD, CONIFEROUS, FOREST, HILLS );
+ registerBiomeType(extremeHillsPlus, MOUNTAIN, FOREST, SPARSE );
+ registerBiomeType(savanna, HOT, SAVANNA, PLAINS, SPARSE );
+ registerBiomeType(savannaPlateau, HOT, SAVANNA, PLAINS, SPARSE );
+ registerBiomeType(mesa, MESA, SANDY );
+ registerBiomeType(mesaPlateau_F, MESA, SPARSE, SANDY );
+ registerBiomeType(mesaPlateau, MESA, SANDY );
}
}
diff --git a/src/main/java/net/minecraftforge/common/ForgeModContainer.java b/src/main/java/net/minecraftforge/common/ForgeModContainer.java
index 3b3b89a..601053b 100644
--- a/src/main/java/net/minecraftforge/common/ForgeModContainer.java
+++ b/src/main/java/net/minecraftforge/common/ForgeModContainer.java
@@ -66,7 +66,9 @@
public static float zombieBabyChance = 0.05f;
public static boolean shouldSortRecipies = true;
public static boolean disableVersionCheck = false;
-
+ public static boolean enableStencilBits = true;
+ public static int defaultSpawnFuzz = 20;
+
private static Configuration config;
public ForgeModContainer()
@@ -89,7 +91,7 @@
config = null;
File cfgFile = new File(Loader.instance().getConfigDir(), "forge.cfg");
config = new Configuration(cfgFile);
-
+
syncConfig(true);
}
@@ -98,7 +100,7 @@
{
return "net.minecraftforge.client.gui.ForgeGuiFactory";
}
-
+
public static Configuration getConfig()
{
return config;
@@ -112,7 +114,7 @@
// By adding a property order list we are defining the order that the properties will appear both in the config file and on the GUIs.
// Property order lists are defined per-ConfigCategory.
List propOrder = new ArrayList();
-
+
if (!config.isChild)
{
if (load)
@@ -125,7 +127,7 @@
Configuration.enableGlobalConfig();
}
}
-
+
Property prop;
prop = config.get(CATEGORY_GENERAL, "disableVersionCheck", false);
@@ -137,8 +139,8 @@
prop.setLanguageKey("forge.configgui.disableVersionCheck");
disableVersionCheck = prop.getBoolean(disableVersionCheck);
propOrder.add(prop.getName());
-
- prop = config.get(Configuration.CATEGORY_GENERAL, "clumpingThreshold", 64,
+
+ prop = config.get(Configuration.CATEGORY_GENERAL, "clumpingThreshold", 64,
"Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024", 64, 1024);
prop.setLanguageKey("forge.configgui.clumpingThreshold").setRequiresWorldRestart(true);
clumpingThreshold = prop.getInt(64);
@@ -204,18 +206,31 @@
blendRanges = prop.getIntList();
propOrder.add(prop.getName());
- prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBaseSummonChance", 0.1,
+ prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBaseSummonChance", 0.1,
"Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.", 0.0D, 1.0D);
prop.setLanguageKey("forge.configgui.zombieBaseSummonChance").setRequiresWorldRestart(true);
zombieSummonBaseChance = prop.getDouble(0.1);
propOrder.add(prop.getName());
- prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBabyChance", 0.05,
+ prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBabyChance", 0.05,
"Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.", 0.0D, 1.0D);
prop.setLanguageKey("forge.configgui.zombieBabyChance").setRequiresWorldRestart(true);
zombieBabyChance = (float) prop.getDouble(0.05);
propOrder.add(prop.getName());
-
+
+ prop = config.get(Configuration.CATEGORY_GENERAL, "enableStencilBits", true);
+ prop.comment = "Set to false to attempt to allocate 8 stencil bits when starting the GL display context.";
+ prop.setLanguageKey("forge.configgui.stencilbits").setRequiresWorldRestart(true);
+ enableStencilBits = prop.getBoolean(true);
+ propOrder.add(prop.getName());
+
+ prop = config.get(Configuration.CATEGORY_GENERAL, "defaultSpawnFuzz", 20,
+ "The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld.",
+ 1, Integer.MAX_VALUE);
+ prop.setLanguageKey("forge.configgui.spawnfuzz").setRequiresWorldRestart(false);
+ defaultSpawnFuzz = prop.getInt(20);
+ propOrder.add(prop.getName());
+
config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);
if (config.hasChanged())
@@ -223,7 +238,7 @@
config.save();
}
}
-
+
/**
* By subscribing to the OnConfigChangedEvent we are able to execute code when our config screens are closed.
* This implementation uses the optional configID string to handle multiple Configurations using one event handler.
diff --git a/src/main/java/net/minecraftforge/common/chunkio/ChunkIOProvider.java b/src/main/java/net/minecraftforge/common/chunkio/ChunkIOProvider.java
index f7eb8c1..ed8da13 100644
--- a/src/main/java/net/minecraftforge/common/chunkio/ChunkIOProvider.java
+++ b/src/main/java/net/minecraftforge/common/chunkio/ChunkIOProvider.java
@@ -37,7 +37,7 @@
public void callStage2(QueuedChunk queuedChunk, net.minecraft.world.chunk.Chunk chunk) throws RuntimeException {
if(chunk == null) {
// If the chunk loading failed just do it synchronously (may generate)
- queuedChunk.provider.loadChunk(queuedChunk.x, queuedChunk.z);
+ queuedChunk.provider.originalLoadChunk(queuedChunk.x, queuedChunk.z);
return;
}
@@ -63,4 +63,4 @@
thread.setDaemon(true);
return thread;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/minecraftforge/common/util/EnumHelper.java b/src/main/java/net/minecraftforge/common/util/EnumHelper.java
index dc0e1a7..f03a8e5 100644
--- a/src/main/java/net/minecraftforge/common/util/EnumHelper.java
+++ b/src/main/java/net/minecraftforge/common/util/EnumHelper.java
@@ -49,7 +49,7 @@
{EnumStatus.class},
{ToolMaterial.class, int.class, int.class, float.class, float.class, int.class},
{EnumRarity.class, EnumChatFormatting.class, String.class}
- };
+ };
public static EnumAction addAction(String name)
{
@@ -190,7 +190,7 @@
setup();
return addEnum(commonTypes, enumType, enumName, paramValues);
}
-
+
@SuppressWarnings("rawtypes")
public static > T addEnum(Class[][] map, Class enumType, String enumName, Object... paramValues)
{
@@ -219,7 +219,7 @@
Field valuesField = null;
Field[] fields = enumType.getDeclaredFields();
-
+
for (Field field : fields)
{
String name = field.getName();
@@ -234,7 +234,7 @@
if (valuesField == null)
{
String valueType = String.format("[L%s;", enumType.getName().replace('.', '/'));
-
+
for (Field field : fields)
{
if ((field.getModifiers() & flags) == flags &&
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/AchievementEvent.java b/src/main/java/net/minecraftforge/event/entity/player/AchievementEvent.java
new file mode 100644
index 0000000..7dff20d
--- /dev/null
+++ b/src/main/java/net/minecraftforge/event/entity/player/AchievementEvent.java
@@ -0,0 +1,20 @@
+package net.minecraftforge.event.entity.player;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.stats.Achievement;
+import cpw.mods.fml.common.eventhandler.Cancelable;
+import cpw.mods.fml.common.eventhandler.Event;
+
+/**
+ * When the player receives an achievement. If canceled the player will not receive anything.
+ */
+@Cancelable
+public class AchievementEvent extends PlayerEvent {
+
+ public final Achievement achievement;
+ public AchievementEvent(EntityPlayer player, Achievement achievement)
+ {
+ super(player);
+ this.achievement = achievement;
+ }
+}
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/ChunkProviderEvent.java b/src/main/java/net/minecraftforge/event/terraingen/ChunkProviderEvent.java
index ea1d02d..55841fb 100644
--- a/src/main/java/net/minecraftforge/event/terraingen/ChunkProviderEvent.java
+++ b/src/main/java/net/minecraftforge/event/terraingen/ChunkProviderEvent.java
@@ -2,6 +2,7 @@
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.block.Block;
+import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.IChunkProvider;
@@ -9,56 +10,60 @@
{
public final IChunkProvider chunkProvider;
-
+
public ChunkProviderEvent(IChunkProvider chunkProvider)
{
this.chunkProvider = chunkProvider;
}
-
+
/**
* This event is fired when a chunks blocks are replaced by a biomes top and
* filler blocks.
- *
+ *
* You can set the result to DENY to prevent the default replacement.
*/
@HasResult
- public static class ReplaceBiomeBlocks extends ChunkProviderEvent
+ public static class ReplaceBiomeBlocks extends ChunkProviderEvent
{
public final int chunkX;
public final int chunkZ;
public final Block[] blockArray;
- public final byte[] metaArray;
+ public final byte[] metaArray; // CAN BE NULL
public final BiomeGenBase[] biomeArray;
-
+ public final World world; // CAN BE NULL
+
+ @Deprecated // TODO: Remove in 1.8
public ReplaceBiomeBlocks(IChunkProvider chunkProvider, int chunkX, int chunkZ, Block[] blockArray, BiomeGenBase[] biomeArray)
{
- super(chunkProvider);
- this.chunkX = chunkX;
- this.chunkZ = chunkZ;
- this.blockArray = blockArray;
- this.biomeArray = biomeArray;
- metaArray = new byte[256];
+ this(chunkProvider, chunkX, chunkZ, blockArray, new byte[256], biomeArray, null);
}
-
+
+ @Deprecated // TODO: Remove in 1.8
public ReplaceBiomeBlocks(IChunkProvider chunkProvider, int chunkX, int chunkZ, Block[] blockArray, byte[] metaArray, BiomeGenBase[] biomeArray)
{
+ this(chunkProvider, chunkZ, chunkZ, blockArray, metaArray, biomeArray, null);
+ }
+
+ public ReplaceBiomeBlocks(IChunkProvider chunkProvider, int chunkX, int chunkZ, Block[] blockArray, byte[] metaArray, BiomeGenBase[] biomeArray, World world)
+ {
super(chunkProvider);
this.chunkX = chunkX;
this.chunkZ = chunkZ;
this.blockArray = blockArray;
this.biomeArray = biomeArray;
this.metaArray = metaArray;
+ this.world = world;
}
-
+
}
-
+
/**
* This event is fired before a chunks terrain noise field is initialized.
- *
+ *
* You can set the result to DENY to substitute your own noise field.
*/
@HasResult
- public static class InitNoiseField extends ChunkProviderEvent
+ public static class InitNoiseField extends ChunkProviderEvent
{
public double[] noisefield;
public final int posX;
@@ -67,7 +72,7 @@
public final int sizeX;
public final int sizeY;
public final int sizeZ;
-
+
public InitNoiseField(IChunkProvider chunkProvider, double[] noisefield, int posX, int posY, int posZ, int sizeX, int sizeY, int sizeZ)
{
super(chunkProvider);
@@ -79,6 +84,6 @@
this.sizeY = sizeY;
this.sizeZ = sizeZ;
}
-
+
}
}
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/java/net/minecraftforge/fluids/Fluid.java b/src/main/java/net/minecraftforge/fluids/Fluid.java
index 0c299a7..2f57c5b 100644
--- a/src/main/java/net/minecraftforge/fluids/Fluid.java
+++ b/src/main/java/net/minecraftforge/fluids/Fluid.java
@@ -190,6 +190,15 @@
/**
* Returns the localized name of this fluid.
*/
+ public String getLocalizedName(FluidStack stack)
+ {
+ return getLocalizedName();
+ }
+
+ /**
+ * Use the FluidStack sensitive version above
+ */
+ @Deprecated
public String getLocalizedName()
{
String s = this.getUnlocalizedName();
diff --git a/src/main/resources/assets/forge/lang/en_US.lang b/src/main/resources/assets/forge/lang/en_US.lang
index 3d2e685..25759ef 100644
--- a/src/main/resources/assets/forge/lang/en_US.lang
+++ b/src/main/resources/assets/forge/lang/en_US.lang
@@ -40,6 +40,8 @@
forge.configgui.zombieBabyChance=Zombie Baby Chance
forge.configgui.zombieBaseSummonChance.tooltip=Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
forge.configgui.zombieBaseSummonChance=Zombie Summon Chance
+forge.configgui.stencilbits=Enable GL Stencil Bits
+forge.configgui.spawnfuzz=Respawn Fuzz Diameter
forge.configgui.modID.tooltip=The mod ID that you want to define override settings for.
forge.configgui.modID=Mod ID
diff --git a/src/main/resources/fmlversion.properties b/src/main/resources/fmlversion.properties
index f027986..aa47058 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=1
-fmlbuild.build.number=41
+fmlbuild.revision.number=11
+fmlbuild.build.number=58
fmlbuild.mcversion=1.7.10
fmlbuild.mcpversion=9.05