manual merges of up to 9a578fc

This commit is contained in:
Progwml6 committed 2013-12-11 23:47:07 -05:00
1 parent 655780cc0c
commit 0c9c8100ad
21 files changed
+218 -56

No files matched your search

@@ -20,11 +20,14 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ConveyorBase extends MantleBlock
{
public ConveyorBase(int ID, Material material)
String texturename;
public ConveyorBase(int ID, Material material, String name)
{
super(ID, material);
this.setCreativeTab(TConstructRegistry.blockTab);
setBlockBounds(0f, 0f, 0f, 1f, 0.5f, 1f);
texturename = name;
}
public boolean isBlockReplaceable (World world, int x, int y, int z)
@@ -135,7 +138,7 @@ public class ConveyorBase extends MantleBlock
@Override
public void registerIcons (IconRegister iconRegister)
{
String[] textureNames = new String[] { "greencurrent", "greencurrent_flow" };
String[] textureNames = new String[] { texturename, texturename + "_flow" };
this.icons = new Icon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i)
@@ -29,6 +29,7 @@ import mantle.blocks.iface.IServantLogic;
public class LavaTankBlock extends BlockContainer
{
public Icon[] icons;
String texturePrefix = "";
public LavaTankBlock(int id)
{
@@ -40,10 +41,20 @@ public class LavaTankBlock extends BlockContainer
setStepSound(Block.soundGlassFootstep);
}
public LavaTankBlock(int id, String prefix)
{
this(id);
texturePrefix = prefix;
}
public String[] getTextureNames ()
{
String[] textureNames = { "lavatank_side", "lavatank_top", "searedgague_top", "searedgague_side", "searedgague_bottom", "searedwindow_top", "searedwindow_side", "searedwindow_bottom" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -33,6 +33,12 @@ public class SearedBlock extends InventoryBlock
setStepSound(soundMetalFootstep);
}
public SearedBlock(int id, String texture)
{
this(id);
this.texturePrefix = texture;
}
@Override
public TileEntity createTileEntity (World world, int metadata)
{
@@ -181,11 +187,17 @@ public class SearedBlock extends InventoryBlock
return SearedRender.searedModel;
}
String texturePrefix = "";
@Override
public String[] getTextureNames ()
{
String[] textureNames = { "castingtable_top", "castingtable_side", "castingtable_bottom", "faucet", "blockcast_top", "blockcast_side", "blockcast_bottom" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -29,6 +29,7 @@ import tconstruct.util.config.PHConstruct;
public class SmelteryBlock extends InventoryBlock
{
Random rand;
String texturePrefix = "";
public SmelteryBlock(int id)
{
@@ -41,6 +42,12 @@ public class SmelteryBlock extends InventoryBlock
this.setUnlocalizedName("tconstruct.Smeltery");
}
public SmelteryBlock(int id, String prefix)
{
this(id);
texturePrefix = prefix;
}
/* Rendering */
@Override
@@ -55,6 +62,10 @@ public class SmelteryBlock extends InventoryBlock
String[] textureNames = { "smeltery_side", "smeltery_inactive", "smeltery_active", "drain_side", "drain_out", "drain_basin", "searedbrick", "searedstone", "searedcobble", "searedpaver",
"searedbrickcracked", "searedroad", "searedbrickfancy", "searedbricksquare", "searedcreeper" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -13,7 +13,7 @@ import net.minecraft.world.World;
public class SoilBlock extends TConstructBlock
{
static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue" };
static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue", "nether_grout" };
public SoilBlock(int id)
{
@@ -865,7 +865,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
Block block = Block.blocksList[blockID];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
{
if (blockID == TRepo.smeltery.blockID)
if (validBlockID(blockID))
return validateBottom(x, y, z, count);
else
return count;
@@ -900,7 +900,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (worldObj.getBlockId(xPos, y, zPos) == TRepo.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
if (validBlockID(worldObj.getBlockId(xPos, y, zPos)) && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -920,7 +920,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
int tempBricks = 0;
int blockID = worldObj.getBlockId(x, y, z);
if (blockID == TRepo.smeltery.blockID || blockID == TRepo.lavaTank.blockID)
if (validBlockID(blockID) || validTankID(blockID))
{
TileEntity te = worldObj.getBlockTileEntity(x, y, z);
if (te == this)
@@ -949,6 +949,16 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return tempBricks;
}
boolean validBlockID (int blockID)
{
return blockID == TRepo.smeltery.blockID || blockID == TRepo.smelteryNether.blockID;
}
boolean validTankID (int blockID)
{
return blockID == TRepo.lavaTank.blockID || blockID == TRepo.lavaTankNether.blockID;
}
public int getCapacity ()
{
return maxLiquid;
@@ -1155,7 +1165,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
// IDebuggable
@Override
public DebugData getDebugInfo(EntityPlayer player) {
public DebugData getDebugInfo (EntityPlayer player)
{
List<String> str = new ArrayList<String>(Arrays.asList(super.getDebugInfo(player).strings));
str.add("layers: " + layers + ", liquid: " + currentLiquid + "/" + maxLiquid + ", direction: " + direction);
str.add("inUse: " + inUse + ", tick: " + tick);
@@ -138,8 +138,8 @@ public class SlimeGrass extends MantleBlock
public int idDropped (int metadata, Random random, int fortune)
{
if (metadata == 1)
return TRepo.craftedSoil.blockID;
else
return Block.dirt.blockID;
else
return TRepo.craftedSoil.blockID;
}
}