Jump to content

Recommended Posts

Posted

My tile entities seem to not be saving their data that I assigned them to save in the NBT functions. Everytime when I load the world it says "Skipping Tile Entity with ID xxxx". I called the method: ModLoader.RegisterTileEntity(net.minecraft.src.TileEntityExample.class, "Example");  I'm wondering if that's the problem. I placed a System.out.println at the read function and it never gets called. For some reason it's not READING the tile entity information.

Posted

Its not reading the info because you are not registering the name before it tries to load.

Or, your name has some invalid characters in it.

Or, your TE can't be created.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Its not reading the info because you are not registering the name before it tries to load.

Or, your name has some invalid characters in it.

Or, your TE can't be created.

 

How would I register the name before it loads? I have the function called in the load() in my NetworkMod/BaseMod class (mod_XXX).

 

The name of my tile entity is "ICBMMissileLauncher" and I don't think there are any illegal characters in that.

 

My tile entity works fine in the game. The only problem is that it doesn't read data from NBT properly. I think this is related to the tile entity not registering properly.

Posted

Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message.

See what its reading, and compare it to the list of possible mappings.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message.

See what its reading, and compare it to the list of possible mappings.

 

When the world loads with my tile entity inside, java keeps throws out errors like "java.lang.InstantiationException:net.minecraft.src.ICBMTileEntityXXX" when the tile entity tries to read data from NBT. After that error, it says "Skipping TileEntity with ID XXX".

 

I'm a beginner at modding so I'm not sure what mapping is in this context and tossing break points. Can you please explain?

Posted

Full, uncensored errors would be helpful, its rather shame that it's taken me actually asking for you to do it -.-

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Load up the game in eclipse, and toss a break point at the like that spits out the skipping te message.

See what its reading, and compare it to the list of possible mappings.

 

When the world loads with my tile entity inside, java keeps throws out errors like "java.lang.InstantiationException:net.minecraft.src.ICBMTileEntityXXX" when the tile entity tries to read data from NBT. After that error, it says "Skipping TileEntity with ID XXX".

 

I'm a beginner at modding so I'm not sure what mapping is in this context and tossing break points. Can you please explain?

Tossing a break point is finding the spot where the bat thing happens, placing a break, and single-stepping the code from there.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted

i had this happen for a while when coding NPCs what you need to do is add another constuctor that just predefines varables.

 

For example

 

public EntityGuardBase(World world) 
{
	this(world,0,0);
}

both of the zero are varables i defined in the actual constructor that are not pulled until Nbt data is read.

 

I solved the problem!

 

I got rid of my constructor which had a parameter which is metadata (since my tile entity has a metadata). It works fine now and I found another way to retrieve the metadata information. Creating an empty constructor could also work.

 

Thanks for the help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • 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" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
    • 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.