mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-19 12:09:12 +00:00
- forge microblocks of neonite, antiblock and glotek are now emissive when using shaders
This commit is contained in:
1 parent
df216f68b4
commit
2150548111
4 files changed
+87
-6
No files matched your search
@@ -181,7 +181,7 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable antiBlock = (BlockCarvable) new BlockCarvableAntiBlock()
|
||||
BlockCarvable antiBlock = (BlockCarvable) new BlockCarvableGlowie(Material.rock)
|
||||
.setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
|
||||
if (!Configurations.allowChiselCrossColors) {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package team.chisel.client.render;
|
||||
|
||||
import codechicken.lib.render.CCRenderState;
|
||||
|
||||
public class FullBrightLighting implements CCRenderState.IVertexOperation {
|
||||
|
||||
public static FullBrightLighting instance = new FullBrightLighting();
|
||||
public int id;
|
||||
|
||||
public boolean load() {
|
||||
if (!CCRenderState.computeLighting) {
|
||||
return false;
|
||||
}
|
||||
CCRenderState.pipeline.addDependency(CCRenderState.colourAttrib);
|
||||
CCRenderState.pipeline.addDependency(CCRenderState.lightCoordAttrib);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void operate() {
|
||||
CCRenderState.setBrightness(FULL_BRIGHT_BLOCK_BRIGHTNESS);
|
||||
}
|
||||
|
||||
public int operationID() {
|
||||
return id;
|
||||
}
|
||||
|
||||
{
|
||||
id = CCRenderState.registerOperation();
|
||||
}
|
||||
|
||||
// magic number from 'RenderBlocksCTMFullbright'
|
||||
// this is the brightness of the neonite, anti, glotek blocks
|
||||
// so we use it for custom microblock lighting
|
||||
private final static int FULL_BRIGHT_BLOCK_BRIGHTNESS = 0xF000F0;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import codechicken.lib.render.CCRenderState;
|
||||
import codechicken.lib.render.ColourMultiplier;
|
||||
import codechicken.lib.vec.Cuboid6;
|
||||
import codechicken.lib.vec.Vector3;
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FullBrightMicroMaterial extends BlockMicroMaterial {
|
||||
|
||||
public FullBrightMicroMaterial(final Block block, final int meta) {
|
||||
super(block, meta);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMicroFace(final Vector3 pos, final int pass, final Cuboid6 bounds) {
|
||||
CCRenderState.pipeline.builder()
|
||||
.add((CCRenderState.IVertexOperation) pos.translation())
|
||||
.add((CCRenderState.IVertexOperation) this.icont())
|
||||
.add((CCRenderState.IVertexOperation) ColourMultiplier.instance(FULL_BRIGHT_COLOR_MULTIPLIER))
|
||||
.add((CCRenderState.IVertexOperation) FullBrightLighting.instance)
|
||||
.render();
|
||||
}
|
||||
|
||||
// magic number from 'RenderBlocksCTMFullbright'
|
||||
// this is what makes the neonite, anti, glotek blocks burn bright as my ass does
|
||||
// so we use it for custom microblock render
|
||||
private final static int FULL_BRIGHT_COLOR_MULTIPLIER = 0xFFFFFFFF;
|
||||
}
|
||||
Reference in new issue
Block a user