Finished BlockDoorGold
This commit is contained in:
parent
18a4af015b
commit
89e609add0
8 changed files with 72 additions and 13 deletions
|
@ -5,8 +5,12 @@ import java.util.Random;
|
|||
import com.zixiken.dimdoors.DimDoors;
|
||||
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 BlockDoorGold extends BlockDoor {
|
||||
public static final String ID = "doorGold";
|
||||
|
@ -17,21 +21,12 @@ public class BlockDoorGold extends BlockDoor {
|
|||
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.itemGoldenDoor;
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||
return state.getValue(BlockDoor.HALF) == EnumDoorHalf.LOWER ? DimDoors.itemGoldenDoor : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return DimDoors.itemGoldenDoor;
|
||||
}
|
||||
public Item getItem(World worldIn, BlockPos pos) {return DimDoors.itemGoldenDoor;}
|
||||
}
|
||||
|
|
36
src/main/resources/assets/dimdoors/blockstates/doorGold.json
Normal file
36
src/main/resources/assets/dimdoors/blockstates/doorGold.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=lower,hinge=left,open=false": { "model": "doorGold_bottom" },
|
||||
"facing=south,half=lower,hinge=left,open=false": { "model": "doorGold_bottom", "y": 90 },
|
||||
"facing=west,half=lower,hinge=left,open=false": { "model": "doorGold_bottom", "y": 180 },
|
||||
"facing=north,half=lower,hinge=left,open=false": { "model": "doorGold_bottom", "y": 270 },
|
||||
"facing=east,half=lower,hinge=right,open=false": { "model": "doorGold_bottom_rh" },
|
||||
"facing=south,half=lower,hinge=right,open=false": { "model": "doorGold_bottom_rh", "y": 90 },
|
||||
"facing=west,half=lower,hinge=right,open=false": { "model": "doorGold_bottom_rh", "y": 180 },
|
||||
"facing=north,half=lower,hinge=right,open=false": { "model": "doorGold_bottom_rh", "y": 270 },
|
||||
"facing=east,half=lower,hinge=left,open=true": { "model": "doorGold_bottom_rh", "y": 90 },
|
||||
"facing=south,half=lower,hinge=left,open=true": { "model": "doorGold_bottom_rh", "y": 180 },
|
||||
"facing=west,half=lower,hinge=left,open=true": { "model": "doorGold_bottom_rh", "y": 270 },
|
||||
"facing=north,half=lower,hinge=left,open=true": { "model": "doorGold_bottom_rh" },
|
||||
"facing=east,half=lower,hinge=right,open=true": { "model": "doorGold_bottom", "y": 270 },
|
||||
"facing=south,half=lower,hinge=right,open=true": { "model": "doorGold_bottom" },
|
||||
"facing=west,half=lower,hinge=right,open=true": { "model": "doorGold_bottom", "y": 90 },
|
||||
"facing=north,half=lower,hinge=right,open=true": { "model": "doorGold_bottom", "y": 180 },
|
||||
"facing=east,half=upper,hinge=left,open=false": { "model": "doorGold_top" },
|
||||
"facing=south,half=upper,hinge=left,open=false": { "model": "doorGold_top", "y": 90 },
|
||||
"facing=west,half=upper,hinge=left,open=false": { "model": "doorGold_top", "y": 180 },
|
||||
"facing=north,half=upper,hinge=left,open=false": { "model": "doorGold_top", "y": 270 },
|
||||
"facing=east,half=upper,hinge=right,open=false": { "model": "doorGold_top_rh" },
|
||||
"facing=south,half=upper,hinge=right,open=false": { "model": "doorGold_top_rh", "y": 90 },
|
||||
"facing=west,half=upper,hinge=right,open=false": { "model": "doorGold_top_rh", "y": 180 },
|
||||
"facing=north,half=upper,hinge=right,open=false": { "model": "doorGold_top_rh", "y": 270 },
|
||||
"facing=east,half=upper,hinge=left,open=true": { "model": "doorGold_top_rh", "y": 90 },
|
||||
"facing=south,half=upper,hinge=left,open=true": { "model": "doorGold_top_rh", "y": 180 },
|
||||
"facing=west,half=upper,hinge=left,open=true": { "model": "doorGold_top_rh", "y": 270 },
|
||||
"facing=north,half=upper,hinge=left,open=true": { "model": "doorGold_top_rh" },
|
||||
"facing=east,half=upper,hinge=right,open=true": { "model": "doorGold_top", "y": 270 },
|
||||
"facing=south,half=upper,hinge=right,open=true": { "model": "doorGold_top" },
|
||||
"facing=west,half=upper,hinge=right,open=true": { "model": "doorGold_top", "y": 90 },
|
||||
"facing=north,half=upper,hinge=right,open=true": { "model": "doorGold_top", "y": 180 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "block/door_bottom",
|
||||
"textures": {
|
||||
"bottom": "blocks/doorGold_lower",
|
||||
"top": "blocks/doorGold_upper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "block/door_bottom_rh",
|
||||
"textures": {
|
||||
"bottom": "blocks/doorGold_lower",
|
||||
"top": "blocks/doorGold_upper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "block/door_top",
|
||||
"textures": {
|
||||
"bottom": "blocks/doorGold_lower",
|
||||
"top": "blocks/doorGold_upper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"parent": "block/door_top_rh",
|
||||
"textures": {
|
||||
"bottom": "blocks/doorGold_lower",
|
||||
"top": "blocks/doorGold_upper"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Loading…
Reference in a new issue