2014-12-15 00:11:48 +00:00
|
|
|
package com.cricketcraft.chisel.block;
|
|
|
|
|
|
2014-04-21 19:13:15 +01:00
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
|
import net.minecraft.util.AxisAlignedBB;
|
|
|
|
|
import net.minecraft.world.World;
|
2014-12-16 22:27:44 +00:00
|
|
|
|
|
|
|
|
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
2015-01-08 05:46:10 -05:00
|
|
|
import com.cricketcraft.chisel.config.Configurations;
|
2014-12-16 22:27:44 +00:00
|
|
|
|
2014-12-14 20:05:39 +00:00
|
|
|
import cpw.mods.fml.common.FMLCommonHandler;
|
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
2014-04-21 19:13:15 +01:00
|
|
|
|
2015-01-07 19:50:18 -05:00
|
|
|
public class BlockConcrete extends BlockCarvable {
|
|
|
|
|
|
|
|
|
|
public BlockConcrete() {
|
|
|
|
|
super();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
|
2015-08-06 00:00:22 -04:00
|
|
|
if (Configurations.fullBlockConcrete)
|
2015-04-12 17:20:08 +01:00
|
|
|
return AxisAlignedBB.getBoundingBox(par2, par3, par4, (par2 + 1), ((par3 + 1)), (par4 + 1));
|
|
|
|
|
else
|
2015-08-06 00:00:22 -04:00
|
|
|
return AxisAlignedBB.getBoundingBox(par2, par3, par4, (par2 + 1), ((par3 + 1) - 0.125F), (par4 + 1));
|
2015-01-07 19:50:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
|
|
|
|
if (FMLCommonHandler.instance().getEffectiveSide() != Side.CLIENT)
|
|
|
|
|
return;
|
|
|
|
|
if (Configurations.concreteVelocity == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
GeneralChiselClient.speedupPlayer(world, entity, Configurations.concreteVelocity);
|
|
|
|
|
}
|
2014-04-21 19:13:15 +01:00
|
|
|
|
|
|
|
|
}
|