This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Noah Jelen
committed
Sep 20, 2018
1 parent
e8aefd2
commit b90f9cc
Showing
118 changed files
with
3,007 additions
and
2,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
src/main/java/com/NetherNoah/ParadiseMod/blocks/formations/mossyStoneFormation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.NetherNoah.ParadiseMod.blocks.formations; | ||
|
||
import net.minecraft.block.BlockDirectional; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.properties.IProperty; | ||
import net.minecraft.block.state.BlockStateContainer; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.util.BlockRenderLayer; | ||
import net.minecraft.util.EnumFacing; | ||
import net.minecraft.util.math.AxisAlignedBB; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.IBlockAccess; | ||
import net.minecraft.world.World; | ||
|
||
public class mossyStoneFormation extends BlockDirectional { | ||
protected static final AxisAlignedBB END_ROD_VERTICAL_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D); | ||
protected static final AxisAlignedBB END_ROD_NS_AABB = new AxisAlignedBB(0.375D, 0.375D, 0.0D, 0.625D, 0.625D, 1.0D); | ||
protected static final AxisAlignedBB END_ROD_EW_AABB = new AxisAlignedBB(0.0D, 0.375D, 0.375D, 1.0D, 0.625D, 0.625D); | ||
|
||
public mossyStoneFormation() | ||
{ | ||
super(Material.CIRCUITS); | ||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP)); | ||
setCreativeTab(CreativeTabs.DECORATIONS); | ||
setUnlocalizedName("mossyStoneFormation"); | ||
setRegistryName("mossy_stone_formation"); | ||
} | ||
|
||
@Override | ||
public boolean isOpaqueCube(IBlockState state) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isFullCube(IBlockState state) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) | ||
{ | ||
switch (((EnumFacing)state.getValue(FACING)).getAxis()) | ||
{ | ||
case X: | ||
default: | ||
return END_ROD_EW_AABB; | ||
case Z: | ||
return END_ROD_NS_AABB; | ||
case Y: | ||
return END_ROD_VERTICAL_AABB; | ||
} | ||
} | ||
@Override | ||
public BlockRenderLayer getBlockLayer() | ||
{ | ||
return BlockRenderLayer.TRANSLUCENT; | ||
} | ||
|
||
@Override | ||
public IBlockState getStateFromMeta(int meta) | ||
{ | ||
IBlockState iblockstate = this.getDefaultState(); | ||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.getFront(meta)); | ||
return iblockstate; | ||
} | ||
|
||
@Override | ||
public int getMetaFromState(IBlockState state) | ||
{ | ||
return ((EnumFacing)state.getValue(FACING)).getIndex(); | ||
} | ||
|
||
@Override | ||
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) | ||
{ | ||
IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite())); | ||
|
||
if (iblockstate.getBlock() == Blocks.END_ROD) | ||
{ | ||
EnumFacing enumfacing = (EnumFacing)iblockstate.getValue(FACING); | ||
|
||
if (enumfacing == facing) | ||
{ | ||
return this.getDefaultState().withProperty(FACING, facing.getOpposite()); | ||
} | ||
} | ||
|
||
return this.getDefaultState().withProperty(FACING, facing); | ||
} | ||
|
||
@Override | ||
protected BlockStateContainer createBlockState() | ||
{ | ||
return new BlockStateContainer(this, new IProperty[] {FACING}); | ||
} | ||
|
||
} |
100 changes: 100 additions & 0 deletions
100
src/main/java/com/NetherNoah/ParadiseMod/blocks/formations/netherrackFormation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package com.NetherNoah.ParadiseMod.blocks.formations; | ||
|
||
import net.minecraft.block.BlockDirectional; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.properties.IProperty; | ||
import net.minecraft.block.state.BlockStateContainer; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.init.Blocks; | ||
import net.minecraft.util.BlockRenderLayer; | ||
import net.minecraft.util.EnumFacing; | ||
import net.minecraft.util.math.AxisAlignedBB; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.IBlockAccess; | ||
import net.minecraft.world.World; | ||
|
||
public class netherrackFormation extends BlockDirectional { | ||
protected static final AxisAlignedBB END_ROD_VERTICAL_AABB = new AxisAlignedBB(0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D); | ||
protected static final AxisAlignedBB END_ROD_NS_AABB = new AxisAlignedBB(0.375D, 0.375D, 0.0D, 0.625D, 0.625D, 1.0D); | ||
protected static final AxisAlignedBB END_ROD_EW_AABB = new AxisAlignedBB(0.0D, 0.375D, 0.375D, 1.0D, 0.625D, 0.625D); | ||
|
||
public netherrackFormation() | ||
{ | ||
super(Material.CIRCUITS); | ||
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP)); | ||
setCreativeTab(CreativeTabs.DECORATIONS); | ||
setUnlocalizedName("netherrackFormation"); | ||
setRegistryName("netherrack_formation"); | ||
} | ||
|
||
@Override | ||
public boolean isOpaqueCube(IBlockState state) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isFullCube(IBlockState state) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) | ||
{ | ||
switch (((EnumFacing)state.getValue(FACING)).getAxis()) | ||
{ | ||
case X: | ||
default: | ||
return END_ROD_EW_AABB; | ||
case Z: | ||
return END_ROD_NS_AABB; | ||
case Y: | ||
return END_ROD_VERTICAL_AABB; | ||
} | ||
} | ||
@Override | ||
public BlockRenderLayer getBlockLayer() | ||
{ | ||
return BlockRenderLayer.TRANSLUCENT; | ||
} | ||
|
||
@Override | ||
public IBlockState getStateFromMeta(int meta) | ||
{ | ||
IBlockState iblockstate = this.getDefaultState(); | ||
iblockstate = iblockstate.withProperty(FACING, EnumFacing.getFront(meta)); | ||
return iblockstate; | ||
} | ||
|
||
@Override | ||
public int getMetaFromState(IBlockState state) | ||
{ | ||
return ((EnumFacing)state.getValue(FACING)).getIndex(); | ||
} | ||
|
||
@Override | ||
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) | ||
{ | ||
IBlockState iblockstate = worldIn.getBlockState(pos.offset(facing.getOpposite())); | ||
|
||
if (iblockstate.getBlock() == Blocks.END_ROD) | ||
{ | ||
EnumFacing enumfacing = (EnumFacing)iblockstate.getValue(FACING); | ||
|
||
if (enumfacing == facing) | ||
{ | ||
return this.getDefaultState().withProperty(FACING, facing.getOpposite()); | ||
} | ||
} | ||
|
||
return this.getDefaultState().withProperty(FACING, facing); | ||
} | ||
|
||
@Override | ||
protected BlockStateContainer createBlockState() | ||
{ | ||
return new BlockStateContainer(this, new IProperty[] {FACING}); | ||
} | ||
|
||
} |
Oops, something went wrong.