From 43a1bf1425dff3c8efef9bf83a1aa22835ba372e Mon Sep 17 00:00:00 2001 From: LexManos Date: Mon, 4 Mar 2013 20:57:42 -0800 Subject: [PATCH] Removed erroring imports and update build function to die on errors. --- .../net/minecraftforge/event/ForgeEventFactory.java | 1 - forge.py | 11 +++++++++-- .../net/minecraft/world/SpawnerAnimals.java.patch | 11 +++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/common/net/minecraftforge/event/ForgeEventFactory.java b/common/net/minecraftforge/event/ForgeEventFactory.java index 3f1deeda8..48f774204 100644 --- a/common/net/minecraftforge/event/ForgeEventFactory.java +++ b/common/net/minecraftforge/event/ForgeEventFactory.java @@ -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; diff --git a/forge.py b/forge.py index 241d8f005..0615bc06e 100644 --- a/forge.py +++ b/forge.py @@ -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: diff --git a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch index 3f2fdc88b..fb4624bc3 100644 --- a/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch +++ b/patches/minecraft/net/minecraft/world/SpawnerAnimals.java.patch @@ -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) {