Fix mobs spawning on inverted slabs/stairs.
This commit is contained in:
parent
081ec4b70a
commit
46440588fe
2 changed files with 4 additions and 17 deletions
|
@ -33,6 +33,7 @@ public class MinecraftForge
|
||||||
public static final EventBus EVENT_BUS = new EventBus();
|
public static final EventBus EVENT_BUS = new EventBus();
|
||||||
public static final EventBus TERRAIN_GEN_BUS = new EventBus();
|
public static final EventBus TERRAIN_GEN_BUS = new EventBus();
|
||||||
public static final EventBus ORE_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;
|
public static boolean SPAWNER_ALLOW_ON_INVERTED = false;
|
||||||
private static final ForgeInternalHandler INTERNAL_HANDLER = new ForgeInternalHandler();
|
private static final ForgeInternalHandler INTERNAL_HANDLER = new ForgeInternalHandler();
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
{
|
{
|
||||||
ItemStack var8 = this.createStackedBlock(par6);
|
ItemStack var8 = this.createStackedBlock(par6);
|
||||||
|
|
||||||
@@ -1356,4 +1372,849 @@
|
@@ -1356,4 +1372,835 @@
|
||||||
canBlockGrass[0] = true;
|
canBlockGrass[0] = true;
|
||||||
StatList.initBreakableStats();
|
StatList.initBreakableStats();
|
||||||
}
|
}
|
||||||
|
@ -511,26 +511,12 @@
|
||||||
+ int meta = world.getBlockMetadata(x, y, z);
|
+ int meta = world.getBlockMetadata(x, y, z);
|
||||||
+ if (this instanceof BlockStep)
|
+ if (this instanceof BlockStep)
|
||||||
+ {
|
+ {
|
||||||
+ if (MinecraftForge.SPAWNER_ALLOW_ON_INVERTED)
|
|
||||||
+ {
|
|
||||||
+ return (((meta & 8) == 8) || isOpaqueCube());
|
+ return (((meta & 8) == 8) || isOpaqueCube());
|
||||||
+ }
|
+ }
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ return isNormalCube(this.blockID);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else if (this instanceof BlockStairs)
|
+ else if (this instanceof BlockStairs)
|
||||||
+ {
|
+ {
|
||||||
+ if (MinecraftForge.SPAWNER_ALLOW_ON_INVERTED)
|
|
||||||
+ {
|
|
||||||
+ return ((meta & 4) != 0);
|
+ return ((meta & 4) != 0);
|
||||||
+ }
|
+ }
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ return isNormalCube(this.blockID);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return isBlockSolidOnSide(world, x, y, z, UP);
|
+ return isBlockSolidOnSide(world, x, y, z, UP);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue