Jump to content

Modding__With__Forge__Need__Imediate__Help (SOLVED)


CraftyPuffin

Recommended Posts

Im Learning to mod with forge which is going great, kinda anoying relearning what i learned from modloader but anyway to the point...

 

Im currently trying to make a big mod/learn on the way and im adding in 19 sets of Ores, Blocks and Ore Droped gems bars, Tools Sets, Armor Sets.. I know thats alot of items.

 

But for some reason after the 7th full set of everything i said above i get an error? the 7 tools armor lbocks work perfectly and flawlessy but the 8th which is perfectly typed in seems to give me this error:

 

2013-02-14 11:58:33 [iNFO] [sTDERR] java.lang.ArrayIndexOutOfBoundsException: 31541

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:324)

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:359)

2013-02-14 11:58:33 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_BlockCore.<init>(A_MTM_BlockCore.java:11)

2013-02-14 11:58:33 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_CORE.load(A_MTM_CORE.java:453)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:485)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

2013-02-14 11:58:33 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

2013-02-14 11:58:33 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

2013-02-14 11:58:33 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)

2013-02-14 11:58:33 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:657)

2013-02-14 11:58:33 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:207)

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:456)

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:744)

2013-02-14 11:58:33 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source)

2013-02-14 11:59:21 [iNFO] [sTDERR] Someone is closing me!

 

As far as i understand im supposed to have Infinate block item space add in 100s of things as i want but this makes no sence? I even tryed maken a new CORE class file. Nope. even a new package. Nope. Is there something im missing to be capable of having such vast amount of tools armors blocks and stuff like that?

 

Immediate help would be fudging fantastic and down to the point of what im doing wrong :(

 

Thanks in advance, FluffyPuffin!

 

PS: SORRY IF IM IN THE WRONG SECTION IM NEW TO THE SITE, And i hope this hasint been posted before i cant find solutions anywere.

Link to comment
Share on other sites

Nothing i have ID'ed is over 4000 all block ID's are under 256 in there own spriteSheet.

 

EDIT: To be more specific it singles out this line.

 

AmethystOre = new A_MTM_BlockCore_Two(this.AmethystOreID, 23).setBlockName("AmethystOre");

That's not really too helpful. What's the value of 'AmethystOreID'?

Link to comment
Share on other sites

2013-02-14 11:58:33 [iNFO] [sTDERR] java.lang.ArrayIndexOutOfBoundsException: 31541

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:324)

2013-02-14 11:58:33 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:359)

2013-02-14 11:58:33 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_BlockCore.<init>(A_MTM_BlockCore.java:11)

2013-02-14 11:58:33 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_CORE.load(A_MTM_CORE.java:453)

 

Nothing i have ID'ed is over 4000 all block ID's are under 256 in there own spriteSheet

 

I don't know what you're trying to accomplish, but your code is ending up calling index 31541 of net.minecraft.block.Block.blocksList[] for initializing one of your Block variables. As mentioned, the Minecraft base code by default doesn't allow blocksList[] indexes other than 0-4095.

 

If you're getting confused with "Infinite terrain/sprite indexes", that has to do with the appearance of blocks/items and nothing to do with allocations in ID arrays. If however you're making use of a mod that tweaks the blocksList[] array bounds in the base code, it's not cooperating.

 

This is where things are hanging up, in order:

 

#1, line 324 of net.minecraft.block.Block:

 

public Block(int par1, Material par2Material)

    {

        this.blockConstructorCalled = true;

        this.enableStats = true;

        this.stepSound = soundPowderFootstep;

        this.blockParticleGravity = 1.0F;

        this.slipperiness = 0.6F;

 

      if (blocksList[par1] != null)

        {

            throw new IllegalArgumentException("Slot " + par1 + " is already occupied by " + blocksList[par1] + " when adding " + this);

        }

        else

        {

            this.blockMaterial = par2Material;

            blocksList[par1] = this;

            this.blockID = par1;

            this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

            opaqueCubeLookup[par1] = this.isOpaqueCube();

            lightOpacity[par1] = this.isOpaqueCube() ? 255 : 0;

            canBlockGrass[par1] = !par2Material.getCanBlockGrass();

        }

        isDefaultTexture = (getTextureFile() != null && getTextureFile().equalsIgnoreCase("/terrain.png"));

    }

 

#2: Line 359 of net.minecraft.block.Block:

 

public Block(int par1, int par2, Material par3Material)

    {

        this(par1, par3Material);

        this.blockIndexInTexture = par2;

    }

 

