Fixed tool effectiveness on various blocks, gave smoldering grass and ash their expected behaviours; burn on contact (smoldering grass) and slowness (ash)
This commit is contained in:
parent
ca668f6ed1
commit
a47e8012df
3 changed files with 50 additions and 3 deletions
|
@ -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;
|
||||
|
@ -49,6 +50,15 @@ public class BlockAsh extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
@ -84,11 +86,29 @@ public class BlockSmolderingGrass extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
@ -1037,8 +1056,6 @@ public class mod_BiomesOPlenty
|
|||
GameRegistry.registerBlock(holySingleSlab, "holySingleSlab");
|
||||
GameRegistry.registerBlock(holyStairs, "holyStairs");
|
||||
|
||||
MinecraftForge.setBlockHarvestLevel(amethystOre, "pickaxe", 3);
|
||||
|
||||
// Add crafting recipes.
|
||||
|
||||
//Plants
|
||||
|
|
Loading…
Reference in a new issue