Jump to content

meganmorgangames

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by meganmorgangames

  1. From the IC2 website http://ic2api.player.to:8080/job/IC2_experimental/ "Builds after #397 are for MC 1.7." Thermal Expansion is on CoFH's webiste http://www.teamcofh.com/ It looks like they haven't updated to 1.7, yet, but there is a section there "For Modders"
  2. Try changing the the package assets.extratools.textures.items Also, you might want to make certain that your modid is "extratools" [coolboy actually beat me to this] It's a really good idea to great a static class that references your mod id, mod name, and version number package com.mmg.candymod.lib; public class Strings { public static final String MODID = "extratools"; public static final String MODNAME = "Extra Tools"; public static final String VERSION = "0.1"; } That way, when you have to reference any of that information, it will always be correct. Then your texture would be setTextureName(Strings.MODID + ":EnderShard"); This is assuming that the EnderShard texture is in your assets.extratools.textures.items folder is named "EnderShard.png"
  3. Just shooting off the hip here TileEntity te = this.worldObj.getBlockTileEntity(this.xCoord+1, this.yCoord, this.zCoord); if (te != null){ if (te instanceof TileEntityWire){ (TileEntityWire)te.yourmethodhere; } } Don't copy and paste it that, though. I just typed it up here so it might not follow proper syntax.
  4. Your folder name should be the same as your modid, which looks like it is "extratools". Java is case sensitive.
  5. In Eclipse, if you highlight the object (i.e. ItemStack) and press F3 (in Windows, don't know anything about Mac or Linux) it will open the class for you. At least that is how I've been doing it.
  6. So, I'm trying to create a custom block that is effected by gravity and can be colored. I've got the gravity part down, I just extended BlockFalling. I looked at BlockColored and copied the body, renamed the variables that I knew what they were doing for easier reference, and created the appropriate textures for the block Only things I didn't rename were func_150032_b and func_150031_c, as I have no idea what they are doing. I haven't done anything special while registering the block (Which may be where the problem is). I created a simple little dirt to custom block with metavalue 2 to see if it works. The block looks fine in inventory, but when I place it, it renders the neutral texture. I get the colored texture back when I break it. I'm guessing that somehow I have to pass the meta value on to the block, but I have no idea how, or if I should register it in some way to recognize the meta value from inventory. I'm sure this is an uber noobish question, but I'm stuck :-/ [edit] Okay. So I figured out I need another class extending ItemBlockWithMetaData. I register in PreInit with: GameRegistry.registerBlock(blockSugarCrystals, ItemBlockSugarCrystals.class, blockSugarCrystals.getUnlocalizedName()); Now the game crashes, probably because I'm registering wrong :-/ Just in case, though Crash Report [edit again] Okay. Digging around I found out that the problem was that the compiler was looking for a Block argument in the constructor. I changed it to the following and it works like a dream:
  7. Progress continues, and thank you for your patience. So, I figured out the best way to cancel it if the stacks aren't exactly right (item and size) was to create a class that implemented IRecipe, and it works like a charm. I'm still using the ItemCraftedEvent (After fixing the loop...I feel like an idiot sometimes, I should have caught that, especially considering it is only a 2 slot recipe, meaning a crafting table isn't even nessicary) to decrease the stack size by the additional 15 (Also should have caught that). Only thing left is getting the GUI to show the actual stack sizes and not what it thinks they should be :-/ This almost did the trick, it takes away 16 strings but now it is only showing that it took away 15 strings in the GUI. Kind of the exact opposite problem from what I had before. I'm certain that I'm calling detectAndSendChanges wrong, or at the wrong time, or in the wrong listener...I make things way more complicated than they need to be...lol Anyway. Thank you for being so very patient with me. I'm gonna continue to try and hammer this out after I make breakfast for the family, but any advice you can offer is greatly appreciated. Applauds and Thank You to both of you [edit] Okay. I'm completely lost now :-/ It works fine the first time I craft the fuses, but then for some reason the result stacksize is set to 0, and the fuses I just crafted stacksize is set to 0. I'm not really sure what I've done wrong...Really starting to think trying to make fuses this way is a bad idea...lol
  8. Makes sense. So I figured out how to create the event handler, and have it registered. So that much is out of the way. I have the listener in place First point of interest. Is that the most efficient way to do that? Is this going to cause conflict with things like NEI? Second point of interest. The stack is decreased, but it doesn't show on the crafting table. The item amount is decreased when I return the strings to my inventory, however. How should I refresh this? Third point of interest. The evt.setCanceled is commented out because it crashed the game. How should I tell the listener not to craft the item? Sorry for sounding so needy. Usually I can find all the answers I need on Google, but sometime my Google-Fu is not strong. Thanks for all the help
  9. Obviously didn't work. I'm trying to get the recipe to each 16 strings and 1 gunpowder to return 16 fuses. Is there an easy way to do this?
  10. Hey. Know I'm replying to a solved thread, but I have a question about the solution. Most of it makes sense, but I'm unclear as to what function 149730_j is checking (which is probably why my blocks are still all facing the same direction). Also not really sure why we use the value "2" for the flag, but I'm sure that's something internal that I don't really need to know. Anyway. Some clarification on the function would be great so I can troubleshoot the mod that I'm working on Thank you. [edit] Okay, I figured it out. Stored the block's metadata a bit differently: Then my Render class I modified as follows: And it works like a...magical...something...that works...working... Anyway. Thanks for pointing me in the right direction
  11. Just a guess (Not by any means an expert, or even know what I'm doing), but does adding the following help? this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
  12. I think I figured it out. My trace of the Owner value on the mob came up with Player followed by an incrementally larger number. I think it is because I am in a developer environment. It never even occurred to me that I never actually login when I'm testing my mod.
  13. I've been looking through the EntityWolf class, and I see where it sets the wolf to Tame, but I can't figure out how it knows what player has tamed it. In my mob, I'm certain I could just pass the EntityPlayer along, but doesn't that change when the player logs out and logs back in again? Anyway. Any ideas how I can tie a player to an instance of an entity? [edit] It took some digging, but I found the line this.setOwner(par1EntityPlayer.getCommandSenderName()); [edit again] Bah! Used that method to set the owner of my mob, and when I logged in and out EntityPlayer.getCommandSenderName() was a different value. Is there any static value that follows the player?
  14. Worked like a charm, and now I know should I run into a similar problem. Thank you
  15. This is probably just me not knowing enough about Java, but I'm trying to get some custom actions to take place when the player collects the item from my crafting table. I figure slotClicked is the method that I want to use, but the trace I have in place calls twice when I grab the item from the table. Is the method that I am using, and I get my trace twice.
  16. Don't know what was wrong, but I found a much better tutorial for creating custom containers: http://www.minecraftforum.net/topic/1959857-162-advanced-minecraft-forge-modding-tutorial-2-inventories/ more of a step by step of what the different methods are doing rather than the "here is the code" of the other tutorial I found. Works like a charm, and I'm ready to start tweaking it to do what I want it to do
  17. Kind of following the tutorial on Containers and GUI, only really changing the names of certain things so that when I dig down into the code and start experimenting I can turn it into my final product. I'm pretty sure I copied everything right, but I might not have. Anyway I'm getting a null pointer exception, and not really sure where it is coming from. Main Mod Block Tile Entity Container Gui There were two methods in the Tile Entity that were implemented but not covered in the tutorial, but I'm pretty sure they aren't being called. My texture path might not be right, but I also tried "textures/gui/guiTest.png" and "summoner/textures/gui/guiTest.png". I'm not extremely Java savy, but I know my way around. Mostly I just mess with code to figure out how it works (when it works). Any help is greatly appreciated. Thank you.
×
×
  • Create New...

Important Information

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