#3 and #4 have to do with the code you're using for your mod. Mind showing us what line 11 of A_MTM_BlockCore.java and line 453 of A_MTM_CORE.java are, and the related methods where said lines are contained?

Link to comment
Share on other sites

Seigyoku gave the perfect answer, I just wanted to add: paste.minecraftforge.net <-- post your mainMod java file here, the one where you have the @mod annotation and stuff, sett highlighting to Java and give us the link, that will make solving your issues a lot easier!

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Im only partly following what you said but im useing ID codes that minecraft isint useing and im useing idex codes in my own sprite sheets and sure anything to help why it wont allow any further addons.

 

Line 11:    super(par1, par2, Material.rock);

 

But every other Ore block has no problem with this.

 

Line 453: AmethystBlock = new A_MTM_BlockCore(this.AmethystBlockID, 39).setBlockName("AmethystBlock");

 

I think you have had a typo or somethign this is line 453. but iwth new error log its 447 FYI

 

and im not sure what you mean by the methods  (My brains is mush atm figureing this out)

 

2013-02-14 15:49:39 [iNFO] [sTDERR] java.lang.ArrayIndexOutOfBoundsException: 31541

2013-02-14 15:49:39 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:324)

2013-02-14 15:49:39 [iNFO] [sTDERR] at net.minecraft.block.Block.<init>(Block.java:359)

2013-02-14 15:49:39 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_BlockCore.<init>(A_MTM_BlockCore.java:11)

2013-02-14 15:49:39 [iNFO] [sTDERR] at MeetTheMod.common.A_MTM_CORE.load(A_MTM_CORE.java:447)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:485)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

2013-02-14 15:49:39 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

2013-02-14 15:49:39 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)

2013-02-14 15:49:39 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)

2013-02-14 15:49:39 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:657)

2013-02-14 15:49:39 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:207)

2013-02-14 15:49:39 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:456)

2013-02-14 15:49:39 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-02-14 15:49:39 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:744)

2013-02-14 15:49:39 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source)

2013-02-14 15:50:00 [iNFO] [sTDERR] Someone is closing me!

 

I think i needed to post a new log since iv been trying to configure to get a work around coulkd be the same i had to re-add Amethyst into my main core class file sorry.

 

 

I wasint sure what you ment or how much i was suppose to paste in but: http://paste.minecraftforge.net/view/e0ca0ad5

Link to comment
Share on other sites

I can explain this simply: When you initialize a block or item, the first parameter usually is the object's ID. The object gets shoved into net.minecraft.block.Block.blocksList[iD] and net.minecraft.item.Item.itemsList[iD] if it's a block, or into net.minecraft.item.Item.itemsList[iD+256] if it's just an item. This is a very important part of initialization, because:

 

public static final Block[] blocksList = new Block[4096];

 

public static Item[] itemsList = new Item[32000];

 

This can't be changed easily unless we alter the base code, or know how to tell Forge to change it for us.

 

The constructor I showed earlier lets us know how the ID part of the block's initialization is handled:

 

public Block(int par1, Material par2Material)

    {

        this.blockConstructorCalled = true;

        this.enableStats = true;

        this.stepSound = soundPowderFootstep;

        this.blockParticleGravity = 1.0F;

        this.slipperiness = 0.6F;

 

        if (blocksList[par1] != null)

        {

            throw new IllegalArgumentException("Slot " + par1 + " is already occupied by " + blocksList[par1] + " when adding " + this);

        }

        else

        {

            this.blockMaterial = par2Material;

            blocksList[par1] = this;

                this.blockID = par1;

            this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

            opaqueCubeLookup[par1] = this.isOpaqueCube();

            lightOpacity[par1] = this.isOpaqueCube() ? 255 : 0;

            canBlockGrass[par1] = !par2Material.getCanBlockGrass();

        }

        isDefaultTexture = (getTextureFile() != null && getTextureFile().equalsIgnoreCase("/terrain.png"));

    }

 

Because of this, calling an index outside of these arrays tend to lead to this kind of compile error.

 

Some examples straight from Block's variables:

 

public static final Block stone = (new BlockStone(1, 1)).setHardness(1.5F).setResistance(10.0F).setStepSound(soundStoneFootstep).setBlockName("stone");

public static final Block dirt = (new BlockDirt(3, 2)).setHardness(0.5F).setStepSound(soundGravelFootstep).setBlockName("dirt");

 

So, we know that Stone Blocks are stored in blocksList[1], and Dirt Blocks are stored in blocksList[3].

 

Meanwhile, sprite sheet indexing is an entirely different matter, that's handled in a different part of initialization.

 

super(par1, par2, Material.rock);

 

That parameter in line 11 of A_MTM_BlockCore.java is your texture index parameter. See the difference?

 

 

 

End lesson! Moving on:

 

Your initialization of the block itself seems okay from the surface, but I'd like to see the constructor you're using with line 11 of A_MTM_BlockCore.java just in case. Is that alright?

 

Meanwhile, the trail ends at your code attempting to pull an ID from your config file. Since you have an in-case ID for AmethystBlock to be 3607, the issue could be within the config file itself. Is there anything that looks like the number 31541 or a similar 5-digit number in there?

Link to comment
Share on other sites

I kinda understand but then i dont im still a total amature so some things kinda has to be stupifyed if u get what i mean. Like im that amatureish i could take a shot at fixing it if i understand correctly or ask for your kindness and show me the code i need to use to totally knock out the problem pernamently, im still pritty new so forgive me if i dont understand the very basic descriptions your help is much apresiated <3 :) but heres the BlockCore code:

package MeetTheMod.common;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

 

public class A_MTM_BlockCore extends Block

{

  public A_MTM_BlockCore(int par1, int par2)

  {

    super(par1, par2, Material.rock);

    this.setCreativeTab(CreativeTabs.tabBlock);

  }

 

  public String getTextureFile()

  {

    return "/MeetTheMod/BlockSpriteSheet.png";

  }

}

 

This is what i use and have had no problem with any other block useing this its just why stop at the 8th add on ? I dont mind giving out some code cause my mod im maken is well its... Iv got alot planned besides new ores and tools ill be adding in stuff not related to that for example new biome anyway gone off topic :)

Link to comment
Share on other sites

Hows you config file crafty?

