Testing translucent textures.

This commit is contained in:
WayofTime 2016-02-25 10:45:00 -05:00
parent da6f410394
commit 3fc6b5627f
10 changed files with 22 additions and 8 deletions

View file

@ -9,6 +9,8 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
@ -54,6 +56,12 @@ public class BlockDemonCrystal extends Block
return 3;
}
@Override
public boolean canRenderInLayer(EnumWorldBlockLayer layer)
{
return layer == EnumWorldBlockLayer.CUTOUT_MIPPED || layer == EnumWorldBlockLayer.TRANSLUCENT;
}
// public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
// {
// return (worldIn.getLight(pos) >= 8 || worldIn.canSeeSky(pos)) && worldIn.getBlockState(pos.down()).getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this);
@ -119,4 +127,10 @@ public class BlockDemonCrystal extends Block
// }
// return ret;
// }
@Override
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
{
return 0xffffff;
}
}

View file

@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"textures": { "all" : "bloodmagic:models/crystal" },
"textures": { "#crystal" : "bloodmagic:models/crystal" },
"model": "bloodmagic:crystal/Crystal1.obj",
"custom": { "flip-v": true },
"transform": {

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

View file

@ -10,4 +10,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd bloodmagic:models/crystal
map_Kd crystal

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB