Removed erroring imports and update build function to die on errors.

This commit is contained in:
LexManos 2013-03-04 20:57:42 -08:00
parent 20db933cee
commit 43a1bf1425
3 changed files with 14 additions and 9 deletions

View file

@ -12,7 +12,6 @@ import net.minecraft.world.WorldServer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.Event.Result;
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
import net.minecraftforge.event.entity.living.LivingSpecialSpawnEvent;
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;

View file

@ -116,11 +116,18 @@ def build_forge_dev(mcp_dir, forge_dir, fml_dir, build_num=0):
error_level = 0
try:
sys.path.append(mcp_dir)
from runtime.recompile import recompile
from runtime.commands import Commands, CLIENT, SERVER, CalledProcessError
from runtime.mcp import recompile_side
os.chdir(mcp_dir)
reset_logger()
recompile(None, True, False)
commands = Commands(None, verify=True)
try:
recompile_side(commands, CLIENT)
except CalledProcessError as e:
error_level = 1
pass
reset_logger()
os.chdir(forge_dir)
except SystemExit, e:

View file

@ -8,19 +8,18 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -19,6 +21,11 @@
@@ -19,6 +21,10 @@
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.ForgeEventFactory;
+import net.minecraftforge.event.entity.living.LivingSpecialSpawnEvent;
+
public final class SpawnerAnimals
{
/** The 17x17 area around the player where mobs can spawn */
@@ -93,6 +100,9 @@
@@ -93,6 +99,9 @@
if ((!enumcreaturetype.getPeacefulCreature() || par2) && (enumcreaturetype.getPeacefulCreature() || par1) && (!enumcreaturetype.getAnimal() || par3) && par0WorldServer.countEntities(enumcreaturetype.getCreatureClass()) <= enumcreaturetype.getMaxNumberOfCreature() * eligibleChunksForSpawning.size() / 256)
{
Iterator iterator = eligibleChunksForSpawning.keySet().iterator();
@ -30,7 +29,7 @@
label110:
while (iterator.hasNext())
@@ -169,7 +179,8 @@
@@ -169,7 +178,8 @@
entityliving.setLocationAndAngles((double)f, (double)f1, (double)f2, par0WorldServer.rand.nextFloat() * 360.0F, 0.0F);
@ -40,7 +39,7 @@
{
++j2;
par0WorldServer.spawnEntityInWorld(entityliving);
@@ -221,7 +232,8 @@
@@ -221,7 +231,8 @@
else
{
int l = par1World.getBlockId(par2, par3 - 1, par4);
@ -50,7 +49,7 @@
}
}
@@ -230,6 +242,11 @@
@@ -230,6 +241,11 @@
*/
private static void creatureSpecificInit(EntityLiving par0EntityLiving, World par1World, float par2, float par3, float par4)
{