mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 15:56:02 +00:00
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
--- ../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);
|
|
|
|
- if (this.field_70170_p.func_72912_H().func_76067_t() == WorldType.field_77138_c && this.field_70146_Z.nextInt(4) != 1)
|
|
+ if (this.field_70170_p.func_72912_H().func_76067_t().handleSlimeSpawnReduction(field_70146_Z, field_70170_p))
|
|
{
|
|
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;
|