No-nonsense getSoundType

This commit is contained in:
Vincent Lee committed 2016-07-24 11:44:21 -05:00
1 parent 5a3047fbc2
commit f8ec3602f2
12 files changed
+143 -3

No files matched your search

@@ -195,7 +195,15 @@
}
@SideOnly(Side.CLIENT)
@@ -893,6 +912,1141 @@
@@ -883,6 +902,7 @@
return Block.EnumOffsetType.NONE;
}
+ @Deprecated // Forge - World/state/pos/entity sensitive version below
public SoundType func_185467_w()
{
return this.field_149762_H;
@@ -893,6 +913,1155 @@
return "Block{" + field_149771_c.func_177774_c(this) + "}";
}
@@ -1332,6 +1340,20 @@
+ public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
+ {
+ }
+
+ /**
+ * Sensitive version of getSoundType
+ * @param state The state
+ * @param world The world
+ * @param pos The position. Note that the world may not necessarily have {@code state} here!
+ * @param entity The entity that is breaking/stepping on/placing/hitting/falling on this block, or null if no entity is in this context
+ * @return A SoundType to use
+ */
+ public SoundType getSoundType(IBlockState state, World world, BlockPos pos, @Nullable Entity entity)
+ {
+ return func_185467_w();
+ }
+
+ /* ========================================= FORGE END ======================================*/
+
public static void func_149671_p()