forked from MobiusFlip/CrimsonRevelations
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Furious Zombies spawn naturally
- Loading branch information
1 parent
82ab558
commit fcf2b2a
Showing
6 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/mod/icarus/crimsonrevelations/mixin/entity/EntityGiantBrainyZombieMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mod.icarus.crimsonrevelations.mixin.entity; | ||
|
||
import mod.icarus.crimsonrevelations.config.CRConfig; | ||
import net.minecraft.entity.monster.EntityMob; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import thaumcraft.common.entities.monster.EntityGiantBrainyZombie; | ||
|
||
@Mixin(value = EntityGiantBrainyZombie.class, remap = false) | ||
public class EntityGiantBrainyZombieMixin extends EntityMob { | ||
public EntityGiantBrainyZombieMixin(World world) { | ||
super(world); | ||
} | ||
|
||
@Override | ||
public boolean getCanSpawnHere() { | ||
if (!CRConfig.general_settings.FURIOUS_ZOMBIE_UNDERGROUND_SPAWNING) { | ||
return super.getCanSpawnHere() && this.world.canSeeSky(new BlockPos(this)); | ||
} else { | ||
return super.getCanSpawnHere(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters