Jump to content

Recommended Posts

Posted

I found a render error with blocks over the ID of 255.  I will attach a picture showing what happened.

What happens is that the default block renderer stops rendering blocks as blocks after it hits 255.

The code that proves this:

if (par2ItemStack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))

The problem can be solved by changing the 256 in this and several other places to 4096.  I will also attach a zip containing a modified source that fixes these errors and makes the renderer actually display blocks as blocks.

This will not produce a error report but will cause a GUI error that makes mod developers not want to use higher IDs because they will not render in your GUI properly.

 

In the picture you can see a flat object in my characters hand.  This is supposed to render as a block but will not unless you have the renderer properly set up.

2012-06-24_18_52_02.png.597f2f1d06f2ceea98015d78b306b7c1.png

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

Update your forge, the version you're using doesn't support 4096.

If you updated properly this wouldn't happen.

Also note, that changin that 256 to 4096 is NOT a proper solution as it fucks up vanilla items.

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

That code is part of the default Minecraft.  Have you tried using s mod_ file along with custom textures?

mod_airSpread

package net.minecraft.src;

import net.minecraft.src.forge.*;

public class mod_airSpread extends BaseMod {

    public static final Block airSpreader = (BlockAirSpreader)(new BlockAirSpreader(3000)).setHardness(0.6F).setStepSound(Block.soundGlassFootstep).setLightOpacity(3).setBlockName("airSpreader");
    
    @Override
    public String getVersion() {
        return "1.0.0";
    }

    @Override
    public void load() {
        
        ModLoader.registerBlock(airSpreader);
        ModLoader.addName(airSpreader, "Air Spreader");
        MinecraftForgeClient.preloadTexture("/hotrods20/terrain1.png");
        ModLoader.addRecipe(new ItemStack(airSpreader, 4), new Object[] {"CBC", " S ", "CBC", 'C', Block.cactus, 'B', Block.mushroomBrown, 'S', Item.sugar});
        
    }
    
}

 

BlockAirSpreader:

package net.minecraft.src;

import java.util.Random;
import net.minecraft.src.forge.*;

public class BlockAirSpreader extends Block implements ITextureProvider
{
    protected BlockAirSpreader(int par1)
    {
        super(par1, Material.grass);
        this.blockIndexInTexture = 0;
        this.setTickRandomly(true);
    }

    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        if (!par1World.isRemote)
        {
                for (int var6 = 0; var6 < 4; ++var6)
                {
                    int var7 = par2 + par5Random.nextInt(3) - 1;
                    int var8 = par3 + par5Random.nextInt(5) - 3;
                    int var9 = par4 + par5Random.nextInt(3) - 1;
                    int var10 = par1World.getBlockId(var7, var8 + 1, var9);

                    if (par1World.getBlockId(var7, var8, var9) == 0)
                    {
                        par1World.setBlockWithNotify(var7, var8, var9, mod_airSpread.airSpreader.blockID);
                    }
                }
        }
    }
    
    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        return super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, 1 - par5);
    }
    
    public int getRenderBlockPass()
    {
        return 1;
    }
    
    public boolean isOpaqueCube()
    {
        return false;
    }
    
    public String getTextureFile()
    {
        return "/hotrods20/terrain1.png";
    }
}

 

I assume you got your own textures.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

Yes I have tried it, along with custom textures and a plethora of custom items/block.

They all work fine.

Also, thats some horrible design in that mod...

And the fact that you even think that it would make a difference where the block is from shows you don't understand what you're talking about.

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

I am not going to fight over this.  You have control here and eventually you'll just lock the topic.  My mod won't work along with others and I will let you deal with it.  Maybe you installed a part of my build.  Did you check to see if the render code was different in other parts?  Maybe you are using one different from the recommended build.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

I am not going to fight over this.  You have control here and eventually you'll just lock the topic.  My mod won't work along with others and I will let you deal with it.  Maybe you installed a part of my build.  Did you check to see if the render code was different in other parts?  Maybe you are using one different from the recommended build.

 

YOu updated to the latest ForgE?

Posted

Mind if I ask why not use the recommended build.  I base my error on what normal players will see.  They will see a render problem because most people will just download the latest stable build and pay no mind to the 'latest' build.  May I recommend something that says not using the 'latest' build may cause render problems or something else.  I like most users will just get the recommended cause EVERYONE uses that.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

Please understand the fucking basic release structure.

You introduce a new feature

You test it

After being tested you release it

 

EXA in forge:

You introduce a new feature: 4096, marked as latest/build

You test it: People download the latest, if bugs are found, you make new builds

After being tested you release it: People test and find that it works, promote to recommended.

 

If you build against something that isn't marked as the recommended build, you just tell your users, 'Get build ###+'

That's why we use build numbers, instead of arbitrary numbers.

 

And your excuse of 'Maybe you installed a part of my build.', that's just asinine, do you REALLY think i'm that stupid. do you REALLY think that I would install something of yours and then decompile it and run it in my dev env? And on top of that, mistake it for my own code? Really.. really.. you think i'm THAT stupid?

 

You should be smart enough to understand that if you're suggesting something you should check the latest version to see if we are already doing it.

 

It's like going to blizzard after seeing the cata announcements.

And saying, 'Hey you know what you should do, add a dragon!' 'Oh you day you did, are you SRUE you did, cuz in my version you didn't'

 

 

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

I don't think you are "stupid" but anything is possible.  I have worked with plenty of other.  Shit can happen and people's code and get mixed.  You just don't always know.  I barely know you and you barely know me.  So, I don't know if you could mix it up or not.  It happens sometimes.  I am just saying that.  You insist on flipping out about a little guess.  I guess I am done bothering with this cause I said I wouldn't argue anymore.  Have fun being big man McGee.  I got better things to do.  Just don't assume everyone is going to use the latest build like you do.  Some of us try to stick as close to recommended as possible.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

Its fairly straight forward:

If you're a average user, use the recommended build unless a mod you use specifically tells you to use something higher.

If you're a modder: Use the recommended build if you don't care about anything new, but if you do, to you're wanting to suggest something/report a bug. Verify that what you're suggesting/reporting hasn't already been fixed in the latest.

 

How is that difficult to understand?

As for flipping out, I'm just really getting tired explaining basic logic to you.

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

Well, I didn't know that it was already planned.  May I recommend something that may say something along the lines of:

Major Features Planned:

Stuff1

Stuff2

Increase block limit and fix render.

Stuff 4

Stuff 5

 

It would simplify it a little bit.  Maybe even put a thing on the home page for all modders to read that tells them to see "enter topic here" about all the features that are planned.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

Posted

Yes, exactly that but make it so it points it out on the main page.  You would have less stress if you put a link to those in the News part on the main page or something along those lines.  That would save you time explaining what is planned and what is implemented.

width=320 height=64http://www.slothygaming.com/img/ota.png[/img]

If your grammar is shit and you blatantly don't know what you're doing, I will not help you.

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

    • that happens every time I enter a new dimension.
    • 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
  • Topics

×
×
  • Create New...

Important Information

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