Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BlueGhast90

Members
  • Joined

  • Last visited

Everything posted by BlueGhast90

  1. Sorry, my mistake import java.util.List; import org.lwjgl.input.Keyboard; import AeroMod.common.blocks.AquaBlueBlock; import AeroMod.common.blocks.BrightYellowBlock; import AeroMod.common.blocks.CoalBlock; import AeroMod.common.blocks.EmeraldGreenBlock; import AeroMod.common.blocks.GUIBlock; import AeroMod.common.blocks.WaterstoneBlock; import AeroMod.Entity.EntityGrenade; import AeroMod.Ore.RubyOre; import AeroMod.Ore.WaterStoneOre; import AeroMod.Tutorial.TileEntity.TileEntityGrinder; import AeroMod.common.AeroModFuelHandler; import AeroMod.common.AeroModGuiHandler; import AeroMod.common.WorldGeneration.WaterStoneOreWorldGeneration; import AeroMod.common.tools.EnumToolMaterials; import AeroMod.common.tools.ItemWaterStoneAxe; import AeroMod.common.tools.ItemWaterStoneHoe; import AeroMod.common.tools.ItemWaterStonePickaxe; import AeroMod.common.tools.ItemWaterStoneShovel; import AeroMod.common.tools.ItemWaterStoneSword; import AeroMod.common.tools.ItemWaterStoneBow; import com.google.common.collect.Lists; import net.minecraft.block.Block; import net.minecraft.client.settings.KeyBinding; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.KeyBindingRegistry; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="AeroMod",name="Tutorial Mod",version="v1") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class AeroMod { public static CreativeTabs DecorativeBlocksTab = new DecorativeBlocksTab(CreativeTabs.getNextID(), "Decorative Blocks Tab"); public static WaterStoneOreWorldGeneration GenWorld = new WaterStoneOreWorldGeneration(); public static Item ItemWaterStone; public static Item ItemWaterStoneBow; public static Item ItemGrenade; public static Item IngotSteel; public static Item ItemWaterStonePickaxe; public static Item ItemWaterStoneSword; public static Item ItemWaterStoneAxe; public static Item ItemWaterStoneShovel; public static Item ItemWaterStoneHoe; public static Block RubyOre; public static Block CoalBlock; public static Block WaterStoneBlock; public static Block AquaBlueBlock; public static Block BrightYellowBlock; public static Block EmeraldGreenBlock; public static Block WaterStoneOre; public static Block GUIBlock; @Instance("AeroMod") public static AeroMod instance; @Init public void load(FMLInitializationEvent event){ // items Skip |ID Numbers 2256 - 2267| ItemWaterStone = new WaterstoneItem(2014).setUnlocalizedName("WaterStone"); ItemGrenade = new GrenadeItem(2019).setUnlocalizedName("ItemGrenade"); IngotSteel = new IngotSteel(2020).setUnlocalizedName("IngotSteel"); //blocks WaterStoneBlock = new WaterstoneBlock(2015, "WaterStoneBlock").setUnlocalizedName("WaterStoneBlock").setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F); CoalBlock = new CoalBlock(2016, "CoalBlock").setUnlocalizedName("CoalBlock").setHardness(3.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F); AquaBlueBlock = new AquaBlueBlock(2026, "AquaBlueBlock").setUnlocalizedName("AquaBlueBlock").setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F); BrightYellowBlock = new BrightYellowBlock(2027, "BrightYellowBLock").setUnlocalizedName("BrightYellowBlock").setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F); EmeraldGreenBlock = new EmeraldGreenBlock(2028, "EmeraldGreenBlock").setUnlocalizedName("EmeraldGreenBlock").setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setResistance(10.0F); GUIBlock = new GUIBlock(2031, "GUIBlock").setUnlocalizedName("GUIBlock").setHardness(2.0F).setStepSound(Block.soundMetalFootstep); //Ore WaterStoneOre = new WaterStoneOre(2029, "WaterStoneOre").setUnlocalizedName("WaterStoneOre").setCreativeTab(CreativeTabs.tabBlock).setHardness(10.0F).setResistance(10.0F).setLightValue(1.0F); MinecraftForge.setBlockHarvestLevel(WaterStoneOre, "pickaxe", 1); RubyOre = new RubyOre(2030, "RubyOre").setUnlocalizedName("RubyOre").setCreativeTab(CreativeTabs.tabBlock).setHardness(10.0F).setResistance(10.0F).setLightValue(1.0F); MinecraftForge.setBlockHarvestLevel(RubyOre, "pickaxe", 1); //Tools ItemWaterStonePickaxe = new ItemWaterStonePickaxe(2021, EnumToolMaterials.WaterStone).setUnlocalizedName("ItemWaterStonePickaxe").setCreativeTab(CreativeTabs.tabTools); ItemWaterStoneSword = new ItemWaterStoneSword(2022, EnumToolMaterials.WaterStone).setUnlocalizedName("ItemWaterStoneSword").setCreativeTab(CreativeTabs.tabCombat); ItemWaterStoneAxe = new ItemWaterStoneAxe(2023, EnumToolMaterials.WaterStone).setUnlocalizedName("ItemWaterStoneAxe").setCreativeTab(CreativeTabs.tabTools); ItemWaterStoneShovel = new ItemWaterStoneShovel(2024, EnumToolMaterials.WaterStone).setUnlocalizedName("ItemWaterStoneShovel").setCreativeTab(CreativeTabs.tabTools); ItemWaterStoneHoe = new ItemWaterStoneHoe(2025, EnumToolMaterials.WaterStone).setUnlocalizedName("ItemWaterStoneHoe").setCreativeTab(CreativeTabs.tabTools); ItemWaterStoneBow = new ItemWaterStoneBow(2017).setUnlocalizedName("WaterStoneBow"); //adding names LanguageRegistry.addName(ItemWaterStone, "Water Stone"); LanguageRegistry.addName(WaterStoneBlock, "Waterstone Block"); LanguageRegistry.addName(CoalBlock, "Coal Block"); LanguageRegistry.addName(ItemWaterStoneBow, "Waterstone Bow"); LanguageRegistry.addName(IngotSteel, "Steel Ingot"); LanguageRegistry.addName(ItemGrenade, "Grenade"); LanguageRegistry.addName(ItemWaterStonePickaxe, "WaterStone Pickaxe"); LanguageRegistry.addName(ItemWaterStoneSword, "WaterStone Sword"); LanguageRegistry.addName(ItemWaterStoneAxe, "WaterStone Axe"); LanguageRegistry.addName(ItemWaterStoneShovel, "WaterStone Shovel"); LanguageRegistry.addName(ItemWaterStoneHoe, "WaterStone Hoe"); LanguageRegistry.addName(AquaBlueBlock, "AquaBlue Block"); LanguageRegistry.addName(BrightYellowBlock, "BrightYellow Block"); LanguageRegistry.addName(EmeraldGreenBlock, "EmeraldGreen Block"); LanguageRegistry.addName(WaterStoneOre, "WaterStone Ore"); LanguageRegistry.addName(RubyOre, "Ruby Ore"); LanguageRegistry.addName(GUIBlock, "GUI Block"); //Blocks GameRegistry.registerBlock(WaterStoneBlock, "Waterstone Block"); GameRegistry.registerBlock(CoalBlock, "Coal Block"); GameRegistry.registerBlock(AquaBlueBlock, "AquaBlue Block"); GameRegistry.registerBlock(BrightYellowBlock, "BrightYellow Block"); GameRegistry.registerBlock(EmeraldGreenBlock, "EmeraldGreen Block"); GameRegistry.registerBlock(WaterStoneOre, "WaterStone Ore"); GameRegistry.registerBlock(RubyOre, "Ruby Ore"); GameRegistry.registerBlock(GUIBlock, "GUI Block"); GameRegistry.registerWorldGenerator(GenWorld); GameRegistry.registerFuelHandler(new AeroModFuelHandler()); GameRegistry.registerTileEntity(TileEntityGrinder.class, "containergrinder"); NetworkRegistry.instance().registerGuiHandler(this, new AeroModGuiHandler()); //Recipes GameRegistry.addRecipe(new ItemStack(WaterStoneBlock,1), new Object[] { "TTT","TTT","TTT",'T',ItemWaterStone}); GameRegistry.addRecipe(new ItemStack(ItemWaterStoneBow, 1), new Object[] { " TX", "T X", " TX",'T',ItemWaterStone, 'X',Item.silk}); GameRegistry.addRecipe(new ItemStack(ItemGrenade,1), new Object[] { "XTX","XTX","XXX",'T',Item.gunpowder, 'X', IngotSteel}); GameRegistry.addRecipe(new ItemStack(ItemWaterStonePickaxe, 1), new Object[] {"TTT"," X "," X ",'T',ItemWaterStone, 'X',Item.stick}); GameRegistry.addRecipe(new ItemStack(ItemWaterStoneSword, 1), new Object[] {"TTT"," X "," X ",'T',ItemWaterStone, 'X',Item.stick}); GameRegistry.addRecipe(new ItemStack(ItemWaterStoneAxe, 1), new Object[] {"TTT"," X "," X ",'T',ItemWaterStone, 'X',Item.stick}); GameRegistry.addRecipe(new ItemStack(ItemWaterStoneShovel, 1), new Object[] {"TTT"," X "," X ",'T',ItemWaterStone, 'X',Item.stick}); GameRegistry.addRecipe(new ItemStack(ItemWaterStoneHoe, 1), new Object[] {"TTT"," X "," X ",'T',ItemWaterStone, 'X',Item.stick}); GameRegistry.addRecipe(new ItemStack(AquaBlueBlock, 1), new Object[] {"TTT","TTT","TTT",'T', Item.stick,}); //MultiBlock + Dye GameRegistry.addRecipe(new ItemStack(GUIBlock, 1), new Object[] {"TTT","SRS","TTT", 'T', Item.ingotIron, 'S', IngotSteel, 'R',Item.redstone }); //Smelting GameRegistry.addSmelting(Item.ingotIron.itemID, new ItemStack(IngotSteel, 1), 2F); GameRegistry.addSmelting(WaterStoneOre.blockID, new ItemStack(ItemWaterStone, 4), 2F); //Entitys EntityRegistry.registerModEntity(EntityGrenade.class, "Grenade", EntityRegistry.findGlobalUniqueEntityId(), this, 128, 1, true); LanguageRegistry.instance().addStringLocalization("entity.Grenade.name", "Grenade"); } }
  2. This is my @Instance @Instance("AeroMod") public static AeroMod instance;
  3. using the furnace code, setting the front the default direction seems to work
  4. I have tried for days to get this to work, but I cant seem to make it work. Help would be appreciated I have tried this but It doesnt seem to help http://www.minecraftforge.net/wiki/Containers_and_GUIs Block Class import java.util.Random; import AeroMod.Tutorial.AeroMod; import AeroMod.Tutorial.TileEntity.TileEntityGrinder; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.src.ModLoader; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class GUIBlock extends Block { public GUIBlock(int par1, String texture) { super(par1, Material.rock); setCreativeTab(CreativeTabs.tabBlock); } public int idDropped(int par1, Random par2Random, int par3) { return AeroMod.GUIBlock.blockID; } public int quantityDropped(Random random) { return 1; } public String getTextureFile(){ return "/textures/blocks/GUIBlock.png"; } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity == null || player.isSneaking()) { return true; } player.openGui(AeroMod.instance, 0, world, x, y, z); return true; } @Override public void breakBlock(World world, int x, int y, int z, int par5, int par6) { dropItems(world, x, y, z); super.breakBlock(world, x, y, z, par5, par6); } public TileEntity createNewTileEntity(World world) { return new TileEntityGrinder(); } private void dropItems(World world, int x, int y, int z){ Random rand = new Random(); TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (!(tileEntity instanceof IInventory)) { return; } IInventory inventory = (IInventory) tileEntity; for (int i = 0; i < inventory.getSizeInventory(); i++) { ItemStack item = inventory.getStackInSlot(i); if (item != null && item.stackSize > 0) { float rx = rand.nextFloat() * 0.8F + 0.1F; float ry = rand.nextFloat() * 0.8F + 0.1F; float rz = rand.nextFloat() * 0.8F + 0.1F; EntityItem entityItem = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.itemID, item.stackSize, item.getItemDamage())); if (item.hasTagCompound()) { entityItem.getEntityItem().setTagCompound((NBTTagCompound) item.getTagCompound().copy()); } float factor = 0.05F; entityItem.motionX = rand.nextGaussian() * factor; entityItem.motionY = rand.nextGaussian() * factor + 0.2F; entityItem.motionZ = rand.nextGaussian() * factor; world.spawnEntityInWorld(entityItem); item.stackSize = 0; } } } } Tile Entity Class import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; public class TileEntityGrinder extends TileEntity implements IInventory { private ItemStack[] inv; public TileEntityGrinder(){ inv = new ItemStack[9]; } @Override public int getSizeInventory() { return inv.length; } @Override public ItemStack getStackInSlot(int slot) { return inv[slot]; } @Override public void setInventorySlotContents(int slot, ItemStack stack) { inv[slot] = stack; if (stack != null && stack.stackSize > getInventoryStackLimit()) { stack.stackSize = getInventoryStackLimit(); } } @Override public ItemStack decrStackSize(int slot, int amt) { ItemStack stack = getStackInSlot(slot); if (stack != null) { if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); } else { stack = stack.splitStack(amt); if (stack.stackSize == 0) { setInventorySlotContents(slot, null); } } } return stack; } @Override public ItemStack getStackInSlotOnClosing(int slot) { ItemStack stack = getStackInSlot(slot); if (stack != null) { setInventorySlotContents(slot, null); } return stack; } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64; } @Override public void openChest() {} @Override public void closeChest() {} @Override public void readFromNBT(NBTTagCompound tagCompound) { super.readFromNBT(tagCompound); NBTTagList tagList = tagCompound.getTagList("Inventory"); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i); byte slot = tag.getByte("Slot"); if (slot >= 0 && slot < inv.length) { inv[slot] = ItemStack.loadItemStackFromNBT(tag); } } } @Override public void writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); NBTTagList itemList = new NBTTagList(); for (int i = 0; i < inv.length; i++) { ItemStack stack = inv[i]; if (stack != null) { NBTTagCompound tag = new NBTTagCompound(); tag.setByte("Slot", (byte) i); stack.writeToNBT(tag); itemList.appendTag(tag); } } tagCompound.setTag("Inventory", itemList); } @Override public String getInvName() { return "AeroMod.TileEntityGrinder"; } @Override public boolean isInvNameLocalized() { return false; } @Override public boolean isStackValidForSlot(int i, ItemStack itemstack) { return false; } } Container Class import cpw.mods.fml.common.FMLLog; import AeroMod.Tutorial.TileEntity.TileEntityGrinder; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnace; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.tileentity.TileEntityFurnace; public class ContainerGrinder extends Container { protected TileEntityGrinder tileEntity; public ContainerGrinder (InventoryPlayer inventoryPlayer, TileEntityGrinder te){ tileEntity = te; //the Slot constructor takes the IInventory and the slot number in that it binds to //and the x-y coordinates it resides on-screen for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { addSlotToContainer(new Slot(tileEntity, j + i * 3, 62 + j * 18, 17 + i * 18)); } } //commonly used vanilla code that adds the player's inventory bindPlayerInventory(inventoryPlayer); } @Override public boolean canInteractWith(EntityPlayer par1EntityPlayer){ return this.tileEntity.isUseableByPlayer(par1EntityPlayer); } protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for (int i = 0; i < 9; i++) { addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142)); } } @Override public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(par2); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (par2 == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (par2 != 1 && par2 != 0) { if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) { if (!this.mergeItemStack(itemstack1, 0, 1, false)) { return null; } } else if (TileEntityFurnace.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { return null; } } else if (par2 >= 3 && par2 < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return null; } } else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(par1EntityPlayer, itemstack1); } return itemstack; } } Gui Class import org.lwjgl.opengl.GL11; import AeroMod.Tutorial.Container.ContainerGrinder; import AeroMod.Tutorial.TileEntity.TileEntityGrinder; import cpw.mods.fml.relauncher.*; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.StatCollector; import net.minecraft.client.gui.inventory.*; @SideOnly(Side.CLIENT) public class GuiGrinder extends GuiContainer { public GuiGrinder (InventoryPlayer inventoryPlayer, TileEntityGrinder tileEntity) { super(new ContainerGrinder(inventoryPlayer, tileEntity)); } @Override protected void drawGuiContainerForegroundLayer(int param1, int param2) { fontRenderer.drawString("Ore Grinder", 8, 6, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture("/gui/grinder.png"); int posX = (this.width - this.xSize) / 2; int posY = (this.height - this.ySize) / 2; this.drawTexturedModalRect(posX, posY, 0, 0, this.xSize, this.ySize); int i1; if (this.furnaceInventory.isBurning()) { i1 = this.furnaceInventory.getBurnTimeRemainingScaled(12); this.drawTexturedModalRect(posX + 56, posY + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2); } i1 = this.furnaceInventory.getCookProgressScaled(24); this.drawTexturedModalRect(posX + 79, posY + 34, 176, 14, i1 + 1, 16); } private TileEntityFurnace furnaceInventory; } Guihandler Class import AeroMod.Tutorial.Container.ContainerGrinder; import AeroMod.Tutorial.Gui.GuiGrinder; import AeroMod.Tutorial.TileEntity.TileEntityGrinder; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.network.IGuiHandler; public class AeroModGuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if(tileEntity instanceof TileEntityGrinder){ return new ContainerGrinder(player.inventory, (TileEntityGrinder) tileEntity); } return null; } @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if(tileEntity instanceof TileEntityGrinder){ return new GuiGrinder(player.inventory, (TileEntityGrinder) tileEntity); } return null; } }
  5. in your return statement (return 300) change the number to whatever you want
  6. Try putting this in your main class file public static CreativeTabs Epsilon = new Epsilon(CreativeTabs.getNextID(), "Epsilon"); This works for me
  7. I tried it again and it works, thanks Mew and ChiBill for all the help
  8. By the way, would it be possible to make a block a fuel (like the Coal Block in 1.6), because i keep getting a cannot make a static reference to a non-static object error
  9. Thank you very much, i have been searching for days and It works
  10. which Base do I import
  11. Anyone know if their was a a way to add a new fuel? (Similar to the new Coal Block) I have searched many sites and I haven't found anything that works in 1.5.2 Any help would be appreciated
  12. Getting testy are we As I have said I am a noob and don't know anything about forge, i have been looking at the popups, but don't understand them
  13. what do you mean javadoc?
  14. I put my material in their, but it still gives me an error (The constructor Waterstoneblock(int, Block) is undefined
  15. I'm having a hard time understand you, your English is bad
  16. I know this a noob question, but all the tutorials I have come across confuse me and I recently came from modloader, so Forge kind of confuses me. Could anyone explain it too me I have a class started, but I am getting errors that I cant seem to solve Class package AeroMod.Tutorial; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class WaterStoneblock extends Block { public WaterStoneblock(int part1, Material par2Material) { super(part1, par2Material); this.setCreativeTab(CreativeTabs.tabBlock); } } In my main Class (My error is underlined) waterstoneblock = [u]new WaterStoneblock(506)[/u].setUnlocalizedName("waterstoneblock"); LanguageRegistry.addName(waterstoneblock, "WaterStone Block"); GameRegistry.registerBlock(waterstoneblock, waterstoneblock.getUnlocalizedName2()); Help is very appreciated
  17. Wow, Thanks Ives I got almost all of them to render, the only one i cant get to render is the original bow texture I would also like to thank Zetal for all your hard work and support, I really appreciate it. I think I can fix it from here. I really appreciate the help Edit: I got it to work by making a copy of the original bow image and renaming it azulbow_0 to fix the broken animation in the icon section
  18. Sorry for the late night, but i went to ItemBow ans copy/pasted the super.updateIcons(par1IconRegister); from that and it worked somehow The main bow renders as usual, but the rest don't. I've tried changing the return image to both 2 & 3. but no luck Here's my code again if you can find anything else ** Left out imports to save space ** public class AzulBow extends Item { public static final String[] bowPullIconNameArray = new String[] {"azulbow_1", "azulbow_2", "azulbow_3"}; @SideOnly(Side.CLIENT) private Icon[] iconArray; public AzulBow(int par1) { super(par1); this.maxStackSize = 1; this.setMaxDamage(384); this.setCreativeTab(CreativeTabs.tabCombat); } /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) { int j = this.getMaxItemUseDuration(par1ItemStack) - par4; ArrowLooseEvent event = new ArrowLooseEvent(par3EntityPlayer, par1ItemStack, j); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return; } j = event.charge; boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0; if (flag || par3EntityPlayer.inventory.hasItem(Item.arrow.itemID)) { float f = (float)j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F); if (f == 1.0F) { entityarrow.setIsCritical(true); } int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack); if (k > 0) { entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D); } int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack); if (l > 0) { entityarrow.setKnockbackStrength(l); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0) { entityarrow.setFire(100); } par1ItemStack.damageItem(1, par3EntityPlayer); par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityarrow.canBePickedUp = 2; } else { par3EntityPlayer.inventory.consumeInventoryItem(Item.arrow.itemID); } if (!par2World.isRemote) { par2World.spawnEntityInWorld(entityarrow); } } } public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { return par1ItemStack; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 72000; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.bow; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { ArrowNockEvent event = new ArrowNockEvent(par3EntityPlayer, par1ItemStack); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(Item.arrow.itemID)) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); } return par1ItemStack; } /** * Return the enchantability factor of the item, most of the time is based on material. */ public int getItemEnchantability() { return 1; } private Icon[] azulbow = new Icon[4]; @SideOnly(Side.CLIENT) public void updateIcons(IconRegister par1IconRegister) { super.registerIcons(par1IconRegister); itemIcon = par1IconRegister.registerIcon("TutorialMod:" + this.getUnlocalizedName().substring(5) + "_0"); for (int N = 0; N < 4; N++) { this.azulbow[N] = par1IconRegister.registerIcon("TutorialMod:" + this.getUnlocalizedName().substring(5) + "_" + N); } } public Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining){ { if(player.getItemInUse() == null) return this.itemIcon; int time = stack.getMaxItemUseDuration() - useRemaining; if (time >= 18) { return azulbow[3]; } else if (time > 13) { return azulbow[2]; } else if (time > 0) { return azulbow[1]; } return azulbow[3]; } }} Thanks again, I really appreciated it
  19. i moved @SideOnly(Side.CLIENT) down, but the error is still their When I hover over it, it gives me The Method updateIcons(IconRegister) is undefined for the type item
  20. I get an error for the "updateIcons" and I dont get what you mean by default Sorry I am just beginning to Mod with Forge, so I'm not so good with the Terms (Method, Icon....)
  21. It also gives me this 2013-05-09 23:23:14 [WARNING] [Minecraft-Server] Can't keep up! Did the system time change, or is the server overloaded?
  22. sorry about that, i misplaced the code you gave me... In the console it gives me [ForgeModLoader]Forge Mod Loader has detected an older LWJGL version, new advanced texture animation features are disabled 2013-05-09 23:21:07 [iNFO] [ForgeModLoader] Not using advanced OpenGL 4.3 advanced capability for animations : OpenGL 4.3 is not available also when I right click, it shows numbers (assuming those are for timing)
  23. I am trying to Make the bow animated and I have all three bow animated textures, but when I right click the bow, it disappers and it shoots an arrow then the bow comes back Here's my code Some help would be greatly appreciated

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.