Hevea / bamboo doors

This commit is contained in:
Emmanuel BENOîT 2016-07-12 17:17:26 +02:00
parent 8615a169a2
commit e616e01762
26 changed files with 282 additions and 8 deletions

View file

@ -9,9 +9,6 @@ deco No Stone - Smooth + stairs + slabs
Limestone Limestone
Slate Slate
Basalt Basalt
deco No Wood - Doors
Hevea
Bamboo
------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------
plants No? Tomatoes plants No? Tomatoes
plants No? Turnips plants No? Turnips

BIN
graphics/bamboo-door.xcf Normal file

Binary file not shown.

BIN
graphics/hevea-door.xcf Normal file

Binary file not shown.

View file

@ -5,6 +5,7 @@ import mmm.deco.DChairs;
import mmm.deco.DSeatEntity; import mmm.deco.DSeatEntity;
import mmm.deco.DStairs; import mmm.deco.DStairs;
import mmm.deco.DTables; import mmm.deco.DTables;
import mmm.deco.doors.DDoors;
import mmm.deco.fences.DFences; import mmm.deco.fences.DFences;
import mmm.deco.slabs.DSlabs; import mmm.deco.slabs.DSlabs;
import mmm.deco.thrones.DThrones; import mmm.deco.thrones.DThrones;
@ -17,6 +18,7 @@ public class MmmDeco
public static final DStairs STAIRS; public static final DStairs STAIRS;
public static final DSlabs SLAB; public static final DSlabs SLAB;
public static final DFences FENCE; public static final DFences FENCE;
public static final DDoors DOOR;
public static final DTables TABLE; public static final DTables TABLE;
public static final DChairs CHAIR; public static final DChairs CHAIR;
public static final DThrones THRONE; public static final DThrones THRONE;
@ -25,6 +27,7 @@ public class MmmDeco
STAIRS = new DStairs( ); STAIRS = new DStairs( );
SLAB = new DSlabs( ); SLAB = new DSlabs( );
FENCE = new DFences( ); FENCE = new DFences( );
DOOR = new DDoors( );
TABLE = new DTables( ); TABLE = new DTables( );
CHAIR = new DChairs( ); CHAIR = new DChairs( );
THRONE = new DThrones( ); THRONE = new DThrones( );

View file

@ -0,0 +1,25 @@
package mmm.deco.doors;
import mmm.core.CRegistry;
import mmm.materials.MWood;
import net.minecraft.item.ItemDoor;
public class DDoor
{
public final DDoorBlock BLOCK;
public final ItemDoor ITEM;
public DDoor( final MWood wood )
{
this.BLOCK = new DDoorBlock( this , wood );
this.ITEM = new ItemDoor( this.BLOCK );
CRegistry.setIdentifiers( this.ITEM , "deco" , "door" , wood.getSuffix( ) );
CRegistry.addBlock( this.BLOCK , this.ITEM );
}
}

View file

@ -0,0 +1,78 @@
package mmm.deco.doors;
import java.util.Random;
import mmm.core.CRegistry;
import mmm.core.api.blocks.I_StateMapperProvider;
import mmm.materials.MWood;
import net.minecraft.block.BlockDoor;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraft.client.renderer.block.statemap.StateMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class DDoorBlock
extends BlockDoor
implements I_StateMapperProvider
{
private final DDoor door;
private final MapColor mapColor;
public DDoorBlock( final DDoor door , final MWood wood )
{
super( Material.WOOD );
this.mapColor = wood.getMapColor( );
this.door = door;
this.setHardness( 3f );
this.setSoundType( SoundType.WOOD );
CRegistry.setIdentifiers( this , "deco" , "door" , wood.getSuffix( ) );
}
@Override
public MapColor getMapColor( final IBlockState state )
{
return this.mapColor;
}
@Override
public Item getItemDropped( final IBlockState state , final Random rand , final int fortune )
{
return state.getValue( BlockDoor.HALF ) == BlockDoor.EnumDoorHalf.UPPER ? null : this.door.ITEM;
}
@Override
public ItemStack getPickBlock( final IBlockState state , final RayTraceResult target , final World world ,
final BlockPos pos , final EntityPlayer player )
{
return new ItemStack( this.door.ITEM );
}
@Override
@SideOnly( Side.CLIENT )
public IStateMapper getStateMapper( )
{
return new StateMap.Builder( ).ignore( BlockDoor.POWERED ).build( );
}
}

View file

@ -0,0 +1,20 @@
package mmm.deco.doors;
import mmm.MmmMaterials;
public class DDoors
{
public final DDoor BAMBOO;
public final DDoor HEVEA;
public DDoors( )
{
this.BAMBOO = new DDoor( MmmMaterials.WOOD.BAMBOO );
this.HEVEA = new DDoor( MmmMaterials.WOOD.HEVEA );
}
}

View file

@ -0,0 +1,36 @@
{
"variants" : {
"facing=east,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/bottom_lh" },
"facing=south,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 90 },
"facing=west,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 180 },
"facing=north,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 270 },
"facing=east,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/bottom_rh" },
"facing=south,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 90 },
"facing=west,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 180 },
"facing=north,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 270 },
"facing=east,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 90 },
"facing=south,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 180 },
"facing=west,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/bottom_rh", "y": 270 },
"facing=north,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/bottom_rh" },
"facing=east,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 270 },
"facing=south,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/bottom_lh" },
"facing=west,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 90 },
"facing=north,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/bottom_lh", "y": 180 },
"facing=east,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/top_lh" },
"facing=south,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/top_lh", "y": 90 },
"facing=west,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/top_lh", "y": 180 },
"facing=north,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/bamboo/top_lh", "y": 270 },
"facing=east,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/top_rh" },
"facing=south,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/top_rh", "y": 90 },
"facing=west,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/top_rh", "y": 180 },
"facing=north,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/bamboo/top_rh", "y": 270 },
"facing=east,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/top_rh", "y": 90 },
"facing=south,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/top_rh", "y": 180 },
"facing=west,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/top_rh", "y": 270 },
"facing=north,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/bamboo/top_rh" },
"facing=east,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/top_lh", "y": 270 },
"facing=south,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/top_lh" },
"facing=west,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/top_lh", "y": 90 },
"facing=north,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/bamboo/top_lh", "y": 180 }
}
}

