Chairs!
This commit is contained in:
parent
1a26c7bd16
commit
ebdacba9a7
28 changed files with 778 additions and 10 deletions
|
@ -3,6 +3,7 @@ package mmm;
|
|||
|
||||
import mmm.deco.DecorativeBlocks;
|
||||
import mmm.utils.URegistration;
|
||||
import mmm.utils.USeat;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
|
@ -20,6 +21,9 @@ public class Mmm
|
|||
public static final String VERSION = "0.1-1.9.4";
|
||||
public static final String PREFIX = Mmm.ID + ".";
|
||||
|
||||
@Mod.Instance( Mmm.ID )
|
||||
public static Mmm mmm;
|
||||
|
||||
@SidedProxy
|
||||
public static CommonProxy proxy = null;
|
||||
|
||||
|
@ -35,7 +39,7 @@ public class Mmm
|
|||
|
||||
public void init( final FMLInitializationEvent event )
|
||||
{
|
||||
// EMPTY
|
||||
USeat.register( mmm );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
250
src/java/mmm/deco/DBlockChair.java
Normal file
250
src/java/mmm/deco/DBlockChair.java
Normal file
|
@ -0,0 +1,250 @@
|
|||
package mmm.deco;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.Mmm;
|
||||
import mmm.utils.I_UBlockSeat;
|
||||
import mmm.utils.I_URecipeRegistrar;
|
||||
import mmm.utils.UMaths;
|
||||
import mmm.utils.USeat;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.EnumPushReaction;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
|
||||
public class DBlockChair
|
||||
extends Block
|
||||
implements I_URecipeRegistrar , I_UBlockSeat
|
||||
{
|
||||
public final static String ID = "deco_chair_";
|
||||
public final static String NAME = Mmm.PREFIX + DBlockChair.ID;
|
||||
|
||||
public static final PropertyDirection FACING = BlockHorizontal.FACING;
|
||||
|
||||
private static final AxisAlignedBB BOUNDING_BOX = UMaths.makeBlockAABB( 1 , 0 , 1 , 15 , 16 , 15 );
|
||||
private static final AxisAlignedBB COLLISION_BOTTOM = UMaths.makeBlockAABB( 1 , 0 , 1 , 15 , 8 , 15 );
|
||||
private static final AxisAlignedBB COLLISION_TOP_NORTH = UMaths.makeBlockAABB( 2 , 8 , 2 , 14 , 16 , 4 );
|
||||
private static final AxisAlignedBB COLLISION_TOP_EAST = UMaths.makeBlockAABB( 12 , 8 , 2 , 14 , 16 , 14 );
|
||||
private static final AxisAlignedBB COLLISION_TOP_SOUTH = UMaths.makeBlockAABB( 2 , 8 , 12 , 14 , 16 , 14 );
|
||||
private static final AxisAlignedBB COLLISION_TOP_WEST = UMaths.makeBlockAABB( 2 , 8 , 2 , 4 , 16 , 14 );
|
||||
|
||||
public final E_DWoodType type;
|
||||
|
||||
|
||||
public DBlockChair( final E_DWoodType type )
|
||||
{
|
||||
super( Material.WOOD , type.mapColor );
|
||||
this.type = type;
|
||||
this.setDefaultState( this.blockState.getBaseState( ).withProperty( DBlockChair.FACING , EnumFacing.NORTH ) );
|
||||
|
||||
this.setCreativeTab( CreativeTabs.DECORATIONS );
|
||||
this.setRegistryName( DBlockChair.ID + type.suffix );
|
||||
this.setUnlocalizedName( DBlockChair.NAME + type.suffix );
|
||||
|
||||
this.lightOpacity = 0;
|
||||
this.translucent = false;
|
||||
this.fullBlock = false;
|
||||
this.blockHardness = 2.5f;
|
||||
this.blockResistance = 12.5f;
|
||||
this.blockSoundType = SoundType.LADDER;
|
||||
this.enableStats = false;
|
||||
|
||||
this.setHarvestLevel( "axe" , 0 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox( final IBlockState state , final IBlockAccess source , final BlockPos pos )
|
||||
{
|
||||
return DBlockChair.BOUNDING_BOX;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxToList( final IBlockState state , final World worldIn , final BlockPos pos ,
|
||||
final AxisAlignedBB container , final List< AxisAlignedBB > output , final Entity entity )
|
||||
{
|
||||
Block.addCollisionBoxToList( pos , container , output , DBlockChair.COLLISION_BOTTOM );
|
||||
|
||||
AxisAlignedBB back;
|
||||
switch ( state.getValue( DBlockChair.FACING ) ) {
|
||||
case EAST:
|
||||
back = DBlockChair.COLLISION_TOP_EAST;
|
||||
break;
|
||||
case NORTH:
|
||||
back = DBlockChair.COLLISION_TOP_NORTH;
|
||||
break;
|
||||
case SOUTH:
|
||||
back = DBlockChair.COLLISION_TOP_SOUTH;
|
||||
break;
|
||||
case WEST:
|
||||
back = DBlockChair.COLLISION_TOP_WEST;
|
||||
break;
|
||||
default:
|
||||
// TODO log problem
|
||||
return;
|
||||
|
||||
}
|
||||
Block.addCollisionBoxToList( pos , container , output , back );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EnumPushReaction getMobilityFlag( final IBlockState state )
|
||||
{
|
||||
return EnumPushReaction.DESTROY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerRecipe( )
|
||||
{
|
||||
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
|
||||
"B " , //
|
||||
"BB" , //
|
||||
"SS" , //
|
||||
'B' , new ItemStack( this.type.slab , 1 , this.type.metaData ) , //
|
||||
'S' , Items.STICK //
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube( final IBlockState state )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFullCube( final IBlockState state )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public BlockRenderLayer getBlockLayer( )
|
||||
{
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState( )
|
||||
{
|
||||
return new BlockStateContainer( this , new IProperty[] {
|
||||
DBlockChair.FACING
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState withRotation( final IBlockState state , final Rotation rot )
|
||||
{
|
||||
return state.withProperty( DBlockChair.FACING , rot.rotate( state.getValue( DBlockChair.FACING ) ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState withMirror( final IBlockState state , final Mirror mirrorIn )
|
||||
{
|
||||
return state.withRotation( mirrorIn.toRotation( state.getValue( DBlockChair.FACING ) ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
EnumFacing enumfacing = EnumFacing.getFront( meta );
|
||||
|
||||
if ( enumfacing.getAxis( ) == EnumFacing.Axis.Y ) {
|
||||
enumfacing = EnumFacing.NORTH;
|
||||
}
|
||||
|
||||
return this.getDefaultState( ).withProperty( DBlockChair.FACING , enumfacing );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMetaFromState( final IBlockState state )
|
||||
{
|
||||
return state.getValue( DBlockChair.FACING ).getIndex( );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState onBlockPlaced( final World worldIn , final BlockPos pos , final EnumFacing facing ,
|
||||
final float hitX , final float hitY , final float hitZ , final int meta , final EntityLivingBase placer )
|
||||
{
|
||||
return this.getDefaultState( ).withProperty( DBlockChair.FACING , placer.getHorizontalFacing( ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( final World worldIn , final BlockPos pos , final IBlockState state ,
|
||||
final EntityPlayer playerIn , final EnumHand hand , final ItemStack heldItem , final EnumFacing side ,
|
||||
final float hitX , final float hitY , final float hitZ )
|
||||
{
|
||||
return USeat.sit( worldIn , pos , playerIn , 0.25 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void neighborChanged( final IBlockState state , final World worldIn , final BlockPos pos ,
|
||||
final Block blockIn )
|
||||
{
|
||||
if ( !this.checkSupportBlock( worldIn , pos ) ) {
|
||||
this.dropBlockAsItem( worldIn , pos , state , 0 );
|
||||
worldIn.setBlockToAir( pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt( final World worldIn , final BlockPos pos )
|
||||
{
|
||||
return super.canPlaceBlockAt( worldIn , pos ) && this.checkSupportBlock( worldIn , pos );
|
||||
}
|
||||
|
||||
|
||||
private boolean checkSupportBlock( final IBlockAccess worldIn , final BlockPos pos )
|
||||
{
|
||||
final BlockPos down = pos.down( );
|
||||
final IBlockState downState = worldIn.getBlockState( down );
|
||||
if ( downState.isSideSolid( worldIn , down , EnumFacing.UP ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final Block downBlock = downState.getBlock( );
|
||||
return downBlock == Blocks.GLASS || downBlock == Blocks.STAINED_GLASS;
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ import java.util.List;
|
|||
import mmm.Mmm;
|
||||
import mmm.utils.I_URecipeRegistrar;
|
||||
import mmm.utils.UMaths;
|
||||
import mmm.utils.URegistration;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -92,8 +91,6 @@ public class DBlockTable
|
|||
this.enableStats = false;
|
||||
|
||||
this.setHarvestLevel( "axe" , 0 );
|
||||
|
||||
URegistration.addBlock( this );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package mmm.deco;
|
||||
|
||||
|
||||
import mmm.utils.URegistration;
|
||||
|
||||
|
||||
|
||||
public class DecorativeBlocks
|
||||
{
|
||||
|
||||
|
@ -11,13 +15,27 @@ public class DecorativeBlocks
|
|||
public static final DBlockTable TABLE_DARK_OAK;
|
||||
public static final DBlockTable TABLE_ACACIA;
|
||||
|
||||
public static final DBlockChair CHAIR_OAK;
|
||||
public static final DBlockChair CHAIR_BIRCH;
|
||||
public static final DBlockChair CHAIR_SPRUCE;
|
||||
public static final DBlockChair CHAIR_JUNGLE;
|
||||
public static final DBlockChair CHAIR_DARK_OAK;
|
||||
public static final DBlockChair CHAIR_ACACIA;
|
||||
|
||||
static {
|
||||
TABLE_OAK = new DBlockTable( E_DWoodType.OAK );
|
||||
TABLE_BIRCH = new DBlockTable( E_DWoodType.BIRCH );
|
||||
TABLE_SPRUCE = new DBlockTable( E_DWoodType.SPRUCE );
|
||||
TABLE_JUNGLE = new DBlockTable( E_DWoodType.JUNGLE );
|
||||
TABLE_DARK_OAK = new DBlockTable( E_DWoodType.DARK_OAK );
|
||||
TABLE_ACACIA = new DBlockTable( E_DWoodType.ACACIA );
|
||||
URegistration.addBlock( TABLE_OAK = new DBlockTable( E_DWoodType.OAK ) );
|
||||
URegistration.addBlock( TABLE_BIRCH = new DBlockTable( E_DWoodType.BIRCH ) );
|
||||
URegistration.addBlock( TABLE_SPRUCE = new DBlockTable( E_DWoodType.SPRUCE ) );
|
||||
URegistration.addBlock( TABLE_JUNGLE = new DBlockTable( E_DWoodType.JUNGLE ) );
|
||||
URegistration.addBlock( TABLE_DARK_OAK = new DBlockTable( E_DWoodType.DARK_OAK ) );
|
||||
URegistration.addBlock( TABLE_ACACIA = new DBlockTable( E_DWoodType.ACACIA ) );
|
||||
|
||||
URegistration.addBlock( CHAIR_OAK = new DBlockChair( E_DWoodType.OAK ) );
|
||||
URegistration.addBlock( CHAIR_BIRCH = new DBlockChair( E_DWoodType.BIRCH ) );
|
||||
URegistration.addBlock( CHAIR_SPRUCE = new DBlockChair( E_DWoodType.SPRUCE ) );
|
||||
URegistration.addBlock( CHAIR_JUNGLE = new DBlockChair( E_DWoodType.JUNGLE ) );
|
||||
URegistration.addBlock( CHAIR_DARK_OAK = new DBlockChair( E_DWoodType.DARK_OAK ) );
|
||||
URegistration.addBlock( CHAIR_ACACIA = new DBlockChair( E_DWoodType.ACACIA ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ public enum E_DWoodType {
|
|||
public final String suffix;
|
||||
public final MapColor mapColor;
|
||||
public final Block block;
|
||||
public final Block slab;
|
||||
public final int metaData;
|
||||
|
||||
|
||||
|
@ -24,6 +25,7 @@ public enum E_DWoodType {
|
|||
this.suffix = suffix;
|
||||
this.mapColor = planks.getMapColor( );
|
||||
this.block = Blocks.PLANKS;
|
||||
this.slab = Blocks.WOODEN_SLAB;
|
||||
this.metaData = planks.getMetadata( );
|
||||
}
|
||||
}
|
7
src/java/mmm/utils/I_UBlockSeat.java
Normal file
7
src/java/mmm/utils/I_UBlockSeat.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package mmm.utils;
|
||||
|
||||
|
||||
public interface I_UBlockSeat
|
||||
{
|
||||
// EMPTY
|
||||
}
|
165
src/java/mmm/utils/USeat.java
Normal file
165
src/java/mmm/utils/USeat.java
Normal file
|
@ -0,0 +1,165 @@
|
|||
package mmm.utils;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.Mmm;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
|
||||
|
||||
|
||||
public class USeat
|
||||
extends Entity
|
||||
{
|
||||
|
||||
public static void register( Mmm mmm )
|
||||
{
|
||||
EntityRegistry.registerModEntity( USeat.class , "Seat" , 0 , mmm , 80 , 1 , false );
|
||||
}
|
||||
|
||||
|
||||
public static boolean sit( World world , BlockPos pos , EntityPlayer player , double yOffset )
|
||||
{
|
||||
if ( world.isRemote ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
List< USeat > seats = world.getEntitiesWithinAABB( USeat.class , new AxisAlignedBB( pos ).expand( 1 , 1 , 1 ) );
|
||||
USeat seat = null;
|
||||
for ( USeat existingSeat : seats ) {
|
||||
if ( !existingSeat.pos.equals( pos ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( existingSeat.getPassengers( ).isEmpty( ) ) {
|
||||
seat = existingSeat;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( seat == null ) {
|
||||
seat = new USeat( world , pos , yOffset );
|
||||
world.spawnEntityInWorld( seat );
|
||||
}
|
||||
player.startRiding( seat );
|
||||
return true;
|
||||
}
|
||||
|
||||
public BlockPos pos;
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
public double yOffset;
|
||||
|
||||
|
||||
public USeat( final World world )
|
||||
{
|
||||
super( world );
|
||||
|
||||
this.setInvisible( true );
|
||||
this.setEntityInvulnerable( true );
|
||||
this.noClip = true;
|
||||
this.width = .01f;
|
||||
this.height = .01f;
|
||||
}
|
||||
|
||||
|
||||
public USeat( final World world , final BlockPos pos , final double yOffset )
|
||||
{
|
||||
this( world );
|
||||
|
||||
this.x = pos.getX( );
|
||||
this.y = pos.getY( );
|
||||
this.z = pos.getZ( );
|
||||
this.pos = new BlockPos( this.x , this.y , this.z );
|
||||
|
||||
this.yOffset = yOffset;
|
||||
|
||||
this.setPosition( this.x + .5 , this.y + this.yOffset , this.z + .5 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void entityInit( )
|
||||
{
|
||||
// EMPTY
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT( final NBTTagCompound compound )
|
||||
{
|
||||
if ( this.worldObj.isRemote ) {
|
||||
return;
|
||||
}
|
||||
this.x = compound.getInteger( "x" );
|
||||
this.y = compound.getInteger( "y" );
|
||||
this.z = compound.getInteger( "z" );
|
||||
this.pos = new BlockPos( this.x , this.y , this.z );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT( final NBTTagCompound compound )
|
||||
{
|
||||
if ( this.worldObj.isRemote ) {
|
||||
return;
|
||||
}
|
||||
compound.setInteger( "BlockX" , this.x );
|
||||
compound.setInteger( "BlockY" , this.y );
|
||||
compound.setInteger( "BlockZ" , this.z );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double getMountedYOffset( )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean shouldSetPosAfterLoading( )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canBeRidden( final Entity entityIn )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEntityUpdate( )
|
||||
{
|
||||
if ( this.worldObj.isRemote ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Block block = this.worldObj.getBlockState( this.pos ).getBlock( );
|
||||
if ( ! ( block instanceof I_UBlockSeat ) ) {
|
||||
this.setDead( );
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hasLiveRider = false;
|
||||
for ( final Entity entity : this.getPassengers( ) ) {
|
||||
hasLiveRider = !entity.isDead;
|
||||
if ( hasLiveRider ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.setDead( );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/acacia" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/acacia" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/acacia" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/acacia" , "y": 270 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/birch" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/birch" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/birch" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/birch" , "y": 270 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/dark_oak" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/dark_oak" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/dark_oak" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/dark_oak" , "y": 270 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/jungle" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/jungle" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/jungle" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/jungle" , "y": 270 }
|
||||
}
|
||||
}
|
8
src/resources/assets/mmm/blockstates/deco_chair_oak.json
Normal file
8
src/resources/assets/mmm/blockstates/deco_chair_oak.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/oak" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/oak" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/oak" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/oak" , "y": 270 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants" : {
|
||||
"facing=north": { "model": "mmm:deco/chair/spruce" } ,
|
||||
"facing=east": { "model": "mmm:deco/chair/spruce" , "y": 90 } ,
|
||||
"facing=south": { "model": "mmm:deco/chair/spruce" , "y": 180 } ,
|
||||
"facing=west": { "model": "mmm:deco/chair/spruce" , "y": 270 }
|
||||
}
|
||||
}
|
|
@ -4,3 +4,10 @@ tile.mmm.deco_table_spruce.name=Spruce table
|
|||
tile.mmm.deco_table_acacia.name=Acacia table
|
||||
tile.mmm.deco_table_jungle.name=Jungle wood table
|
||||
tile.mmm.deco_table_dark_oak.name=Dark oak table
|
||||
|
||||
tile.mmm.deco_chair_oak.name=Oak chair
|
||||
tile.mmm.deco_chair_birch.name=Birch chair
|
||||
tile.mmm.deco_chair_spruce.name=Spruce chair
|
||||
tile.mmm.deco_chair_acacia.name=Acacia chair
|
||||
tile.mmm.deco_chair_jungle.name=Jungle wood chair
|
||||
tile.mmm.deco_chair_dark_oak.name=Dark oak chair
|
||||
|
|
161
src/resources/assets/mmm/models/block/deco/chair.json
Normal file
161
src/resources/assets/mmm/models/block/deco/chair.json
Normal file
|
@ -0,0 +1,161 @@
|
|||
{
|
||||
"textures":
|
||||
{
|
||||
"particle": "#body"
|
||||
},
|
||||
|
||||
"elements":
|
||||
[
|
||||
{
|
||||
"from": [ 2, 0, 2 ] ,
|
||||
"to": [ 3 , 7, 3 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body", "cullface": "down" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 13, 0, 2 ] ,
|
||||
"to": [ 14 , 7, 3 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body", "cullface": "down" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 13, 0, 13 ] ,
|
||||
"to": [ 14 , 7, 14 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body", "cullface": "down" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 2, 0, 13 ] ,
|
||||
"to": [ 3 , 7, 14 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body", "cullface": "down" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
|
||||
{
|
||||
"from": [ 2, 2, 3 ] ,
|
||||
"to": [ 3 , 3, 13 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body" },
|
||||
"up": { "texture": "#body" },
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 13, 2, 3 ] ,
|
||||
"to": [ 14 , 3, 13 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body" },
|
||||
"up": { "texture": "#body" },
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 3, 2, 7 ] ,
|
||||
"to": [ 13 , 3, 9 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body" },
|
||||
"up": { "texture": "#body" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
|
||||
{
|
||||
"from": [ 1, 7, 1 ] ,
|
||||
"to": [ 15 , 8, 15 ] ,
|
||||
"faces": {
|
||||
"down": { "texture": "#body" },
|
||||
"up": { "texture": "#body" },
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
|
||||
{
|
||||
"from": [ 2, 8, 2 ] ,
|
||||
"to": [ 4 , 14, 4 ] ,
|
||||
"faces": {
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 12, 8, 2 ] ,
|
||||
"to": [ 14 , 14, 4 ] ,
|
||||
"faces": {
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 5, 8, 3 ] ,
|
||||
"to": [ 6 , 14, 4 ] ,
|
||||
"faces": {
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 7, 8, 3 ] ,
|
||||
"to": [ 9, 14, 4 ] ,
|
||||
"faces": {
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 10, 8, 3 ] ,
|
||||
"to": [ 11 , 14, 4 ] ,
|
||||
"faces": {
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
} ,
|
||||
{
|
||||
"from": [ 2, 14, 2 ] ,
|
||||
"to": [ 14 , 16, 4 ] ,
|
||||
"faces": {
|
||||
"up": { "texture": "#body" , "cullface": "up" } ,
|
||||
"down": { "texture": "#body" } ,
|
||||
"north": { "texture": "#body" } ,
|
||||
"south": { "texture": "#body" } ,
|
||||
"east": { "texture": "#body" } ,
|
||||
"west": { "texture": "#body" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_acacia",
|
||||
"leg": "minecraft:blocks/log_acacia"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_birch",
|
||||
"leg": "minecraft:blocks/log_birch"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_big_oak",
|
||||
"leg": "minecraft:blocks/log_big_oak"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_jungle",
|
||||
"leg": "minecraft:blocks/log_jungle"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_oak",
|
||||
"leg": "minecraft:blocks/log_oak"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_spruce",
|
||||
"leg": "minecraft:blocks/log_spruce"
|
||||
}
|
||||
}
|
25
src/resources/assets/mmm/models/item/deco_chair.json
Normal file
25
src/resources/assets/mmm/models/item/deco_chair.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"parent": "mmm:block/deco/chair",
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 10, -45, 10 ],
|
||||
"translation": [ 0, 1.5, -1.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 10, -45, 10 ],
|
||||
"translation": [ 0, 1.5, -1.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"ground": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, 1, 0 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 30, 45, 0 ],
|
||||
"translation": [ 0, 0, 0 ],
|
||||
"scale": [ 0.5, 0.5, 0.5 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_acacia",
|
||||
"legs": "minecraft:blocks/log_acacia"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_birch",
|
||||
"legs": "minecraft:blocks/log_birch"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_big_oak",
|
||||
"legs": "minecraft:blocks/log_big_oak"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_jungle",
|
||||
"legs": "minecraft:blocks/log_jungle"
|
||||
}
|
||||
}
|
7
src/resources/assets/mmm/models/item/deco_chair_oak.json
Normal file
7
src/resources/assets/mmm/models/item/deco_chair_oak.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_oak",
|
||||
"legs": "minecraft:blocks/log_oak"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "mmm:item/deco_chair",
|
||||
"textures": {
|
||||
"body": "minecraft:blocks/planks_spruce",
|
||||
"legs": "minecraft:blocks/log_spruce"
|
||||
}
|
||||
}
|
Reference in a new issue