diff --git a/src/java/mmm/Mmm.java b/src/java/mmm/Mmm.java index 2ba37a1..3f1af5d 100644 --- a/src/java/mmm/Mmm.java +++ b/src/java/mmm/Mmm.java @@ -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 ); } } diff --git a/src/java/mmm/deco/DBlockChair.java b/src/java/mmm/deco/DBlockChair.java new file mode 100644 index 0000000..c3de16e --- /dev/null +++ b/src/java/mmm/deco/DBlockChair.java @@ -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; + } +} diff --git a/src/java/mmm/deco/DBlockTable.java b/src/java/mmm/deco/DBlockTable.java index bcdb767..9583945 100644 --- a/src/java/mmm/deco/DBlockTable.java +++ b/src/java/mmm/deco/DBlockTable.java @@ -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 ); } diff --git a/src/java/mmm/deco/DecorativeBlocks.java b/src/java/mmm/deco/DecorativeBlocks.java index 137eb0e..2c97e28 100644 --- a/src/java/mmm/deco/DecorativeBlocks.java +++ b/src/java/mmm/deco/DecorativeBlocks.java @@ -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 ) ); } diff --git a/src/java/mmm/deco/E_DWoodType.java b/src/java/mmm/deco/E_DWoodType.java index 35206ea..3b36f2e 100644 --- a/src/java/mmm/deco/E_DWoodType.java +++ b/src/java/mmm/deco/E_DWoodType.java @@ -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( ); } } \ No newline at end of file diff --git a/src/java/mmm/utils/I_UBlockSeat.java b/src/java/mmm/utils/I_UBlockSeat.java new file mode 100644 index 0000000..b073f53 --- /dev/null +++ b/src/java/mmm/utils/I_UBlockSeat.java @@ -0,0 +1,7 @@ +package mmm.utils; + + +public interface I_UBlockSeat +{ + // EMPTY +} diff --git a/src/java/mmm/utils/USeat.java b/src/java/mmm/utils/USeat.java new file mode 100644 index 0000000..b97b080 --- /dev/null +++ b/src/java/mmm/utils/USeat.java @@ -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( ); + } + +} diff --git a/src/resources/assets/mmm/blockstates/deco_chair_acacia.json b/src/resources/assets/mmm/blockstates/deco_chair_acacia.json new file mode 100644 index 0000000..a4d9f67 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_acacia.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/blockstates/deco_chair_birch.json b/src/resources/assets/mmm/blockstates/deco_chair_birch.json new file mode 100644 index 0000000..8924dfa --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_birch.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/blockstates/deco_chair_dark_oak.json b/src/resources/assets/mmm/blockstates/deco_chair_dark_oak.json new file mode 100644 index 0000000..c8e9998 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_dark_oak.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/blockstates/deco_chair_jungle.json b/src/resources/assets/mmm/blockstates/deco_chair_jungle.json new file mode 100644 index 0000000..d0e4d33 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_jungle.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/blockstates/deco_chair_oak.json b/src/resources/assets/mmm/blockstates/deco_chair_oak.json new file mode 100644 index 0000000..579cc54 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_oak.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/blockstates/deco_chair_spruce.json b/src/resources/assets/mmm/blockstates/deco_chair_spruce.json new file mode 100644 index 0000000..9e0c2bd --- /dev/null +++ b/src/resources/assets/mmm/blockstates/deco_chair_spruce.json @@ -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 } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index 022d373..8d9b6b1 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -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 diff --git a/src/resources/assets/mmm/models/block/deco/chair.json b/src/resources/assets/mmm/models/block/deco/chair.json new file mode 100644 index 0000000..3cfb29a --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair.json @@ -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" } + } + } + ] +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/block/deco/chair/acacia.json b/src/resources/assets/mmm/models/block/deco/chair/acacia.json new file mode 100644 index 0000000..4d00c1f --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/acacia.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_acacia", + "leg": "minecraft:blocks/log_acacia" + } +} diff --git a/src/resources/assets/mmm/models/block/deco/chair/birch.json b/src/resources/assets/mmm/models/block/deco/chair/birch.json new file mode 100644 index 0000000..291e874 --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/birch.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_birch", + "leg": "minecraft:blocks/log_birch" + } +} diff --git a/src/resources/assets/mmm/models/block/deco/chair/dark_oak.json b/src/resources/assets/mmm/models/block/deco/chair/dark_oak.json new file mode 100644 index 0000000..b468cc3 --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/dark_oak.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_big_oak", + "leg": "minecraft:blocks/log_big_oak" + } +} diff --git a/src/resources/assets/mmm/models/block/deco/chair/jungle.json b/src/resources/assets/mmm/models/block/deco/chair/jungle.json new file mode 100644 index 0000000..12ec41a --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/jungle.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_jungle", + "leg": "minecraft:blocks/log_jungle" + } +} diff --git a/src/resources/assets/mmm/models/block/deco/chair/oak.json b/src/resources/assets/mmm/models/block/deco/chair/oak.json new file mode 100644 index 0000000..b58552d --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/oak.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_oak", + "leg": "minecraft:blocks/log_oak" + } +} diff --git a/src/resources/assets/mmm/models/block/deco/chair/spruce.json b/src/resources/assets/mmm/models/block/deco/chair/spruce.json new file mode 100644 index 0000000..0254a8b --- /dev/null +++ b/src/resources/assets/mmm/models/block/deco/chair/spruce.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:block/deco/chair", + "textures": { + "body": "minecraft:blocks/planks_spruce", + "leg": "minecraft:blocks/log_spruce" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair.json b/src/resources/assets/mmm/models/item/deco_chair.json new file mode 100644 index 0000000..7b40ff9 --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair.json @@ -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 ] + } + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/deco_chair_acacia.json b/src/resources/assets/mmm/models/item/deco_chair_acacia.json new file mode 100644 index 0000000..093764a --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_acacia.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_acacia", + "legs": "minecraft:blocks/log_acacia" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair_birch.json b/src/resources/assets/mmm/models/item/deco_chair_birch.json new file mode 100644 index 0000000..e88d4b2 --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_birch.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_birch", + "legs": "minecraft:blocks/log_birch" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair_dark_oak.json b/src/resources/assets/mmm/models/item/deco_chair_dark_oak.json new file mode 100644 index 0000000..31daa83 --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_dark_oak.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_big_oak", + "legs": "minecraft:blocks/log_big_oak" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair_jungle.json b/src/resources/assets/mmm/models/item/deco_chair_jungle.json new file mode 100644 index 0000000..77798ef --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_jungle.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_jungle", + "legs": "minecraft:blocks/log_jungle" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair_oak.json b/src/resources/assets/mmm/models/item/deco_chair_oak.json new file mode 100644 index 0000000..df7363e --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_oak.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_oak", + "legs": "minecraft:blocks/log_oak" + } +} diff --git a/src/resources/assets/mmm/models/item/deco_chair_spruce.json b/src/resources/assets/mmm/models/item/deco_chair_spruce.json new file mode 100644 index 0000000..cbe0ff7 --- /dev/null +++ b/src/resources/assets/mmm/models/item/deco_chair_spruce.json @@ -0,0 +1,7 @@ +{ + "parent": "mmm:item/deco_chair", + "textures": { + "body": "minecraft:blocks/planks_spruce", + "legs": "minecraft:blocks/log_spruce" + } +}