View file

@ -0,0 +1,36 @@
{
"variants" : {
"facing=east,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/hevea/bottom_lh" },
"facing=south,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 90 },
"facing=west,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 180 },
"facing=north,half=lower,hinge=left,open=false": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 270 },
"facing=east,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/hevea/bottom_rh" },
"facing=south,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 90 },
"facing=west,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 180 },
"facing=north,half=lower,hinge=right,open=false": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 270 },
"facing=east,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 90 },
"facing=south,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 180 },
"facing=west,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/hevea/bottom_rh", "y": 270 },
"facing=north,half=lower,hinge=left,open=true": { "model": "mmm:deco/door/hevea/bottom_rh" },
"facing=east,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 270 },
"facing=south,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/hevea/bottom_lh" },
"facing=west,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 90 },
"facing=north,half=lower,hinge=right,open=true": { "model": "mmm:deco/door/hevea/bottom_lh", "y": 180 },
"facing=east,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/hevea/top_lh" },
"facing=south,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/hevea/top_lh", "y": 90 },
"facing=west,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/hevea/top_lh", "y": 180 },
"facing=north,half=upper,hinge=left,open=false": { "model": "mmm:deco/door/hevea/top_lh", "y": 270 },
"facing=east,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/hevea/top_rh" },
"facing=south,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/hevea/top_rh", "y": 90 },
"facing=west,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/hevea/top_rh", "y": 180 },
"facing=north,half=upper,hinge=right,open=false": { "model": "mmm:deco/door/hevea/top_rh", "y": 270 },
"facing=east,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/hevea/top_rh", "y": 90 },
"facing=south,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/hevea/top_rh", "y": 180 },
"facing=west,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/hevea/top_rh", "y": 270 },
"facing=north,half=upper,hinge=left,open=true": { "model": "mmm:deco/door/hevea/top_rh" },
"facing=east,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/hevea/top_lh", "y": 270 },
"facing=south,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/hevea/top_lh" },
"facing=west,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/hevea/top_lh", "y": 90 },
"facing=north,half=upper,hinge=right,open=true": { "model": "mmm:deco/door/hevea/top_lh", "y": 180 }
}
}

View file

@ -145,6 +145,14 @@ tile.mmm.deco.slabs.andesite.name=Andesite Slab
tile.mmm.deco.slabs.hevea.name=Hevea Wood Slab tile.mmm.deco.slabs.hevea.name=Hevea Wood Slab
tile.mmm.deco.slabs.bamboo.name=Bamboo Wood Slab tile.mmm.deco.slabs.bamboo.name=Bamboo Wood Slab
tile.mmm.deco.fence.hevea.name=Hevea Fence
tile.mmm.deco.fence.gate.hevea.name=Hevea Fence Gate
tile.mmm.deco.fence.bamboo.name=Bamboo Fence
tile.mmm.deco.fence.gate.bamboo.name=Bamboo Fence Gate
tile.mmm.deco.door.hevea.name=Hevea Door
tile.mmm.deco.door.bamboo.name=Bamboo Door
tile.mmm.deco.table.oak.name=Oak Table tile.mmm.deco.table.oak.name=Oak Table
tile.mmm.deco.table.birch.name=Birch Table tile.mmm.deco.table.birch.name=Birch Table
tile.mmm.deco.table.spruce.name=Spruce Table tile.mmm.deco.table.spruce.name=Spruce Table
@ -298,8 +306,3 @@ tile.mmm.deco.throne.hevea.red.name=Hevea Throne (Red)
tile.mmm.deco.throne.hevea.silver.name=Hevea Throne (Silver) 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.white.name=Hevea Throne (White)
tile.mmm.deco.throne.hevea.yellow.name=Hevea Throne (Yellow) tile.mmm.deco.throne.hevea.yellow.name=Hevea Throne (Yellow)
tile.mmm.deco.fence.hevea.name=Hevea Fence
tile.mmm.deco.fence.gate.hevea.name=Hevea Fence Gate
tile.mmm.deco.fence.bamboo.name=Bamboo Fence
tile.mmm.deco.fence.gate.bamboo.name=Bamboo Fence Gate

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_bottom",
"textures":
{
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
"top": "mmm:blocks/deco/door/bamboo/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_bottom_rh",
"textures":
{
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
"top": "mmm:blocks/deco/door/bamboo/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_top",
"textures":
{
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
"top": "mmm:blocks/deco/door/bamboo/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_top_rh",
"textures":
{
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
"top": "mmm:blocks/deco/door/bamboo/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_bottom",
"textures":
{
"bottom": "mmm:blocks/deco/door/hevea/bottom",
"top": "mmm:blocks/deco/door/hevea/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_bottom_rh",
"textures":
{
"bottom": "mmm:blocks/deco/door/hevea/bottom",
"top": "mmm:blocks/deco/door/hevea/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_top",
"textures":
{
"bottom": "mmm:blocks/deco/door/hevea/bottom",
"top": "mmm:blocks/deco/door/hevea/top"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/door_top_rh",
"textures":
{
"bottom": "mmm:blocks/deco/door/hevea/bottom",
"top": "mmm:blocks/deco/door/hevea/top"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/deco/door/bamboo"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/deco/door/hevea"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B