Hevea / bamboo doors
This commit is contained in:
parent
8615a169a2
commit
e616e01762
26 changed files with 282 additions and 8 deletions
3
TODO.txt
3
TODO.txt
|
@ -9,9 +9,6 @@ deco No Stone - Smooth + stairs + slabs
|
|||
Limestone
|
||||
Slate
|
||||
Basalt
|
||||
deco No Wood - Doors
|
||||
Hevea
|
||||
Bamboo
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
plants No? Tomatoes
|
||||
plants No? Turnips
|
||||
|
|
BIN
graphics/bamboo-door.xcf
Normal file
BIN
graphics/bamboo-door.xcf
Normal file
Binary file not shown.
BIN
graphics/hevea-door.xcf
Normal file
BIN
graphics/hevea-door.xcf
Normal file
Binary file not shown.
|
@ -5,6 +5,7 @@ import mmm.deco.DChairs;
|
|||
import mmm.deco.DSeatEntity;
|
||||
import mmm.deco.DStairs;
|
||||
import mmm.deco.DTables;
|
||||
import mmm.deco.doors.DDoors;
|
||||
import mmm.deco.fences.DFences;
|
||||
import mmm.deco.slabs.DSlabs;
|
||||
import mmm.deco.thrones.DThrones;
|
||||
|
@ -17,6 +18,7 @@ public class MmmDeco
|
|||
public static final DStairs STAIRS;
|
||||
public static final DSlabs SLAB;
|
||||
public static final DFences FENCE;
|
||||
public static final DDoors DOOR;
|
||||
public static final DTables TABLE;
|
||||
public static final DChairs CHAIR;
|
||||
public static final DThrones THRONE;
|
||||
|
@ -25,6 +27,7 @@ public class MmmDeco
|
|||
STAIRS = new DStairs( );
|
||||
SLAB = new DSlabs( );
|
||||
FENCE = new DFences( );
|
||||
DOOR = new DDoors( );
|
||||
TABLE = new DTables( );
|
||||
CHAIR = new DChairs( );
|
||||
THRONE = new DThrones( );
|
||||
|
|
25
src/java/mmm/deco/doors/DDoor.java
Normal file
25
src/java/mmm/deco/doors/DDoor.java
Normal 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 );
|
||||
}
|
||||
|
||||
}
|
78
src/java/mmm/deco/doors/DDoorBlock.java
Normal file
78
src/java/mmm/deco/doors/DDoorBlock.java
Normal 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( );
|
||||
}
|
||||
|
||||
}
|
20
src/java/mmm/deco/doors/DDoors.java
Normal file
20
src/java/mmm/deco/doors/DDoors.java
Normal 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 );
|
||||
}
|
||||
|
||||
}
|
36
src/resources/assets/mmm/blockstates/deco/door/bamboo.json
Normal file
36
src/resources/assets/mmm/blockstates/deco/door/bamboo.json
Normal 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 }
|
||||
}
|
||||
}
|
36
src/resources/assets/mmm/blockstates/deco/door/hevea.json
Normal file
36
src/resources/assets/mmm/blockstates/deco/door/hevea.json
Normal 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 }
|
||||
}
|
||||
}
|
|
@ -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.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.birch.name=Birch 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.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.gate.hevea.name=Hevea Fence Gate
|
||||
tile.mmm.deco.fence.bamboo.name=Bamboo Fence
|
||||
tile.mmm.deco.fence.gate.bamboo.name=Bamboo Fence Gate
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/door_bottom",
|
||||
"textures":
|
||||
{
|
||||
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
|
||||
"top": "mmm:blocks/deco/door/bamboo/top"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/door_top",
|
||||
"textures":
|
||||
{
|
||||
"bottom": "mmm:blocks/deco/door/bamboo/bottom",
|
||||
"top": "mmm:blocks/deco/door/bamboo/top"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/door_bottom",
|
||||
"textures":
|
||||
{
|
||||
"bottom": "mmm:blocks/deco/door/hevea/bottom",
|
||||
"top": "mmm:blocks/deco/door/hevea/top"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/door_top",
|
||||
"textures":
|
||||
{
|
||||
"bottom": "mmm:blocks/deco/door/hevea/bottom",
|
||||
"top": "mmm:blocks/deco/door/hevea/top"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mmm:items/deco/door/bamboo"
|
||||
}
|
||||
}
|
|
@ -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 |
BIN
src/resources/assets/mmm/textures/blocks/deco/door/hevea/top.png
Normal file
BIN
src/resources/assets/mmm/textures/blocks/deco/door/hevea/top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 742 B |
BIN
src/resources/assets/mmm/textures/items/deco/door/bamboo.png
Normal file
BIN
src/resources/assets/mmm/textures/items/deco/door/bamboo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 120 B |
BIN
src/resources/assets/mmm/textures/items/deco/door/hevea.png
Normal file
BIN
src/resources/assets/mmm/textures/items/deco/door/hevea.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 122 B |
Reference in a new issue