Made honey give slowness upon contact
This commit is contained in:
parent
b0a418ea8f
commit
c4bcba471d
|
@ -18,7 +18,9 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import biomesoplenty.BiomesOPlenty;
|
||||
import biomesoplenty.api.Blocks;
|
||||
import biomesoplenty.api.Fluids;
|
||||
import biomesoplenty.api.Items;
|
||||
import biomesoplenty.entities.EntityWasp;
|
||||
|
||||
public class BlockHoney extends Block
|
||||
{
|
||||
|
@ -34,6 +36,12 @@ public class BlockHoney extends Block
|
|||
blockIcon = par1IconRegister.registerIcon("biomesoplenty:honeyblock");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int par5, int par6)
|
||||
{
|
||||
world.setBlock(x, y, z, Fluids.honey.get().blockID, 7, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderBlockPass()
|
||||
|
|
|
@ -183,7 +183,7 @@ public class BOPBlocks
|
|||
Blocks.cloud = Optional.of((new BlockCloud(BOPConfigurationIDs.cloudID)).setHardness(0.1F).setLightOpacity(3).setStepSound(Block.soundClothFootstep).setUnlocalizedName("bop.cloud"));
|
||||
|
||||
Blocks.hive = Optional.of((new BlockHive(BOPConfigurationIDs.hiveID)).setHardness(0.5F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("bop.hive"));
|
||||
Blocks.honeyBlock = Optional.of((new BlockHoney(BOPConfigurationIDs.honeyBlockID)).setHardness(0.5F).setStepSound(Block.soundGlassFootstep).setUnlocalizedName("bop.honeyBlock"));
|
||||
Blocks.honeyBlock = Optional.of((new BlockHoney(BOPConfigurationIDs.honeyBlockID)).setHardness(0.5F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("bop.honeyBlock"));
|
||||
|
||||
Blocks.bones = Optional.of((new BlockBones(BOPConfigurationIDs.bonesID)).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("bop.bones"));
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
package biomesoplenty.fluids;
|
||||
|
||||
import biomesoplenty.api.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -39,4 +44,15 @@ public class BlockFluidHoney extends BlockFluidFinite
|
|||
{
|
||||
return par1 != 0 && par1 != 1 ? honeyFlowingIcon : honeyStillIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World par1World, int x, int y, int z, Entity par5Entity)
|
||||
{
|
||||
int meta = par1World.getBlockMetadata(x, y, z);
|
||||
|
||||
if (par5Entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase)par5Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 682 B |
Loading…
Reference in New Issue