Finished BlockDoorQuartz

This commit is contained in:
zangamj 2016-07-12 14:03:40 -04:00
parent 89e609add0
commit 989c917515
8 changed files with 73 additions and 16 deletions

View file

@ -3,12 +3,14 @@ package com.zixiken.dimdoors.blocks;
import java.util.Random;
import com.zixiken.dimdoors.DimDoors;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockDoor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockDoorQuartz extends BlockDoor {
public static final String ID = "doorQuartz";
@ -18,22 +20,13 @@ public class BlockDoorQuartz extends BlockDoor {
setHardness(0.1F);
setUnlocalizedName(ID);
}
@SideOnly(Side.CLIENT)
protected String getTextureName()
{
return DimDoors.modid + ":" + this.getUnlocalizedName();
}
@Override
public Item getItemDropped(int par1, Random par2Random, int par3)
{
return (par1 & 8) != 0 ? null : DimDoors.itemQuartzDoor;
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return state.getValue(BlockDoor.HALF) == EnumDoorHalf.LOWER ? DimDoors.itemQuartzDoor : null;
}
@Override
@SideOnly(Side.CLIENT)
public Item getItem(World world, int x, int y, int z) {
return DimDoors.itemQuartzDoor;
}
public Item getItem(World worldIn, BlockPos pos) {return DimDoors.itemQuartzDoor;}
}

View file

@ -0,0 +1,36 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": { "model": "doorQuartz_bottom" },
"facing=south,half=lower,hinge=left,open=false": { "model": "doorQuartz_bottom", "y": 90 },
"facing=west,half=lower,hinge=left,open=false": { "model": "doorQuartz_bottom", "y": 180 },
"facing=north,half=lower,hinge=left,open=false": { "model": "doorQuartz_bottom", "y": 270 },
"facing=east,half=lower,hinge=right,open=false": { "model": "doorQuartz_bottom_rh" },
"facing=south,half=lower,hinge=right,open=false": { "model": "doorQuartz_bottom_rh", "y": 90 },
"facing=west,half=lower,hinge=right,open=false": { "model": "doorQuartz_bottom_rh", "y": 180 },
"facing=north,half=lower,hinge=right,open=false": { "model": "doorQuartz_bottom_rh", "y": 270 },
"facing=east,half=lower,hinge=left,open=true": { "model": "doorQuartz_bottom_rh", "y": 90 },
"facing=south,half=lower,hinge=left,open=true": { "model": "doorQuartz_bottom_rh", "y": 180 },
"facing=west,half=lower,hinge=left,open=true": { "model": "doorQuartz_bottom_rh", "y": 270 },
"facing=north,half=lower,hinge=left,open=true": { "model": "doorQuartz_bottom_rh" },
"facing=east,half=lower,hinge=right,open=true": { "model": "doorQuartz_bottom", "y": 270 },
"facing=south,half=lower,hinge=right,open=true": { "model": "doorQuartz_bottom" },
"facing=west,half=lower,hinge=right,open=true": { "model": "doorQuartz_bottom", "y": 90 },
"facing=north,half=lower,hinge=right,open=true": { "model": "doorQuartz_bottom", "y": 180 },
"facing=east,half=upper,hinge=left,open=false": { "model": "doorQuartz_top" },
"facing=south,half=upper,hinge=left,open=false": { "model": "doorQuartz_top", "y": 90 },
"facing=west,half=upper,hinge=left,open=false": { "model": "doorQuartz_top", "y": 180 },
"facing=north,half=upper,hinge=left,open=false": { "model": "doorQuartz_top", "y": 270 },
"facing=east,half=upper,hinge=right,open=false": { "model": "doorQuartz_top_rh" },
"facing=south,half=upper,hinge=right,open=false": { "model": "doorQuartz_top_rh", "y": 90 },
"facing=west,half=upper,hinge=right,open=false": { "model": "doorQuartz_top_rh", "y": 180 },
"facing=north,half=upper,hinge=right,open=false": { "model": "doorQuartz_top_rh", "y": 270 },
"facing=east,half=upper,hinge=left,open=true": { "model": "doorQuartz_top_rh", "y": 90 },
"facing=south,half=upper,hinge=left,open=true": { "model": "doorQuartz_top_rh", "y": 180 },
"facing=west,half=upper,hinge=left,open=true": { "model": "doorQuartz_top_rh", "y": 270 },
"facing=north,half=upper,hinge=left,open=true": { "model": "doorQuartz_top_rh" },
"facing=east,half=upper,hinge=right,open=true": { "model": "doorQuartz_top", "y": 270 },
"facing=south,half=upper,hinge=right,open=true": { "model": "doorQuartz_top" },
"facing=west,half=upper,hinge=right,open=true": { "model": "doorQuartz_top", "y": 90 },
"facing=north,half=upper,hinge=right,open=true": { "model": "doorQuartz_top", "y": 180 }
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/door_bottom",
"textures": {
"bottom": "blocks/doorQuartz_lower",
"top": "blocks/doorQuartz_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/door_bottom_rh",
"textures": {
"bottom": "blocks/doorQuartz_lower",
"top": "blocks/doorQuartz_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/door_top",
"textures": {
"bottom": "blocks/doorQuartz_lower",
"top": "blocks/doorQuartz_upper"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/door_top_rh",
"textures": {
"bottom": "blocks/doorQuartz_lower",
"top": "blocks/doorQuartz_upper"
}
}