mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Location aware version og Block.lightOpacity for PR #169
This commit is contained in:
1 parent
6ec887b34f
commit
520550dab9
6 files changed
+145
-38
No files matched your search
@@ -102,7 +102,7 @@
|
||||
{
|
||||
ItemStack var8 = this.createStackedBlock(par6);
|
||||
|
||||
@@ -1249,4 +1255,797 @@
|
||||
@@ -1249,4 +1255,816 @@
|
||||
canBlockGrass[0] = true;
|
||||
StatList.initBreakableStats();
|
||||
}
|
||||
@@ -898,5 +898,24 @@
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Location aware and overrideable version of the lightOpacity array,
|
||||
+ * return the number to subtract from the light value when it passes through this block.
|
||||
+ *
|
||||
+ * This is not guaranteed to have the tile entity in place before this is called, so it is
|
||||
+ * Recommended that you have your tile entity call relight after being placed if you
|
||||
+ * rely on it for light info.
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param x X Position
|
||||
+ * @param y Y Position
|
||||
+ * @param z Z position
|
||||
+ * @return The amount of light to block, 0 for air, 255 for fully opaque.
|
||||
+ */
|
||||
+ public int getLightOpacity(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return lightOpacity[blockID];
|
||||
+ }
|
||||
}
|
||||
Reference in new issue
Block a user