HomeJavaModsColorful Spawning Sheep
Colorful Spawning Sheep
ModsJava

Colorful Spawning Sheep

by poopiedoopie9002 · on Modrinth

Which Minecraft do you have?

Every version of the game needs its own build. Pick yours, then download — the wrong build installs fine and then does nothing in the game. This mod is built for ModLoader only.

⬇ Download for 1.2.4–1.2.5⬇ Download for 1.2.1–1.2.3⬇ Download for 1.1⬇ Download for 1.0
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.
Colorful Spawning Sheep — screenshot 1Colorful Spawning Sheep — screenshot 2Colorful Spawning Sheep — screenshot 3Colorful Spawning Sheep — screenshot 4

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.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more