Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

L.J.Duckfield

Forge Modder
  • Posts

    54
  • Joined

  • Last visited

Everything posted by L.J.Duckfield

  1. i'd rather drop 'Item.wheat', but cant seem to drop it.
  2. I have been attempting to make an item drop at given co-ordinates from a block upon power, but have only been able to make the block drop a block as an item. i have been using this:- CompactWheat.dropBlockAsItem(world, x, y + 1, z, 3, 3); The Compact wheat is simply my block equivalent of the Wheat item, and is exchangeable in a Crafting grid. if anyone can help me on this matter, it would be greatly appreciated. Thank-you in advance
  3. I've been using the 'SetBlockWithMetaDataAndNotify' for adding a block to the world when my custom block is powered. This works. When the Custom block is powered off, I want the placed block to be removed from the world or replaced with air. Its likely to be a simple solution, and something i'm completely overlooking. But any help would be greatly appreciated.
  4. Upon connecting to my Forge Test server (which i test my mods in), i get a Client crash and error . Error Report Minecraft has crashed! ---------------------- Minecraft has stopped running because it encountered a problem; Unexpected error This error has been saved to C:\Users\Inspiron\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-20_23.02.58-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone. --- BEGIN ERROR REPORT c4a0b307 -------- Generated 20/08/12 23:02 - Minecraft Version: 1.3.2 - Operating System: Windows 7 (amd64) version 6.1 - Java Version: 1.7.0_05, Oracle Corporation - Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation - Memory: 464417008 bytes (442 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB) - JVM Flags: 2 total; -Xms512m -Xmx1024m - LWJGL: 2.4.2 - OpenGL: Intel(R) HD Graphics GL version 2.1.0 - Build 8.15.10.2622, Intel - Is Modded: Definitely; 'forge,fml' - Type: Client - Texture Pack: Default - Profiler Position: N/A (disabled) - World MpServer Entities: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - World MpServer Players: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - World MpServer Chunk Stats: MultiplayerChunkCache: 1 - Forced Entities: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - Retry Entities: 0 total; [] java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at wl.a(Chunk.java:1367) at asv.a(NetClientHandler.java:1090) at cp.a(SourceFile:135) at bb.b(TcpConnection.java:438) at asv.d(NetClientHandler.java:99) at atd.b(SourceFile:51) at net.minecraft.client.Minecraft.l(Minecraft.java:1774) at net.minecraft.client.Minecraft.J(Minecraft.java:831) at net.minecraft.client.Minecraft.run(Minecraft.java:761) at java.lang.Thread.run(Unknown Source) --- END ERROR REPORT 44529f21 ---------- Crash Report ---- Minecraft Crash Report ---- // Don't be sad. I'll do better next time, I promise! Time: 20/08/12 23:02 Description: Unexpected error java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at wl.a(Chunk.java:1367) at asv.a(NetClientHandler.java:1090) at cp.a(SourceFile:135) at bb.b(TcpConnection.java:438) at asv.d(NetClientHandler.java:99) at atd.b(SourceFile:51) at net.minecraft.client.Minecraft.l(Minecraft.java:1774) at net.minecraft.client.Minecraft.J(Minecraft.java:831) at net.minecraft.client.Minecraft.run(Minecraft.java:761) at java.lang.Thread.run(Unknown Source) Relevant Details: - Minecraft Version: 1.3.2 - Operating System: Windows 7 (amd64) version 6.1 - Java Version: 1.7.0_05, Oracle Corporation - Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation - Memory: 464417008 bytes (442 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB) - JVM Flags: 2 total; -Xms512m -Xmx1024m - LWJGL: 2.4.2 - OpenGL: Intel(R) HD Graphics GL version 2.1.0 - Build 8.15.10.2622, Intel - Is Modded: Definitely; 'forge,fml' - Type: Client - Texture Pack: Default - Profiler Position: N/A (disabled) - World MpServer Entities: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - World MpServer Players: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - World MpServer Chunk Stats: MultiplayerChunkCache: 1 - Forced Entities: 1 total; [atg['ljduckfield'/363, l='MpServer', x=255.50, y=70.18, z=243.50]] - Retry Entities: 0 total; []
  5. took me 2 seconds of looking at RedstoneOre to find this... /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Item.redstone.shiftedIndex; } if dropping one of your mods blocks, replace { return Item.redstone.shiftedIndex; } with... { return mod_XXXX.myItem.shiftedIndex; } so as i said, its in Redstone ore...as an example
  6. then think of a block that drops an item and look at its class. (Redstone being one) you should be able to work out what you need to do from there. if not, read up on some tutorials.
  7. If you don't understand how that could be helpful, then you are probably copy / paste "modding"...
  8. I am having some trouble with my new block. It needs to define a radius around itself and check whether any entity (creature / monster / player) is in the given radius. i have been trying to use:- if(world.getEntitiesWithinAABB, class, AxisAlignedBB){ //do something } else { //do something else } Any help would be greatly appreciated. Sorry if I'm missing something obvious.
  9. I still really enjoy using Risugami's Recipe book, wish there was an option inside NEI for Risugami's GUI 'look' for recipe mode.
  10. it means, read this or you may get banned... http://minecraftforge.net/forum/index.php/topic,20.0.html
  11. re-install forge on a clean *.jar, DON'T install modloader. then install the most recent version of forge, or a version you see fit.
  12. Thank-you, how i missed that is beyond me, My kids must have kept me on my feet today. works like a charm.
  13. basically, i use this for my solar panel, within my main mod and refer to it within the blocks class. It is to detect whether there is light at a full level at coordinates x,y+1,z (above the block 'solar panel') public static boolean isSolar(World world, int x, int y, int z, int blockID) { if(world.getBrightness(x, y + 1, z, 0) > .99)//fiddle with the .99 for brightness { return true; } else { return false; } } I am looking for something to replace world.getBrightness to check a position for water.
  14. I am trying to find out how i can make my custom block check its collision box for contact with another specific block, In my Case Water. Any help would be greatly appreciated.
  15. I highly doubt this is a forge related bug or error, more than likely one of the 40+ mods your using... Also Multi-MC isn't the most stable of applications. Try re-installing forge on a clean jar. then adding the mods maybe one at a time, until you know which mod is causing the problem...
  16. just found out i wasn't using the correct damage value to return the dye... my bad. thank-you
  17. I have read tutorials on Dye's many times, yet i'm still having some trouble using dye in a recipe. I aim receive a block , and input 1 piece of glass and a dye of a certain color through the recipe. I am using the following code, knowing that 'Item.dyePowder,1,3' refers to Bonemeal. ModLoader.addShapelessRecipe(new ItemStack(blockStainedGlass1, 1), new Object[] {(new ItemStack(Item.dyePowder,1 ,3)), (blockFramedGlass)}); Any help would be greatly appreciated, my stained glass mod is on hold until the recipe is working.
  18. surely you can resolve id's using the config files for the mods?
  19. http://minecraftforge.net/wiki/How_to_use_infinite_terrain_and_sprite_indexes#Prerequisites
  20. I must admit i am a complete 'newb' when it comes to java, i spend a good few hours a day looking through code and picking it up as i go along. I did look into what you said, and it seems there were two parts to my code for each crop that were complicating matters. This is how i have the code for each crop in the 'mod_XXXX.java' whereas beforehand, the bracketed value wasn't corresponding to the stage of growth it was meant to be representing. public static int blockCottonCrop0 = (0); public static int blockCottonCrop1 = (1); public static int blockCottonCrop2 = (2); public static int blockCottonCrop3 = (3); public static int blockCottonCrop4 = (4); public static int blockCottonCrop5 = (5); public static int blockCottonCrop6 = (6); public static int blockCottonCrop7 = (7); Secondly i created a new 'XXXXbonemealHandler' for each crop... rather than creating the one handler to deal with all crops in the mod. Noticing during tests that my first registered handler in the 'mod_XXXX.java' would actually grow the crop upon using bonemeal, i deleted the irrelevant 'BonemealHandlers' and added the data for each crop into the one file. Ran another test inside Eclipse and all worked correctly Thank-you for your patience, and ever-helpful responses. -EDIT - Tested after Re-obfuscation, also worked.
  21. Which mods are you talking about?... a mod you've developed yourself? or another persons mod?
  22. If it helps, this is my current BonemealHandler code package net.minecraft.src; import net.minecraft.src.forge.*; import net.minecraft.client.*; public class blockCarrotCropBonemealHandler implements IBonemealHandler { public boolean onUseBonemeal(World world, int blockID, int X, int Y, int Z) { if (!world.tickUpdates(true)) { ((blockCarrotCrop) ((blockCarrotCrop)mod_AbsolutCrop.blockCarrotCrop).setRequiresSelfNotify()).fertilize(world, X, Y, Z); } return true; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.