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.

Jeerdus

Members
  • Joined

  • Last visited

Everything posted by Jeerdus

  1. Aah! Just found out I had to type my modID lowercased. Stupid me...
  2. Nope. Still doesn't work (it does the same thing)
  3. Good day, I cannot figure out why I always get this error: [WARNING] [Minecraft-Client] Failed to load texture: Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png java.io.FileNotFoundException: Cyborg53373_Elementum:/textures/gui/cellingMachineGUI.png at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:31) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:41) at elementum.GuiCellingMachine.drawGuiContainerBackgroundLayer(GuiCellingMachine.java:36) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946) at net.minecraft.client.Minecraft.run(Minecraft.java:838) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) when I open my custom furnace. (but Minecraft doesn't crash) Basicly it doesn't load the texture (there are only the purple-black squares) Here's my GuiCellingMachine: package elementum; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; import elementum.Elementum; import elementum.ContainerCellingMachine; import elementum.ElementumGuiHandler; import elementum.TileEntityCellingMachine; import elementum.SlotInputCellingMachine; public class GuiCellingMachine extends GuiContainer { private ResourceLocation tif = new ResourceLocation("Cyborg53373_Elementum","/textures/gui/cellingMachineGUI.png"); private TileEntityCellingMachine inputMachineInventory; public GuiCellingMachine(InventoryPlayer inventoryplayer, TileEntityCellingMachine tileentityCellingMachine) { super(new ContainerCellingMachine(inventoryplayer, tileentityCellingMachine)); inputMachineInventory = tileentityCellingMachine; } protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRenderer.drawString(StatCollector.translateToLocal("Celling Machine"), 40, 6, 0x404040); fontRenderer.drawString(StatCollector.translateToLocal("Inventory"), 8, (ySize - 96) + 2, 0x404040); } protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); //mc.renderEngine.bindTexture(tif); Minecraft.getMinecraft().getTextureManager().bindTexture(tif); int l = (width - xSize) / 2; int i1 = (height - ySize) / 2; drawTexturedModalRect(l, i1, 0, 0, xSize, ySize); if (inputMachineInventory.isBurning()) { int j1 = inputMachineInventory.getBurnTimeRemainingScaled(12); drawTexturedModalRect(l + 56, (i1 + 36 + 12) - j1, 176, 12 - j1, 14, j1 + 2); } int k1 = inputMachineInventory.getCookProgressScaled(24); drawTexturedModalRect(l + 79, i1 + 34, 176, 14, k1 + 1, 16); } }
  4. Good day, I have a block and all I would want for it to do is that when I break it with my custom item it should drop different item then it normally drops when you break it with anything else. I tried this: public int idDropped(int id, Random rand, int idDropped, EntityPlayer player) { itemstack = player.getCurrentEquippedItem(); if (itemstack != null) { item = player.getCurrentEquippedItem().getItem(); if(item == Elementum.forgingHammer) return Elementum.cellingMachine.blockID; else return Block.blockIron.blockID; } return idDropped; } But it didn't work. Could anybody help me please?
  5. I have got the item I need to damage after using in a crafting table: package elementum; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemForgingHammer extends Item { private ItemStack emptyItem = null; public ItemForgingHammer(int id) { super(id); maxStackSize = 1; setMaxDamage(31); } @Override public boolean hasContainerItem() { return true; } public void setEmptyItem(ItemStack ei) { this.emptyItem = ei; } public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) { return false; } @Override public ItemStack getContainerItemStack(ItemStack stack) { int dmg = stack.getItemDamage(); if (dmg == 32) { return new ItemStack(stack.getItem(), 0, 32); } ItemStack tr = copyStack(stack, 1); tr.setItemDamage(dmg + 2); return tr; } public static ItemStack copyStack(ItemStack stack, int n) { return new ItemStack(stack.itemID, n, stack.getItemDamage()); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon(Elementum.modid + ":" + this.getUnlocalizedName().substring(5)); } } Here's the crafting recpie: GameRegistry.addRecipe(new ItemStack(ironPlate), new Object[]{ "X","Y", 'X', new ItemStack(Elementum.forgingHammer,1,-1), 'Y', Item.ingotIron }); The problem is that it doesn't want to craft after it's been used only once.
  6. Thank you for your help I figured it out!
  7. Good day, I would like to ask someone if they couldn't help me with an item, that gives you poison effect when it is in the inventory.
  8. Hmm... strange... I deleted the && corY > 48 bit from the for(int corY=0;corY < 64 && corY > 48; corY++) and it seems that it worked. Anyway, thanks for the help
  9. It checks the Y axis.
  10. May I ask what's the problem?
  11. I played with the code a bit and eventually I got to this: public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { int blockID; int corX; int corZ; for(int corY=0;corY < 64 && corY > 48; corY++) { for (int corX2=0;corX2 <= 16; corX2++){ for (int corZ2=0;corZ2 <= 16; corZ2++){ corX = chunkX*16 + corX2; corZ = chunkZ*16 + corZ2; blockID = world.getBlockId(corX, corY, corZ); if(blockID == Block.blockClay.blockID) { world.setBlock(corX, corY, corZ, Elementum.lithiumClay.blockID); } } } } } But that bloody thing still won't generate
  12. Ok, one last problem If I define corX and corZ like this: corX = chunkX*16; corZ = chunkZ*16; Then the block only generates at x:0 of that chunk and z:0 of that chunk. Is there a way to cover up the whole chunk? BTW, here's my code: http://paste.minecraftforge.net/view/4108ea8d
  13. Oh, I am so sorry for bothering you. I just realized I commented out "WorldGenLithium worldGen = new WorldGenLithium();" But really, thank you for your help
  14. I'm afraid that I'll need a code for that. How I said, I'm not that good in Java
  15. Thank you for your help, but now I'm actually looking for a way to randomly replace blocks in the world with chance.
  16. I've got idea. I could somehow go around the generation and somehow randomly replace generated Clay in the world. Is there any way to randomly replace blocks with chance in the world?
  17. Can you post your code by paste.minecraftforge.net?
  18. WOO! Somehow figured it out by myself Just had to change it, so it generates in sand, not in dirt Ok, so now I've got a different problem... It only generates once in the world (around spawn)
  19. Sorry to still bother you, but I just can't figure it out. My code looks something like this: http://paste.minecraftforge.net/view/cb33f6b2 And it's still not generating.
  20. I don't know what to change the par3, par4 and par5 to. http://paste.minecraftforge.net/view/54713356
  21. If I do that it starts screaming that it cannot be boolean.
  22. I tried implementing IWorldGenerator, but then it want's to add unimplemented methods. I add the "public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)" method and then I get completely stuck. I don't know what am I supposed to do. I'll give a cookie to someone who helps me with this.
  23. I've tried doing that. It says that "The method registerWorldGenerator(IWorldGenerator) in the type GameRegistry is not applicable for the arguments (WorldGenLithium)"
  24. Here's the main mod file: (I've removed all the blocks that aren't important) http://paste.minecraftforge.net/view/cade39d3 Here's the Lithium Clay code: http://paste.minecraftforge.net/view/e92fcf86 And finally here's the Lithium Clay Item code: http://paste.minecraftforge.net/view/d41fef46 The WorldGen file is basicly the same as WorldGenClay (only with modified block ids) http://paste.minecraftforge.net/view/834e1813 The problem is that I need to somehow define it in the main mod code for it to load up the WorldGenLithium file.

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.