Merge pull request #16 from Adubbz/EffectivenessChanges

Efectiveness Fixes and minor tweaks
This commit is contained in:
ted 2013-04-02 11:24:50 -07:00
commit f6bdadd761
3 changed files with 50 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -48,6 +49,15 @@ public class BlockAsh extends Block
par1World.spawnParticle("smoke", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
}
}
/**
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
*/
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.motionX *= 0.4D;
par5Entity.motionZ *= 0.4D;
}
/**
* Returns the ID of the items to drop on destruction.

View File

@ -8,6 +8,8 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -83,12 +85,30 @@ public class BlockSmolderingGrass extends Block
par1World.spawnParticle("flame", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
}
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
float f = 0.02F;
return AxisAlignedBB.getAABBPool().getAABB((double)par2, (double)par3, (double)par4, (double)(par2 + 1), (double)((float)(par3 + 1) - f), (double)(par4 + 1));
}
/**
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
*/
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
par5Entity.setFire(2);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return 0;
return Block.dirt.blockID;
}
}

View File

@ -661,6 +661,25 @@ public class mod_BiomesOPlenty
leggingsAmethyst = (new ArmorAmethyst(leggingsAmethystID, EnumArmorMaterialAmethyst, proxy.addArmor("amethyst"), 2)).setCreativeTab(tabBiomesOPlenty).setUnlocalizedName("leggingsAmethyst");
bootsAmethyst = (new ArmorAmethyst(bootsAmethystID, EnumArmorMaterialAmethyst, proxy.addArmor("amethyst"), 3)).setCreativeTab(tabBiomesOPlenty).setUnlocalizedName("bootsAmethyst");
//Block tool strength, 0 is Wood and Gold, 1 is Stone, 2 is Iron and 3 is Diamond
//Leaves can be obtained from using shears, however they arn't instantly broken by them (unsure how to do this)
MinecraftForge.setBlockHarvestLevel(smolderingGrass, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(mud, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(ash, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(originGrass, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(hardSand, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(holyGrass, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(quicksand, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(driedDirt, "pickaxe", 0);
MinecraftForge.setBlockHarvestLevel(amethystOre, "pickaxe", 3);
MinecraftForge.setBlockHarvestLevel(amethystBlock, "pickaxe", 3);
MinecraftForge.setToolClass(shovelAmethyst, "shovel", 3);
MinecraftForge.setToolClass(pickaxeAmethyst, "pickaxe", 3);
MinecraftForge.setToolClass(axeAmethyst, "axe", 3);
// Achievement declaration
if (achievements == true)
{
@ -1036,8 +1055,6 @@ public class mod_BiomesOPlenty
GameRegistry.registerBlock(holyDoubleSlab, "holyDoubleSlab");
GameRegistry.registerBlock(holySingleSlab, "holySingleSlab");
GameRegistry.registerBlock(holyStairs, "holyStairs");
MinecraftForge.setBlockHarvestLevel(amethystOre, "pickaxe", 3);
// Add crafting recipes.