From 120ad367fc3dd5f2db495f8d1de2238aa31c294f Mon Sep 17 00:00:00 2001 From: Pahimar Date: Tue, 15 Nov 2016 20:55:44 -0500 Subject: [PATCH] Bump Forge to 2125 and update MCP names --- gradle.properties | 6 ++-- .../ee3/block/BlockInfusedStoneSlab.java | 30 +++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2023afa5..a4444fa9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Build related properties minecraft_version = 1.10.2 -forge_version = 12.18.2.2105 -mcp_mappings_version = snapshot_20160518 +forge_version = 12.18.2.2125 +mcp_mappings_version = snapshot_20161111 curseforge_plugin_version = 1.0.7 # Mod related properties @@ -12,5 +12,5 @@ api_version = 1.5.0 mod_release_type = beta # Mod dependency related properties -dep_jei_version = 3.12.7.315 +dep_jei_version = 3.13.0.335 dep_waila_version = 1.7.0-B3_1.9.4 \ No newline at end of file diff --git a/src/main/java/com/pahimar/ee3/block/BlockInfusedStoneSlab.java b/src/main/java/com/pahimar/ee3/block/BlockInfusedStoneSlab.java index d8645309..a4d3170d 100644 --- a/src/main/java/com/pahimar/ee3/block/BlockInfusedStoneSlab.java +++ b/src/main/java/com/pahimar/ee3/block/BlockInfusedStoneSlab.java @@ -1,10 +1,40 @@ package com.pahimar.ee3.block; import com.pahimar.ee3.block.base.BlockBase; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public class BlockInfusedStoneSlab extends BlockBase { + public static final PropertyDirection FACING = PropertyDirection.create("facing"); + public BlockInfusedStoneSlab() { super("infused_stone_slab"); + setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.UP)); + } + + @Override + public IBlockState getStateFromMeta(int meta) { + return getDefaultState().withProperty(FACING, EnumFacing.getFront(meta & 7)); + } + + @Override + public int getMetaFromState(IBlockState state) { + return state.getValue(FACING).getIndex(); + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, FACING); + } + + @Override + public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { + return this.getDefaultState().withProperty(FACING, facing); } }