mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 11:39:14 +00:00
humongous spotless apply to make CI happy
This commit is contained in:
1 parent
a0f11f404a
commit
834beb5ac8
114 files changed
+2121
-1858
No files matched your search
@@ -12,27 +12,27 @@ public class RenderBlocksEldritch extends RenderBlocks {
|
||||
}
|
||||
|
||||
static double displacementMap[] = { +0.1165, -0.0352, -0.1208, +0.0906, -0.0295, +0.0302, -0.0973, +0.0548, -0.1077,
|
||||
+0.0662, -0.0932, -0.0925, -0.1161, +0.0073, -0.1084, +0.1136, +0.0307, +0.0316, -0.1066, -0.0237, +0.0614,
|
||||
-0.0864, +0.0837, +0.1218, +0.0502, -0.0529, -0.0942, +0.1209, -0.0418, +0.1035, +0.0066, -0.0255, +0.0830,
|
||||
-0.0361, +0.0965, +0.0646, +0.1124, +0.0890, -0.0037, +0.0467, +0.1025, +0.1161, +0.0014, +0.0365, +0.0755,
|
||||
-0.0025, +0.0739, +0.0656, +0.0571, -0.0813, -0.0062, -0.0904, -0.0005, +0.0612, -0.0227, +0.0138, -0.0899,
|
||||
-0.0019, -0.1047, +0.1191, -0.1197, -0.1123, +0.0999, +0.0638, +0.0865, +0.0029, -0.0084, +0.1132, -0.0433,
|
||||
+0.0115, +0.0850, +0.0439, +0.0748, +0.0460, -0.0441, +0.0839, +0.0162, -0.0229, +0.0774, -0.0647, -0.0636,
|
||||
-0.0709, -0.0719, -0.0194, +0.1070, -0.0466, -0.1200, -0.0996, -0.0298, -0.1035, -0.0006, +0.0530, -0.0939,
|
||||
-0.1210, +0.0176, +0.0924, +0.0343, -0.0777, +0.1050, -0.0729, -0.0062, -0.1107, -0.0434, -0.0042, +0.0232,
|
||||
+0.0269, +0.0709, -0.0388, +0.0342, +0.0240, -0.0192, +0.0491, +0.0017, -0.1240, +0.0687, -0.1160, +0.1123,
|
||||
-0.0332, -0.0260, +0.0476, -0.0049, -0.0893, -0.0243, -0.0371, -0.0230, +0.0656, +0.1080, +0.0781, -0.0648,
|
||||
+0.0082, -0.1086, -0.0451, -0.0594, -0.1155, -0.0623, -0.0152, +0.0131, -0.0754, +0.0607, +0.0876, -0.0657,
|
||||
+0.0366, -0.0981, +0.1164, -0.0623, +0.0181, -0.0475, +0.0722, -0.0293, +0.0486, -0.0195, +0.1041, +0.1011,
|
||||
+0.0042, -0.0045, -0.1031, +0.0110, +0.0058, +0.0083, -0.0782, -0.1003, -0.0082, -0.0304, -0.0971, -0.0097,
|
||||
-0.0208, -0.1059, -0.0239, -0.0385, +0.0505, +0.0537, -0.1098, -0.0022, -0.0165, -0.0027, -0.0208, +0.0305,
|
||||
+0.0592, +0.0301, +0.0055, +0.1138, -0.0338, -0.0901, +0.1015, +0.0061, +0.0861, -0.1057, -0.0889, -0.0972,
|
||||
+0.0783, -0.1052, -0.0932, -0.1103, +0.0497, +0.1222, -0.0146, +0.0632, -0.0240, -0.0193, +0.0676, -0.1128,
|
||||
-0.0886, +0.0926, +0.0538, -0.0175, -0.0966, -0.0369, +0.1124, -0.0820, -0.1013, -0.0836, -0.0981, -0.0502,
|
||||
+0.0573, +0.0616, -0.0458, +0.0294, +0.0108, -0.0782, +0.0692, +0.0234, -0.0178, -0.0171, -0.0505, -0.0313,
|
||||
+0.0538, +0.0462, -0.0758, +0.0556, -0.0023, -0.1086, -0.0100, -0.0897, -0.0409, -0.1161, +0.0212, +0.1229,
|
||||
-0.0945, +0.0341, +0.1238, +0.0893, -0.1189, -0.1098, -0.0125, +0.1137, -0.0202, +0.0239, -0.0408, +0.0920,
|
||||
+0.0777, -0.0085, -0.0572, -0.0293, -0.0131, +0.0272, +0.0991, };
|
||||
+0.0662, -0.0932, -0.0925, -0.1161, +0.0073, -0.1084, +0.1136, +0.0307, +0.0316, -0.1066, -0.0237, +0.0614,
|
||||
-0.0864, +0.0837, +0.1218, +0.0502, -0.0529, -0.0942, +0.1209, -0.0418, +0.1035, +0.0066, -0.0255, +0.0830,
|
||||
-0.0361, +0.0965, +0.0646, +0.1124, +0.0890, -0.0037, +0.0467, +0.1025, +0.1161, +0.0014, +0.0365, +0.0755,
|
||||
-0.0025, +0.0739, +0.0656, +0.0571, -0.0813, -0.0062, -0.0904, -0.0005, +0.0612, -0.0227, +0.0138, -0.0899,
|
||||
-0.0019, -0.1047, +0.1191, -0.1197, -0.1123, +0.0999, +0.0638, +0.0865, +0.0029, -0.0084, +0.1132, -0.0433,
|
||||
+0.0115, +0.0850, +0.0439, +0.0748, +0.0460, -0.0441, +0.0839, +0.0162, -0.0229, +0.0774, -0.0647, -0.0636,
|
||||
-0.0709, -0.0719, -0.0194, +0.1070, -0.0466, -0.1200, -0.0996, -0.0298, -0.1035, -0.0006, +0.0530, -0.0939,
|
||||
-0.1210, +0.0176, +0.0924, +0.0343, -0.0777, +0.1050, -0.0729, -0.0062, -0.1107, -0.0434, -0.0042, +0.0232,
|
||||
+0.0269, +0.0709, -0.0388, +0.0342, +0.0240, -0.0192, +0.0491, +0.0017, -0.1240, +0.0687, -0.1160, +0.1123,
|
||||
-0.0332, -0.0260, +0.0476, -0.0049, -0.0893, -0.0243, -0.0371, -0.0230, +0.0656, +0.1080, +0.0781, -0.0648,
|
||||
+0.0082, -0.1086, -0.0451, -0.0594, -0.1155, -0.0623, -0.0152, +0.0131, -0.0754, +0.0607, +0.0876, -0.0657,
|
||||
+0.0366, -0.0981, +0.1164, -0.0623, +0.0181, -0.0475, +0.0722, -0.0293, +0.0486, -0.0195, +0.1041, +0.1011,
|
||||
+0.0042, -0.0045, -0.1031, +0.0110, +0.0058, +0.0083, -0.0782, -0.1003, -0.0082, -0.0304, -0.0971, -0.0097,
|
||||
-0.0208, -0.1059, -0.0239, -0.0385, +0.0505, +0.0537, -0.1098, -0.0022, -0.0165, -0.0027, -0.0208, +0.0305,
|
||||
+0.0592, +0.0301, +0.0055, +0.1138, -0.0338, -0.0901, +0.1015, +0.0061, +0.0861, -0.1057, -0.0889, -0.0972,
|
||||
+0.0783, -0.1052, -0.0932, -0.1103, +0.0497, +0.1222, -0.0146, +0.0632, -0.0240, -0.0193, +0.0676, -0.1128,
|
||||
-0.0886, +0.0926, +0.0538, -0.0175, -0.0966, -0.0369, +0.1124, -0.0820, -0.1013, -0.0836, -0.0981, -0.0502,
|
||||
+0.0573, +0.0616, -0.0458, +0.0294, +0.0108, -0.0782, +0.0692, +0.0234, -0.0178, -0.0171, -0.0505, -0.0313,
|
||||
+0.0538, +0.0462, -0.0758, +0.0556, -0.0023, -0.1086, -0.0100, -0.0897, -0.0409, -0.1161, +0.0212, +0.1229,
|
||||
-0.0945, +0.0341, +0.1238, +0.0893, -0.1189, -0.1098, -0.0125, +0.1137, -0.0202, +0.0239, -0.0408, +0.0920,
|
||||
+0.0777, -0.0085, -0.0572, -0.0293, -0.0131, +0.0272, +0.0991, };
|
||||
|
||||
static int dmap1 = displacementMap.length * 1 / 6;
|
||||
static int dmap2 = displacementMap.length * 2 / 6;
|
||||
|
||||
@@ -54,9 +54,11 @@ public class RenderChiselSnowman extends RenderLiving {
|
||||
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemStack, EQUIPPED);
|
||||
boolean is3D = (customRenderer != null
|
||||
&& customRenderer.shouldUseRenderHelper(EQUIPPED, itemStack, BLOCK_3D));
|
||||
&& customRenderer.shouldUseRenderHelper(EQUIPPED, itemStack, BLOCK_3D));
|
||||
|
||||
if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemStack.getItem()).getRenderType())) {
|
||||
if (is3D || RenderBlocks.renderItemIn3d(
|
||||
Block.getBlockFromItem(itemStack.getItem())
|
||||
.getRenderType())) {
|
||||
float f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.34375F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package team.chisel.client.render;
|
||||
|
||||
import team.chisel.ctmlib.CTMRenderer;
|
||||
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.ctmlib.CTMRenderer;
|
||||
|
||||
public class RendererCTM extends CTMRenderer {
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
|
||||
public class RendererCTMPane implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -200,7 +200,7 @@ public class RendererCTMPane implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
BlockPane block = (BlockPane) b;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -230,12 +230,12 @@ public class RendererCTMPane implements ISimpleBlockRenderingHandler {
|
||||
|
||||
if (renderer.hasOverrideBlockTexture()) {
|
||||
paneRenderer.set(
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
renderer.overrideBlockTexture,
|
||||
renderer.overrideBlockTexture,
|
||||
renderer.overrideBlockTexture);
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
renderer.overrideBlockTexture,
|
||||
renderer.overrideBlockTexture,
|
||||
renderer.overrideBlockTexture);
|
||||
} else {
|
||||
paneRenderer.set(x, y, z, iconPane, iconTop, iconSide);
|
||||
}
|
||||
@@ -259,8 +259,8 @@ public class RendererCTMPane implements ISimpleBlockRenderingHandler {
|
||||
|
||||
boolean isolatedTop = !connectsTopNorth && !connectsTopSouth && !connectsTopWest && !connectsTopEast;
|
||||
boolean isolatedBottom = !connectsBottomNorth && !connectsBottomSouth
|
||||
&& !connectsBottomWest
|
||||
&& !connectsBottomEast;
|
||||
&& !connectsBottomWest
|
||||
&& !connectsBottomEast;
|
||||
|
||||
if (!connectsNorth && !connectsSouth && !connectsWest && !connectsEast) {
|
||||
connectsNorth = connectsSouth = connectsWest = connectsEast = true;
|
||||
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
|
||||
public class RendererEldritch implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class RendererEldritch implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks rendererOld) {
|
||||
RenderBlocks rendererOld) {
|
||||
|
||||
// tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x,
|
||||
// y, z));
|
||||
|
||||
@@ -7,13 +7,13 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockCarvableGlow;
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import team.chisel.utils.GeneralClient;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RendererLayeredGlow implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class RendererLayeredGlow implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
Tessellator.instance.setColorOpaque_I(Configurations.configColors[world.getBlockMetadata(x, y, z)]);
|
||||
Tessellator.instance.setBrightness(0xF000F0);
|
||||
Drawing.renderAllFaces(renderer, block, x, y, z, ((BlockCarvableGlow) block).getGlowTexture());
|
||||
|
||||
@@ -8,10 +8,10 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import team.chisel.block.BlockMultiLayerBase;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.block.BlockMultiLayerBase;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
|
||||
public class RendererMultiLayer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class RendererMultiLayer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
if (blck == null || !(blck instanceof BlockMultiLayerBase)) return false;
|
||||
BlockMultiLayerBase block = (BlockMultiLayerBase) blck;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockRoadLine;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RendererRoadLine implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class RendererRoadLine implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
BlockRoadLine block = (BlockRoadLine) b;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
@@ -59,10 +59,14 @@ public class RendererRoadLine implements ISimpleBlockRenderingHandler {
|
||||
}
|
||||
tessellator.setColorOpaque_F(f * f1, f * f2, f * f3);
|
||||
|
||||
boolean N = world.getBlock(x, y, z - 1).equals(block) && world.getBlockMetadata(x, y, z - 1) == meta;
|
||||
boolean S = world.getBlock(x, y, z + 1).equals(block) && world.getBlockMetadata(x, y, z + 1) == meta;
|
||||
boolean W = world.getBlock(x - 1, y, z).equals(block) && world.getBlockMetadata(x - 1, y, z) == meta;
|
||||
boolean E = world.getBlock(x + 1, y, z).equals(block) && world.getBlockMetadata(x + 1, y, z) == meta;
|
||||
boolean N = world.getBlock(x, y, z - 1)
|
||||
.equals(block) && world.getBlockMetadata(x, y, z - 1) == meta;
|
||||
boolean S = world.getBlock(x, y, z + 1)
|
||||
.equals(block) && world.getBlockMetadata(x, y, z + 1) == meta;
|
||||
boolean W = world.getBlock(x - 1, y, z)
|
||||
.equals(block) && world.getBlockMetadata(x - 1, y, z) == meta;
|
||||
boolean E = world.getBlock(x + 1, y, z)
|
||||
.equals(block) && world.getBlockMetadata(x + 1, y, z) == meta;
|
||||
|
||||
if (!N && !S && !W && !E) {
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
|
||||
@@ -6,11 +6,11 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockCarvableLayered;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RendererSimpleLayered implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RendererSimpleLayered implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
renderer.setOverrideBlockTexture(((BlockCarvableLayered) block).getBaseTex());
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.clearOverrideBlockTexture();
|
||||
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.block.BlockSnakestone;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.block.BlockSnakestone;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
|
||||
public class RendererSnakeStone implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RendererSnakeStone implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
setRenderRotate(renderer, (BlockSnakestone) block, meta);
|
||||
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.block.BlockCarvableStairs;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.block.BlockCarvableStairs;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
|
||||
public class RendererStairs implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RendererStairs implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
if (blck == null || !(blck instanceof BlockCarvableStairs)) return false;
|
||||
BlockCarvableStairs block = (BlockCarvableStairs) blck;
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.Drawing;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SubmapManagerAntiblock extends SubmapManagerBase {
|
||||
|
||||
@@ -36,9 +36,9 @@ public class SubmapManagerAntiblock extends SubmapManagerBase {
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Drawing.drawBlock(
|
||||
ChiselBlocks.antiBlock,
|
||||
ChiselBlocks.antiBlock.getIcon(0, item.getItemDamage()),
|
||||
(RenderBlocks) data[0]);
|
||||
ChiselBlocks.antiBlock,
|
||||
ChiselBlocks.antiBlock.getIcon(0, item.getItemDamage()),
|
||||
(RenderBlocks) data[0]);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
|
||||
public abstract class SubmapManagerBase implements ISubmapManager {
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
public class SubmapManagerCarpetFloor extends SubmapManagerBase {
|
||||
|
||||
|
||||
@@ -10,15 +10,14 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType.AbstractSubmapManager;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
|
||||
@@ -67,14 +66,14 @@ public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
int iz = MathHelper.floor_double(z);
|
||||
if (type == TextureType.V4 || type == TextureType.V9) {
|
||||
submap = (TextureSubmap) TextureType
|
||||
.getVIcon(rType, SubmapManagerCombinedCTM.this.submap, ix, iy, iz, side.ordinal());
|
||||
.getVIcon(rType, SubmapManagerCombinedCTM.this.submap, ix, iy, iz, side.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType
|
||||
.getVIcon(rType, SubmapManagerCombinedCTM.this.smallSubmap, ix, iy, iz, side.ordinal());
|
||||
.getVIcon(rType, SubmapManagerCombinedCTM.this.smallSubmap, ix, iy, iz, side.ordinal());
|
||||
} else {
|
||||
submap = (TextureSubmap) TextureType
|
||||
.getRIcon(rType, SubmapManagerCombinedCTM.this.submap, ix, iy, iz, side.ordinal());
|
||||
.getRIcon(rType, SubmapManagerCombinedCTM.this.submap, ix, iy, iz, side.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType
|
||||
.getRIcon(rType, SubmapManagerCombinedCTM.this.smallSubmap, ix, iy, iz, side.ordinal());
|
||||
.getRIcon(rType, SubmapManagerCombinedCTM.this.smallSubmap, ix, iy, iz, side.ordinal());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,13 +110,18 @@ public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
|
||||
public SubmapManagerCombinedCTM(int meta, String texturePath, TextureType rType) {
|
||||
assert rType == TextureType.R16 || rType == TextureType.R9
|
||||
|| rType == TextureType.R4
|
||||
|| rType == TextureType.V4
|
||||
|| rType == TextureType.V9 : "Not a valid random type!";
|
||||
|| rType == TextureType.R4
|
||||
|| rType == TextureType.V4
|
||||
|| rType == TextureType.V9 : "Not a valid random type!";
|
||||
|
||||
this.meta = meta;
|
||||
this.texturePath = texturePath;
|
||||
this.size = Integer.parseInt(rType.name().substring(1, rType.name().length())); // >.>
|
||||
this.size = Integer.parseInt(
|
||||
rType.name()
|
||||
.substring(
|
||||
1,
|
||||
rType.name()
|
||||
.length())); // >.>
|
||||
this.rType = rType;
|
||||
}
|
||||
|
||||
@@ -146,14 +150,15 @@ public class SubmapManagerCombinedCTM extends SubmapManagerBase {
|
||||
TextureSubmap[][] submapsSmall = new TextureSubmap[wh][wh];
|
||||
for (int i = 0; i < size; i++) {
|
||||
AbstractSubmapManager manager = (AbstractSubmapManager) TextureType.CTMX
|
||||
.createManagerFor(CarvingUtils.getDefaultVariationFor(block, meta, 0), texturePath + "-" + i);
|
||||
.createManagerFor(CarvingUtils.getDefaultVariationFor(block, meta, 0), texturePath + "-" + i);
|
||||
manager.registerIcons(modName, block, register);
|
||||
Object cached = manager.getCachedObject();
|
||||
Triple<IIcon, TextureSubmap, TextureSubmap> triple = (Triple<IIcon, TextureSubmap, TextureSubmap>) cached;
|
||||
submaps[i % wh][i / wh] = triple.getMiddle();
|
||||
submapsSmall[i % wh][i / wh] = triple.getRight();
|
||||
if (i == 0) {
|
||||
defaultIcon = triple.getRight().getBaseIcon();
|
||||
defaultIcon = triple.getRight()
|
||||
.getBaseIcon();
|
||||
}
|
||||
}
|
||||
submap = new Submap(base, wh, submaps);
|
||||
|
||||
@@ -7,15 +7,14 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.ctmlib.CTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.ctmlib.CTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
public class SubmapManagerFakeController extends SubmapManagerBase {
|
||||
|
||||
@@ -63,8 +62,8 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":" + texturePath), 2, 2);
|
||||
} else {
|
||||
Chisel.logger.info(
|
||||
"SubmapManagerFakeController was called on block " + block.getUnlocalizedName()
|
||||
+ " without declaring texture, using a default texture instead.");
|
||||
"SubmapManagerFakeController was called on block " + block.getUnlocalizedName()
|
||||
+ " without declaring texture, using a default texture instead.");
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controller"), 2, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SubmapManagerSlab implements ISubmapManager {
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
|
||||
|
||||
@@ -67,7 +67,8 @@ public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
String materialName = materialType.name().toLowerCase();
|
||||
String materialName = materialType.name()
|
||||
.toLowerCase();
|
||||
submap = new TextureSubmap(register.registerIcon(modName + ":" + materialName + "/" + color + "-ctm"), 4, 4);
|
||||
submapSmall = new TextureSubmap(register.registerIcon(modName + ":" + materialName + "/" + color), 2, 2);
|
||||
}
|
||||
|
||||
@@ -8,15 +8,14 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.ctmlib.ISubmapManager;
|
||||
import team.chisel.ctmlib.RenderBlocksCTM;
|
||||
import team.chisel.ctmlib.TextureSubmap;
|
||||
|
||||
public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
|
||||
@@ -87,12 +86,12 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
|
||||
private IIcon getBase(double x, double y, double z, int side) {
|
||||
return TextureType.getVIcon(
|
||||
TextureType.V4,
|
||||
base,
|
||||
MathHelper.floor_double(x),
|
||||
MathHelper.floor_double(y),
|
||||
MathHelper.floor_double(z),
|
||||
side);
|
||||
TextureType.V4,
|
||||
base,
|
||||
MathHelper.floor_double(x),
|
||||
MathHelper.floor_double(y),
|
||||
MathHelper.floor_double(z),
|
||||
side);
|
||||
}
|
||||
|
||||
private String texture;
|
||||
@@ -116,7 +115,7 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
@Override
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
overlay = TextureType.getTypeFor(null, modName, texture)
|
||||
.createManagerFor(CarvingUtils.getDefaultVariationFor(block, meta, 0), texture);
|
||||
.createManagerFor(CarvingUtils.getDefaultVariationFor(block, meta, 0), texture);
|
||||
overlay.registerIcons(modName, block, register);
|
||||
base = new TextureSubmap(register.registerIcon(modName + ":" + "animations/hadesX32"), 2, 2);
|
||||
}
|
||||
|
||||
@@ -30,27 +30,27 @@ public class ItemChiselRenderer implements IItemRenderer {
|
||||
// Fixes potential render bug with blocks that draw this item
|
||||
renderItem.zLevel = 10f;
|
||||
renderItem.renderItemIntoGUI(
|
||||
Minecraft.getMinecraft().fontRenderer,
|
||||
Minecraft.getMinecraft().renderEngine,
|
||||
stack,
|
||||
0,
|
||||
0);
|
||||
Minecraft.getMinecraft().fontRenderer,
|
||||
Minecraft.getMinecraft().renderEngine,
|
||||
stack,
|
||||
0,
|
||||
0);
|
||||
|
||||
if (stack.stackTagCompound != null) {
|
||||
|
||||
ItemStack chiselTarget = ItemStack
|
||||
.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("chiselTarget"));
|
||||
.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("chiselTarget"));
|
||||
if (chiselTarget != null) {
|
||||
|
||||
GL11.glScalef(0.65f, 0.65f, 0.65f);
|
||||
GL11.glTranslatef(-8f, -8f, 0.0f);
|
||||
|
||||
renderItem.renderItemIntoGUI(
|
||||
Minecraft.getMinecraft().fontRenderer,
|
||||
Minecraft.getMinecraft().renderEngine,
|
||||
chiselTarget,
|
||||
8,
|
||||
8);
|
||||
Minecraft.getMinecraft().fontRenderer,
|
||||
Minecraft.getMinecraft().renderEngine,
|
||||
chiselTarget,
|
||||
8,
|
||||
8);
|
||||
}
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -25,18 +25,18 @@ import net.minecraftforge.client.model.obj.TextureCoordinate;
|
||||
import net.minecraftforge.client.model.obj.Vertex;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
|
||||
public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler, IItemRenderer {
|
||||
|
||||
private static final WavefrontObject model = new WavefrontObject(
|
||||
new ResourceLocation(Chisel.MOD_ID, "models/autoChisel/autoChisel.obj"));
|
||||
new ResourceLocation(Chisel.MOD_ID, "models/autoChisel/autoChisel.obj"));
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
Chisel.MOD_ID,
|
||||
"textures/blocks/autoChisel/autoChisel.png");
|
||||
Chisel.MOD_ID,
|
||||
"textures/blocks/autoChisel/autoChisel.png");
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
@@ -46,7 +46,7 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK || helper == ItemRendererHelper.ENTITY_BOBBING
|
||||
|| helper == ItemRendererHelper.ENTITY_ROTATION;
|
||||
|| helper == ItemRendererHelper.ENTITY_ROTATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +85,7 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
Tessellator tes = Tessellator.instance;
|
||||
IIcon icon = renderer.hasOverrideBlockTexture() ? renderer.overrideBlockTexture : block.getIcon(0, 0);
|
||||
tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
@@ -100,18 +100,18 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp
|
||||
TextureCoordinate t = f.textureCoordinates[i];
|
||||
if (!renderer.hasOverrideBlockTexture()) {
|
||||
tes.addVertexWithUV(
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU(t.u * 16),
|
||||
icon.getInterpolatedV(t.v * 16));
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU(t.u * 16),
|
||||
icon.getInterpolatedV(t.v * 16));
|
||||
} else {
|
||||
tes.addVertexWithUV(
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU((t.u * 64) % 16),
|
||||
icon.getInterpolatedV((t.v * 64) % 16));
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU((t.u * 64) % 16),
|
||||
icon.getInterpolatedV((t.v * 64) % 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,8 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp
|
||||
|
||||
float max = 0.35f;
|
||||
|
||||
if (!Minecraft.getMinecraft().isGamePaused()) {
|
||||
if (!Minecraft.getMinecraft()
|
||||
.isGamePaused()) {
|
||||
autoChisel.xRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.yRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.zRot += (rand.nextFloat() * max) - (max / 2);
|
||||
@@ -195,8 +196,8 @@ public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimp
|
||||
glPushMatrix();
|
||||
glTranslated(x + 0.7, y + 1.01, z + 0.5);
|
||||
float rot = autoChisel.chiselRot == 0 ? 0
|
||||
: autoChisel.chiseling ? autoChisel.chiselRot + (TileEntityAutoChisel.rotAmnt * scale)
|
||||
: autoChisel.chiselRot - (TileEntityAutoChisel.rotAmnt * scale);
|
||||
: autoChisel.chiseling ? autoChisel.chiselRot + (TileEntityAutoChisel.rotAmnt * scale)
|
||||
: autoChisel.chiselRot - (TileEntityAutoChisel.rotAmnt * scale);
|
||||
glRotatef(rot, 0, 0, 1);
|
||||
glTranslated(-0.12, 0, 0);
|
||||
glScalef(0.9f, 0.9f, 0.9f);
|
||||
|
||||
@@ -18,9 +18,9 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
|
||||
public class RenderCarvableBeacon extends TileEntityBeaconRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@@ -151,7 +151,7 @@ public class RenderCarvableBeacon extends TileEntityBeaconRenderer implements IS
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
RenderBlocks renderer) {
|
||||
float f = 0.1875F;
|
||||
boolean breaking = renderer.hasOverrideBlockTexture();
|
||||
if (!breaking) {
|
||||
|
||||
@@ -14,13 +14,13 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityPresent;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderPresent extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||
|
||||
private ModelChest smallChest = new ModelChest();
|
||||
@@ -77,8 +77,8 @@ public class RenderPresent extends TileEntitySpecialRenderer implements IItemRen
|
||||
}
|
||||
|
||||
private void bindTexture(TileEntityPresent present) {
|
||||
int idx = present.getWorldObj().getBlockMetadata(present.xCoord, present.yCoord, present.zCoord)
|
||||
+ (present.isConnected() ? 0 : 16);
|
||||
int idx = present.getWorldObj()
|
||||
.getBlockMetadata(present.xCoord, present.yCoord, present.zCoord) + (present.isConnected() ? 0 : 16);
|
||||
ResourceLocation rl = textureCache.get(idx);
|
||||
if (rl == null) {
|
||||
String res = ChiselBlocks.present.getModelTexture(idx % 16);
|
||||
@@ -106,10 +106,11 @@ public class RenderPresent extends TileEntitySpecialRenderer implements IItemRen
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(
|
||||
FMLClientHandler.instance()
|
||||
.getClient().renderEngine.bindTexture(
|
||||
new ResourceLocation(
|
||||
Chisel.MOD_ID,
|
||||
ChiselBlocks.present.getModelTexture(item.getItemDamage()) + ".png"));
|
||||
Chisel.MOD_ID,
|
||||
ChiselBlocks.present.getModelTexture(item.getItemDamage()) + ".png"));
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderBlock(0.0F, 1.0F, 0.0F);
|
||||
|
||||
Reference in new issue
Block a user