Skip to content

Commit 1a2df09

Browse files
authored
Fix
1 parent 55232d0 commit 1a2df09

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/resources/forge-1.16.5/templates/livingentity/livingentity.java.ftl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,8 @@ public class ${name}Entity extends ${extendsClass}Entity <#if interfaces?size gt
879879
return <@procedureOBJToConditionCode data.spawningCondition/>;
880880
}
881881
<#else>
882-
SquidEntity::func_223365_b
882+
(entityType, world, reason, pos, random) ->
883+
(world.getBlockState(pos).matchesBlock(Blocks.WATER) && world.getBlockState(pos.up()).matchesBlock(Blocks.WATER))
883884
</#if>
884885
);
885886
<#else>
@@ -893,7 +894,9 @@ public class ${name}Entity extends ${extendsClass}Entity <#if interfaces?size gt
893894
return <@procedureOBJToConditionCode data.spawningCondition/>;
894895
}
895896
<#else>
896-
MonsterEntity::canMonsterSpawn
897+
(entityType, world, reason, pos, random) ->
898+
(world.getDifficulty() != Difficulty.PEACEFUL && MonsterEntity.isValidLightLevel(world, pos, random)
899+
&& MobEntity.canSpawnOn(entityType, world, reason, pos, random))
897900
</#if>
898901
);
899902
</#if>

0 commit comments

Comments
 (0)