Added the remaining logs

This commit is contained in:
Adubbz 2014-10-02 15:57:50 +10:00
parent 08feb58a1f
commit f236e93bfa
30 changed files with 294 additions and 1 deletions

View File

@ -15,5 +15,7 @@ public class BOPBlocks
public static Block ash_block;
public static Block log;
public static Block log2;
public static Block log3;
public static Block log4;
public static Block planks;
}

View File

@ -0,0 +1,82 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import biomesoplenty.api.block.IBOPVariant;
public class BlockBOPLog3 extends BlockBOPLogBase
{
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", LogType.class);
public BlockBOPLog3()
{
super(VARIANT_PROP);
}
@Override
public IBlockState getStateFromMeta(int meta)
{
int axis = meta % 3;
int type = (meta - axis) / 3;
return this.getDefaultState().withProperty(VARIANT_PROP, LogType.values()[type]).withProperty(AXIS_PROP, EnumFacing.Axis.values()[axis]);
}
@Override
public int getMetaFromState(IBlockState state)
{
int baseMeta = ((LogType)state.getValue(VARIANT_PROP)).ordinal();
return baseMeta * 3 + ((EnumFacing.Axis)state.getValue(AXIS_PROP)).ordinal();
}
@Override
protected BlockState createBlockState()
{
return new BlockState(this, new IProperty[] { AXIS_PROP, VARIANT_PROP });
}
public static enum LogType implements IBOPVariant
{
DEAD,
GIANT_FLOWER_STEM,
PINE,
HELL_BARK,
JACARANDA;
@Override
public String getBaseName()
{
return this.equals(GIANT_FLOWER_STEM) ? null : "log";
}
@Override
public String getName()
{
return this.name().toLowerCase();
}
@Override
public String toString()
{
return getName();
}
@Override
public int getDefaultMetadata()
{
return this.ordinal() * 3;
}
}
}

View File

@ -0,0 +1,78 @@
/*******************************************************************************
* Copyright 2014, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.block;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import biomesoplenty.api.block.IBOPVariant;
public class BlockBOPLog4 extends BlockBOPLogBase
{
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", LogType.class);
public BlockBOPLog4()
{
super(VARIANT_PROP);
}
@Override
public IBlockState getStateFromMeta(int meta)
{
int axis = meta % 3;
int type = (meta - axis) / 3;
return this.getDefaultState().withProperty(VARIANT_PROP, LogType.values()[type]).withProperty(AXIS_PROP, EnumFacing.Axis.values()[axis]);
}
@Override
public int getMetaFromState(IBlockState state)
{
int baseMeta = ((LogType)state.getValue(VARIANT_PROP)).ordinal();
return baseMeta * 3 + ((EnumFacing.Axis)state.getValue(AXIS_PROP)).ordinal();
}
@Override
protected BlockState createBlockState()
{
return new BlockState(this, new IProperty[] { AXIS_PROP, VARIANT_PROP });
}
public static enum LogType implements IBOPVariant
{
MAHOGANY;
@Override
public String getBaseName()
{
return "log";
}
@Override
public String getName()
{
return this.name().toLowerCase();
}
@Override
public String toString()
{
return getName();
}
@Override
public int getDefaultMetadata()
{
return this.ordinal() * 3;
}
}
}

View File

@ -11,7 +11,6 @@ package biomesoplenty.common.init;
import static biomesoplenty.api.block.BOPBlocks.*;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.util.IStringSerializable;
import biomesoplenty.api.block.BOPBlock;
import biomesoplenty.api.block.IBOPVariant;
import biomesoplenty.client.util.ModelHelper;
@ -19,6 +18,8 @@ import biomesoplenty.common.block.BOPBlockPlanks;
import biomesoplenty.common.block.BlockAsh;
import biomesoplenty.common.block.BlockBOPLog;
import biomesoplenty.common.block.BlockBOPLog2;
import biomesoplenty.common.block.BlockBOPLog3;
import biomesoplenty.common.block.BlockBOPLog4;
import biomesoplenty.common.item.ItemBlockWithVariants;
import biomesoplenty.common.util.RegistryUtil;
import biomesoplenty.core.BiomesOPlenty;
@ -30,6 +31,8 @@ public class ModBlocks
ash_block = registerBlock(new BlockAsh(), "ash_block");
log = registerBlock(new BlockBOPLog(), "log");
log2 = registerBlock(new BlockBOPLog2(), "log2");
log3 = registerBlock(new BlockBOPLog3(), "log3");
log4 = registerBlock(new BlockBOPLog4(), "log4");
planks = registerBlock(new BOPBlockPlanks(), "planks");
}

View File

@ -0,0 +1,19 @@
{
"variants": {
"axis=x,variant=dead": { "model": "biomesoplenty:dead_log", "x": 90, "y": 90 },
"axis=y,variant=dead": { "model": "biomesoplenty:dead_log" },
"axis=z,variant=dead": { "model": "biomesoplenty:dead_log", "x": 90 },
"axis=x,variant=giant_flower_stem": { "model": "biomesoplenty:giant_flower_stem", "x": 90, "y": 90 },
"axis=y,variant=giant_flower_stem": { "model": "biomesoplenty:giant_flower_stem" },
"axis=z,variant=giant_flower_stem": { "model": "biomesoplenty:giant_flower_stem", "x": 90 },
"axis=x,variant=pine": { "model": "biomesoplenty:pine_log", "x": 90, "y": 90 },
"axis=y,variant=pine": { "model": "biomesoplenty:pine_log" },
"axis=z,variant=pine": { "model": "biomesoplenty:pine_log", "x": 90 },
"axis=x,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log", "x": 90, "y": 90 },
"axis=y,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log" },
"axis=z,variant=hell_bark": { "model": "biomesoplenty:hell_bark_log", "x": 90 },
"axis=x,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log", "x": 90, "y": 90 },
"axis=y,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log" },
"axis=z,variant=jacaranda": { "model": "biomesoplenty:jacaranda_log", "x": 90 }
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"axis=x,variant=mahogany": { "model": "biomesoplenty:mahogany_log", "x": 90, "y": 90 },
"axis=y,variant=mahogany": { "model": "biomesoplenty:mahogany_log" },
"axis=z,variant=mahogany": { "model": "biomesoplenty:mahogany_log", "x": 90 }
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/dead_log_top",
"side": "biomesoplenty:blocks/dead_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/giant_flower_stem_top",
"side": "biomesoplenty:blocks/giant_flower_stem"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/hell_bark_log_top",
"side": "biomesoplenty:blocks/hell_bark_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/jacaranda_log_top",
"side": "biomesoplenty:blocks/jacaranda_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/mahogany_log_top",
"side": "biomesoplenty:blocks/mahogany_log"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "biomesoplenty:blocks/pine_log_top",
"side": "biomesoplenty:blocks/pine_log"
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/dead_log",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/giant_flower_stem",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/hell_bark_log",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/jacaranda_log",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/mahogany_log",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

View File

@ -0,0 +1,10 @@
{
"parent": "biomesoplenty:block/pine_log",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B