frakier Posted October 27, 2020 Posted October 27, 2020 (edited) I tried getting the block under the entity and.... colorInt = targetEntity.world.getBiome(new BlockPos(entityX, entityY, entityZ)).getGrassColor(entityX, entityZ) Expecting, hoping, to get the current shifted color of the grass [also tried this with foliage] but it only seems to return the default colors for grass not shifted for the biome [biome grass color]. What am I missing? Can anyone point me in the right direction? I'm currently working on my own code that uses the temp/humidity to shift the colors but would rather not reinvent the wheel. Thanks Edited October 29, 2020 by frakier clarifying - clarifying title again Quote
ChampionAsh5357 Posted October 27, 2020 Posted October 27, 2020 For reference, the method only exists on the physical client. So, calling this on the logical server is problematic. This wouldn't be stored on the specific entity, this would be called directly in the renderer and applied there. Quote
frakier Posted October 27, 2020 Author Posted October 27, 2020 (edited) 51 minutes ago, ChampionAsh5357 said: For reference, the method only exists on the physical client. So, calling this on the logical server is problematic. This wouldn't be stored on the specific entity, this would be called directly in the renderer and applied there. This all takes place in rendering on the client so not a problem. For a chameleon like ability. Edited October 27, 2020 by frakier Quote
ChampionAsh5357 Posted October 27, 2020 Posted October 27, 2020 15 minutes ago, frakier said: This all takes place in rendering on the client so not a problem. For a chameleon like ability. Thanks for the clarification. Well in that case, you might want to try your luck with BiomeColors::getGrassColor. That should be able to get the exact block color for grass. Make sure the position you check is the one below your entity. Quote
frakier Posted October 27, 2020 Author Posted October 27, 2020 (edited) colorInt = BiomeColors.getGrassColor(targetEntity.world, new BlockPos(entityX, entityY, entityZ)); seems to get the same value as colorInt = targetEntity.world.getBiome(new BlockPos(entityX, entityY, entityZ)).getGrassColor(entityX, entityZ); Need something to get the tint of the color being used in the biome, found some talk about a colorizeer or something to that effect but that seems to be fro a really old version of mc. I'll keep digging. Looking at how BlockModelRenderer handles it. More Information, fairly sure getGrassColor is for Blocks.GRASS and Blocks.TALL_GRASS the plants not Blocks.GRASS_BLOCK So I am looking for foliage, particularly the default, shaded/tint color for the biome and the correct shaded/tint color for GRASS_BLOCK in the biome. Edited October 28, 2020 by frakier Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.