Colorful Spawning Sheep

Quick rating

Colorful Spawning Sheep

No reviews yet

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

Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Client and Server

Must be installed on both the client and the server.

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.0

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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.

Screenshots

Gallery

  • Purple, Green, Pink
    Purple, Green, Pink Purple, Green, and Pink sheep found in the wild.
  • Black, Magenta, Light Blue
    Black, Magenta, Light Blue Black, Magenta, and Light Blue sheep found in the wild.
  • Orange, Light Grey
    Orange, Light Grey Orange and Light Grey sheep found in the wild.
  • Blue, Grey
    Blue, Grey Blue and Grey sheep found in the wild.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works