More 1.5 work

This commit is contained in:
pahimar 2013-03-04 22:18:15 -05:00
parent e3f6491c4f
commit 1116fb6351
18 changed files with 95 additions and 56 deletions

View file

@ -144,7 +144,7 @@ public class EquivalentExchange3 {
proxy.initRenderingAndTextures(); proxy.initRenderingAndTextures();
// Load the Transmutation Stone recipes // Load the Transmutation Stone recipes
RecipesTransmutationStone.init(); //RecipesTransmutationStone.init();
// Register the Fuel Handler // Register the Fuel Handler
GameRegistry.registerFuelHandler(new FuelHandler()); GameRegistry.registerFuelHandler(new FuelHandler());

View file

@ -33,11 +33,11 @@ public class ModBlocks {
redWaterStill = new BlockRedWaterStill(BlockIds.RED_WATER_STILL); redWaterStill = new BlockRedWaterStill(BlockIds.RED_WATER_STILL);
redWaterFlowing = new BlockRedWaterFlowing(BlockIds.RED_WATER_STILL - 1); redWaterFlowing = new BlockRedWaterFlowing(BlockIds.RED_WATER_STILL - 1);
GameRegistry.registerBlock(calcinator, Strings.CALCINATOR_NAME); //GameRegistry.registerBlock(calcinator, Strings.CALCINATOR_NAME);
GameRegistry.registerBlock(aludel, Strings.ALUDEL_NAME); //GameRegistry.registerBlock(aludel, Strings.ALUDEL_NAME);
GameRegistry.registerBlock(alchemicalChest, Strings.ALCHEMICAL_CHEST_NAME); //GameRegistry.registerBlock(alchemicalChest, Strings.ALCHEMICAL_CHEST_NAME);
GameRegistry.registerBlock(redWaterStill, Strings.RED_WATER_STILL_NAME); //GameRegistry.registerBlock(redWaterStill, Strings.RED_WATER_STILL_NAME);
GameRegistry.registerBlock(redWaterFlowing, Strings.RED_WATER_FLOWING_NAME); //GameRegistry.registerBlock(redWaterFlowing, Strings.RED_WATER_FLOWING_NAME);
initBlockRecipes(); initBlockRecipes();

View file

@ -95,7 +95,7 @@ public class ConfigurationHandler {
ItemIds.MINIUM_SHARD = configuration.getItem(Strings.MINIUM_SHARD_NAME, ItemIds.MINIUM_SHARD_DEFAULT).getInt(ItemIds.MINIUM_SHARD_DEFAULT); ItemIds.MINIUM_SHARD = configuration.getItem(Strings.MINIUM_SHARD_NAME, ItemIds.MINIUM_SHARD_DEFAULT).getInt(ItemIds.MINIUM_SHARD_DEFAULT);
ItemIds.INERT_STONE = configuration.getItem(Strings.INERT_STONE_NAME, ItemIds.INERT_STONE_DEFAULT).getInt(ItemIds.INERT_STONE_DEFAULT); ItemIds.INERT_STONE = configuration.getItem(Strings.INERT_STONE_NAME, ItemIds.INERT_STONE_DEFAULT).getInt(ItemIds.INERT_STONE_DEFAULT);
ItemIds.MINIUM_STONE = configuration.getItem(Strings.MINIUM_STONE_NAME, ItemIds.MINIUM_STONE_DEFAULT).getInt(ItemIds.MINIUM_STONE_DEFAULT); ItemIds.MINIUM_STONE = configuration.getItem(Strings.MINIUM_STONE_NAME, ItemIds.MINIUM_STONE_DEFAULT).getInt(ItemIds.MINIUM_STONE_DEFAULT);
ItemIds.PHILOSOPHER_STONE = configuration.getItem(Strings.PHILOSOPHER_STONE_NAME, ItemIds.PHILOSOPHER_STONE_DEFAULT).getInt(ItemIds.PHILOSOPHER_STONE_DEFAULT); ItemIds.PHILOSOPHER_STONE = configuration.getItem(Strings.PHILOSOPHERS_STONE_NAME, ItemIds.PHILOSOPHER_STONE_DEFAULT).getInt(ItemIds.PHILOSOPHER_STONE_DEFAULT);
ItemIds.ALCHEMY_DUST = configuration.getItem(Strings.ALCHEMY_DUST_NAME, ItemIds.ALCHEMY_DUST_DEFAULT).getInt(ItemIds.ALCHEMY_DUST_DEFAULT); ItemIds.ALCHEMY_DUST = configuration.getItem(Strings.ALCHEMY_DUST_NAME, ItemIds.ALCHEMY_DUST_DEFAULT).getInt(ItemIds.ALCHEMY_DUST_DEFAULT);
ItemIds.ALCHEMY_BAG = configuration.getItem(Strings.ALCHEMY_BAG_NAME, ItemIds.ALCHEMY_BAG_DEFAULT).getInt(ItemIds.ALCHEMY_BAG_DEFAULT); ItemIds.ALCHEMY_BAG = configuration.getItem(Strings.ALCHEMY_BAG_NAME, ItemIds.ALCHEMY_BAG_DEFAULT).getInt(ItemIds.ALCHEMY_BAG_DEFAULT);

View file

@ -86,7 +86,7 @@ public class ConfigurationSettings {
// The maximum durability for the Philosophers Stone // The maximum durability for the Philosophers Stone
public static int PHILOSOPHERS_STONE_MAX_DURABILITY; public static int PHILOSOPHERS_STONE_MAX_DURABILITY;
public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHER_STONE_NAME; public static final String PHILOSOPHERS_STONE_MAX_DURABILITY_CONFIGNAME = Strings.PHILOSOPHERS_STONE_NAME;
public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001; public static final int PHILOSOPHERS_STONE_MAX_DURABILITY_DEFAULT = 10001;
/* /*

View file

@ -7,13 +7,10 @@ import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import com.pahimar.ee3.lib.Sprites;
import cpw.mods.fml.client.FMLClientHandler;
public class RenderUtils { public class RenderUtils {
private static int rotationAngle = 0; private static int rotationAngle = 0;
@ -51,11 +48,12 @@ public class RenderUtils {
int itemID = stack.itemID; int itemID = stack.itemID;
int meta = stack.getItemDamage(); int meta = stack.getItemDamage();
int iconIndex = stack.getIconIndex(); Icon iconIndex = stack.getIconIndex();
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
renderEngine.bindTexture(renderEngine.getTexture(stack.getItem().getTextureFile())); // FIXME
//renderEngine.bindTexture(renderEngine.getTexture(stack.getItem().getTextureFile()));
int overlayColour = Item.itemsList[itemID].getColorFromItemStack(stack, 0); int overlayColour = Item.itemsList[itemID].getColorFromItemStack(stack, 0);
float var17 = (float) (overlayColour >> 16 & 255) / 255.0F; float var17 = (float) (overlayColour >> 16 & 255) / 255.0F;
@ -64,7 +62,7 @@ public class RenderUtils {
GL11.glColor4f(var17, var16, var12, opacity); GL11.glColor4f(var17, var16, var12, opacity);
drawTexturedQuad(x, y, iconIndex % 16 * 16, iconIndex / 16 * 16, 16, 16, -90, scale); //drawTexturedQuad(x, y, iconIndex % 16 * 16, iconIndex / 16 * 16, 16, 16, -90, scale);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
} }

View file

@ -3,16 +3,12 @@ package com.pahimar.ee3.core.helper;
import java.util.ArrayList; import java.util.ArrayList;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockSand;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemLeaves;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import com.pahimar.ee3.core.handlers.EquivalencyHandler; import com.pahimar.ee3.core.handlers.EquivalencyHandler;
import com.pahimar.ee3.lib.Sounds;
/** /**
* TransmutationHelper * TransmutationHelper
@ -32,7 +28,7 @@ public class TransmutationHelper {
public static boolean transmuteInWorld(World world, EntityPlayer player, ItemStack stack, int x, int y, int z, int targetID, int targetMeta) { public static boolean transmuteInWorld(World world, EntityPlayer player, ItemStack stack, int x, int y, int z, int targetID, int targetMeta) {
if (Block.blocksList[targetID] != null) { if (Block.blocksList[targetID] != null) {
world.setBlockAndMetadataWithNotify(x, y, z, targetID, targetMeta); world.setBlockAndMetadataWithNotify(x, y, z, targetID, targetMeta, 2);
return true; return true;
} }

View file

@ -132,9 +132,6 @@ public class ClientProxy extends CommonProxy {
RenderIds.aludelRenderId = RenderingRegistry.getNextAvailableRenderId(); RenderIds.aludelRenderId = RenderingRegistry.getNextAvailableRenderId();
RenderIds.alchemicalChestRenderId = RenderingRegistry.getNextAvailableRenderId(); RenderIds.alchemicalChestRenderId = RenderingRegistry.getNextAvailableRenderId();
MinecraftForgeClient.preloadTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.BLOCK_SPRITE_SHEET);
MinecraftForgeClient.preloadTexture(Sprites.SPRITE_SHEET_LOCATION + Sprites.ITEM_SPRITE_SHEET);
MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new ItemCalcinatorRenderer()); MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new ItemCalcinatorRenderer());
MinecraftForgeClient.registerItemRenderer(BlockIds.ALUDEL, new ItemAludelRenderer()); MinecraftForgeClient.registerItemRenderer(BlockIds.ALUDEL, new ItemAludelRenderer());
MinecraftForgeClient.registerItemRenderer(BlockIds.ALCHEMICAL_CHEST, new ItemAlchemicalChestRenderer()); MinecraftForgeClient.registerItemRenderer(BlockIds.ALCHEMICAL_CHEST, new ItemAlchemicalChestRenderer());

View file

@ -106,4 +106,18 @@ public class AlchemicalBagSavedData extends WorldSavedData implements IInventory
} }
@Override
// public boolean hasCustomName()
public boolean func_94042_c() {
return false;
}
@Override
// public boolean canInsertSide(int i, ItemStack itemStack)
public boolean func_94041_b(int i, ItemStack itemstack) {
return false;
}
} }

View file

@ -1,20 +1,15 @@
package com.pahimar.ee3.item; package com.pahimar.ee3.item;
import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper; import net.minecraft.util.Icon;
import net.minecraft.world.World; import net.minecraft.world.World;
import com.pahimar.ee3.EquivalentExchange3; import com.pahimar.ee3.EquivalentExchange3;
import com.pahimar.ee3.core.helper.NBTHelper; import com.pahimar.ee3.core.helper.NBTHelper;
import com.pahimar.ee3.lib.Colours;
import com.pahimar.ee3.lib.GuiIds; import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Strings; import com.pahimar.ee3.lib.Strings;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -51,22 +46,25 @@ public class ItemAlchemyBag extends ItemEE {
} }
@Override @Override
public Icon getIconIndex(ItemStack itemStack, int renderPass) { @SideOnly(Side.CLIENT)
public Icon getIcon(ItemStack itemStack, int renderPass) {
// If the bag is open
if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) { if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMY_BAG_GUI_OPEN)) {
if (renderPass == 0) { if (renderPass == 0) {
return this.iconIndex + 2; return this.iconIndex;
} }
else { else {
return this.iconIndex + 1 + 2; return this.iconIndex;
} }
} }
// Else, the bag is closed
else { else {
if (renderPass == 0) { if (renderPass == 0) {
return this.iconIndex; return this.iconIndex;
} }
else { else {
return this.iconIndex + 1; return this.iconIndex;
} }
} }
} }

View file

@ -1,9 +1,12 @@
package com.pahimar.ee3.item; package com.pahimar.ee3.item;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import com.pahimar.ee3.lib.Reference; import com.pahimar.ee3.lib.Reference;
import com.pahimar.ee3.lib.Sprites;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/** /**
* ItemEE * ItemEE
@ -20,8 +23,13 @@ public class ItemEE extends Item {
super(id - Reference.SHIFTED_ID_RANGE_CORRECTION); super(id - Reference.SHIFTED_ID_RANGE_CORRECTION);
maxStackSize = 1; maxStackSize = 1;
setTextureFile(Sprites.SPRITE_SHEET_LOCATION + Sprites.ITEM_SPRITE_SHEET);
setNoRepair(); setNoRepair();
} }
@Override
@SideOnly(Side.CLIENT)
// public void setIconIndex(IconRegister iconRegister)
public void func_94581_a(IconRegister iconRegister) {
this.iconIndex = iconRegister.func_94245_a(Reference.MOD_ID.toLowerCase() + ":"+ this.getUnlocalizedName());
}
} }

View file

@ -37,7 +37,7 @@ public class ItemPhilosopherStone extends ItemEE
public ItemPhilosopherStone(int id) { public ItemPhilosopherStone(int id) {
super(id); super(id);
this.setUnlocalizedName(Strings.PHILOSOPHER_STONE_NAME); this.setUnlocalizedName(Strings.PHILOSOPHERS_STONE_NAME);
this.setCreativeTab(EquivalentExchange3.tabsEE3); this.setCreativeTab(EquivalentExchange3.tabsEE3);
this.setMaxDamage(ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY - 1); this.setMaxDamage(ConfigurationSettings.PHILOSOPHERS_STONE_MAX_DURABILITY - 1);
this.maxChargeLevel = 3; this.maxChargeLevel = 3;

View file

@ -30,19 +30,19 @@ public class ModItems {
public static void init() { public static void init() {
/* Initialize each mod item individually */ /* Initialize each mod item individually */
miniumShard = new ItemMiniumShard(ItemIds.MINIUM_SHARD); //miniumShard = new ItemMiniumShard(ItemIds.MINIUM_SHARD);
inertStone = new ItemInertStone(ItemIds.INERT_STONE); inertStone = new ItemInertStone(ItemIds.INERT_STONE);
miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE); //miniumStone = new ItemMiniumStone(ItemIds.MINIUM_STONE);
philStone = new ItemPhilosopherStone(ItemIds.PHILOSOPHER_STONE); //philStone = new ItemPhilosopherStone(ItemIds.PHILOSOPHER_STONE);
alchemyDust = new ItemAlchemyDust(ItemIds.ALCHEMY_DUST); //alchemyDust = new ItemAlchemyDust(ItemIds.ALCHEMY_DUST);
alchemyBag = new ItemAlchemyBag(ItemIds.ALCHEMY_BAG); //alchemyBag = new ItemAlchemyBag(ItemIds.ALCHEMY_BAG);
miniumStone.setContainerItem(miniumStone); //miniumStone.setContainerItem(miniumStone);
philStone.setContainerItem(philStone); //philStone.setContainerItem(philStone);
GameRegistry.addRecipe(new ItemStack(inertStone), new Object[] { "sis", "igi", "sis", Character.valueOf('s'), Block.stone, Character.valueOf('i'), Item.ingotIron, Character.valueOf('g'), Item.ingotGold }); //GameRegistry.addRecipe(new ItemStack(inertStone), new Object[] { "sis", "igi", "sis", Character.valueOf('s'), Block.stone, Character.valueOf('i'), Item.ingotIron, Character.valueOf('g'), Item.ingotGold });
GameRegistry.addRecipe(new ItemStack(miniumStone), new Object[] { "sss", "sis", "sss", Character.valueOf('s'), miniumShard, Character.valueOf('i'), inertStone }); //GameRegistry.addRecipe(new ItemStack(miniumStone), new Object[] { "sss", "sis", "sss", Character.valueOf('s'), miniumShard, Character.valueOf('i'), inertStone });
} }
} }

