
JamieEdwards
Members-
Posts
33 -
Joined
-
Last visited
Everything posted by JamieEdwards
-
Setting custom blockstate location for block
JamieEdwards replied to JamieEdwards's topic in Modder Support
Thank you for the suggestion, I wasn't going to keep that (and trust me, it looked a whole lot worse prior to posting this xD) I'm using 1.12 at the moment. Even so, would I be able to sufficiently organise my resources without giving a custom path as you say? -
Hi guys and girls, Not sure if the title really explains it properly. If you look at my github: https://github.com/JamieRhys/Comtech and under common/handlers/ModEntityHandler.java, I have the following code: @SubscribeEvent public static void registerBlocks(final RegistryEvent.Register<Block> event) { for(Block block : ModBlocks.BlockMap.values()) { event.getRegistry().register(block); } } public static void registerModel(Item item, int meta) { int iend = item.getRegistryName().toString().indexOf("_"); String finalString = iend != -1 ? item.getRegistryName().toString().substring(0, 8) + item.getRegistryName().toString().substring(8, iend) + "s/" + item.getRegistryName().toString().substring(8) : ""; ModelLoader.setCustomModelResourceLocation( item, meta, new ModelResourceLocation(finalString, "inventory") ); } It seems these two do completely different things. At the moment, it seems I have to use two almost identical blockstate and model .json files for the blocks. What I would like, as you can imagine, is to use a single file for both the item and the block. Unfortunately, I'm unable to find out what I need to do in order to achieve this. I really don't want to use two separate files that are identical (or almost). I can do this perfectly fine with the items. Any ideas on how I can solve this? Thanks
-
[SOLVED] Block Texture not showing, also no error log
JamieEdwards replied to JamieEdwards's topic in Modder Support
I feel like an idiot.... I figured out what the problem was. I was doing everything right EXCEPT, I didn't set the customModelResourceLocation for the inventory icon. It's fixed now and works absolutely fine. I also get why I wasn't getting any errors too, given that the game didn't even know that the icons existed in the first place. Sorry guys for wasting time! -
[SOLVED] Block Texture not showing, also no error log
JamieEdwards replied to JamieEdwards's topic in Modder Support
Here's the repo: https://github.com/JamieRhys/Comtech -
[SOLVED] Block Texture not showing, also no error log
JamieEdwards replied to JamieEdwards's topic in Modder Support
I'm not quite sure what you mean? Is it a case of me needing to put a json file in items too? -
[SOLVED] Block Texture not showing, also no error log
JamieEdwards replied to JamieEdwards's topic in Modder Support
It is yeah, sorry, I'll edit it -
Hi, I have the following: resources/assets/comtech/models/block/ore_aluminium.json: { "parent": "block/cube_all", "textures": { "all": "comtech:blocks/ore_aluminium } } resources/assets/blockstates/ore_aluminium.json: { "forge_marker": 1, "defaults": { "model": "comtech:ore_aluminium" }, "variants": { "normal": [{}], "inventory: [{}] } } and my texture file is in the following place: resources/assets/textures/blocks/ore_aluminium.png When I load up the game, initially, I had a whole heap of errors which unfortunately I do not remember. What I do remember however, is that it said it couldn't find something for my block. This disappeared however, once I had added an entry into my .lang file and it runs as "normal". However, when I go into the inventory, the texture in there is the default no texture found icon. Any ideas what might be happening? I've tried the solutions on the internet but they don't seem to be working in my case. UPDATE: It seems to just be the inventory icon that I'm having an issue with, when I place the block in the world, the sides of the block are textured appropriately.
-
Hi, Haven't been here in a while and decided to try my hand at modding again, however, I've a quite the issue. Gradle is trying to use Java version 11.0.4 but after reading online, Forge does not support this yet. As such, I'm trying desperately hard to make sure that it uses Java 8, however, I'm coming up to a loss. I'm getting the following issue: 14:07:32.113 [ERROR] [org.gradle.BuildExceptionReporter] 14:07:32.170 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 14:07:32.170 [ERROR] [org.gradle.BuildExceptionReporter] 14:07:32.171 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 14:07:32.171 [ERROR] [org.gradle.BuildExceptionReporter] Could not determine java version from '11.0.4'. 14:07:32.175 [ERROR] [org.gradle.BuildExceptionReporter] 14:07:32.175 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 14:07:32.177 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.IllegalArgumentException: Could not determine java version from '11.0.4'. 14:07:32.177 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:68) 14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.JavaVersion.current(JavaVersion.java:78) 14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:32) 14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) 14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205) 14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) 14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33) 14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:566) 14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55) 14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36) 14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter] at java.base/java.lang.reflect.Method.invoke(Method.java:566) 14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) 14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) 14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) My gradle version is 5.6.1 and the wrapper version is also 5.6.1. My question is, how do I go about setting up gradle properly so that it can use the right java version so that I can start modding?
-
? Oh jeez.... This is why I don't have nice things! Thank You LexManos!
-
Yes it is... As I said, I pretty much copied my previous code (from back in 1.7.10) which worked perfectly and it's not working here. Well, I've tried changing the file structure to src/main/java and src/main/resources and it still isn't being picked up.
-
I can confirm that the resources folder is a source folder, much the same as the java folder. I cannot however confirm if other resources are being loaded as I've not got that far in the mod to start loading other resources.
-
Hi guys, So I've decided to start picking up modding again and have run into an issue whilst starting fresh. My Eclipse file structure is as follows: ComTech -- |-- src -- |-- java -- | |-- com/jamierhys/comtech/ -- | |-- main -- | |-- ComTech <-- Where my main mod class is |-- resources -- |-- assets | |-- mcmod.info Now when I launch the client and have a look at "mods", ComTech does have an entry in the mods list but when I click on it, it says to message the author for a mcmod.info file. I don't understand what's changed as this has always been the same way I've created mods. What am I doing wrong? my mcmod.info looks like this: [ { "modinfo": "comtech", "name": "ComTech", "description": "", "version": "1.10.2-0.0.1", "mcversion": "1.10.2", "url": "", "updateUrl": "", "authorList": ["JamieRhys"], "credits": "", "logoFile": "", "dependencies": ["Forge"] } ]
-
[1.8.9] Unable to get block textures to work
JamieEdwards replied to JamieEdwards's topic in Modder Support
OK, it all works. Now, how exactly would I use the DefaultStateMapper and setCustomStateMapper? -
[1.8.9] Unable to get block textures to work
JamieEdwards replied to JamieEdwards's topic in Modder Support
That isnt the problem, the call for that IS coming from the client proxy and not my common proxy. That worked and now minecraft is launching. But I'm still having an issue with it not finding my .json files. I want to use a custom path in my blockstates... see below to how I want it. Here's my file structure: |---blockstates/ | |---- blocks/ | |--- ores/ | |--- ore_aluminium.json | |---- models/ |--- block/ | |--- blocks/ | |--- ores/ | |--- ore_aluminium.json | |--- item/ |--- blocks/ |--- ores/ |--- ore_aluminium.json As you can see I want my ores in blockstates/blocks/ores/ but the only problem is that unless it's in just blockstates, it won't work... is there a way to tell forge to look there instead? -
Hi guys, So I have a problem which I cannot wrap my head around. To give you an idea of how my code works, I'll show you how I register my items (which works). When I register an item, I use the following to do so: public void register(CTBasicItem item, String id, String type) { this.setUnlocalizedName(Reference.resource.PREFIX + id); registerTexture(item, id, type); GameRegistry.registerItem(item, id); } private void registerTexture(CTBasicItem item, String id, String type) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Reference.resource.PREFIX + "items/" + type + "/" + id, "inventory")); } As previously mentioned, when using the above code on an item, it works perfectly. Reference.resource.PREFIX = comtech + ":" "items/" is the subdirectory of "item" "type" is the subdirectory of "items". (could be dusts/ or ingots/, etc) However if I change the registerTexture to: private void registerTexture(CTBasicBlock block, String id, String type) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(Reference.resource.PREFIX + "blocks/" + type + "/" + id, "inventory")); } And try to run minecraft, it crashes... it crashes hard with the following error: Now I can see there is a nullpointerexception but I cannot figure out how to fix it... Anyone got any ideas?
-
Intellij Idea 15 bug with Minecraft Forge?
JamieEdwards replied to JamieEdwards's topic in Modder Support
Sorry, I've tried to do what you've told me but it doesn't seem to work... Would it be possible to give me a step by step of the process? If not then that's ok! Never mind, I've found a work around within my git client and now have it all work. -
Intellij Idea 15 bug with Minecraft Forge?
JamieEdwards replied to JamieEdwards's topic in Modder Support
What could I set as the gradle home? -
Intellij Idea 15 bug with Minecraft Forge?
JamieEdwards replied to JamieEdwards's topic in Modder Support
How would one do that, do you know? Also, I don't actually place multiple projects into the src dir, I was using it as an example as I can do that in eclipse -
Intellij Idea 15 bug with Minecraft Forge?
JamieEdwards replied to JamieEdwards's topic in Modder Support
If that's the case then why can I go into Eclipse and add as many different mod directories (not that I actually would but I can) call them any number of things and they will all run no matter what WITH their resources? Doing it just like doesn't seem very flexible! Also, if I clone a repository on my GIthub, it automatically names the root directory by the name of the repository on my profile and changing that is difficult. -
Hi guys, Ok, so I think I've found a bug in Intellij Idea 15, but it could be a thing in all variations of idea... Anyway, if I overwrite the stock "Example Mod" directory that MF provides and run the client, it picks both my java code up AND my assets folder up. Both of which are marked as Sources and Resource root. However, if I add another directory say "MiniCrafft" and also mark my "java" and "resources" sub-directories as "Sources" and "Resource" root. I then create just a simple main java class and a simple mcmod.info file then re-launch the client... I get the following: In my "Mods" option on the title screen, it DOES show "MiniCraft" as an entry BUT it does NOT show my mcmod.info information, it however shows the "please contact mod author for the mcmod file" thing. Does anyone else get that? Or is it literally just me?
-
Re-synchronise... That's where I click the circular arrow icon in the gradle tab isn't it? If so I've pressed that every time I've done a task in the tutorial. I've also run genIntellijRuns task every time the tutorial has stated too.
-
Turns out the Git repo isn't actually causing an issue as the mcmod.info still isnt being shown.
-
The: idea { module { inheritOutputDirs = true; } } If so, I did do that as I actually followed his tutorial to set it up in the first place. Also, I have the directory set as a git repo... Could that be an issue?
-
The thing I don't understand with that is it's not ignoring the example mods mcmod.info file and displays it fine?
-
Hi guys, So I'm confused as anything to what's going on as I've copied exactly what the example mod is doing. I'm using Intellij Idea 15 Ultimate as my chosen IDE as it's free to me as a student and Eclipse is being stupid... Anyway, I've set up the Forge workspace up properly (of which I'm using 1.8.9-11.15.1.1722) and have my project exactly the same as the example mod (as previously said) but to clarify I've got: Java -| <-- Set as Sources Root and this works fine as the mod shows in minecraft. | |--- com.jamierhys.comtech.main <-- where my main class is Resources -| <-- Set as Resources Root but this is not working | |--- mcmod.info As you can see, it's identical to what the example mod is but when I launch minecraft and click "mods", although the mod shows up correctly, it comes up with: ComTech Mod Version: 1.8.9-0.0.1 Mod State: Available No mod information found Ask your mod author to provide a mod mcmod.info file And cannot figure out what's going on as this is the first time using Idea... Anyone have any ideas? (Pun not intended)