Fixed language and creative tabs
This commit is contained in:
parent
0c26e84808
commit
97c117b7c3
|
@ -1,5 +1,5 @@
|
|||
# English @author Calclavia
|
||||
|
||||
itemGroup.resonantinduction.name=Resonant Induction
|
||||
itemGroup.resonantinduction=Resonant Induction
|
||||
|
||||
tile.resonantinduction:\tesla.name=Tesla Coil
|
||||
tile.resonantinduction\:tesla.name=Tesla Coil
|
|
@ -5,6 +5,7 @@ import java.util.Arrays;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import resonantinduction.tesla.BlockTesla;
|
||||
import resonantinduction.tesla.TileEntityTesla;
|
||||
|
@ -66,7 +67,7 @@ public class ResonantInduction
|
|||
public static final String ITEM_TEXTURE_DIRECTORY = TEXTURE_DIRECTORY + "items/";
|
||||
public static final String MODEL_TEXTURE_DIRECTORY = TEXTURE_DIRECTORY + "models/";
|
||||
|
||||
public static final String LANGUAGE_DIRECTORY = TEXTURE_DIRECTORY + "/languages";
|
||||
public static final String LANGUAGE_DIRECTORY = TEXTURE_DIRECTORY + "languages/";
|
||||
public static final String[] LANGUAGES = new String[] { "en_US" };
|
||||
|
||||
/**
|
||||
|
@ -113,12 +114,14 @@ public class ResonantInduction
|
|||
|
||||
GameRegistry.registerTileEntity(TileEntityTesla.class, blockTesla.getUnlocalizedName());
|
||||
this.proxy.registerRenderers();
|
||||
|
||||
TabRI.ITEMSTACK = new ItemStack(blockTesla);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent evt)
|
||||
{
|
||||
LOGGER.fine("Loaded:" + loadLanguages(LANGUAGE_DIRECTORY, LANGUAGES));
|
||||
LOGGER.fine("Languages Loaded:" + loadLanguages(LANGUAGE_DIRECTORY, LANGUAGES));
|
||||
|
||||
metadata.modId = ID;
|
||||
metadata.name = NAME;
|
||||
|
@ -126,6 +129,8 @@ public class ResonantInduction
|
|||
metadata.url = "http://universalelectricity.com";
|
||||
metadata.version = VERSION + BUILD_VERSION;
|
||||
metadata.authorList = Arrays.asList(new String[] { "Calclavia", "Aidancbrady" });
|
||||
metadata.logoFile = "/";
|
||||
metadata.credits = "Thanks to Archadia for the assets.";
|
||||
metadata.autogenerated = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@ package resonantinduction.render;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.tesla.BlockTesla;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -23,7 +28,15 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
if (block instanceof BlockTesla)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.5, 1.5, 0.5);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(RenderTesla.TEXTURE_BOTTOM);
|
||||
RenderTesla.MODEL_BOTTOM.render(0.0625f);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,34 +55,39 @@ public class TileEntityTesla extends TileEntityBase implements ITesla
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws power from furnace below it.
|
||||
*
|
||||
* @author Calclavia
|
||||
*/
|
||||
TileEntity tileEntity = this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord - 1, this.zCoord);
|
||||
|
||||
if (tileEntity instanceof TileEntityFurnace)
|
||||
{
|
||||
TileEntityFurnace furnaceTile = (TileEntityFurnace) tileEntity;
|
||||
int burnTime = TileEntityFurnace.getItemBurnTime(furnaceTile.getStackInSlot(1));
|
||||
|
||||
if (burnTime > 0)
|
||||
boolean doBlockStateUpdate = false;
|
||||
|
||||
if (furnaceTile.furnaceBurnTime == 0)
|
||||
{
|
||||
boolean doBlockStateUpdate = false;
|
||||
|
||||
if (furnaceTile.furnaceBurnTime == 0)
|
||||
int burnTime = TileEntityFurnace.getItemBurnTime(furnaceTile.getStackInSlot(1));
|
||||
if (burnTime > 0)
|
||||
{
|
||||
furnaceTile.decrStackSize(1, 1);
|
||||
furnaceTile.furnaceBurnTime = burnTime;
|
||||
doBlockStateUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
furnaceTile.furnaceBurnTime--;
|
||||
}
|
||||
|
||||
if (doBlockStateUpdate)
|
||||
{
|
||||
BlockFurnace.updateFurnaceBlockState(furnaceTile.furnaceBurnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
|
||||
doBlockStateUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.transfer(ResonantInduction.POWER_PER_COAL / 20);
|
||||
furnaceTile.furnaceBurnTime--;
|
||||
}
|
||||
|
||||
if (doBlockStateUpdate)
|
||||
{
|
||||
|
||||
BlockFurnace.updateFurnaceBlockState(furnaceTile.furnaceBurnTime > 0, furnaceTile.worldObj, furnaceTile.xCoord, furnaceTile.yCoord, furnaceTile.zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue