Jump to content

TheDoctorSoda

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by TheDoctorSoda

  1. Thanks! What I want to do is have a few localisations such as metal.tin and metal.copper, and match them with component.plate and component.powder, so I can combine them to make Tin Plate, Tin Powder, Copper Plate, Copper Powder, etc.
  2. So how would I localise an item's name in code, as opposed to a language file?
  3. This is somewhat difficult to explain. Basically, I want to dynamically assign textures to a few items. I have it all done, however I do not know how to do this one bit: Let me show you an image first, then I will explain. Let's say I have texture A, and I want to replace the green part with texture C. What I want to happen, is it to replace the green part, and replace that part with the exact spot from texture c. Same thing for textures B and C. How would I go about doing this? (Note: these are simply demonstrative images, not the actual textures I wish to use. Also, sorry if this is an awful explanation.) Also, while I know this is possible in 1.7, is this even a thing that you can do in 1.8? Haven't messed with the model files much, but wouldn't you need a model file for each item? That would mean it couldn't be dynamic... To clarify, I want to do this on 1.7.10, but I am curious about the possibility of doing this on 1.8.8 as well.
  4. So I was wondering how I would check if a block is registered under a certain ore dictionary entry. I assume there's a simple answer? EDIT: There's a really good example below, for future googlers!
  5. I don't get why this isn't working! public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { if (!world.isRemote) { player.displayGUIWorkbench(x, y, z); } return true; }
  6. The icons I am referring to: http://i.imgur.com/mghuSE1.png
  7. How do you remove items from the ore dictionary? Specifically, I want to remove dustRedstone from redstone dust.
  8. I am interested in replacing an item's onItemUse method, in this particular case, I want to prevent redstone dust from placing redstone.
  9. Right now, I am registering my seeds with ItemSeeds and I enter the two parameters crop block and soil block. The soil block can only use one block (as far as I know) and I would like these seeds to be able to be planted on dirt, grass, farmland, podzol, etc. How would I go about this?
  10. Nevermind I am a failure and apparently forgot to call my tile entity registry class in my main mod class
  11. That's the only method in my class, but whatever, here's the full one https://gist.github.com/TheDoctorSoda/64ae68d20da74981e5db Tile Entity is registered and works perfectly fine until I relog, and it doesn't work until I replace the block.
  12. Here's the code for my tile entity class. I honestly don't see why it wouldn't work https://gist.github.com/TheDoctorSoda/927b3943b458270447d2
  13. I have a tile entity that constantly is checking if a certain block is above it, and if so, it breaks it. The block however no longer does this after the world is closed, and reopened, and you must break and replace the block to make it function again. Am I stupid?
  14. Hmm. Should I add a new enchantment called the same thing, and does the same thing that only works on my item, or is that bad?
  15. Title says it, basically. I created a mod that adds bows with attack damage. A user suggested that it can get both sword enchants and bow enchants. Because I am extending the ItemBow class, it can get power (and other bow enchants), but not sword enchantments (obviously). How would I go about doing this?
  16. ... .setBlockBounds(). Once I changed it from this.setBlockBounds(0F, 0F, 0F, 0.4F, 1F, 0.4F); to this.setBlockBounds(0.6F, 0F, 0.6F, 0.4F, 1F, 0.4F); is when this occurs. Am I missing something very obvious? Here's the block class: And it works, however you cannot break the block because it has no hitbox.
  17. These are popping up for every single item and block I have registered. Not quite sure what it means, but I assume it has something to do with how I am registering the items and blocks? Here's the errors: This error comes up twice for each item/block: [server thread/WARN] [FML]: Unable to lookup mechconstruct:copperOre for public static com.thedoctorsoda.mechconstruct.block.BlockBuildingTDS com.thedoctorsoda.mechconstruct.init.ModBlocks.copperOre. Is there something wrong with the registry? as well as one of these for every item/block: [Client thread/WARN] [FML]: **************************************** [Client thread/WARN] [FML]: * Illegal extra prefix item.mechconstruct for name item.mechconstruct:bronze_ingot, invalid registry invocation/invalid name? [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:805) [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143) [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131) [Client thread/WARN] [FML]: * at com.thedoctorsoda.mechconstruct.init.ModItems.init(ModItems.java:103) [Client thread/WARN] [FML]: * at com.thedoctorsoda.mechconstruct.mechanicalconstruct.preInit(mechanicalconstruct.java:32) [Client thread/WARN] [FML]: * at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)... [Client thread/WARN] [FML]: **************************************** I should note, this is not a crash, just errors in the console that I don't know what they mean. Does anyone know what they're trying to tell me? Here's how I am registering my items: GameRegistry.registerItem(bronzeIngot, bronzeIngot.getUnlocalizedName()); and bronzeIngot is assigned like this: public static final ItemMaterialTDS bronzeIngot = (ItemMaterialTDS) new ItemMaterialTDS().setUnlocalizedName(Names.BRONZEINGOT); (PS: Sorry formatting is all screwed up, the buttons weren't working to help format it.)
  18. Thanks a load, I just realised that I didn't import minecraft's entity. Also, it's not that I removed @Override, I forgot to add it in the first place Works perfectly now, thanks guys!
  19. I forgot that, but when I added it I got this error: "The method onUpdate(ItemStack, World, Entity, int, boolean) of type heartMK1 must override or implement a supertype method" Do I need to add it to my item superclass?
  20. I'm probably an idiot, but why isn't this working? http://pastebin.com/JRxiuGZG Also, if I did get this working, how would I convert an Entity to EntityPlayer?
  21. I added an item (x) to my mod, and I want y (the action) to happen when x is in my inventory. I've tried event handlers, but there has to be a simpler way, right?
×
×
  • Create New...

Important Information

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