mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
~80 errors remaining. Need to properly add offhand support for most items
This commit is contained in:
1 parent
a89b8f666c
commit
79af86daae
40 files changed
+586
-436
No files matched your search
@@ -10,7 +10,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
@@ -75,16 +77,17 @@ public class BlockObsidianTNT extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityplayer, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityplayer, EnumHand hand, ItemStack stack, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if(entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().getItem() == Items.FLINT_AND_STEEL)
|
||||
if(stack != null && stack.getItem() == Items.FLINT_AND_STEEL)
|
||||
{
|
||||
explode(world, pos);
|
||||
world.setBlockToAir(pos);
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return super.onBlockActivated(world, pos, state, entityplayer, side, hitX, hitY, hitZ);
|
||||
return super.onBlockActivated(world, pos, state, entityplayer, hand, stack, side, hitX, hitY, hitZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user