View file

@ -11,7 +11,7 @@ package com.pahimar.ee3.lib;
*/ */
public class Localizations { public class Localizations {
private static final String LANG_RESOURCE_LOCATION = "/com/pahimar/ee3/lang/"; private static final String LANG_RESOURCE_LOCATION = "/mods/ee3/lang/";
public static String[] localeFiles = { public static String[] localeFiles = {
LANG_RESOURCE_LOCATION + "cs_CZ.xml", LANG_RESOURCE_LOCATION + "cs_CZ.xml",

View file

@ -3,10 +3,10 @@ package com.pahimar.ee3.lib;
public class Sprites { public class Sprites {
// Base file pathes // Base file pathes
public static final String SPRITE_SHEET_LOCATION = "/com/pahimar/ee3/art/sprites/"; public static final String SPRITE_SHEET_LOCATION = "/mods/ee3/textures/items/";
public static final String MODEL_SHEET_LOCATION = "/com/pahimar/ee3/art/models/"; public static final String MODEL_SHEET_LOCATION = "/mods/ee3/textures/models/";
public static final String ARMOR_SHEET_LOCATION = "/com/pahimar/ee3/art/armor/"; public static final String ARMOR_SHEET_LOCATION = "/mods/ee3/textures/armor/";
public static final String GUI_SHEET_LOCATION = "/com/pahimar/ee3/art/gui/"; public static final String GUI_SHEET_LOCATION = "/mods/ee3/textures/gui/";
// Item/Block sprite sheets // Item/Block sprite sheets
public static final String ITEM_SPRITE_SHEET = "ee3_items.png"; public static final String ITEM_SPRITE_SHEET = "ee3_items.png";

View file

@ -38,11 +38,11 @@ public class Strings {
public static final String RED_WATER_FLOWING_NAME = "redWaterFlowing"; public static final String RED_WATER_FLOWING_NAME = "redWaterFlowing";
/* Item name constants */ /* Item name constants */
public static final String MINIUM_SHARD_NAME = "miniumShard"; public static final String MINIUM_SHARD_NAME = "shardMinium";
public static final String INERT_STONE_NAME = "inertStone"; public static final String INERT_STONE_NAME = "stoneInert";
public static final String MINIUM_STONE_NAME = "miniumStone"; public static final String MINIUM_STONE_NAME = "stoneMinium";
public static final String PHILOSOPHER_STONE_NAME = "philStone"; public static final String PHILOSOPHERS_STONE_NAME = "stonePhilosophers";
public static final String ALCHEMY_DUST_NAME = "alchemyDust"; public static final String ALCHEMY_DUST_NAME = "dustAlchemy";
public static final String ALCHEMY_BAG_NAME = "alchemyBag"; public static final String ALCHEMY_BAG_NAME = "alchemyBag";
/* TileEntity name constants */ /* TileEntity name constants */

View file

@ -130,4 +130,18 @@ public class TileAludel extends TileEE implements IInventory {
} }
nbtTagCompound.setTag("Items", tagList); nbtTagCompound.setTag("Items", tagList);
} }
@Override
// public boolean hasCustomName()
public boolean func_94042_c() {
return false;
}
@Override
// public boolean canInsertSide(int i, ItemStack itemStack)
public boolean func_94041_b(int i, ItemStack itemstack) {
return true;
}
} }

View file

@ -130,4 +130,18 @@ public class TileCalcinator extends TileEE implements IInventory {
} }
nbtTagCompound.setTag("Items", tagList); nbtTagCompound.setTag("Items", tagList);
} }
@Override
// public boolean hasCustomName()
public boolean func_94042_c() {
return false;
}
@Override
// public boolean canInsertSide(int i, ItemStack itemStack)
public boolean func_94041_b(int i, ItemStack itemstack) {
return true;
}
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB