World Border (Fabric)

World Border (Fabric)

261k Downloads

the mob heads mod but different.

GreenForzeGaming opened this issue ยท 4 comments

commented

i love mob heads, but thats the thing... its just "mob" heads. ive seen server use this cleverly using other textures to make fruits books and cool decor. id love a mod similer to this but that adds a easy way to get these heads by adding them yourself via textures.

id call it the Decor Head Mod.
it would add a villiger npc that alows you to buy decor heads that youve added yourself, lets say there are some basic ones to start with in the mod, and maybe have a good use for clay to make decor heads aswell.
i think this could be a cool mod.

commented

Technical implementation details of my idea for the mod:

To craft a mob head in game, an amount of Clay Balls, Cyan Dye, Magenta Dye, Yellow Dye, and Black Dye would be consumed, based on the texture to be used for the mob head and how many mob heads are being produced at once.

The costs would be calculated as follows:

  • Clay Balls: 1 per mob head
  • Cyan, Magenta, Yellow, and Black Dye: Calculated with the following steps:
  1. Read the color values from the skin image for the parts that correspond to the six faces of a player head.
  2. Convert the color values to the CMYK color space.
  3. For each color channel, add all of the color values for all of the pixels together.
  4. Divide the totals by a constant, which is set in the config and is a combination of the efficiency of the dye items and the surface area of the cube that makes up the mob head.
  5. The result is how much cyan, magenta, yellow, and black dye is required to paint one mob head. Multiply that by the number of mob heads being produced and round up to get the final cost in each of the four dyes for the batch.
Click to see example

Suppose a player wants to produce 64 mob heads, with a texture whose average color is 0xB8A12E in the RGB color space, with each dye providing enough pigment to fully color in 384 pixels with that color.

  1. The color values of the texture are read.
  2. The average color across the given texture converts to 0.2, 0.3, 0.8, 0.1 in the CMYK color space.
  3. There are 8 * 8 * 6 = 384 pixels that make up a mob head's texture. Multiplying this by the average CMYK color, we get 76.8, 115.2, 307.2, and 38.4 for cyan, magenta, yellow, and black.
  4. Dividing this by 384 to get the dye per head, we get that each head will require 0.2 cyan, 0.3 magenta, 0.8 yellow, and 0.1 black dye.
  5. Multiplying this by the number of mob heads being produced, 64, and rounding up, we get that the full batch will cost 64 clay balls, 13 cyan dye, 20 magenta dye, 52 yellow dye, and 7 black dye.
commented

Instead of the texture-dependent dye cost calculation, there could instead be a flat cost (per mob head) of one clay ball, one cyan dye, one magenta dye, one yellow dye, and one black dye for every mob head produced (not bought), since those dyes can be used and mixed together to create any color in the RGB space.

commented

interesting, id like it a lil simpler though XD, not as in it will happen but if id love this to be a cool new mod!

commented

I appreciate the new mod suggestion! I have added your idea to the list. I'm keeping track of all ideas on the Trello page and added the URL of this issue there.

In order to reduce the amount of open issues on this Github repository, I'll be closing this issue.

It definitely does not mean I am not interested and I'll post a comment here if/when the mod is released. This might take some time, as bug reports take priority. But I'll definitely be releasing more mods along the way.

Thank you very much for the suggestion!