Minecraft:Spawn Egg colors: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| Line 376: | Line 376: | ||
|{{HistoryLine||1.1|dev=11w49a|[[File:Spawn Egg (texture) JE1.png|32px]] Spawn eggs originally used a single texture, which was then colored as a whole with a randomly-generated color.}} | |{{HistoryLine||1.1|dev=11w49a|[[File:Spawn Egg (texture) JE1.png|32px]] Spawn eggs originally used a single texture, which was then colored as a whole with a randomly-generated color.}} | ||
|{{HistoryLine|||dev=12w01a|[[File:Spawn Egg (texture) JE2.png|32px]] [[File:Spawn Egg (overlay texture) JE1.png|32px]] Spawn eggs now use two textures, a base and an overlay, which are colored individually with values defined in the code.}} | |{{HistoryLine|||dev=12w01a|[[File:Spawn Egg (texture) JE2.png|32px]] [[File:Spawn Egg (overlay texture) JE1.png|32px]] Spawn eggs now use two textures, a base and an overlay, which are colored individually with values defined in the code.}} | ||
|{{HistoryLine||1.8|dev=14w25a|[[File:Spawn Egg (texture) JE3.png|32px]] The base texture for spawn eggs has been changed.}} | |{{HistoryLine||1.8|dev=14w25a|[[File:Spawn Egg (texture) JE3.png|32px]] The base texture for spawn eggs has been changed - pixels obscured by the overlay, which are never normally visible anyway, have been removed.}} | ||
|{{HistoryLine||1.21.5|dev=25w08a|Colored spawn eggs have been replaced with their own separate textures.}} | |{{HistoryLine||1.21.5|dev=25w08a|Colored spawn eggs have been replaced with their own separate textures.}} | ||
|{{HistoryLine|bedrock}} | |{{HistoryLine|bedrock}} | ||
| Line 546: | Line 546: | ||
|[[File:Spawn Egg BE2.png|32px]] Spawn: {{color|#000000}}, {{color|#000000}} | |[[File:Spawn Egg BE2.png|32px]] Spawn: {{color|#000000}}, {{color|#000000}} | ||
|When there are no colors specified the spawn egg looks completely black.}} | |When there are no colors specified the spawn egg looks completely black.}} | ||
|{{HistoryLine||?|Added elder guardian ghost spawn eggs. | |||
|[[File:Spawn Egg BE2.png|32px]] Elder Guardian Ghost: {{color|#000000}}, {{color|#000000}}}} | |||
|{{HistoryLine||1.9.0|dev=beta 1.9.0.0|Added pillager spawn eggs. | |{{HistoryLine||1.9.0|dev=beta 1.9.0.0|Added pillager spawn eggs. | ||
|[[File:Pillager Spawn Egg JE1 BE1.png|32px]] Pillager: {{color|#532F36}}, {{color|#959B9B}}}} | |[[File:Pillager Spawn Egg JE1 BE1.png|32px]] Pillager: {{color|#532F36}}, {{color|#959B9B}}}} | ||
| Line 673: | Line 675: | ||
There are a total of 64 distinct spawn egg colors that can be generated, and the pattern of colors repeats every 256 metadata values (such that a spawn egg with metadata value 0 looks identical to that of one of value 256, and that to one of 512, and so on). | There are a total of 64 distinct spawn egg colors that can be generated, and the pattern of colors repeats every 256 metadata values (such that a spawn egg with metadata value 0 looks identical to that of one of value 256, and that to one of 512, and so on). | ||
The following calculator can be used to calculate the colour of a spawn egg of damage value n: | |||
<div class="calculator-container" data-calculator-refresh-on-load="true"> | |||
n = {{Simplecalc|id=n|default=0}} | |||
red = {{Simplecalc|type=plain|formula=(64 + bitand(n * 2423535, 0xC0) ) % 256|id=r}}, green = {{Simplecalc|type=plain|formula=(64 + bitand(n * 223535, 0xC0) ) % 256|id=g}}, blue = {{Simplecalc|type=plain|formula=(64 + bitand(n * 242535, 0xC0) ) % 256|id=b}} | |||
Color: {{Color|rgb(var(--calculator-r) var(--calculator-g) var(--calculator-b))|#{{Simplecalc|type=plain|formula=r|mapping={"0":0,"40":64,"80":128,"C0":192} }}{{Simplecalc|type=plain|formula=g|mapping={"0":0,"40":64,"80":128,"C0":192} }}{{Simplecalc|type=plain|formula=b|mapping={"0":0,"40":64,"80":128,"C0":192} }}}} | |||
</div> | |||
The following is a table of each individual spawn egg color, what data values it applies to in the 0-to-255 range (with the first being bold), and entities that this color is associated with: | The following is a table of each individual spawn egg color, what data values it applies to in the 0-to-255 range (with the first being bold), and entities that this color is associated with: | ||
Revision as of 11:13, 7 September 2026
Template:Removed feature Prior to the Minecraft:Spring to Life game drop, Minecraft:spawn eggs used textures that were accordingly Minecraft:colored to match each mob.
While Minecraft:Programmer Art returns the old spawn eggs Template:In and Minecraft:add-ons can create the old spawn eggs Template:In, these are dedicated texture files per item rather than the old coloring system.
Previous values
Java Edition
April Fools' spawn eggs
Bedrock Edition
Spawn eggs that are pre-colored
These spawn eggs used texture files directly, as opposed to using the standard base and overlay textures. Several of these used textures visually identical to the outcome of tinting in Java Edition, and as such the input colors could be reverse-engineered.
History
Used colors
Spawn eggs that do not use colors
Template:IN, not all spawn eggs utilized the color system, and instead used predefined sprites that are themselves colored. These may appear identical to their Java Edition counterparts, or entirely different. Such cases are listed here for the sake of completion, and to distinguish them from color-using spawn eggs via highlighting what eggs do not.
Before 12w01a
Prior to Java Edition 12w01a, spawn eggs used a single texture, colored with a single color. This color was generated by the game via an equation, rather than specific colors picked for each egg; as such, even the unused spawn eggs had colors associated with them. The following formula was used to calculate each color component:
red = (64 + (n * 2423535 & 0xC0)) % 256; green = (64 + (n * 223535 & 0xC0)) % 256; blue = (64 + (n * 242535 & 0xC0)) % 256;
There are a total of 64 distinct spawn egg colors that can be generated, and the pattern of colors repeats every 256 metadata values (such that a spawn egg with metadata value 0 looks identical to that of one of value 256, and that to one of 512, and so on).
The following calculator can be used to calculate the colour of a spawn egg of damage value n:
red = Template:Simplecalc, green = Template:Simplecalc, blue = Template:Simplecalc
Color: Template:Color
The following is a table of each individual spawn egg color, what data values it applies to in the 0-to-255 range (with the first being bold), and entities that this color is associated with:
Notes
References
Minecraft:es:Colores de huevos generadores Minecraft:fr:Couleurs des oeufs d'apparition Minecraft:pt:Cores de ovos geradores