Jump to content

Recommended Posts

Posted
15 minutes ago, V0idWa1k3r said:

Minecraft.class has a ItemRenderer instance that you can obtain via a getter that is called getItemRenderer

That's a clear answer thank you. and I know how my IDE works but i can't search for something if I don't know what I have to search.

16 minutes ago, V0idWa1k3r said:

An example of what do you need?

Of what lines I need to write in the doRender method of my RenderThrowablePokeball class.

Posted
8 minutes ago, Thegametutor101 said:

but i can't search for something if I don't know what I have to search.

Well, in this case you need to search for ItemRenderer, right? You can use your IDE's "find references" feature to see everything that references ItemRenderer. I don't know about eclipse but IDEA will sort the references by their type - whether it's just an import, a type parameter, etc. In IDEA I would just expad the "method return type" section to see which methods return this to me. That takes maybe 15 seconds or so on average accounting for the search type.

Alternatively since I told you that it is provided by Minecraft you could just go into the Minecraft.class and perform a simple search(Ctrl+F) for ItemRenderer.

 

11 minutes ago, Thegametutor101 said:

Of what lines I need to write in the doRender method of my RenderThrowablePokeball class.

Do the same RenderEntityItem does as I've told you previously but don't create the ItemRenderer, instead use the one Minecraft provides.

Posted
29 minutes ago, V0idWa1k3r said:

Do the same RenderEntityItem does as I've told you previously but don't create the ItemRenderer, instead use the one Minecraft provides.

can you please just write the code that I am supposed to put?

 

I found the getItemRenderer method in the Minecraft class but can't get it via a Minecraft.getItemRenderer() call.

I can't manage to "do the same RenderEntityItem does".

Posted
5 minutes ago, Thegametutor101 said:

can you please just write the code that I am supposed to put?

 

No. I will not give you code to copy-paste, that's the worst solution possible because you'll just come back to these forums an hour later with a similar problem.

 

6 minutes ago, Thegametutor101 said:

but can't get it via a Minecraft.getItemRenderer() call.

Well, the method isn't static thus you can't do that, obviously. But that's basic java. You do know basic java, right? If you don't then you need to learn it before making minecraft mods.

Posted
5 minutes ago, V0idWa1k3r said:

No. I will not give you code to copy-paste

Then if you want to help me give me a better explanation other than just sayng the same thing i already said I didn't understand.

 

7 minutes ago, V0idWa1k3r said:

Well, the method isn't static thus you can't do that, obviously.

Yes I realised that and thus I don't know what you are trying to say. Need a better explanation than "do the same as".

7 minutes ago, V0idWa1k3r said:

But that's basic java. You do know basic java, right?

Remember what I said about being arrogant? I'm trying to be patient and polite so please give me the same treatment.

Posted

Again, I am notbeing arrogant, you are making a mistake that a person with enough java knowledge would never make.

Case and point - if you don't know java - stop. This is not me being arrogant, you simply won't be able to proceed further without knowing the language. You could bash your head against the wall but it will just cause you great frustration. Just learn java if you don't know it enough, don't try building a rocket without the basic understanding of physics and engineering.

 

9 minutes ago, Thegametutor101 said:

Then if you want to help me give me a better explanation other than just sayng the same thing i already said I didn't understand.

 

If you want a better explanation then you need to formulate what you don't understand better. Simply saying "I don't understand what you are saying" isn't helpful and I can't help you with that. Give me a concrete issue you are having that isn't a basic java issue and I will help you with an explanation if nececcarry.

 

10 minutes ago, Thegametutor101 said:

Yes I realised that and thus I don't know what you are trying to say.

If the method isn't static then you need an instance to invoke it, this is basic java. Again, you can use your IDE to figure out how to obtain the instance of Minecraft you need.

 

11 minutes ago, Thegametutor101 said:

Need a better explanation than "do the same as".

Well, what do you want me to do? Copy the entire method and go through it line-by-line explaining what each and every line does? You can understand it yourself with enough time and logic, you don't need a stranger on the internet to hold your hand here.

 

Again, give me a concrete problem that you can't solve yourselves and I will try my best to explain it to you.

Posted

Don’t ever use GL11, use GLStateManager instead 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

  • 9 months later...
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } }  
    • All versions of Minecraft Forge suddenly black screen even without mods (tried reinstalling original Minecraft, Java, updating drivers doesn't work)
  • Topics

×
×
  • Create New...

Important Information

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