Everything posted by DragonFerocity
-
Custom Door: Top doesn't get placed
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?
-
[SOLVED] Strange Forge Error
Haha, Microsoft has a way of doing that. Anyway, I think this thread can be locked now.
-
[SOLVED] Strange Forge Error
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.
-
[SOLVED] Strange Forge Error
You are quite right. I may just start using a different text editor for the JSON files. Thanks,
-
[SOLVED] Strange Forge Error
I don't know what the bump specifics are for this forum, so bump.
-
[SOLVED] Strange Forge Error
I'm using Visual Studio. Here's a github link
-
[SOLVED] Strange Forge Error
If you'd like, I can upload all of my files online for you to look at.
-
[SOLVED] Strange Forge Error
Do you think re-installing MC or Forge would help?
-
[SOLVED] Strange Forge Error
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.
-
[SOLVED] Strange Forge Error
So, I started over from scratch, and same issue persists.
-
[SOLVED] Strange Forge Error
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.
-
[SOLVED] Strange Forge Error
jsonlint says they all are correctly formed JSON. (Visual studio would tell me if there were any errors regardless.)
-
[SOLVED] Strange Forge Error
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
-
[SOLVED] Strange Forge Error
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!
IPS spam blocked by CleanTalk.