Added support for transparent blocks

This commit is contained in:
Namikon committed 2015-08-26 10:21:15 +02:00
1 parent fdff19b454
commit de084e60c8
4 files changed
+30 -5

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge'
version = "1.7.10-0.5.2"
version = "1.7.10-0.5.4"
group= "eu.usrv.YAMCore" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "YAMCore"
@@ -4,7 +4,22 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
public class BlockBase extends Block {
public BlockBase(Material pMaterial) {
super(pMaterial);
}
private boolean _mIsOpaqueCube;
public BlockBase(Material pMaterial)
{
super(pMaterial);
_mIsOpaqueCube = true;
}
public void setInner_IsOpaque(boolean pFlag)
{
_mIsOpaqueCube = pFlag;
}
@Override
public boolean isOpaqueCube()
{
return _mIsOpaqueCube;
}
}
@@ -54,8 +54,11 @@ public class ModSimpleBaseBlock {
_mBlockInstance.setStepSound(pBlockProperties.getStepSound());
_mBlockInstance.setLightLevel(pBlockProperties.getLightLevel());
_mBlockInstance.setLightOpacity(pBlockProperties.getOpacity());
_mBlockInstance.setInner_IsOpaque(pBlockProperties.getIsOpaqueCube());
}
/**
* Create a new simple block (for recipes or other very basic stuff)
* @param pItemName The Blocks unlocalized name
@@ -71,4 +71,11 @@ public interface IExtendedBlockProperties {
* @return
*/
public SoundType getStepSound();
/**
* Set to false if the Block-texture has an alpha channel
* See here for more information: http://greyminecraftcoder.blogspot.de/2013/07/rendering-transparent-blocks.html
* @return
*/
public boolean getIsOpaqueCube();
}