Finished BlockGoldDimDoor. Removed gold dim door textures since they are identical to gold door textures.

This commit is contained in:
zangamj 2016-07-13 11:35:47 -04:00
parent 989c917515
commit 881ead8acf
4 changed files with 42 additions and 8 deletions

View file

@ -7,9 +7,11 @@ import com.zixiken.dimdoors.core.NewDimData;
import com.zixiken.dimdoors.core.PocketManager; import com.zixiken.dimdoors.core.PocketManager;
import com.zixiken.dimdoors.tileentities.TileEntityDimDoorGold; import com.zixiken.dimdoors.tileentities.TileEntityDimDoorGold;
import net.minecraft.block.BlockDoor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
public class BlockGoldDimDoor extends BaseDimDoor { public class BlockGoldDimDoor extends BaseDimDoor {
@ -22,16 +24,12 @@ public class BlockGoldDimDoor extends BaseDimDoor {
} }
@Override @Override
public void placeLink(World world, int x, int y, int z) public void placeLink(World world, BlockPos pos) {
{ if (!world.isRemote && world.getBlockState(pos.down()).getBlock() == this) {
if (!world.isRemote && world.getBlock(x, y - 1, z) == this)
{
NewDimData dimension = PocketManager.createDimensionData(world); NewDimData dimension = PocketManager.createDimensionData(world);
DimLink link = dimension.getLink(x, y, z); DimLink link = dimension.getLink(pos);
if (link == null) if (link == null)
{ dimension.createLink(pos, LinkType.POCKET, world.getBlockState(pos.down()).getValue(BlockDoor.FACING));
dimension.createLink(x, y, z, LinkType.POCKET,world.getBlockMetadata(x, y - 1, z));
}
} }
} }

View 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 }
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB