Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/12/18 in all areas

  1. There is a WIP PR for documentation on this that has everything that is on this tutorial, and will soon have more such as Items and Entities. Here is a link to the PR. In this tutorial I will be explaining how to use the Animation State Machine or Forge's Animation System on a TileEntity, though this can be applied to Items or Entities as well. Let's start off easy, with the code for the Block, TileEntity and the binding of the TESR. Block TileEntity TESR Binding This is where the confusion comes from for the animation system. The armature and ASM JSON files. The ASM file has it's own "grammar" which is outlined by fry, here. This is a little vague so I will try to explain this a bit more, so that it is easier to understand with what I have come to know through my own attempts at using this system. Armature File ASM File Sample BlockState File I'm sure there are typos or possibly something I have missed or not explained well enough, so I would love some feedback even on formatting issues. I will also post my raw notes on this stuff that might contain extra information.
    1 point
  2. (Moved to Modder Support) Please don't use text speak, and this might explain your issue.
    1 point
  3. I have finished the tutorial on the Animation System here, please @diesieben07 @Draco18s @loordgek if you have time please look over my tutorial.
    1 point
  4. Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model blockstatetraining:blockstates/lighted_glass_block.json Caused by: java.io.FileNotFoundException: blockstatetraining:blockstates/lighted_glass_block.json Your modID is "blockstatetraining", but your assets folder is named "bst"
    1 point
  5. I see exceptions being thrown from applied energistics, have you tried it without that mod? If it works after removing, report the problem to the mod author.
    1 point
  6. If your item uses the container item system to damage itself (like my ItemCuttingAxe), you don't need to create your own recipe class; just use one of the existing Vanilla or Forge classes. You only need to damage the item in the recipe if you're using an item from Vanilla or another mod.
    1 point
  7. I think you are going to need to implement your own IRecipe. Follow choonsters example of ShapedArmourUpgradeRecipe (from your example you are looking at). Yes, you'll need to add a couple classes, but then you can override the matches and getCraftingResult to match and damage. Choonsters example is nice, because it still allows you to read from the json file....and he gives you all the code you need. To simplify you could hard code it in the IRecipe, but why ?
    1 point
  8. Try 32767 for the input item's damage value in your crafting recipe, I hear that's the wildcard "match any" value. That's already in the example
    1 point
  9. Think it has to do with the recipe json. Crafting will do a check on the item and if not the "same", it won't find it. if the meta or damage are not the same, it will not think it is the same item. Metas are small enough you can add mutliple metas into a recipe json, but if you want damaged items to work, think you'll need to create your own IRecipe to handle the item matching. I'm working on 0 sleep, so if I'm not following your problem, sorry. If you are trying to make your item repairable, then that is different solution
    1 point
  10. Not neccessarily. The error is only the surface error: - It can be caused by a missing block state file (the game still fails to find the variant) - It can be caused by a malformed json file (the game still fails to find the variant) - It can be caused by an incomplete json file (as you suggest, the game still fails to find the variant) - It can be caused by a missing or bad model file (e.g. something the blockstate file says to load, but the game fails to find, the game still fails to find the variant) The surface level error "variant failed to load" is meaningless until you dig deeper to find the "Caused By" line following it.
    1 point
  11. Ok so, here's what you need to know: 1) Metadata is an implementation detail dealing with how the block serializes to disk as well as the metadata of the item form (however these two values may not be the same: modders use the same values for simplicity's sake, but nothing in the code requires it). That's it. 2) The properties handle how the block is dealt with at run time, including its blockstate.json file (represented by strings) 3) The blockstate,json file dictates what model to use (and any state-based overrides) 4) The model dictates what texture(s) to use. 5) The blockstate state based overrides can alter the texture
    1 point
  12. https://github.com/TheGreyGhost/MinecraftByExample
    1 point
  13. I think your issue was the time of use of the item was too short and the animation sound didn't play. These 3 overrides from ItemPotion work for me in a new Item. @Override public int getMaxItemUseDuration(ItemStack stack) { return 32; } @Override public EnumAction getItemUseAction(ItemStack stack) { return EnumAction.DRINK; } @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { playerIn.setActiveHand(handIn); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, playerIn.getHeldItem(handIn)); }
    1 point
  14. Yeah, there's a reason I have this class: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/api/internal/CommonContainer.java
    1 point
  15. Hello everyone, Today, I'm going to show you how to use Forge's built-in version update checker found in v11.14.3.1549 and later. First, create an update.json file. Lastly, add the URL of your newly created file to your @Mod annotation. ...And you're done! If someone uses an outdated version of your mod, Forge will show a download link and changelog for the new version, using the info you've provided. Hope this helps!
    1 point
×
×
  • Create New...

Important Information

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