Jump to content

JamieEdwards

Members
  • Posts

    33
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JamieEdwards's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. 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?
  2. 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
  3. 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!
  4. I'm not quite sure what you mean? Is it a case of me needing to put a json file in items too?
  5. 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.
  6. 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?
  7. ? Oh jeez.... This is why I don't have nice things! Thank You LexManos!
  8. 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.
  9. 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.
  10. 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"] } ]
  11. OK, it all works. Now, how exactly would I use the DefaultStateMapper and setCustomStateMapper?
  12. 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?
  13. 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?
×
×
  • Create New...

Important Information

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