forked from gnembon/carpetmod
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported rule
spawnBabyProbably
and spawnJockeyProbably
- Loading branch information
1 parent
c6826b5
commit 00e90c6
Showing
4 changed files
with
95 additions
and
3 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
patches/net/minecraft/entity/monster/EntitySpider.java.patch
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 @@ | ||
--- a/net/minecraft/entity/monster/EntitySpider.java | ||
+++ b/net/minecraft/entity/monster/EntitySpider.java | ||
@@ -2,6 +2,9 @@ | ||
|
||
import java.util.Random; | ||
import javax.annotation.Nullable; | ||
+ | ||
+import carpet.CarpetServer; | ||
+import carpet.settings.CarpetSettings; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.CreatureAttribute; | ||
import net.minecraft.entity.EntityLivingBase; | ||
@@ -168,7 +171,10 @@ | ||
{ | ||
entityLivingData = super.onInitialSpawn(difficulty, entityLivingData, itemNbt); | ||
|
||
- if (this.world.rand.nextInt(100) == 0) | ||
+ // TISCM spawnJockeyProbably | ||
+ boolean forcedJockeyTISCM = CarpetSettings.spawnJockeyProbably > 0 && CarpetServer.rand.nextFloat() <= CarpetSettings.spawnJockeyProbably; | ||
+ | ||
+ if (this.world.rand.nextInt(100) == 0 || forcedJockeyTISCM) | ||
{ | ||
EntitySkeleton entityskeleton = new EntitySkeleton(this.world); | ||
entityskeleton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); |
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