Added leaf piles and dead leaf piles
This commit is contained in:
parent
cbaa851f98
commit
bb6083a56e
35 changed files with 186 additions and 9 deletions
|
@ -32,6 +32,10 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler
|
|||
return renderBlockAlgae(renderer, block, x, y, z);
|
||||
else if (meta == 13)
|
||||
return renderBlockClover(renderer, block, x, y, z);
|
||||
else if (meta == 14)
|
||||
return renderBlockLeafPile(renderer, block, x, y, z);
|
||||
else if (meta == 15)
|
||||
return renderBlockDeadLeafPile(renderer, block, x, y, z);
|
||||
else
|
||||
return renderCrossedSquares(block, x, y, z, renderer);
|
||||
}
|
||||
|
@ -175,6 +179,128 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler
|
|||
tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean renderBlockLeafPile(RenderBlocks renderer, Block block, int x, int y, int z)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
//TODO: blockAccess
|
||||
IBlockAccess world = renderer.blockAccess;
|
||||
//TODO: getBlockIconFromSide()
|
||||
IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, 14);
|
||||
|
||||
//Need to make public: overrideBlockTexture
|
||||
|
||||
//TODO: hasOverrideBlockTexture()
|
||||
if (renderer.hasOverrideBlockTexture())
|
||||
{
|
||||
//TODO: overrideBlockTexture
|
||||
icon = renderer.overrideBlockTexture;
|
||||
}
|
||||
|
||||
float cf = 1.0F;
|
||||
//TODO: colorMUltiplier()
|
||||
int cl = block.colorMultiplier(world, x, y, z);
|
||||
float c1 = (cl >> 16 & 255) / 255.0F;
|
||||
float c2 = (cl >> 8 & 255) / 255.0F;
|
||||
float c3 = (cl & 255) / 255.0F;
|
||||
|
||||
if (EntityRenderer.anaglyphEnable)
|
||||
{
|
||||
float f4 = (c1 * 30.0F + c2 * 59.0F + c3 * 11.0F) / 100.0F;
|
||||
float f5 = (c1 * 30.0F + c2 * 70.0F) / 100.0F;
|
||||
float f6 = (c1 * 30.0F + c3 * 70.0F) / 100.0F;
|
||||
c1 = f4;
|
||||
c2 = f5;
|
||||
c3 = f6;
|
||||
}
|
||||
|
||||
tessellator.setColorOpaque_F(cf * c1, cf * c2, cf * c3);
|
||||
|
||||
float f = 0.05F;
|
||||
double d0 = (double)icon.getMinU();
|
||||
double d1 = (double)icon.getMinV();
|
||||
double d2 = (double)icon.getMaxU();
|
||||
double d3 = (double)icon.getMaxV();
|
||||
long l = (long)(x * 3129871) ^ (long)z * 116129781L ^ (long)y;
|
||||
l = l * l * 42317861L + l * 11L;
|
||||
int i1 = (int)(l >> 16 & 3L);
|
||||
//TODO: getMixedBrightnessForBlock()
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
float f1 = (float)x + 0.5F;
|
||||
float f2 = (float)z + 0.5F;
|
||||
float f3 = (float)(i1 & 1) * 0.5F * (float)(1 - i1 / 2 % 2 * 2);
|
||||
float f4 = (float)(i1 + 1 & 1) * 0.5F * (float)(1 - (i1 + 1) / 2 % 2 * 2);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean renderBlockDeadLeafPile(RenderBlocks renderer, Block block, int x, int y, int z)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
//TODO: blockAccess
|
||||
IBlockAccess world = renderer.blockAccess;
|
||||
//TODO: getBlockIconFromSide()
|
||||
IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, 15);
|
||||
|
||||
//Need to make public: overrideBlockTexture
|
||||
|
||||
//TODO: hasOverrideBlockTexture()
|
||||
if (renderer.hasOverrideBlockTexture())
|
||||
{
|
||||
//TODO: overrideBlockTexture
|
||||
icon = renderer.overrideBlockTexture;
|
||||
}
|
||||
|
||||
float cf = 1.0F;
|
||||
//TODO: colorMUltiplier()
|
||||
int cl = block.colorMultiplier(world, x, y, z);
|
||||
float c1 = (cl >> 16 & 255) / 255.0F;
|
||||
float c2 = (cl >> 8 & 255) / 255.0F;
|
||||
float c3 = (cl & 255) / 255.0F;
|
||||
|
||||
if (EntityRenderer.anaglyphEnable)
|
||||
{
|
||||
float f4 = (c1 * 30.0F + c2 * 59.0F + c3 * 11.0F) / 100.0F;
|
||||
float f5 = (c1 * 30.0F + c2 * 70.0F) / 100.0F;
|
||||
float f6 = (c1 * 30.0F + c3 * 70.0F) / 100.0F;
|
||||
c1 = f4;
|
||||
c2 = f5;
|
||||
c3 = f6;
|
||||
}
|
||||
|
||||
tessellator.setColorOpaque_F(cf * c1, cf * c2, cf * c3);
|
||||
|
||||
float f = 0.05F;
|
||||
double d0 = (double)icon.getMinU();
|
||||
double d1 = (double)icon.getMinV();
|
||||
double d2 = (double)icon.getMaxU();
|
||||
double d3 = (double)icon.getMaxV();
|
||||
long l = (long)(x * 3129871) ^ (long)z * 116129781L ^ (long)y;
|
||||
l = l * l * 42317861L + l * 11L;
|
||||
int i1 = (int)(l >> 16 & 3L);
|
||||
//TODO: getMixedBrightnessForBlock()
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
float f1 = (float)x + 0.5F;
|
||||
float f2 = (float)z + 0.5F;
|
||||
float f3 = (float)(i1 & 1) * 0.5F * (float)(1 - i1 / 2 % 2 * 2);
|
||||
float f4 = (float)(i1 + 1 & 1) * 0.5F * (float)(1 - (i1 + 1) / 2 % 2 * 2);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1);
|
||||
tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean renderCrossedSquares(Block par1Block, int par2, int par3, int par4, RenderBlocks renderer)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ public class BiomeGenBambooForest extends BOPBiome
|
|||
this.bopWorldFeatures.riverCanePerChunk = 6;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 6;
|
||||
this.bopWorldFeatures.bushesPerChunk = 5;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ import biomesoplenty.common.world.features.trees.WorldGenBayou3;
|
|||
|
||||
public class BiomeGenBayou extends BOPBiome
|
||||
{
|
||||
private static final Height biomeHeight = new Height(0.0F, 0.1F);
|
||||
private static final Height biomeHeight = new Height(-0.1F, 0.1F);
|
||||
|
||||
public BiomeGenBayou(int id)
|
||||
{
|
||||
|
|
|
@ -49,6 +49,8 @@ public class BiomeGenBog extends BOPBiome
|
|||
this.bopWorldFeatures.waterReedsPerChunk = 8;
|
||||
this.bopWorldFeatures.koruPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 8;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ public class BiomeGenBorealForest extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,6 +46,7 @@ public class BiomeGenChaparral extends BOPBiome
|
|||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 10;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ public class BiomeGenDeadForest extends BOPBiome
|
|||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
||||
this.bopWorldFeatures.thornsPerChunk = 2;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,8 @@ public class BiomeGenDeciduousForest extends BOPBiome
|
|||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,6 +52,7 @@ public class BiomeGenFen extends BOPBiome
|
|||
this.bopWorldFeatures.waterReedsPerChunk = 10;
|
||||
this.bopWorldFeatures.koruPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 7;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,6 +41,7 @@ public class BiomeGenHeathland extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 20;
|
||||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ public class BiomeGenMapleWoods extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 2;
|
||||
this.bopWorldFeatures.poisonIvyPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 2;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,6 +31,8 @@ public class BiomeGenMountain extends BOPBiome
|
|||
this.bopWorldFeatures.berryBushesPerChunk = 3;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,7 @@ public class BiomeGenPrairie extends BOPBiome
|
|||
this.bopWorldFeatures.berryBushesPerChunk = 2;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 3;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,6 +41,7 @@ public class BiomeGenRainforest extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 25;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
||||
this.bopWorldFeatures.cloverPatchesPerChunk = 20;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
|
||||
/*TODO: FEATURE customBiomeDecorator.pinkFlowersPerChunk = 2;
|
||||
|
|
|
@ -38,6 +38,7 @@ public class BiomeGenRedwoodForest extends BOPBiome
|
|||
this.bopWorldFeatures.berryBushesPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ public class BiomeGenSeasonalForest extends BOPBiome
|
|||
this.bopWorldFeatures.toadstoolsPerChunk = 4;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 15;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 8;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,6 +36,7 @@ public class BiomeGenShield extends BOPBiome
|
|||
|
||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.generateStoneInGrass2 = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ public class BiomeGenSilkglades extends BOPBiome
|
|||
this.bopWorldFeatures.koruPerChunk = 1;
|
||||
this.bopWorldFeatures.generatePumpkins = true;
|
||||
this.bopWorldFeatures.cobwebNestsPerChunk = 2;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,6 +49,8 @@ public class BiomeGenSludgepit extends BOPBiome
|
|||
//TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 5;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 6;
|
||||
this.bopWorldFeatures.koruPerChunk = 1;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 5;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,6 +44,7 @@ public class BiomeGenTemperateRainforest extends BOPBiome
|
|||
this.bopWorldFeatures.wildCarrotsPerChunk = 1;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,6 +31,8 @@ public class BiomeGenThicket extends BOPBiome
|
|||
this.bopWorldFeatures.bopFlowersPerChunk = 5;
|
||||
this.bopWorldFeatures.thornsPerChunk = 55;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 5;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,6 +36,8 @@ public class BiomeGenTimber extends BOPBiome
|
|||
this.bopWorldFeatures.toadstoolsPerChunk = 2;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 4;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 10;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 5;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 12;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome
|
|||
this.bopWorldFeatures.generateQuicksand = true;
|
||||
this.bopWorldFeatures.poisonIvyPerChunk = 4;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 15;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -44,6 +44,7 @@ public class BiomeGenTropics extends BOPBiome
|
|||
|
||||
this.bopWorldFeatures.bopFlowersPerChunk = 30;
|
||||
this.bopWorldFeatures.shrubsPerChunk = 4;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.generatePumpkins = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ public class BiomeGenWetland extends BOPBiome
|
|||
this.bopWorldFeatures.waterReedsPerChunk = 8;
|
||||
this.bopWorldFeatures.koruPerChunk = 1;
|
||||
this.bopWorldFeatures.cloverPatchesPerChunk = 15;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -36,6 +36,8 @@ public class BiomeGenWoodland extends BOPBiome
|
|||
this.bopWorldFeatures.shrubsPerChunk = 20;
|
||||
this.bopWorldFeatures.waterReedsPerChunk = 2;
|
||||
this.bopWorldFeatures.cloverPatchesPerChunk = 10;
|
||||
this.bopWorldFeatures.leafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.deadLeafPilesPerChunk = 10;
|
||||
this.bopWorldFeatures.logsPerChunk = 10;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.common.blocks.templates.BOPBlockWorldDecor;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -38,7 +39,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
||||
{
|
||||
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"};
|
||||
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch", "leafpile", "deadleafpile"};
|
||||
|
||||
private IIcon[] textures;
|
||||
public IIcon shrubBranch;
|
||||
|
@ -158,6 +159,7 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
{
|
||||
//TODO: getBlock()
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
boolean solid = block.isOpaqueCube();
|
||||
|
||||
if (block == Blocks.air) return false;
|
||||
|
||||
|
@ -312,16 +314,18 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
}
|
||||
|
||||
@Override
|
||||
//TODO: colorMultiplier()
|
||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
if (world.getBlockMetadata(x, y, z) == 9)
|
||||
if (world.getBlockMetadata(x, y, z) == 9 || world.getBlockMetadata(x, y, z) == 14)
|
||||
{
|
||||
//TODO: getBiomeFoliageColor()
|
||||
return world.getBiomeGenForCoords(x, z).getBiomeFoliageColor(x, y, z);
|
||||
}
|
||||
|
||||
//TODO: getBiomeGrassColor()
|
||||
|
||||
if (world.getBlockMetadata(x, y, z) == 15)
|
||||
{
|
||||
return 16777215;
|
||||
}
|
||||
|
||||
return world.getBiomeGenForCoords(x, z).getBiomeGrassColor(x, y, z);
|
||||
}
|
||||
|
||||
|
@ -362,6 +366,12 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable
|
|||
|
||||
case 13: //Clover Patch
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D);
|
||||
|
||||
case 14: //Leaf Pile
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D);
|
||||
|
||||
case 15: //Dead Leaf Pile
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D);
|
||||
|
||||
default:
|
||||
return AxisAlignedBB.getBoundingBox(x + 0.1D, y, z + 0.1D, x + 0.9D, y + 0.8D, z + 0.9D);
|
||||
|
|
|
@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ItemBlockFoliage extends ItemColored
|
||||
{
|
||||
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"};
|
||||
private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch", "leafpile", "deadleafpile"};
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] textures;
|
||||
private static final int GRASSTOP = 6;
|
||||
|
@ -43,13 +43,14 @@ public class ItemBlockFoliage extends ItemColored
|
|||
textures[3] = iconRegister.registerIcon("biomesoplenty:item_highgrass");
|
||||
textures[8] = iconRegister.registerIcon("biomesoplenty:item_berrybush");
|
||||
textures[9] = iconRegister.registerIcon("biomesoplenty:item_shrub");
|
||||
textures[15] = iconRegister.registerIcon("biomesoplenty:deadleafpile");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemStack, int par2)
|
||||
{
|
||||
if (itemStack.getItemDamage() == 3 || itemStack.getItemDamage() == 8 || itemStack.getItemDamage() == 9)
|
||||
if (itemStack.getItemDamage() == 3 || itemStack.getItemDamage() == 8 || itemStack.getItemDamage() == 9 || itemStack.getItemDamage() == 15)
|
||||
return 16777215;
|
||||
else
|
||||
//TODO: getRenderColor()
|
||||
|
|
|
@ -24,6 +24,8 @@ public class BOPWorldFeatures
|
|||
public int shrubsPerChunk = 0;
|
||||
public int bushesPerChunk = 0;
|
||||
public int cloverPatchesPerChunk = 0;
|
||||
public int leafPilesPerChunk = 0;
|
||||
public int deadLeafPilesPerChunk = 0;
|
||||
public int lavenderPerChunk = 0;
|
||||
public int thornsPerChunk = 0;
|
||||
public int stalagmitesPerChunk = 3;
|
||||
|
|
|
@ -58,6 +58,8 @@ public class WorldGenFieldAssociation
|
|||
associateField("shrubsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 9));
|
||||
associateField("bushesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 4));
|
||||
associateField("cloverPatchesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 13, 128));
|
||||
associateField("leafPilesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 14, 256));
|
||||
associateField("deadLeafPilesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 15, 256));
|
||||
associateField("lavenderPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 3));
|
||||
associateField("thornsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 5));
|
||||
associateField("stalagmitesPerChunk", new WorldGenBOPTallGrass(BOPBlockHelper.get("stoneFormations"), 0));
|
||||
|
|
|
@ -77,6 +77,8 @@ tile.foliage.wheatgrass.name=Wheat Grass
|
|||
tile.foliage.dampgrass.name=Damp Grass
|
||||
tile.foliage.koru.name=Koru
|
||||
tile.foliage.cloverpatch.name=Clover Patch
|
||||
tile.foliage.leafpile.name=Leaf Pile
|
||||
tile.foliage.deadleafpile.name=Dead Leaf Pile
|
||||
|
||||
tile.petals.bigflowerred.name=Giant Red Flower
|
||||
tile.petals.bigfloweryellow.name=Giant Yellow Flower
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 670 B |
Binary file not shown.
After Width: | Height: | Size: 636 B |
Loading…
Reference in a new issue