Fixing Sanguine armour, adding some fancy rendering, doing other random bug fixes
This commit is contained in:
parent
4f9fad22c5
commit
14f9e3c61b
66 changed files with 2425 additions and 911 deletions
|
@ -18,9 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockOrientable extends BlockContainer
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon[] fireIcons;
|
||||
|
||||
public BlockOrientable()
|
||||
{
|
||||
super(Material.rock);
|
||||
|
@ -31,67 +28,11 @@ public class BlockOrientable extends BlockContainer
|
|||
//func_111022_d("AlchemicalWizardry:blocks");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.fireIcons = this.registerIconsWithString(iconRegister, "fireEffectBlock");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon[] registerIconsWithString(IIconRegister iconRegister, String blockString)
|
||||
{
|
||||
IIcon[] icons = new IIcon[7];
|
||||
|
||||
icons[0] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_input");
|
||||
icons[1] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_output");
|
||||
icons[2] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_upArrow");
|
||||
icons[3] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_downArrow");
|
||||
icons[4] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_leftArrow");
|
||||
icons[5] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_rightArrow");
|
||||
icons[6] = iconRegister.registerIcon("AlchemicalWizardry:" + blockString + "_blank");
|
||||
|
||||
return icons;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
IIcon[] icons = this.getIconsForMeta(meta);
|
||||
switch (side)
|
||||
{
|
||||
case 4: return icons[1];
|
||||
default: return icons[6];
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
/**
|
||||
* Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
|
||||
*/
|
||||
public IIcon getBlockTexture(IBlockAccess par1IBlockAccess, int x, int y, int z, int side)
|
||||
{
|
||||
TileEntity tile = par1IBlockAccess.getTileEntity(x, y, z);
|
||||
int meta = par1IBlockAccess.getBlockMetadata(x, y, z);
|
||||
|
||||
if(tile instanceof TEOrientable)
|
||||
{
|
||||
ForgeDirection input = ((TEOrientable)tile).getInputDirection();
|
||||
ForgeDirection output = ((TEOrientable)tile).getOutputDirection();
|
||||
|
||||
return this.getIconsForMeta(meta)[this.getTextureIndexForSideAndOrientation(side, input, output)];
|
||||
}
|
||||
|
||||
return this.getIcon(side, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int dunno)
|
||||
|
@ -99,11 +40,6 @@ public class BlockOrientable extends BlockContainer
|
|||
return new TEOrientable();
|
||||
}
|
||||
|
||||
public IIcon[] getIconsForMeta(int metadata)
|
||||
{
|
||||
return this.fireIcons;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
package WayofTime.alchemicalWizardry.common.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockReagentConduit extends BlockContainer
|
||||
{
|
||||
public BlockReagentConduit()
|
||||
{
|
||||
super(Material.rock);
|
||||
this.setBlockName("blockReagentConduit");
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
super.registerBlockIcons(iconRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
return new TEReagentConduit();
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
// {
|
||||
// if (this.equals(ModBlocks.blockSpellParadigm))
|
||||
// {
|
||||
// par3List.add(new ItemStack(par1, 1, 0));
|
||||
// par3List.add(new ItemStack(par1, 1, 1));
|
||||
// par3List.add(new ItemStack(par1, 1, 2));
|
||||
// par3List.add(new ItemStack(par1, 1, 3));
|
||||
// } else
|
||||
// {
|
||||
// super.getSubBlocks(par1, par2CreativeTabs, par3List);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float what, float these, float are)
|
||||
{
|
||||
return super.onBlockActivated(world, x, y, z, player, side, what, these, are);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
|
@ -21,29 +21,13 @@ public class BlockSpellParadigm extends BlockOrientable
|
|||
{
|
||||
public static final float minPos = (3f/16f);
|
||||
public static final float maxPos = (13f/16f);
|
||||
|
||||
IIcon[] projectileIcons = new IIcon[7];
|
||||
|
||||
public BlockSpellParadigm()
|
||||
{
|
||||
super();
|
||||
this.setBlockName("blockSpellParadigm");
|
||||
//setBlockBounds(minPos, minPos, minPos, maxPos, maxPos, maxPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.projectileIcons = this.registerIconsWithString(iconRegister, "projectileParadigmBlock");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Icon[] getIconsForMeta(int metadata)
|
||||
// {
|
||||
// return this.projectileIcons;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta)
|
||||
{
|
||||
|
@ -109,104 +93,4 @@ public class BlockSpellParadigm extends BlockOrientable
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
//TODO Need to make a renderer for the paradigm blocks and other spell blocks.
|
||||
/*
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, List arraylist, Entity par7Entity)
|
||||
{
|
||||
|
||||
setBlockBounds(minPos, minPos, minPos, maxPos, maxPos, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
|
||||
|
||||
TileEntity tile1 = world.getBlockTileEntity(i, j, k);
|
||||
if (tile1 instanceof TESpellParadigmBlock)
|
||||
{
|
||||
TESpellParadigmBlock tileG = (TESpellParadigmBlock) tile1;
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.WEST))
|
||||
{
|
||||
setBlockBounds(0.0F, minPos, minPos, maxPos, maxPos, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.EAST))
|
||||
{
|
||||
setBlockBounds(minPos, minPos, minPos, 1.0F, maxPos, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.DOWN))
|
||||
{
|
||||
setBlockBounds(minPos, 0.0F, minPos, maxPos, maxPos, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.UP))
|
||||
{
|
||||
setBlockBounds(minPos, minPos, minPos, maxPos, 1.0F, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.NORTH))
|
||||
{
|
||||
setBlockBounds(minPos, minPos, 0.0F, maxPos, maxPos, maxPos);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
if (tileG.isSideRendered(ForgeDirection.SOUTH))
|
||||
{
|
||||
setBlockBounds(minPos, minPos, minPos, maxPos, maxPos, 1.0F);
|
||||
super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
// float facadeThickness = TransportConstants.FACADE_THICKNESS;
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.EAST)) {
|
||||
// setBlockBounds(1 - facadeThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.WEST)) {
|
||||
// setBlockBounds(0.0F, 0.0F, 0.0F, facadeThickness, 1.0F, 1.0F);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.UP)) {
|
||||
// setBlockBounds(0.0F, 1 - facadeThickness, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.DOWN)) {
|
||||
// setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, facadeThickness, 1.0F);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.SOUTH)) {
|
||||
// setBlockBounds(0.0F, 0.0F, 1 - facadeThickness, 1.0F, 1.0F, 1.0F);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (tileG.hasFacade(ForgeDirection.NORTH)) {
|
||||
// setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, facadeThickness);
|
||||
// super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
|
||||
// }
|
||||
}
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -66,9 +66,9 @@ public class ImperfectRitualStone extends Block
|
|||
if (world.isRemote)
|
||||
{
|
||||
world.setRainStrength(1.0F);
|
||||
world.setThunderStrength(1.0f);
|
||||
}
|
||||
|
||||
world.setThunderStrength(1.0f);
|
||||
world.getWorldInfo().setThunderTime(0);
|
||||
world.getWorldInfo().setThundering(true);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue