mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-22 21:29:52 +00:00
Some class renaming, move TextureSubmap to API and improve its methods
This commit is contained in:
1 parent
c2fa40d57e
commit
d50f2c9da5
36 files changed
+373
-294
No files matched your search
@@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarblePaneRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RendererCTMPane;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -46,7 +46,7 @@ public class BlockCarvablePane extends BlockPane implements ICarvable {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockMarblePaneRenderer.id;
|
||||
return RendererCTMPane.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarblePillarRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RendererPillar;
|
||||
|
||||
public class BlockCarvablePillar extends BlockCarvable {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class BlockCarvablePillar extends BlockCarvable {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockMarblePillarRenderer.id;
|
||||
return RendererPillar.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,9 +31,9 @@ public class BlockCarvablePillar extends BlockCarvable {
|
||||
}
|
||||
|
||||
public IIcon getCtmIcon(int index, int metadata) {
|
||||
//Workaround to prevent crash with invalid meta
|
||||
// Workaround to prevent crash with invalid meta
|
||||
CarvableVariation var = null;
|
||||
if(metadata <= carverHelper.variations.size())
|
||||
if (metadata <= carverHelper.variations.size())
|
||||
var = carverHelper.variations.get(metadata);
|
||||
else
|
||||
var = carverHelper.variations.get(0);
|
||||
@@ -42,7 +42,7 @@ public class BlockCarvablePillar extends BlockCarvable {
|
||||
return var.iconTop;
|
||||
if (var.seamsCtmVert == null)
|
||||
return var.icon;
|
||||
return var.seamsCtmVert.icons[index];
|
||||
return var.seamsCtmVert.getSubIcon(index % 2, index / 2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RendererStairs;
|
||||
|
||||
public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockMarbleStairsRenderer.id;
|
||||
return RendererStairs.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
|
||||
public class BlockLavastone extends BlockMarbleTexturedOre {
|
||||
public class BlockLavastone extends BlockMultiLayer {
|
||||
|
||||
public BlockLavastone(Material mat, String baseIcon) {
|
||||
super(mat, baseIcon);
|
||||
|
||||
+3
-3
@@ -15,17 +15,17 @@ import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
|
||||
public class BlockMarbleTexturedOre extends BlockTexturedOre implements ICarvable {
|
||||
public class BlockMultiLayer extends BlockMultiLayerBase implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
public BlockMarbleTexturedOre(Material mat, String baseIcon) {
|
||||
public BlockMultiLayer(Material mat, String baseIcon) {
|
||||
super(mat, baseIcon);
|
||||
|
||||
carverHelper = new CarvableHelper();
|
||||
}
|
||||
|
||||
public BlockMarbleTexturedOre(Material mat, Block block) {
|
||||
public BlockMultiLayer(Material mat, Block block) {
|
||||
super(mat, block);
|
||||
|
||||
carverHelper = new CarvableHelper();
|
||||
+5
-5
@@ -5,22 +5,22 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.BlockTexturedOreRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RendererMultiLayer;
|
||||
|
||||
public class BlockTexturedOre extends Block {
|
||||
public abstract class BlockMultiLayerBase extends Block {
|
||||
|
||||
public int currentPass;
|
||||
public Block base;
|
||||
public IIcon icon;
|
||||
String iconFile;
|
||||
|
||||
public BlockTexturedOre(Material mat, Block base) {
|
||||
public BlockMultiLayerBase(Material mat, Block base) {
|
||||
super(mat);
|
||||
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
public BlockTexturedOre(Material mat, String iconFile) {
|
||||
public BlockMultiLayerBase(Material mat, String iconFile) {
|
||||
super(mat);
|
||||
|
||||
this.iconFile = iconFile;
|
||||
@@ -33,7 +33,7 @@ public class BlockTexturedOre extends Block {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockTexturedOreRenderer.id;
|
||||
return RendererMultiLayer.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.BlockSnakeStoneRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RendererSnakeStone;
|
||||
|
||||
public class BlockSnakestone extends Block {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class BlockSnakestone extends Block {
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockSnakeStoneRenderer.id;
|
||||
return RendererSnakeStone.id;
|
||||
}
|
||||
|
||||
static final int[] rotRemap = { 0, 3, 1, 2 };
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockWaterstone extends BlockMarbleTexturedOre {
|
||||
public class BlockWaterstone extends BlockMultiLayer {
|
||||
|
||||
public BlockWaterstone(Material mat, String baseIcon) {
|
||||
super(mat, baseIcon);
|
||||
|
||||
Reference in new issue
Block a user