SpecialMobs
8 merged pull requests.
Changes
- #33 Added MobHelper.removeRandomFoodItem, and the Hungry zombie, pig zombie and spider onTypeAttack now use it with stealLife(3) as the fallback. Removed the spider stomach list and loot pickup. Added SpiceOfLifeCompat to include open food containers, with a SpiceOfLife compileOnly dependency. - @GDCloudstrike
- Added: food eating by hungry mobs, lifesteal fallback when the player has no food, Spice of Life food container support
- Removed: hungry mobs dropping random inventory items, hungry spider item storage
Bug Fixes
- #35 EntityWitchCaveSpider.attackEntityFrom tags deflected projectiles with an entity NBT flag (witchSpiderDeflected) and skips deflection for projectiles that already carry it. Same fix as SpecialMobs PR #28. - @Ressed
- Fixed: infinite projectile duplication by Witch Cave Spider deflection
- Closes GTNH#26782
- #34 Added MobHelper.checkIfValidFood and getFoodValue, which use SpiceOfLifeCompat and AppleCoreAPI.getUnmodifiedFoodValues when Spice of Life is present. This replaces the ItemFood cast in the hungry zombie, pig zombie and spider classes. Food containers are excluded from valid food. - @GDCloudstrike
- Fixed: hungry zombie failed cast server crash with lunch bags
- Closes GTNH#26801
- #31 Added an immuneToAllPotions flag to SpecialMobData, checked in isPotionApplicable and saved to NBT as SMAllPotionImmune. EntityWitchSpider and EntityWitchCaveSpider set it instead of looping over Potion.potionTypes. - @Alexdoru
- Added: immune-to-all-potions flag for special mobs
- Fixed: huge potion immunity set built for Witch Spiders with Endless IDs
- #29 EntityEnderCreeper.teleportTo now also requires block.isNormalCube() in the landing-block check, in addition to the material blocking movement. - @loenaaaa
- Fixed: Ender Creeper teleporting into Steam Tank blocks
- Closes GTNH#22925
- #28 EntityWitchSpider.attackEntityFrom marks deflected projectiles with a boolean in their entity data. Projectiles carrying that mark skip deflection and take the normal damage path. The README was also edited. - @wlhlm
- Fixed: Infinite projectile duplication loop on Witch Spider, Softlock when shooting a Witch Spider with Draconic Bow Shockwave arrows
- Closes GTNH#16062
- #27 MobHelper.darkExplode now calls ForgeEventFactory.onExplosionDetonate before doExplosionB. Dark creepers skipped doExplosionA, so the Forge event bus never saw the explosion and ServerUtilities could not cancel the block damage. - @dibbydoda
- Fixed: Dark Creepers destroying blocks in claimed chunks with explosions disabled
- Closes GTNH#19888
Performance
- #32 MobHelper.canReplace checks IMob and the species spawn setting before calling getEntityData, which otherwise attaches a compound that gets saved in the chunk. RandomHelper caches entity names per species. SpecialMobData stores potion immunities as a long bit set instead of a HashSet, so ids above 63 are dropped with a debug message. - @Algent
- Fixed: extra per-spawn string building, ForgeData compound attached to mobs that can never be replaced
Contributors
Everyone who authored, reviewed or co-authored a change on this page, with how many of them:
@Algent (2), @GDCloudstrike (2), @wlhlm (2), @Alexdoru (1), @boubou19 (1), @cubefury (1), @dibbydoda (1), @Dream-Master (1), @koolkrafter5 (1), @loenaaaa (1), @Ressed (1), @Spicierspace153 (1), @vermz99 (1)