Jump to content

TheMoleTractor

Members
  • Posts

    53
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

TheMoleTractor's Achievements

Stone Miner

Stone Miner (3/8)

1

Reputation

  1. Hi there! I just did a fresh install of forge and when I started up the client I got this... http://www.mediafire.com/view/3h3ih344ae6g698/IMAG0501.jpg Any ideas? Thanks!
  2. @Awesome_Spider @Jabelar @tiffit After 5-6 different tries of things (was looking at Blocks.getDamageValue(World, int, int, int) for help, didn't work) I finally got it. This would have gone a LOT faster if the darn tickUpdate wasn't so slow. I'll post the new, working code (removed that big ugly if structure and replaced it with some fancy for loops and a smaller if). Thanks so much everybody! Block lava = Blocks.lava; for(int i = -1; i <= 1; i++) for(int j = -1; j <= 1; j++) if(i != 0 & j != 0) if(!world.getBlock(x + i, y, z + j).equals(lava) || world.getBlockMetadata(x + i, y, z + j) != 0) return false; return true;
  3. Hi there! Back after a long hiatus for school! Anyways, on to the point. I am trying to have my block check each of the 8 spots around it (each diagonal and adjacent) for a lava block. My problem is flowing_lava is being treated the same as lava when I do my check. Block lava = Blocks.lava; // Check 8 sides around block and return if all are lava if(world.getBlock(x + 1, y, z).equals(lava) && world.getBlock(x - 1, y, z).equals(lava) && world.getBlock(x, y, z + 1).equals(lava) && world.getBlock(x, y, z - 1).equals(lava) && world.getBlock(x + 1, y, z + 1).equals(lava) && world.getBlock(x + 1, y, z - 1).equals(lava) && world.getBlock(x - 1, y, z + 1).equals(lava) && world.getBlock(x - 1, y, z - 1).equals(lava)) return true; I know there is a different block for each in the code currently but for some reason if I place a lava source block at two opposite corners and let the lava flow in the remaining 2 slots, the updateTick sees the setup as valid when it should not. Any ideas?
  4. Hello, I am trying to run a "bash gradlew build" for my mod, of which I have done before and it has worked fine. I have changed nothing but some of my source code inside eclipse. When trying to run the line above through Terminal I get this... Exception in thread "main" java.lang.NoClassDefFoundError: ?-Xmx4G? Caused by: java.lang.ClassNotFoundException: ?-Xmx4G? at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) No idea why...any help please? Quick Edit: Running "bash gradlew build" causes it but I also tried "bash gradlew" and clean, etc. etc. and they all give the same error. EDIT (solved): I cd'ed to the wrong directory (went to a fresh, empty directory), works fine.
  5. Fixed it... I was registering the blocks after I was registry the crafting recipes...stupid mistake I should have seen. Thanks anyways!
  6. Hello! I am getting a NullPointerException when trying to craft a TESR block I have, I have had (almost) the exact same crash from a previous, still unsolved, part of my mod when trying to render these TESR's in hand (link to that topic below) Crash Report: http://pastebin.com/k37aenHa Crafting class: http://pastebin.com/7NkDBJPg Previous Topic http://www.minecraftforge.net/forum/index.php?topic=21862.new;topicseen#new It appears to be crashing when rendering the item. As mentioned in the other topic, I am maintaining two mods and the other mod does the same things (code wise) and works perfectly fine. I am having a seething hunch that it is caused from my other mod being created fresh in 1.7.10 and the one giving me (a lot it turns out) of problems being updated from a non-gradle 1.6.4 version.
  7. Well each instance of these blocks that I'm attempting to render in hand has a TileEntity, Render (TESR), Model, ItemRender (rendering in hand class), and Block class associated with them, as well as a Base and ClientProxy class with code to initialize and register them. I'm going to post the Working and Un-Working code classes of Render, ItemRender, TileEntity, and the ClientProxy because I feel those are where something is wonky. I am happy to post any others though. Working Block TileEntity: Render: ItemRenderer: Client Proxy: Non-Working Block TileEntity: Render: ItemRenderer: ClientProxy: I may just be a little burnt out and missed something. Another note that may be important is the working one I built from scratch on the 1.7.10 gradle system while the not working one has been updated (over the past couple days) to 1.7.10 from 1.6.4. (Didn't use gradle previously) EDIT: Got it working, in my base class I was initializing my full TileEntity before I initialized the two TileEntities I was using in my Render class; resulting in a null for the Rendering Item in the one field. Bit of a further explanation, my block was not placed, a different block was placed and a second block was right clicked and "put on top" to create the TileEntity I was having issues with. Trying to rendering the productions TileEntity before I had initialized the TileEntity for the other two was causing the problems. Anyways, it all works now, solved! Huge thanks for Nephroid for the help pin pointing where and why the problem was occurring.
  8. I guess I'm really just confused at why my other mod works perfectly without having to declare/assign the func_147501_a yet this one does. I mean I see exactly what you are talking about and I now know why it is giving the null pointer (thanks a ton for the feedback by the way), I just don't understand why it works in one case but doesn't in another, and because it does not work in this case while the other does, I do not know quite how to solve the issue. I have never worked with the TileEntityRendererDispatcher (the single argument for the func_147497_a method that assigns the above variable) before.
  9. The line calling the bindTexture method is from a method I did not create and is offered from, I believe, Minecraft Vanilla. I would understand it calling a null if neither the in-hand nor the placed version of my block were not working but the odd part is that if I do not use a special, in-hand renderer, the block is placeable and looks as it should in the world but does not render anything in hand (not blank, but the default missing texture purple and black texture). I'll post the code that my object is calling. It is overriding an existing method so I did not create my own bindTexture method. I'll toss a null check around the bindTexture, and although I'm sure that will remove my crash, I don't believe it will do much more.
  10. Hello! I am trying to make my custom block (a staff) render in hand. Unfortunately, while it renders perfectly when placed, the game is crashing when I try to add the ItemRender class and I have no idea why. I am currently working on two mods and the one mod I have working with in-hand rendering but the newer one is giving a NullPointer on the "this.bindTexture(texture);" line, which I can't figure out why. Does anyone have any ideas? I'd love hear them. I'll paste my Render class below Renderer class Line 44 (this.bindTexture(stickTexture) is throwing the null pointer but it uses the same call as my other mod does and the other mod works fine. All the folders are set up the same as well (resources/assets/*modName*/textures/tileentity/*TESR*.png)
  11. Hello, I am trying to sync my sever and client with an integer value saved through an NBTTagCompound in my TileEntity class. I can confirm that the value is being saved on the server side but I can't seem to get the server to send the value through the SimpleNetworkWrapper. @Mod class lines: public static SimpleNetworkWrapper network; In my preInit: (It's the first thing in this method) network = NetworkRegistry.INSTANCE.newSimpleChannel(MODID); network.registerMessage(PacketHandler.class, MagmaChargePacket.class, 0, Side.SERVER); Packet class: http://pastebin.com/miCkmKm3 PacketHandler class: http://pastebin.com/zcm0gDN5 TileEntity class: http://pastebin.com/taKLHKJg I'm getting no errors, it just appears to simply not be working at all.
  12. Hello, I am trying to set up my eclipse environment to handle 2 mods separately (i.e. be able to swap between the two by switching the workspace) but when I try to set up two different workspaces they end up being the same project. Should I just follow the main tutorial and set up a fresh environment and try again or is there something special I can do? Thanks!
  13. One more thing I feel I didn't make clear was that the model itself is not rendering, which I feel is the issue (obvious? lol maybe). The IItemRenderer is not rendering the model in my inventory at all and I feel like it is not being called upon although I have the MinecraftForgeClient.registerItemRenderer(); clearly implemented directly below the ClientRegistry.bindTileEntitySpecialRenderer(); In-game the model works when placed but is not shown in hand. Something is going wacky with the implementation of that IItemRenderer class but I don't know what EDIT: GAHH!!! I tried changing the .registerItemRenderer's first argument to an actual item from my mod and the item rendered the 3d model perfectly. One step closer...I now know that the Item.getItemFromBlock() call seems a bit whooey. Any suggestions would be great. EDIT 2: [FIXED] Ok! So I fiddled some more...In my @Mod class (for anyone interested) I had my ClientRegistry proxy call BEFORE my blocks GameRegistrys. I moved the proxy call below the block GameRegistrys and it works! Hooray! Thanks again TGG for the help!
  14. When you say I have not implemented it correctly, what files should I be looking into? I assume the ItemRender class but can't see anything causing issues there. Is the ItemRender class supposed to be registered in the @Mod class? I have it registered in my ClientRegistry class but I also have my ClientRegistry implemented into my @Mod class. EDIT: Quick edit, thank you so much for the link, these are some very interesting reads
×
×
  • Create New...

Important Information

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