Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Show how you register your block and block model.
  2. Mmmm....nope. Typed like that the game through a "could not find variant" message caused by "Not a JSON Object: 6.0". Shoving the var1/var2 stuff inside the } just to the left (so it was part of the submodel declaration) threw "Expected to[1] to be a Float, was "#height"" message instead.
  3. Try taking a hit that is 20 damage. Or 30. damageTaken = damageDealt * ( 1 - min( 20, max( defensePoints / 5, defensePoints - damageDealt / ( 2 + toughness / 4 ) ) ) / 25 ) "toughness" for all armors is 0, unless diamond, in which case 2. "defensePoints" is the visible armor points.
  4. So I have a submodel that I'm using to represent some TE data and just changed from it being a boolean property to an integer (0-6). I'm perfectly happy copy-pasting the submodel json file 5 times and supplying slight variations on each, however I wanted to ask if it was possible to have variants in the model and just query that instead. My blockstate file looks like this atm: "salt_level": { "6": { "submodel": { "saltblock": { "model": "harderfarming:salt6" } } }, "5": { "submodel": { "saltblock": { "model": "harderfarming:salt5" } } }, "4": { "submodel": { "saltblock": { "model": "harderfarming:salt4" } } }, "3": { "submodel": { "saltblock": { "model": "harderfarming:salt3" } } }, "2": { "submodel": { "saltblock": { "model": "harderfarming:salt2" } } }, "1": { "submodel": { "saltblock": { "model": "harderfarming:salt1" } } }, "0": {} } Where each of those submodels would look like: { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "textures": { "0": "harderfarming:blocks/saltblock" }, "elements": [ { "name": "salt", "from": [ 5.0, 0.0, 5.0 ], "to": [ 11.0, 6.0, 11.0 ], "faces": { "north": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "east": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "south": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "west": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "up": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] }, "down": { "texture": "#0", "uv": [ 5.0, 5.0, 11.0, 11.0 ] } } } ] } Only that the "to" and UV values will differ slightly. I was just wondering if there was a cleaner/simpler way to do this.
  5. Actually...You can create armor that is "better than diamond" using the current 1.10 armor mechanics. Diamond Armor has an "armor toughness" property (giving 2 points, all other armors lack this attribute and give 0 points). Prior to 1.9, armor was a flat 4% reduction per point (half-icon in the UI). With 1.9 it was changed so that as the damage you took went up, the percentage per point went down (to a minimum of 0.8% per point). Armor toughness reduces that reduction math. So yes, you could actually provide armor that has more toughness than diamond.
  6. IIRC, the default handling of top and filler blocks is that they ONLY replace stone. You need to override that behavior somewhere.
  7. By the way, you have the forge marker. You don't need to write out the Cartesian map of your blockstates like that. See: http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ Or: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/axel.json
  8. BrewingRecipeRegistry.addRecipe(IBrewingRecipe)
  9. You have a blockstate json, but not a model json. You either need a model json or specify an existing model in the blockstate json (which can point to a vanilla model or a custom model). https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/ore_hardiron.json#L9
  10. No. And the stuff should be 100% based on world state.
  11. Edit, ok, the missing texture is back AND several other blocks now have missing models and no errors. WTF. *Compares with Git repo* Well I can now solve both problems. Despite having searched the entire project for "saltblock" and not finding it, it was buried over in the model used by the blocks that were broken.
  12. Cough: I didn't type out the null checks because I figured you were intelligent enough to know what I'd meant. Point is: don't store the lore string in the NBT. Looking back over what you had, things actually may have been fine, you just have a weird "convert from index to chapter" method (honestly, what do that even do, add 1? Subtract 1? Return its input?). Also: this.random.nextInt((8 - 1) + 1) + 1; "8 - 1, +1" Do you mean "8" per chance?
  13. Eclipse's version is Project -> Clean, I believe. That was insufficient (I still got the error). Lets try manually deleted everything in /bin, /build, and /run.... yep that did it. What was weird was that it WAS using the current files (I could make changes and see them reflected when running), but kept insisting there was a problem.
  14. Don't use BlockContainer. Just extend Block then override hasTileEntity and getTileEntity, like I did here: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/block/BlockSifter.java
  15. You're still pulling the lore from the NBT. Stop that. This function should look like this: private string getLoreIndex(ItemStack stack) { int loreID = stack.getTagCompound().getInteger("lore"); return UtilsScCeui.getIndexFromID(loreID); } Along with the various "hasNBT" and "hasKey" checks.
  16. You need to post more of your code. You are likely trying to register the recipe before your items have been created.
  17. Write your own code that loops over the player's inventory.
  18. If you looked at the method hasItemStack you'd find that it gives no shits about stack size.
  19. It's based on the ToolMaterialEnum. Basically, don't use it at all because it could change if someone else also creates tool materials.
  20. Your tool material has an ordinal of 8. Your ATTACK_DAMAGES array has a size of 5. Take a wild guess at why that crashes. Then use this constructor instead: public TutorialItemPaxel(ToolMaterial material, float damage, float speed)
  21. Use the other constructor for the axe, the one that takes two floats. There's literally 400 threads on this forum about it. One of which was created yesterday.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.