Moved wood type enum to separate file
This commit is contained in:
parent
ca9de00430
commit
1a26c7bd16
3 changed files with 37 additions and 34 deletions
|
@ -8,9 +8,7 @@ import mmm.utils.I_URecipeRegistrar;
|
||||||
import mmm.utils.UMaths;
|
import mmm.utils.UMaths;
|
||||||
import mmm.utils.URegistration;
|
import mmm.utils.URegistration;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockPlanks;
|
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.MapColor;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.IProperty;
|
import net.minecraft.block.properties.IProperty;
|
||||||
import net.minecraft.block.properties.PropertyBool;
|
import net.minecraft.block.properties.PropertyBool;
|
||||||
|
@ -18,7 +16,6 @@ import net.minecraft.block.state.BlockStateContainer;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.BlockRenderLayer;
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
|
@ -43,29 +40,6 @@ public class DBlockTable
|
||||||
public final static String ID = "deco_table_";
|
public final static String ID = "deco_table_";
|
||||||
public final static String NAME = Mmm.PREFIX + DBlockTable.ID;
|
public final static String NAME = Mmm.PREFIX + DBlockTable.ID;
|
||||||
|
|
||||||
public static enum E_WoodType {
|
|
||||||
OAK( "oak" , BlockPlanks.EnumType.OAK ) , //
|
|
||||||
BIRCH( "birch" , BlockPlanks.EnumType.BIRCH ) , //
|
|
||||||
SPRUCE( "spruce" , BlockPlanks.EnumType.SPRUCE ) , //
|
|
||||||
JUNGLE( "jungle" , BlockPlanks.EnumType.JUNGLE ) , //
|
|
||||||
DARK_OAK( "dark_oak" , BlockPlanks.EnumType.DARK_OAK ) , //
|
|
||||||
ACACIA( "acacia" , BlockPlanks.EnumType.ACACIA );
|
|
||||||
|
|
||||||
public final String suffix;
|
|
||||||
public final int metaData;
|
|
||||||
public final MapColor mapColor;
|
|
||||||
public final Block block;
|
|
||||||
|
|
||||||
|
|
||||||
private E_WoodType( final String suffix , final BlockPlanks.EnumType planks )
|
|
||||||
{
|
|
||||||
this.suffix = suffix;
|
|
||||||
this.metaData = planks.getMetadata( );
|
|
||||||
this.mapColor = planks.getMapColor( );
|
|
||||||
this.block = Blocks.PLANKS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static final AxisAlignedBB COLLISION_TOP = UMaths.makeBlockAABB( 0 , 12 , 0 , 16 , 16 , 16 );
|
protected static final AxisAlignedBB COLLISION_TOP = UMaths.makeBlockAABB( 0 , 12 , 0 , 16 , 16 , 16 );
|
||||||
protected static final AxisAlignedBB COLLISION_LEGS[] = { //
|
protected static final AxisAlignedBB COLLISION_LEGS[] = { //
|
||||||
UMaths.makeBlockAABB( 1 , 0 , 1 , 3 , 12 , 3 ) , //
|
UMaths.makeBlockAABB( 1 , 0 , 1 , 3 , 12 , 3 ) , //
|
||||||
|
@ -87,10 +61,10 @@ public class DBlockTable
|
||||||
DBlockTable.SW , DBlockTable.WEST , DBlockTable.NW//
|
DBlockTable.SW , DBlockTable.WEST , DBlockTable.NW//
|
||||||
};
|
};
|
||||||
|
|
||||||
public final E_WoodType type;
|
public final E_DWoodType type;
|
||||||
|
|
||||||
|
|
||||||
public DBlockTable( final E_WoodType type )
|
public DBlockTable( final E_DWoodType type )
|
||||||
{
|
{
|
||||||
super( Material.WOOD , type.mapColor );
|
super( Material.WOOD , type.mapColor );
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
|
@ -12,12 +12,12 @@ public class DecorativeBlocks
|
||||||
public static final DBlockTable TABLE_ACACIA;
|
public static final DBlockTable TABLE_ACACIA;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
TABLE_OAK = new DBlockTable( DBlockTable.E_WoodType.OAK );
|
TABLE_OAK = new DBlockTable( E_DWoodType.OAK );
|
||||||
TABLE_BIRCH = new DBlockTable( DBlockTable.E_WoodType.BIRCH );
|
TABLE_BIRCH = new DBlockTable( E_DWoodType.BIRCH );
|
||||||
TABLE_SPRUCE = new DBlockTable( DBlockTable.E_WoodType.SPRUCE );
|
TABLE_SPRUCE = new DBlockTable( E_DWoodType.SPRUCE );
|
||||||
TABLE_JUNGLE = new DBlockTable( DBlockTable.E_WoodType.JUNGLE );
|
TABLE_JUNGLE = new DBlockTable( E_DWoodType.JUNGLE );
|
||||||
TABLE_DARK_OAK = new DBlockTable( DBlockTable.E_WoodType.DARK_OAK );
|
TABLE_DARK_OAK = new DBlockTable( E_DWoodType.DARK_OAK );
|
||||||
TABLE_ACACIA = new DBlockTable( DBlockTable.E_WoodType.ACACIA );
|
TABLE_ACACIA = new DBlockTable( E_DWoodType.ACACIA );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
29
src/java/mmm/deco/E_DWoodType.java
Normal file
29
src/java/mmm/deco/E_DWoodType.java
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
package mmm.deco;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockPlanks;
|
||||||
|
import net.minecraft.block.material.MapColor;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
|
||||||
|
public enum E_DWoodType {
|
||||||
|
OAK( "oak" , BlockPlanks.EnumType.OAK ) , //
|
||||||
|
BIRCH( "birch" , BlockPlanks.EnumType.BIRCH ) , //
|
||||||
|
SPRUCE( "spruce" , BlockPlanks.EnumType.SPRUCE ) , //
|
||||||
|
JUNGLE( "jungle" , BlockPlanks.EnumType.JUNGLE ) , //
|
||||||
|
DARK_OAK( "dark_oak" , BlockPlanks.EnumType.DARK_OAK ) , //
|
||||||
|
ACACIA( "acacia" , BlockPlanks.EnumType.ACACIA );
|
||||||
|
|
||||||
|
public final String suffix;
|
||||||
|
public final MapColor mapColor;
|
||||||
|
public final Block block;
|
||||||
|
public final int metaData;
|
||||||
|
|
||||||
|
|
||||||
|
private E_DWoodType( final String suffix , final BlockPlanks.EnumType planks )
|
||||||
|
{
|
||||||
|
this.suffix = suffix;
|
||||||
|
this.mapColor = planks.getMapColor( );
|
||||||
|
this.block = Blocks.PLANKS;
|
||||||
|
this.metaData = planks.getMetadata( );
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue