Jump to content

Choonster

Moderators
  • Posts

    5123
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. Extend BlockBush (or the appropriate subclass) and override getCollisionBoundingBox to return the same thing as the implementation in Block .
  2. You still have a syntax error in your model. Did you remove the semicolon?
  3. As the log says, you have a syntax error in your redstonesword model (an unclosed string with a semicolon after it). JSONLint will tell you what the problem is in more detail.
  4. Rendering of the fishing line and bobber is done in RenderFish .
  5. You'll probably need to make your own recipe class that implements IRecipe (extending an existing implementation will simplify things) and override IRecipe#getRemainingItems to return an array containing the container item for each slot (if any) and your custom remaining item for any slot containing the appropriate vanilla item. ForgeHooks.defaultRecipeGetRemainingItems will create and fill an array of the container items, so you can just search for the vanilla item. If you extend an existing shaped/shapeless recipe class, you can probably just call super.getRemainingItems instead of the ForgeHooks method. Make sure you register your recipe class with RecipeSorter.register .
  6. If it's your own item that should give something back, you need to use the container item system. I've written an example of an unbreaking container item (never breaks) and a breaking container item (breaks after a fixed number of uses). You can see how to use them in recipes here. These examples are for 1.7.10, but should work in 1.8 as well.
  7. I don't think Minecraft imposes a maximum length. The file will be compressed when its in the mod's JAR, I don't think you can compress it in any other way. I'm not sure why there'd be a pause. Do you get a pause when playing the OGG in a normal audio player?
  8. They're usually similar, but not always the same. The wiki does have a list of all vanilla block and item names here, though.
  9. You don't. Just pass the mod ID and item name as separate arguments.
  10. Why not use the item's GameRegistry name and GameRegistry.findItem ?
  11. I copied your sounds.json into my own, put an audio file at assets/testmod2/sounds/audio/test.ogg and created a new record class using "record.rawk" as the sound event and it worked without issue. You can see what I did here.
  12. 90% of the code in SummontheRawk is pointless, there's no need to override a super method to do exactly the same thing. All you need to override is getRecordResource . When you do override a method, you should add the @Override annotation to it. You can print text to the log/console using the standard System.out (for quick and dirty debugging) or FMLLog (for properly formatted output). You can also use a wrapper around FMLLog , like this. You can also set breakpoints and launch Minecraft in debug mode. Do you get any warnings from SoundManager earlier in the log?
  13. The file paths in sounds.json are relative to assets/<modid>/sounds, so your path is invalid unless your sound file is located at assets/themoneymod/sounds/audio/test.ogg. There should be a warning from SoundHandler earlier in the log saying that the file doesn't exist and can't be added to the sound event.
  14. If you've set up a ForgeGradle workspace, you'll have a copy of Minecraft's assets in ~/.gradle/caches/minecraft/assets (replace ~ with %USERPROFILE% on Windows).
  15. The ResourceLocation returned from ItemRecord#getRecordResource is used as the name of a sound event, not a file. You need to create a sounds.json file in assets/themoneymod in this format. Your sound files need to go in assets/themoneymod/sounds. If you name the sound event records.<recordname> (where <recordname> is the argument you passed to the ItemRecord constructor), you can just use the name argument of getRecordResource directly. I have an example implementation of a record here and a sounds.json file here.
  16. Override the method and add a String to the List for each tooltip line. You should add the lines to your lang files and use StatCollector.translateToLocal to translate them to the client's language.
  17. Create your own class that extends ItemBlock and overrides Item#addInformation . This method has an ItemStack argument, which has a metadata value. Register your Block using GameRegistry#registerBlock(Block, Class<? extends ItemBlock>, String) instead of GameRegistry#registerBlock(Block, String) .
  18. It looks like you've used the U+201C LEFT DOUBLE QUOTATION MARK (a.k.a smart quote) character instead of the U+0022 QUOTATION MARK character.
  19. You can use InventoryPlayer#addItemStackToInventory to add an item to a player's inventory (stored in the EntityPlayer#inventory field). Where you call this from depends on when you want the item to be given to the player.
  20. EntityPlayer#getItemInUse is marked as @SideOnly(Side.CLIENT) , which means that it doesn't exist on the server. To access the EntityPlayer#itemInUse field on the server, you'll need to use reflection or an access transformer.
  21. I think the error is caused by returning null from Item#onItemRightClick . ItemInWorldManager#tryUseItem expects a non-null ItemStack to be returned, even if its stackSize is 0 (which it explicitly checks for). Oddly enough, it does check if the returned ItemStack is null; but only after checking that the returned ItemStack is equal to the original ItemStack (which can't possibly be null at that point).
  22. In 1.7.10 and 1.8, the stack size is drawn in RenderItem#renderItemOverlayIntoGUI .
  23. You should override Block#getBlockLayer to return the appropriate layer (explained in TGG's post) and Block#isFullCube to return false .
  24. You need to override Block#isOpaqueCube to return false if your Block isn't a full cube. This way the adjacent Block s will still be rendered. The Grey Ghost has a post on transparent blocks here.
×
×
  • Create New...

Important Information

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