mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Implemented isBlockFoliage for pull #141
This commit is contained in:
1 parent
4524435e25
commit
769f18ee61
2 files changed
+21
-1
No files matched your search
@@ -104,7 +104,7 @@
|
||||
{
|
||||
ItemStack var8 = this.createStackedBlock(par6);
|
||||
|
||||
@@ -1249,4 +1257,669 @@
|
||||
@@ -1249,4 +1257,680 @@
|
||||
canBlockGrass[0] = true;
|
||||
StatList.initBreakableStats();
|
||||
}
|
||||
@@ -772,5 +772,16 @@
|
||||
+ }
|
||||
+
|
||||
+ return new ItemStack(id, 1, getDamageValue(world, x, y, z));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Used by getTopSolidOrLiquidBlock while placing biome decorations, villages, etc
|
||||
+ * Also used to determine if the player can spawn on this block.
|
||||
+ *
|
||||
+ * @return False to disallow spawning
|
||||
+ */
|
||||
+ public boolean isBlockFoliage(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
@@ -93,6 +93,15 @@
|
||||
}
|
||||
|
||||
this.getChunkFromChunkCoords(var2, var3).addEntity(par1Entity);
|
||||
@@ -1730,7 +1759,7 @@
|
||||
{
|
||||
int var5 = var3.getBlockID(par1, var4, par2);
|
||||
|
||||
- if (var5 != 0 && Block.blocksList[var5].blockMaterial.blocksMovement() && Block.blocksList[var5].blockMaterial != Material.leaves)
|
||||
+ if (var5 != 0 && Block.blocksList[var5].blockMaterial.blocksMovement() && Block.blocksList[var5].blockMaterial != Material.leaves && !Block.blocksList[var5].isBlockFoliage(this, par1, var4, par2))
|
||||
{
|
||||
return var4 + 1;
|
||||
}
|
||||
@@ -1887,7 +1916,7 @@
|
||||
|
||||
if (var8 != null)
|
||||
|
||||
Reference in new issue
Block a user