Add a hook for custom particle spawning for slimes
This commit is contained in:
parent
7298b21cb5
commit
7f52bc6547
1 changed files with 24 additions and 0 deletions
|
@ -1,5 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
@@ -111,7 +111,7 @@
|
||||
if (this.field_70122_E && !this.field_175452_bi)
|
||||
{
|
||||
int i = this.func_70809_q();
|
||||
-
|
||||
+ if (spawnCustomParticles()) { i = 0; } // don't spawn particles if it's handled by the implementation itself
|
||||
for (int j = 0; j < i * 8; ++j)
|
||||
{
|
||||
float f = this.field_70146_Z.nextFloat() * (float)Math.PI * 2.0F;
|
||||
@@ -271,7 +271,7 @@
|
||||
BlockPos blockpos = new BlockPos(MathHelper.func_76128_c(this.field_70165_t), 0, MathHelper.func_76128_c(this.field_70161_v));
|
||||
Chunk chunk = this.field_70170_p.func_175726_f(blockpos);
|
||||
|
@ -9,3 +18,18 @@
|
|||
{
|
||||
return false;
|
||||
}
|
||||
@@ -336,6 +336,14 @@
|
||||
return super.func_180482_a(p_180482_1_, p_180482_2_);
|
||||
}
|
||||
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ /**
|
||||
+ * Called when the slime spawns particles on landing, see onUpdate.
|
||||
+ * Return true to prevent the spawning of the default particles.
|
||||
+ */
|
||||
+ protected boolean spawnCustomParticles() { return false; }
|
||||
+ /* ======================================== FORGE END =====================================*/
|
||||
+
|
||||
static class AISlimeAttack extends EntityAIBase
|
||||
{
|
||||
private EntitySlime field_179466_a;
|
||||
|
|
Loading…
Reference in a new issue