Skip to content

Commit

Permalink
Welcome back, old patternchest. Go push the new one already, @alexbegt
Browse files Browse the repository at this point in the history
…:P
  • Loading branch information
bonii-xx committed Oct 6, 2014
1 parent 2f33bd0 commit d89fd46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/java/tconstruct/library/tools/HarvestTool.java
Expand Up @@ -238,7 +238,6 @@ protected void breakExtraBlock(World world, int x, int y, int z, int sidehit, En
Block refBlock = world.getBlock(refX, refY, refZ);
float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ);
float strength = ForgeHooks.blockStrength(block, player, world, x,y,z);
float foo = refStrength/strength;

// only harvestable blocks that aren't impossibly slow to harvest
if (!ForgeHooks.canHarvestBlock(block, player, meta) || refStrength/strength > 10f)
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/tconstruct/tools/model/TableRender.java
Expand Up @@ -15,6 +15,14 @@ public void renderInventoryBlock (Block block, int metadata, int modelID, Render
{
if (modelID == model)
{
// until we get the new model.. finally...
if(metadata >= 5 && metadata <= 9) {
// pattern chest
renderer.setRenderBounds(0,0,0,1,0.875,1);
renderStandardInvBlock(renderer, block, metadata);
return;
}

renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
Expand All @@ -33,6 +41,15 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
{
if (modelID == model)
{
int metadata = world.getBlockMetadata(x,y,z);
// until we get the new model.. finally...
if(metadata >= 5 && metadata <= 9) {
// pattern chest
renderer.setRenderBounds(0,0,0,1,0.875,1);
renderer.renderStandardBlock(block, x,y,z);
return true;
}

renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
Expand Down

1 comment on commit d89fd46

@TherminatorX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, that was a bother.

Please sign in to comment.