COWMODSКаталог модов

Colorful Spawning Sheep

This mod allows for sheep of all 16 wool colors to spawn at equal rates.

Автор: poopiedoopie90021,2 тыс.3обновлён 8 апр. 2024 г.
ДекорМобы

Описание

Colorful Spawning Sheep! Beta 1.7.3

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. View Code in Spoiler directly below.

Modloader not required but I had to select an API.

Spoiler

Base Fuction

	public 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

	public static int getRandomFleeceColor(Random random0) {
		int i1 = random0.nextInt(100);
		return i1;
	}

Here is some extra information about the two diffetent version 'Normal Drops' and 'x2 Drops'. Normal Drops just means when you shear a sheep you will get the normal amount of wool out of them, 2-5. X2 Drops will give you 4-10 when you shear the sheep. View Code in Spoiler directly below.

Spoiler

Normal Drops

	public 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

	public 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;
	}

Specifially these lines

				int i3 = 2 + this.rand.nextInt(3);
				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 fuction :)

Edit: 7 April 2024 No Changes, but I added support for b1.2-b1.8.1, r1.0, r1.1, r1.2.4&5. I will do 1.2, 1.2.1, 1.2.2, and 1.2.3 soon.

Edit: 8 April 2024 Added 1.2.1-3 support. I am considering adding 1.3-1.20 support. It will be a bit before that happens I am sure.

Галерея

Purple, Green, PinkOrange, Light GreyBlack, Magenta, Light BlueBlue, Grey

Последние версии

Все версии →
release

[r1.2.1-3]Colorful Spawning Sheep

1.0
8 апр. 2024 г.203Minecraft: 1.2.1, 1.2.2, 1.2.3modloader
Скачать
Что нового
Initial Release
release

[r1.2.4&5]Colorful Spawning Sheep

1.0
8 апр. 2024 г.104Minecraft: 1.2.4, 1.2.5modloader
Скачать
Что нового
Inital Release
release

[r1.1]Colorful Spawning Sheep

1.0
8 апр. 2024 г.115Minecraft: 1.1modloader
Скачать
Что нового
Initial Release
release

[r1.0]Colorful Spawning Sheep

1.0
8 апр. 2024 г.125Minecraft: 1.0modloader
Скачать
Что нового
Initial Release
release

[b1.8.1]Colorful Spawning Sheep

1.0
8 апр. 2024 г.61Minecraft: b1.8, b1.8.1modloader
Скачать
Что нового
Initial Release
release

[b1.6.6]Colorful Spawning Sheep

1.0
8 апр. 2024 г.74Minecraft: b1.6, b1.6.1, b1.6.2, b1.6.3, b1.6.4, b1.6.5, b1.6.6modloader
Скачать
Что нового
Initial Release
release

[b1.5_01]Colorful Spawning Sheep

1.0
8 апр. 2024 г.54Minecraft: b1.5, b1.5_01modloader
Скачать
Что нового
Initial Release
release

[b1.4_01]Colorful Spawning Sheep

1.0
8 апр. 2024 г.74Minecraft: b1.4, b1.4_01modloader
Скачать
Что нового
Initial Release
release

[b1.3_01]Colorful Spawning Sheep

1.0
8 апр. 2024 г.56Minecraft: b1.3b, b1.3_01modloader
Скачать
Что нового
Initial Release
release

[b1.2_02]Colorful Spawning Sheep

1.0
8 апр. 2024 г.69Minecraft: b1.2, b1.2_01, b1.2_02modloader
Скачать
Что нового
Initial Release