mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-28 07:56:01 +00:00
Rebase!
This commit is contained in:
1 parent
316e703b90
commit
2789545d34
567 files changed
+5211
-6296
No files matched your search
@@ -15,41 +15,52 @@ import net.minecraft.world.World;
|
||||
* @author fuj1n
|
||||
*
|
||||
*/
|
||||
public class BehaviorExplosive extends Behavior{
|
||||
public class BehaviorExplosive extends Behavior
|
||||
{
|
||||
|
||||
@Override
|
||||
public void executeLogic(World par1World, int par2, int par3, int par4, ItemStack par5ItemStack, Entity triggerer, boolean willBlockBeRemoved) {
|
||||
float explodeStrenght = 0;
|
||||
if(par5ItemStack.itemID == Block.tnt.blockID){
|
||||
explodeStrenght = 4.0F * par5ItemStack.stackSize;
|
||||
}else if(par5ItemStack.itemID == Item.gunpowder.itemID){
|
||||
explodeStrenght = 0.8F * par5ItemStack.stackSize;
|
||||
}
|
||||
|
||||
par1World.createExplosion(new EntityTNTPrimed(par1World, par2, par3, par4, (EntityLivingBase) null), par2, par3, par4, explodeStrenght, true);
|
||||
}
|
||||
@Override
|
||||
public void executeLogic (World par1World, int par2, int par3, int par4, ItemStack par5ItemStack, Entity triggerer, boolean willBlockBeRemoved)
|
||||
{
|
||||
float explodeStrenght = 0;
|
||||
if (par5ItemStack.itemID == Block.tnt.blockID)
|
||||
{
|
||||
explodeStrenght = 4.0F * par5ItemStack.stackSize;
|
||||
}
|
||||
else if (par5ItemStack.itemID == Item.gunpowder.itemID)
|
||||
{
|
||||
explodeStrenght = 0.8F * par5ItemStack.stackSize;
|
||||
}
|
||||
|
||||
par1World.createExplosion(new EntityTNTPrimed(par1World, par2, par3, par4, (EntityLivingBase) null), par2, par3, par4, explodeStrenght, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInformation (ItemStack par1ItemStack, List par2List)
|
||||
{
|
||||
String str = "UNDEFINED";
|
||||
if (par1ItemStack.itemID == Block.tnt.blockID)
|
||||
{
|
||||
str = "medium";
|
||||
}
|
||||
else if (par1ItemStack.itemID == Item.gunpowder.itemID)
|
||||
{
|
||||
str = "small";
|
||||
}
|
||||
|
||||
//par2List.add("This item explodes with " + str + " power when the landmine is triggered.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOffensive (ItemStack par1ItemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//Change this to false to greatly decrease the maximum potential of explosions but at the same time, make them launch the player much higher(I mean the explosions with 2 or more TNT
|
||||
public boolean effectStacks ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getInformation(ItemStack par1ItemStack, List par2List){
|
||||
String str = "UNDEFINED";
|
||||
if(par1ItemStack.itemID == Block.tnt.blockID){
|
||||
str = "medium";
|
||||
}else if(par1ItemStack.itemID == Item.gunpowder.itemID){
|
||||
str = "small";
|
||||
}
|
||||
|
||||
//par2List.add("This item explodes with " + str + " power when the landmine is triggered.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOffensive(ItemStack par1ItemStack){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//Change this to false to greatly decrease the maximum potential of explosions but at the same time, make them launch the player much higher(I mean the explosions with 2 or more TNT
|
||||
public boolean effectStacks(){
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user