diff options
| author | Antifluxfield <lyj_299792458@163.com> | 2017-12-12 21:10:29 +0800 |
|---|---|---|
| committer | Antifluxfield <lyj_299792458@163.com> | 2017-12-12 21:10:29 +0800 |
| commit | 22fb5955b0356a9b174312a6300348446a523f5c (patch) | |
| tree | 594feea7970baa612d517d19a1fcb95144ab369f /src/main/java/gregtech/common/blocks/GT_Block_Concretes.java | |
| parent | 0cce0e6a1af627fe536aa11097373c17547c242b (diff) | |
| parent | 79999604ecb7795cafca5dac21f8df33f8da62ee (diff) | |
| download | GT5-Unofficial-22fb5955b0356a9b174312a6300348446a523f5c.tar.gz GT5-Unofficial-22fb5955b0356a9b174312a6300348446a523f5c.tar.bz2 GT5-Unofficial-22fb5955b0356a9b174312a6300348446a523f5c.zip | |
Merge remote-tracking branch 'origin/experimental' into GT6-pipes
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Concretes.java')
| -rw-r--r-- | src/main/java/gregtech/common/blocks/GT_Block_Concretes.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java index 6f3f80c7df..402f50a484 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java @@ -2,6 +2,7 @@ package gregtech.common.blocks; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.IBlockOnWalkOver; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.block.Block; @@ -16,11 +17,11 @@ import net.minecraft.world.World; import net.minecraftforge.fluids.IFluidBlock; public class GT_Block_Concretes - extends GT_Block_Stones_Abstract { + extends GT_Block_Stones_Abstract implements IBlockOnWalkOver{ public GT_Block_Concretes() { super(GT_Item_Concretes.class, "gt.blockconcretes"); setResistance(20.0F); - this.slipperiness = 0.9F; + //this.slipperiness = 0.9F; GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Dark Concrete"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Dark Concrete Cobblestone"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Dark Concrete Cobblestone"); @@ -70,6 +71,15 @@ public class GT_Block_Concretes return gregtech.api.enums.Textures.BlockIcons.CONCRETES[0].getIcon(); } + @Override + public void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ) { + if ((aEntity.motionX != 0 || aEntity.motionZ != 0) && !aEntity.isInWater() && !aEntity.isWet() && !aEntity.isSneaking()) { + double tSpeed = (aWorld.getBlock(aX, aY-1, aZ).slipperiness >= 0.8 ? 1.5 : 1.2); + aEntity.motionX *= tSpeed; aEntity.motionZ *= tSpeed; + } + } + + /** public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity aEntity) { Block tBlock = aWorld.getBlock(aX, aY + 1, aZ); if (((aEntity instanceof EntityLivingBase)) && (!(tBlock instanceof IFluidBlock)) && (!(tBlock instanceof BlockLiquid)) && (aEntity.onGround) && (!aEntity.isInWater()) && (!aEntity.isWet())) { @@ -92,4 +102,5 @@ public class GT_Block_Concretes } return AxisAlignedBB.getBoundingBox(aX, aY, aZ, aX + 1, aY + 0.875D, aZ + 1); } + **/ } |
