mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Added side sensitivity to standard EntityDiggingFX, added Block functions to override spawning of digging and breaking effects.
This commit is contained in:
1 parent
de24eea885
commit
c2d53e7651
4 files changed
+95
-3
No files matched your search
@@ -104,7 +104,7 @@
|
||||
{
|
||||
ItemStack var8 = this.createStackedBlock(par6);
|
||||
|
||||
@@ -1249,4 +1257,680 @@
|
||||
@@ -1249,4 +1257,717 @@
|
||||
canBlockGrass[0] = true;
|
||||
StatList.initBreakableStats();
|
||||
}
|
||||
@@ -783,5 +783,42 @@
|
||||
+ public boolean isBlockFoliage(World world, int x, int y, int z)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Spawn a digging particle effect in the world, this is a wrapper
|
||||
+ * around EffectRenderer.addBlockHitEffects to allow the block more
|
||||
+ * control over the particles. Useful when you have entirely different
|
||||
+ * texture sheets for different sides/locations in the world.
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param target The target the player is looking at {x/y/z/side/sub}
|
||||
+ * @param effectRenderer A reference to the current effect renderer.
|
||||
+ * @return True to prevent vanilla digging particles form spawning.
|
||||
+ */
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
+ public boolean addBlockHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Spawn particles for when the block is destroyed. Due to the nature
|
||||
+ * of how this is invoked, the x/y/z locations are not always guaranteed
|
||||
+ * to host your block. So be sure to do proper sanity checks before assuming
|
||||
+ * that the location is this block.
|
||||
+ *
|
||||
+ * @param world The current world
|
||||
+ * @param x X position to spawn the particle
|
||||
+ * @param y Y position to spawn the particle
|
||||
+ * @param z Z position to spawn the particle
|
||||
+ * @param meta The metadata for the block before it was destroyed.
|
||||
+ * @param effectRenderer A reference to the current effect renderer.
|
||||
+ * @return True to prevent vanilla break particles from spawning.
|
||||
+ */
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
+ public boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
Reference in new issue
Block a user