Since you have an in-case ID for AmethystBlock to be 3607' date=' the issue could be within the config file itself. Is there anything that looks like the number 31541 or a similar 5-digit number in there?[/quote']

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Hows you config file crafty?

Since you have an in-case ID for AmethystBlock to be 3607' date=' the issue could be within the config file itself. Is there anything that looks like the number 31541 or a similar 5-digit number in there?[/quote']

 

I compleatly forgot about that part, Were is this config file cause if theres a class file were you make a config then im that noobish i probally dont even know i have it lol but i searched every part of my code in every class there is no number that high anywere its when i add in that 8th ore just seems to crash

Link to comment
Share on other sites

That's okay! We all start off trying to figure out our hands from our feet in this sort of hobby. ;)

 

I'll use what you supplied for hopefully something easier in explaining what's going on:

 

public A_MTM_BlockCore(int par1, int par2)

  {

    super(par1, par2, Material.rock);

    this.setCreativeTab(CreativeTabs.tabBlock);

  }

 

more or less means:

 

public A_MTM_BlockCore(int ID, int texture)

  {

    super(ID, texture, Material.rock);

    this.setCreativeTab(CreativeTabs.tabBlock);

  }

 

Your textures come from the sprite sheet you supplied for your blocks. That you already figured out, I think, looking at your getTextureFile() method for that class.

 

So you're initializing AmethystBlock:

 

AmethystBlock = new A_MTM_BlockCore(this.AmethystBlockID, 39).setBlockName("AmethystBlock");

 

this.AmethystBlockID is the ID of your AmethystBlock

39 is the texture index you're using from your supplied sprite sheet

 

So, there isn't anything wrong with your code so far, actually! But for some reason, your compiler thinks that AmethystBlockID has the value 31541, which is no good to us. Due to that, we have to keep looking:

 

this.AmethystBlockID = config.getBlock("Amethyst block", "block", 3607).getInt();

 

This seems to be the real culprit. You supplied a default just-in-case value of 3607, well within the bounds of the block ID array, so the config file should be the cause of your problems. There's a very good chance that there's confusion between item IDs with block IDs in there, as 31541 is suspiciously looking like an item ID.

 

As for where the config file should be, look in \forge\mcp\jars\config\, is anything that looks like yours in there? Configuration files aren't really known to me yet, so I'm mainly going off of what I see in this link: http://www.minecraftforge.net/wiki/How_to_make_an_advanced_configuration_file

 

 

 

EDIT: Okay, I checked out your error logs again, the older log marks line 453:

 

AquamarineBlock = new A_MTM_BlockCore(this.AquamarineBlockID, 36).setBlockName("AquamarineBlock");

 

while your newer error lists line 447:

 

AmethystOre = new A_MTM_BlockCore(this.AmethystOreID, 23).setBlockName("AmethystOre");

 

Both have the same marked issue though, 31541 as an arrayOutOfBoundsException. Why is your compiler spitting out the same problem at different lines of code each time you try to test it? :o

Link to comment
Share on other sites

That kinda made more sence to me about double initialising the block, i fiddled around abit and removed the get testurefile part same error i also noticed in the config were it says this.whatever it was set to getitem weirdly enough i changed it to getblock but same error i thought it was the problem my heart filled with joy to be emptyed like a poped balloon xD

 

as for the new line code of 447 , when i posted this i was still fiddleing around trying to fix it like putting Amethyst into a new core file and pasting it back in may have added a dew extra space lines hence the new number.

 

As for the config folder i see 4 CFG files named: "Forge" "ForgeChunjLoading" "MeetTheMod" (My Mods name @Copyright :3) and "MeetTheMod_Two" <-- thats only there cuase of my messing around trying to fix it i think thats unimportant i didint make that package untill after the error for 2 days driving me mad thinjking of ways around it.

 

And i shall have a wonder on that link you posted, do you know how to fix it or are you still figureing it out btw? cause ill feel very stupid if u literally  told me the fix xD

Link to comment
Share on other sites

Any kind of text editor, like the default notepad that comes with windows works :)

if you want a more fancy program, then Notepad++ is a free notepad with nifty features like syntax highlighting.

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

as for the new line code of 447 , when i posted this i was still fiddleing around trying to fix it like putting Amethyst into a new core file and pasting it back in may have added a dew extra space lines hence the new number.

 

Alright, I'm just trying to make sure for myself which of your block variables is giving you a headache. :D One more time to confirm, which one is being a pain, AmethystBlock or AmethystOre?

 

And i shall have a wonder on that link you posted, do you know how to fix it or are you still figureing it out btw? cause ill feel very stupid if u literally  told me the fix xD

 

I'm pretty clueless as to how Forge formats config files, but if the error is inside the file, it should be easy enough to spot. Just remember the number, 31541!

Link to comment
Share on other sites

Its the ore thats seems to be B****ing out lol even when i removed Amethyst from my FULLY coded 19 set i have it backed up and saved th full code and i used that to paste in one by one untill it went wrong lol and well to my supprise item id codes in that file ate in the 30,000s which makes no sence to me if that can be somewhat explained lol heres the paste file i could probally take a stab at it but yeno what you guys think: http://paste.minecraftforge.net/view/e39f5618

Link to comment
Share on other sites

####################

# amethyst ore

####################

 

"amethyst ore" {

    I:block=31541

}

 

Ding ding, here's our problem, it looks like. 8) I'll be editing this post as I try to traceback the process.

 

As for you wondering why your Item IDs are so high, can we see your custom item class? This might actually solve why the config file is doing what it's doing.

 

 

 

EDIT: Okay, we know now how the config file is messing things up, just not why.

 

public static Block AmethystOre;

 

this.AmethystOreID = config.getItem("Amethyst Ore", "block", 3307).getInt();

this.AmethystOreID = config.getBlock("Amethyst Ore", "block", 3307).getInt();

 

####################

# amethyst ore

####################

 

"amethyst ore" {

    I:block=31541

}

 

AmethystOre = new A_MTM_BlockCore(this.AmethystOreID, 23).setBlockName("AmethystOre");

 

Following that, and looking at what you wrote before:

 

even when i removed Amethyst from my FULLY coded 19 set

 

Since the value is already written into the config file and saved, disabling the code doesn't entirely help, you'll have to manually edit the value yourself in there too. See if it behaves changing the value from 31541 to 3307.

Link to comment
Share on other sites

for some weird reason when i posted my last reply i was booted offt he site for ages >.> but yea  i edited the number and saw that i had a item term in the block code i was like *FACEPALM* Probally would have noticed if i could get on this site faster xD but i thank you guys for your massive help tho :D i now understand some of the code more and i now know were to go if i get some weird id code error :3 I love yous ^_^ now i gota fix textures >.> my client loads perfectly now with all 19 ores tools and armors and blocks :D SUCCESS! now texture fixing and i can finally after 3 days progress with my big ibg mod! But im sure ill be back here with another problem ;)

 

Much love to you guys :D any suggestions on what to add into my mod wud be awesome :o IV already got big plans from certain mobs and other stuff ^_^

 

Hopefully people who get stuck like me find this :P Omg i feel like a car has been lifted off my back now so much relief :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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