From 46440588fe1b9c5a82be8ca5d2175a086763c5c5 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 27 Dec 2012 13:50:13 -0800 Subject: [PATCH] Fix mobs spawning on inverted slabs/stairs. --- .../minecraftforge/common/MinecraftForge.java | 1 + .../net/minecraft/block/Block.java.patch | 20 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/common/net/minecraftforge/common/MinecraftForge.java b/common/net/minecraftforge/common/MinecraftForge.java index 4d6e2c70b..aefed721d 100644 --- a/common/net/minecraftforge/common/MinecraftForge.java +++ b/common/net/minecraftforge/common/MinecraftForge.java @@ -33,6 +33,7 @@ public class MinecraftForge public static final EventBus EVENT_BUS = new EventBus(); public static final EventBus TERRAIN_GEN_BUS = new EventBus(); public static final EventBus ORE_GEN_BUS = new EventBus(); + @Deprecated //Vanilla feature now public static boolean SPAWNER_ALLOW_ON_INVERTED = false; private static final ForgeInternalHandler INTERNAL_HANDLER = new ForgeInternalHandler(); diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 67ef7bb75..d9c0a5e81 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -141,7 +141,7 @@ { ItemStack var8 = this.createStackedBlock(par6); -@@ -1356,4 +1372,849 @@ +@@ -1356,4 +1372,835 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); } @@ -511,25 +511,11 @@ + int meta = world.getBlockMetadata(x, y, z); + if (this instanceof BlockStep) + { -+ if (MinecraftForge.SPAWNER_ALLOW_ON_INVERTED) -+ { -+ return (((meta & 8) == 8) || isOpaqueCube()); -+ } -+ else -+ { -+ return isNormalCube(this.blockID); -+ } ++ return (((meta & 8) == 8) || isOpaqueCube()); + } + else if (this instanceof BlockStairs) + { -+ if (MinecraftForge.SPAWNER_ALLOW_ON_INVERTED) -+ { -+ return ((meta & 4) != 0); -+ } -+ else -+ { -+ return isNormalCube(this.blockID); -+ } ++ return ((meta & 4) != 0); + } + return isBlockSolidOnSide(world, x, y, z, UP); + }