|
|
Colorful Spawning Sheep (Colorful Spawning Sheep)Github |相关wiki |源站链接支持: modloaderThis mod allows for sheep of all 16 wool colors to spawn at equal rates.
The spawning of different colors is completely equal. There is no sort of rarity, just sheep spawning with all the color of wool!
This mod makes a very simple change to the \'EntitySheep\' class.
Modloader not required but I had to select an API.
Spoiler
Base Function
javapublic static int getRandomFleeceColor(Random random0) {int i1 = random0.nextInt(100);return i1 < 5 ? 15 : (i1 < 10 ? 7 : (i1 < 15 ? 8 : (i1 < 18 ? 12 : (random0.nextInt(500) == 0 ? 6 : 0))));
}
Edited for this mod
java
public static int getRandomFleeceColor(Random random0) {
int i1 = random0.nextInt(100);
return i1;
}
Here is some extra information about the two different versions \'Normal Drops\' and \'x2 Drops\'.
Normal Drops
Spoiler
javapublic boolean interact(EntityPlayer entityPlayer1) {ItemStack itemStack2 = entityPlayer1.inventory.getCurrentItem();if(itemStack2 != null && itemStack2.itemID == Item.shears.shiftedIndex && !this.getSheared()) {if(!this.worldObj.multiplayerWorld) {this.setSheared(true);int i3 = 2 + this.rand.nextInt(3);
for(int i4 = 0; i4 < i3; ++i4) {
EntityItem entityItem5 = this.entityDropItem(new ItemStack(Block.cloth.blockID, 1, this.getFleeceColor()), 1.0F);
entityItem5.motionY += (double)(this.rand.nextFloat() * 0.05F);
entityItem5.motionX += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
entityItem5.motionZ += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
}
}
itemStack2.damageItem(1, entityPlayer1);
}
return false;
}
x2 Drops
Spoiler
javapublic boolean interact(EntityPlayer entityPlayer1) {ItemStack itemStack2 = entityPlayer1.inventory.getCurrentItem();if(itemStack2 != null && itemStack2.itemID == Item.shears.shiftedIndex && !this.getSheared()) {if(!this.worldObj.multiplayerWorld) {this.setSheared(true);int i3 = 4 + this.rand.nextInt(6);
for(int i4 = 0; i4 < i3; ++i4) {
EntityItem entityItem5 = this.entityDropItem(new ItemStack(Block.cloth.blockID, 1, this.getFleeceColor()), 1.0F);
entityItem5.motionY += (double)(this.rand.nextFloat() * 0.05F);
entityItem5.motionX += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
entityItem5.motionZ += (double)((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
}
}
itemStack2.damageItem(1, entityPlayer1);
}
return false;
}
Specifically these lines
java
int i3 = 2 + this.rand.nextInt(3);
java
int i3 = 4 + this.rand.nextInt(6);
2 or 4 is the amount of wool you will always get from the sheep, where the \'this.rand.nextInt(3);\' or 6 will give you an extra 0 through 3 or 6 in addition to the 2 or 4 you have already been given. This happens simultaneously but I am trying to explain the function :)
[video]https://www.youtube-nocookie.com/embed/tNUHYq8CFno[/video]
截图:
https://i.sodamc.com/modrinth/BOb1Y2RDp2.jpg?x-oss-process=style/forge2] https://i.sodamc.com/modrinth/RVdFcdfjXy.jpg?x-oss-process=style/forge2] https://i.sodamc.com/modrinth/gGvAGIj7Jv.jpg?x-oss-process=style/forge2] https://i.sodamc.com/modrinth/D0dKPv4drU.jpg?x-oss-process=style/forge2]
来自Modrinth所有游戏版本1.2.11.2.21.2.31.2.41.2.51.11.0b1.8b1.8.1b1.6b1.6.1b1.6.2b1.6.3b1.6.4b1.6.5b1.6.6b1.5b1.5_01b1.4b1.4_01b1.3bb1.3_01b1.2b1.2_01b1.2_02b1.7b1.7.2b1.7.3所有类型modloader[r1.2.1-3]Colorful Spawning Sheep[r1.2.1-3]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[r1.2.1-3]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: 1.2.1, 1.2.2, 1.2.3类型: modloaderRelease下载次数: 64[r1.2.4&5]Colorful Spawning Sheep[r1.2.4&5]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[r1.2.4&5]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInital Release展开版本: 1.0支持游戏: 1.2.4, 1.2.5类型: modloaderRelease下载次数: 54[r1.1]Colorful Spawning Sheep[r1.1]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[r1.1]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: 1.1类型: modloaderRelease下载次数: 71[r1.0]Colorful Spawning Sheep[r1.0]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[r1.0]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: 1.0类型: modloaderRelease下载次数: 57[b1.8.1]Colorful Spawning Sheep[b1.8.1]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.8.1]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.8, b1.8.1类型: modloaderRelease下载次数: 35[b1.6.6]Colorful Spawning Sheep[b1.6.6]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.6.6]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.6, b1.6.1, b1.6.2, b1.6.3, b1.6.4, b1.6.5, b1.6.6类型: modloaderRelease下载次数: 28[b1.5_01]Colorful Spawning Sheep[b1.5_01]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.5_01]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.5, b1.5_01类型: modloaderRelease下载次数: 30[b1.4_01]Colorful Spawning Sheep[b1.4_01]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.4_01]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.4, b1.4_01类型: modloaderRelease下载次数: 46[b1.3_01]Colorful Spawning Sheep[b1.3_01]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.3_01]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.3b, b1.3_01类型: modloaderRelease下载次数: 37[b1.2_02]Colorful Spawning Sheep[b1.2_02]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#Release[b1.2_02]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial Release展开版本: 1.0支持游戏: b1.2, b1.2_01, b1.2_02类型: modloaderRelease下载次数: 41[b1.7.3]Colorful Spawning Sheep x2 Drops[b1.7.3]Colorful Spawning Sheep x2 Drops Client+Patch+SRC.zip下载1.0#ReleaseColorful Spawning Sheep x2 Drops Client+Patch+SRC.zip下载1.0#Release[b1.7.3]Colorful Spawning Sheep x2 Drops Server+Patch+SRC.zip下载1.0#ReleaseInitial ReleaseThis version the sheep drop 2 times the normal amount of wool (4-10)The files labeled `Colorful Spawning Sheep x2 Drops Client+Patch+SRC.zip` and `[b1.7.3]Colorful Spawning Sheep x2 Drops Client+Patch+SRC.zip` are the same. I was trying to clean up the formatting and I don\'t think I can remove files.展开版本: 1.0支持游戏: b1.7, b1.7.2, b1.7.3类型: modloaderRelease下载次数: 86[b1.7.3]Colorful Spawning Sheep[b1.7.3]Colorful Spawning Sheep Client+Patch+SRC.zip下载1.0#ReleaseColorful Spawning Sheep Normal Drops Client+Patch+SRC.zip下载1.0#Release[b1.7.3]Colorful Spawning Sheep Server+Patch+SRC.zip下载1.0#ReleaseInitial ReleaseThis version the sheep drop the normal amount of wool (2-5)The files labeled `[b1.7.3]Colorful Spawning Sheep Client+Patch+SRC.zip` and `Colorful Spawning Sheep Normal Drops Client+Patch+SRC.zip` are the same. I was trying to clean up the formatting and I don\'t think I can remove files.展开版本: 1.0支持游戏: b1.7, b1.7.2, b1.7.3类型: modloaderRelease下载次数: 73全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
Colorful Spawning Sheep |
|