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.

DragonFerocity

Members
  • Joined

  • Last visited

Everything posted by DragonFerocity

  1. Hello, I'm trying to create a custom door (ie, a vanilla door with a different texture). Here's my code. Basically, I created a new class called ModBlockDoor that extends the vanilla BlockDoor. The project compiles perfectly, and runs without a hitch. The only problem is that in game, when I place the door, it only places the bottom of the door. The top doesn't get place at all (I know because I'm able to jump over the bottom of the door). Can anyone let me know how to fix this? I figure I'd need to override some functions in my class, but I'm not sure which ones. Also, do I need a door item? It seems to work without it?
  2. Haha, Microsoft has a way of doing that. Anyway, I think this thread can be locked now.
  3. Yeah. There's probably a way to force VS to use different line endings, or to force it to use minified JSON. When I used the online minifier, and posted it into VS, it auto formatted it adding line-breaks in certain places, so I test and same error. Then I opened the file in Atom, and put the minified JSON, and it worked just fine. Thanks for looking into this. I probably wouldn't have found that it was a problem because of VS.
  4. You are quite right. I may just start using a different text editor for the JSON files. Thanks,
  5. I don't know what the bump specifics are for this forum, so bump.
  6. I'm using Visual Studio. Here's a github link
  7. If you'd like, I can upload all of my files online for you to look at.
  8. Do you think re-installing MC or Forge would help?
  9. I can run Minecraft without forge, if that's what you're asking. I haven't tried running it with forge except through the command line.
  10. So, I started over from scratch, and same issue persists.
  11. Yeah, that's why I'm so confused. I'm beginning to wonder if there's an issue with Forge. I may try re-installing that to see if that changes anything.
  12. jsonlint says they all are correctly formed JSON. (Visual studio would tell me if there were any errors regardless.)
  13. I tried that format. Same issue, same error. I also changed my ModID to expanded rather than ea, same issue. The tutorial I'm following has you create a BlockHandler class: public class BlockHandler { public static Block tutBlock; public static ItemBlock ibTutBlock; public static void init() { tutBlock = new BlockTutBlock(Material.ROCK, "tut_block", CreativeTabs.BUILDING_BLOCKS, 5F, 15F, 3, "pickaxe"); ibTutBlock = (ItemBlock)new ItemBlock(tutBlock); } public static void register() { GameRegistry.register(tutBlock); GameRegistry.register(ibTutBlock, tutBlock.getRegistryName()); } public static void registerRenders() { registerRender(tutBlock); } public static void registerRender(Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } And ItemHandler: public class ItemHandler { public static Item tutItem; public static void init() { tutItem = new ItemTutItem("tut_item", CreativeTabs.MATERIALS); } public static void register() { GameRegistry.register(tutItem); } public static void registerRenders() { registerRender(tutItem); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } ClientProxy: public class ClientProxy extends CommonProxy { public void init() { ItemHandler.registerRenders(); BlockHandler.registerRenders(); } } CommonProxy: public class CommonProxy implements IProxy { public void preInit() { ItemHandler.init(); ItemHandler.register(); BlockHandler.init(); BlockHandler.register(); } public void init() { } public void postInit() { } } Thanks for the help
  14. EDIT: Turns out that the problem originated with how Visual Studio formats JSON code. Hey guys, I'm very new to using Forge and java, but I'm picking up Java very easily since I have worked with so many other languages in the past. Anyway. I'm following a nice tutorial for beginners (Tutorial), and I'm on the fourth one on that page. I'm getting the error: [Client thread/ERROR] [FML]: Exception loading model for variant ea:tut_block#normal for blockstate "ea:tut_block" ... [Client thread/ERROR] [FML]: Exception loading blockstate for the variant ea:tut_block#normal: java.lang.Exception: Could not load model definition for variant ea:tut_block ... Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of 'ea:tut_block' from: 'ea:blockstates/tut_block.json' in resourcepack: 'FMLFileResourcePack:Extended Aesthetics' I've searched all over the place and I can't find a solution for my problem. I'm using Visual Studio (instead of Eclipse), and the project compiles perfectly right now. However, the tut_block that the tutorial has you make, in game it doesn't have the right texture. It shows a black/purple texture instead of the right one. Here's a picture of my folder structure: (I couldn't get the picture dialogue to actually insert a picture) Which should be correct, and all the names are correct as far as I can tell. Here's the blockstates/tut_block.json file: { "variants": { "normal": { "model": "ea:tut_block" }, "inventory": { "model": "ea:tut_block" } } } models/item/tut_block.json { "parent": "ea:block/tut_block" } models/block/tut_block.json { "parent": "block/cube_all", "textures": { "all": "ea:blocks/tut_block" } } Here's the complete error log: Thanks for any help. If you need more files I can post those too. Again I haven't been able to find anything anywhere. Other people have malformed JSON; I don't. Other people have the wrong folder structure; I don't as far as I can tell. EDIT: Should probably mention, I'm modding for MC1.11.2, and using Forge 13.20.0.2260 EDIT: GitHub link!

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.