Bamboo / hevea fences

This commit is contained in:
Emmanuel BENOîT 2016-07-11 10:28:49 +02:00
parent 3d9be8923d
commit c1635ea943
13 changed files with 156 additions and 0 deletions

View file

@ -0,0 +1,19 @@
package mmm.deco;
import mmm.utils.URegistry;
public class DFence
{
public final DFenceBlock BLOCK;
public DFence( DWoodType woodType )
{
this.BLOCK = new DFenceBlock( woodType );
URegistry.addBlock( this.BLOCK );
}
}

View file

@ -0,0 +1,45 @@
package mmm.deco;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.block.BlockFence;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class DFenceBlock
extends BlockFence
implements I_URecipeRegistrar
{
private DWoodType woodType;
public DFenceBlock( DWoodType woodType )
{
super( Material.WOOD , woodType.getMapColor( ) );
this.woodType = woodType;
this.setHardness( 2.f );
this.setResistance( 5.f );
this.setSoundType( SoundType.WOOD );
this.setHarvestLevel( "axe" , 0 );
URegistry.setIdentifiers( this , "deco" , "fence" , woodType.getSuffix( ) );
}
@Override
public void registerRecipes( )
{
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
"PSP" , //
"PSP" , //
'P' , this.woodType.getPlanksBlock( ) , //
'S' , Items.STICK );
}
}

View file

@ -0,0 +1,16 @@
package mmm.deco;
public class DFences
{
public final DFence BAMBOO;
public final DFence HEVEA;
DFences( )
{
this.BAMBOO = new DFence( DWoodType.BAMBOO );
this.HEVEA = new DFence( DWoodType.HEVEA );
}
}

View file

@ -48,6 +48,8 @@ public class DecorativeBlocks
public static final DThrone THRONE_HEVEA;
public static final DThrone THRONE_BAMBOO;
public static final DFences FENCE;
static {
final BlockStone.EnumType granite = BlockStone.EnumType.GRANITE_SMOOTH;
final BlockStone.EnumType diorite = BlockStone.EnumType.DIORITE_SMOOTH;
@ -96,6 +98,8 @@ public class DecorativeBlocks
THRONE_ACACIA = new DThrone( DWoodType.ACACIA );
THRONE_HEVEA = new DThrone( DWoodType.HEVEA);
THRONE_BAMBOO = new DThrone( DWoodType.BAMBOO );
FENCE = new DFences( );
}

View file

@ -0,0 +1,17 @@
{
"multipart": [
{ "apply": { "model": "mmm:deco/fence/bamboo/post" }},
{ "when": { "north": "true" },
"apply": { "model": "mmm:deco/fence/bamboo/side", "uvlock": true }
},
{ "when": { "east": "true" },
"apply": { "model": "mmm:deco/fence/bamboo/side", "y": 90, "uvlock": true }
},
{ "when": { "south": "true" },
"apply": { "model": "mmm:deco/fence/bamboo/side", "y": 180, "uvlock": true }
},
{ "when": { "west": "true" },
"apply": { "model": "mmm:deco/fence/bamboo/side", "y": 270, "uvlock": true }
}
]
}

View file

@ -0,0 +1,17 @@
{
"multipart": [
{ "apply": { "model": "mmm:deco/fence/hevea/post" }},
{ "when": { "north": "true" },
"apply": { "model": "mmm:deco/fence/hevea/side", "uvlock": true }
},
{ "when": { "east": "true" },
"apply": { "model": "mmm:deco/fence/hevea/side", "y": 90, "uvlock": true }
},
{ "when": { "south": "true" },
"apply": { "model": "mmm:deco/fence/hevea/side", "y": 180, "uvlock": true }
},
{ "when": { "west": "true" },
"apply": { "model": "mmm:deco/fence/hevea/side", "y": 270, "uvlock": true }
}
]
}

View file

@ -292,3 +292,5 @@ tile.mmm.deco.throne.hevea.silver.name=Hevea Throne (Silver)
tile.mmm.deco.throne.hevea.white.name=Hevea Throne (White)
tile.mmm.deco.throne.hevea.yellow.name=Hevea Throne (Yellow)
tile.mmm.deco.fence.hevea.name=Hevea Fence
tile.mmm.deco.fence.bamboo.name=Bamboo Fence

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/fence_post",
"textures": {
"texture": "mmm:blocks/materials/planks/bamboo"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_side",
"textures": {
"texture": "mmm:blocks/materials/planks/bamboo"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/fence_post",
"textures": {
"texture": "mmm:blocks/materials/planks/hevea"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/fence_side",
"textures": {
"texture": "mmm:blocks/materials/planks/hevea"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/fence_inventory",
"textures": {
"texture": "mmm:blocks/materials/planks/bamboo"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/fence_inventory",
"textures": {
"texture": "mmm:blocks/materials/planks/hevea"
}
}