Fixed picking up slabs with MMB.

Fixed stairs textures.
This commit is contained in:
Amnet 2013-05-12 15:06:54 +02:00
parent e85443bdd0
commit 1778263c8a
4 changed files with 15 additions and 18 deletions

View File

@ -139,23 +139,17 @@ public class BlockBOPSlab extends BlockHalfSlab
switch (getTypeFromMeta(meta))
{
case 0:
case 3:
hardness = 1.6F;
break;
case 1:
case 4:
hardness = 1.1F;
break;
case 2:
hardness = 1.0F;
break;
case 3:
hardness = 1.6F;
break;
case 4:
hardness = 1.1F;
break;
}
}
@ -174,23 +168,17 @@ public class BlockBOPSlab extends BlockHalfSlab
switch (getTypeFromMeta(meta))
{
case 0:
case 3:
resistance = 7.0F;
break;
case 1:
case 4:
resistance = 7.5F;
break;
case 2:
resistance = 2.0F;
break;
case 3:
resistance = 7.0F;
break;
case 4:
resistance = 7.5F;
break;
}
}
@ -198,6 +186,11 @@ public class BlockBOPSlab extends BlockHalfSlab
return resistance / 5.0F;
}
public int idPicked(World par1World, int par2, int par3, int par4)
{
return !isDoubleSlab ? this.blockID : (this.blockID == Blocks.woodenDoubleSlab1.get().blockID ? Blocks.woodenSingleSlab1.get().blockID : (this.blockID == Blocks.woodenDoubleSlab2.get().blockID ? Blocks.woodenSingleSlab2.get().blockID : Blocks.stoneSingleSlab.get().blockID));
}
protected ItemStack createStackedBlock(int par1)
{
return new ItemStack(this.blockID, 2, par1);

View File

@ -35,7 +35,7 @@ public class BlockBOPStairs extends BlockStairs
textures = new Icon[types.length];
for (int i = 0; i < types.length; ++i)
if (i < types.length - 3)
if (i < types.length - 5)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:plank_"+types[i]);
else
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]);

View File

@ -279,9 +279,13 @@ public class BOPBlocks {
LanguageRegistry.addName(new ItemStack(Blocks.stoneDoubleSlab.get(),1,0), "Red Rock Cobblestone Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneDoubleSlab.get(),1,1), "Red Rock Bricks Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneDoubleSlab.get(),1,2), "Mud Bricks Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneDoubleSlab.get(),1,3), "Skystone Cobblestone Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneDoubleSlab.get(),1,4), "Skystone Bricks Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneSingleSlab.get(),1,0), "Red Rock Cobblestone Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneSingleSlab.get(),1,1), "Red Rock Bricks Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneSingleSlab.get(),1,2), "Mud Bricks Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneSingleSlab.get(),1,3), "Skystone Cobblestone Slab");
LanguageRegistry.addName(new ItemStack(Blocks.stoneSingleSlab.get(),1,4), "Skystone Bricks Slab");
LanguageRegistry.addName(Blocks.mudBricksStairs.get(), "Mud Bricks Stairs");
LanguageRegistry.addName(Blocks.originGrass.get(), "Origin Grass");
LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,0), "Origin Leaves");

View File

@ -813,7 +813,7 @@ public class BOPConfiguration {
}
finally
{
config.save();
if (config.hasChanged()) config.save();
}
}
}