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)) switch (getTypeFromMeta(meta))
{ {
case 0: case 0:
case 3:
hardness = 1.6F; hardness = 1.6F;
break; break;
case 1: case 1:
case 4:
hardness = 1.1F; hardness = 1.1F;
break; break;
case 2: case 2:
hardness = 1.0F; hardness = 1.0F;
break;
case 3:
hardness = 1.6F;
break;
case 4:
hardness = 1.1F;
break; break;
} }
} }
@ -174,23 +168,17 @@ public class BlockBOPSlab extends BlockHalfSlab
switch (getTypeFromMeta(meta)) switch (getTypeFromMeta(meta))
{ {
case 0: case 0:
case 3:
resistance = 7.0F; resistance = 7.0F;
break; break;
case 1: case 1:
case 4:
resistance = 7.5F; resistance = 7.5F;
break; break;
case 2: case 2:
resistance = 2.0F; resistance = 2.0F;
break;
case 3:
resistance = 7.0F;
break;
case 4:
resistance = 7.5F;
break; break;
} }
} }
@ -198,6 +186,11 @@ public class BlockBOPSlab extends BlockHalfSlab
return resistance / 5.0F; 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) protected ItemStack createStackedBlock(int par1)
{ {
return new ItemStack(this.blockID, 2, par1); return new ItemStack(this.blockID, 2, par1);

View file

@ -35,7 +35,7 @@ public class BlockBOPStairs extends BlockStairs
textures = new Icon[types.length]; textures = new Icon[types.length];
for (int i = 0; i < types.length; ++i) 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]); textures[i] = iconRegister.registerIcon("BiomesOPlenty:plank_"+types[i]);
else else
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]); 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,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,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,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,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,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,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.mudBricksStairs.get(), "Mud Bricks Stairs");
LanguageRegistry.addName(Blocks.originGrass.get(), "Origin Grass"); LanguageRegistry.addName(Blocks.originGrass.get(), "Origin Grass");
LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,0), "Origin Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves2.get(),1,0), "Origin Leaves");

View file

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