本文整理汇总了Java中net.minecraft.world.ColorizerGrass类的典型用法代码示例。如果您正苦于以下问题:Java ColorizerGrass类的具体用法?Java ColorizerGrass怎么用?Java ColorizerGrass使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ColorizerGrass类属于net.minecraft.world包,在下文中一共展示了ColorizerGrass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: genBiomeColours
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
private static void genBiomeColours(BlockColours bc) {
// generate array of foliage, grass, and water colour multipliers
// for each biome.
for (Object oBiome : Biome.REGISTRY) {
Biome biome = (Biome) oBiome;
if (biome != null) {
double temp = MathHelper.clamp(biome.getTemperature(), 0.0F, 1.0F);
double rain = MathHelper.clamp(biome.getRainfall(), 0.0F, 1.0F);
int grasscolor = ColorizerGrass.getGrassColor(temp, rain);
int foliagecolor = ColorizerFoliage.getFoliageColor(temp, rain);
int watercolor = biome.getWaterColorMultiplier();
bc.setBiomeData(biome.getBiomeName(), watercolor & 0xffffff, grasscolor & 0xffffff, foliagecolor & 0xffffff);
}
}
}
示例2: getRenderColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
public int getRenderColor(IBlockState state)
{
if (state.getBlock() != this)
{
return super.getRenderColor(state);
}
else
{
BlockTallGrass.EnumType blocktallgrass$enumtype = (BlockTallGrass.EnumType)state.getValue(TYPE);
return blocktallgrass$enumtype == BlockTallGrass.EnumType.DEAD_BUSH ? 16777215 : ColorizerGrass.getGrassColor(0.5D, 1.0D);
}
}
示例3: onResourceManagerReload
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
public void onResourceManagerReload(IResourceManager resourceManager)
{
try
{
ColorizerGrass.setGrassBiomeColorizer(TextureUtil.readImageData(resourceManager, LOC_GRASS_PNG));
}
catch (IOException var3)
{
;
}
}
示例4: getGrassColorAtPos
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public int getGrassColorAtPos(BlockPos pos)
{
double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(pos), 0.0F, 1.0F);
double d1 = (double)MathHelper.clamp_float(this.getRainfall(), 0.0F, 1.0F);
return getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1));
}
示例5: getBlockColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public int getBlockColor()
{
double d0 = 0.5D;
double d1 = 1.0D;
return ColorizerGrass.getGrassColor(d0, d1);
}
示例6: Init
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@Override
public void Init() {
final BlockColors blockcolors = Minecraft.getMinecraft().getBlockColors();
blockcolors.registerBlockColorHandler(new IBlockColor() {
public int colorMultiplier(IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex) {
return worldIn != null && pos != null ? BiomeColorHelper.getGrassColorAtPos(worldIn, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D);
}
}, ModBlocks.machinemowedgrass);
}
示例7: getBiomeGrassColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
{
double var4 = (double)MathHelper.clamp_float(this.getFloatTemperature(p_150558_1_, p_150558_2_, p_150558_3_), 0.0F, 1.0F);
double var6 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
return ColorizerGrass.getGrassColor(var4, var6);
}
示例8: onResourceManagerReload
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
public void onResourceManagerReload(IResourceManager par1ResourceManager)
{
try
{
ColorizerGrass.setGrassBiomeColorizer(TextureUtil.readImageData(par1ResourceManager, field_130078_a));
}
catch (IOException var3)
{
;
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:12,代码来源:GrassColorReloadListener.java
示例9: getBlockColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public int getBlockColor() {
if (this instanceof IBlockSoil) {
return ColorizerGrass.getGrassColor(0.5D, 1.0D);
} else {
return 16777215;
}
}
示例10: renderWorldBlockPass0
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
private boolean renderWorldBlockPass0 (IBlockAccess world, int x, int y, int z, BlockMediumPot block, int modelId, RenderBlocks renderer) {
int metadata = world.getBlockMetadata(x, y, z);
boxRenderer.setUnit(.0625);
boxRenderer.setColor(ModularBoxRenderer.COLOR_WHITE);
for (int i = 0; i < 6; i++)
boxRenderer.setIcon(renderer.getBlockIconFromSideAndMetadata(block, i, metadata), i);
boxRenderer.renderBox(world, block, x, y, z, .125, 0, .125, .875, .75, .875, 0, ModularBoxRenderer.CUT_YPOS);
TileEntityMediumPot te = block.getTileEntity(world, x, y, z);
if (te != null && te.getSubstrate() != null && te.getSubstrate().getItem() instanceof ItemBlock) {
Block substrate = Block.getBlockFromItem(te.getSubstrate().getItem());
int substrateData = te.getSubstrate().getItemDamage();
if (substrate != Blocks.water) {
IIcon substrateIcon = renderer.getBlockIconFromSideAndMetadata(substrate, 1, substrateData);
int color = substrate.colorMultiplier(world, x, y, z);
if (color == Blocks.grass.colorMultiplier(world, x, y, z))
color = ColorizerGrass.getGrassColor(te.getBiomeTemperature(), te.getBiomeHumidity());
RenderHelper.calculateBaseColor(colorScratch, color);
RenderHelper.instance.setRenderBounds(.125, 0, .125, .875, .6875f, .875);
RenderHelper.instance.renderFace(RenderHelper.YPOS, world, block, x, y, z, substrateIcon, colorScratch[0], colorScratch[1], colorScratch[2]);
}
}
return true;
}
示例11: getBiomeGrassColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public int getBiomeGrassColor(int p_150558_1_, int p_150558_2_, int p_150558_3_)
{
double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(p_150558_1_, p_150558_2_, p_150558_3_), 0.0F, 1.0F);
double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
return getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1));
}
示例12: onResourceManagerReload
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
public void onResourceManagerReload(IResourceManager p_110549_1_)
{
try
{
ColorizerGrass.setGrassBiomeColorizer(TextureUtil.readImageData(p_110549_1_, field_130078_a));
}
catch (IOException ioexception)
{
;
}
}
示例13: func_110549_a
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
public void func_110549_a(ResourceManager p_110549_1_) {
try {
ColorizerGrass.func_77479_a(TextureUtil.func_110986_a(p_110549_1_, field_130078_a));
} catch (IOException var3) {
;
}
}
示例14: getBiomeGrassColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F);
double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F);
return getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1));
}
示例15: getBiomeGrassColor
import net.minecraft.world.ColorizerGrass; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
double d0 = (double)this.getFloatTemperature();
double d1 = (double)this.getFloatRainfall();
return ((ColorizerGrass.getGrassColor(d0, d1) & 16711422) + 5115470) / 2;
}