mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
<1000 errors
This commit is contained in:
1 parent
c6a09b5658
commit
af008b9395
99 files changed
+470
-484
No files matched your search
@@ -10,6 +10,7 @@ import mekanism.common.block.states.BlockStatePlastic;
|
||||
import mekanism.common.block.states.BlockStatePlastic.PlasticBlockType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -17,6 +18,7 @@ import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -28,7 +30,7 @@ public class BlockPlastic extends Block
|
||||
|
||||
public BlockPlastic(PlasticBlockType blockType)
|
||||
{
|
||||
super(Material.wood);
|
||||
super(Material.WOOD);
|
||||
type = blockType;
|
||||
setHardness(type == PlasticBlockType.REINFORCED ? 50F : 5F);
|
||||
setResistance(type == PlasticBlockType.REINFORCED ? 2000F : 10F);
|
||||
@@ -41,7 +43,7 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStatePlastic(this);
|
||||
}
|
||||
@@ -59,14 +61,14 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 modifyAcceleration(World world, BlockPos pos, Entity e, Vec3 motion)
|
||||
public Vec3d modifyAcceleration(World world, BlockPos pos, Entity e, Vec3 motion)
|
||||
{
|
||||
if(type == PlasticBlockType.ROAD)
|
||||
{
|
||||
double boost = 1.6;
|
||||
|
||||
double a = Math.atan2(motion.xCoord, motion.zCoord);
|
||||
return new Vec3(motion.xCoord + Math.sin(a) * boost * slipperiness, motion.yCoord, motion.zCoord + Math.cos(a) * boost * slipperiness);
|
||||
return new Vec3d(motion.xCoord + Math.sin(a) * boost * slipperiness, motion.yCoord, motion.zCoord + Math.cos(a) * boost * slipperiness);
|
||||
}
|
||||
|
||||
return motion;
|
||||
@@ -104,13 +106,13 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue()
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
if(type == PlasticBlockType.GLOW)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user