It's just a way (potentially) for mods to mark their GUIs for sorting themselves, instead of having to add them to these checks. I've also been considering moving the hardcoded properties into a text file so that support for things that aren't using that system can be done by editing a config file instead of the code.
As an example, a mod author could write
@ContainerGUI
public class GuiMyChest extends GuiContainer {
}
and if everything was done correctly it would automatically support sorting as if it was added to the list of chests in InvTweaksModCompatability
Still I recommend the old version (mine) for now, because I compiled yours and whenevery I want to sort the items I get a crash
java.lang.NoSuchFieldError: inventoryContainer
at invtweaks.ContainerManager.<init>(ContainerManager.java:53)
at invtweaks.InvTweaks.handleMiddleClick(InvTweaks.java:467)
at invtweaks.InvTweaks.onTickInGUI(InvTweaks.java:126)
at invtweaks.handlers.ClientTick.tickEnd(ClientTick.java:43)
at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:22)
at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:138)
at cpw.mods.fml.common.FMLCommonHandler.onRenderTickEnd(FMLCommonHandler.java:372)
at net.minecraft.client.Minecraft.J(Minecraft.java:884)
at net.minecraft.client.Minecraft.run(Minecraft.java:771)
at java.lang.Thread.run(Unknown Source)
Had to compile it through some other programs, because I can't compile it through mcp (it doesn't support java 1.7)
Still I recommend the old version (mine) for now, because I compiled yours and whenevery I want to sort the items I get a crash
Had to compile it through some other programs, because I can't compile it through mcp (it doesn't support java 1.7)
That looks like you didn't reobfuscate it
I've got a weird dev setup, I don't use MCP's recompiler but I just throw it in forge/mcp/bin/minecraft and run reobf when I need to test normally. (I'd like to get a better way of doing that going too, so I can have it build a final jar automatically.)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
at ban.b(EntityRenderer.java:1158)
at net.minecraft.client.Minecraft.J(Minecraft.java:882)
at net.minecraft.client.Minecraft.run(Minecraft.java:771)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
at ban.b(EntityRenderer.java:1158)
at net.minecraft.client.Minecraft.J(Minecraft.java:882)
at net.minecraft.client.Minecraft.run(Minecraft.java:771)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
i don't know what most of that means but is it an incompatibility with NEI maybe?
For me it works fine with NEI both on single player or server. The mods I use are the following and they are all the latest versions available currently (except extended workbench that made my game crash)
Forge 1.4.6 6.5.0.489
Flat Bedrock
Lava Fix
More Village Biomes
Creepers no Creeping
Optifine
ChickenChunks
Ender Storage
Not Enough Items (+ plugins and RP)
Wireless Redstone
TreeCapitator
Backpack
BuildCraft
Chest Transporter
Chococraft
CJB Measure and Moreinfo
Condensed Blocks
Extra Biomes XL
Fancy Fences
Forestry
Damage Indicators
Diamond Buckets Plus
Dimensional Anchors
Tubestuff
Enchanting Plus
Extended Workbench
Factorization
Fancy Fences
Flan's Mod (WWII)
Flowercraft
Haycraft
Industrial Craft 2
InGame Mod List
Inventory Tweaks
Iron Chest
Jammy's Furniture
MAtmos
More Bows
More Pistons
Mystcraft
OmniTools
Plugins for Forestry
PortalGun
Power Converters
Railcraft
Red Power 2
Rei's Minimap
Slabcraft
Special Armor
Staircraft
Steves Carts
Thaumcraft
Traincraft
Twilight Forest
Useful Food
BC3 Additional Pipes Unofficial
BC3 LogisticsPipes
BC3 Thermal Expansion
BC3 ValvePipe
IC2 Advanced Machines Original
IC2 AdvancedSolarPanel
IC2 CompactSolars
IC2 GregTech
IC2 Nuclear Control
IC2 Transformers
Did you try it with the sort key and the middle mouse click?
Should be the same effect as the z (I guess)
I personally just tried it because it was mentioned in here XD I would not care much about the inventory of my auto crafting tables. But lets try it out... dum dum dum.. When the middle mouse button is used the same thing as pressing z happens. Minecraft locks for 2-3 seconds and nothing gets arranged.
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
at ban.b(EntityRenderer.java:1158)
at net.minecraft.client.Minecraft.J(Minecraft.java:882)
at net.minecraft.client.Minecraft.run(Minecraft.java:771)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
i don't know what most of that means but is it an incompatibility with NEI maybe?
Yeah I get the same crashes, even with just Forge, CCCore, NEI, and invtweaks, since 1.4.4. Perhaps it's a MagicLauncher thing? (I don't actually know why this would ever happen, but sometimes bugs are strange.) As a workaround, I just use creative+ for sp, and actually change my gamemode for mp when the server doesn't have NEI.
Yeah I get the same crashes, even with just Forge, CCCore, NEI, and invtweaks, since 1.4.4. Perhaps it's a MagicLauncher thing? (I don't actually know why this would ever happen, but sometimes bugs are strange.) As a workaround, I just use creative+ for sp, and actually change my gamemode for mp when the server doesn't have NEI.
Using MultiMC, just to point out even more than it might be magic launcher. I have not used that awesome loader since 1.2.5.
I personally just tried it because it was mentioned in here XD I would not care much about the inventory of my auto crafting tables. But lets try it out... dum dum dum.. When the middle mouse button is used the same thing as pressing z happens. Minecraft locks for 2-3 seconds and nothing gets arranged.
The Project Table's inventory changed between pr5 and pr6, with that new template slot.
It's all open-source still, so go ahead -- You'll probably need to rename a few things back because I went a bit crazy on that, and I would recommend taking out the acceptedMinecraftVersions setting as no one seems to use it anyway, and it breaks when Mojang puts out updates like 1.4.7 that are compatable. You'll also want to remove certificateFingerprint or change it if you know what that's used for, leaving that in will make FML complain in its log file when you load the mod unless I packaged it.
The important files for forge are the modifed mod_InvTweaks file (Can be renamed to get it out of modloader's way, but there's already an InvTweaks.java...), invtweaks.handlers.ClientTick, and mcmod.info.
Lordmau5
As an example, a mod author could write
and if everything was done correctly it would automatically support sorting as if it was added to the list of chests in InvTweaksModCompatability
Still I recommend the old version (mine) for now, because I compiled yours and whenevery I want to sort the items I get a crash
Had to compile it through some other programs, because I can't compile it through mcp (it doesn't support java 1.7)
That looks like you didn't reobfuscate it
I've got a weird dev setup, I don't use MCP's recompiler but I just throw it in forge/mcp/bin/minecraft and run reobf when I need to test normally. (I'd like to get a better way of doing that going too, so I can have it build a final jar automatically.)
And what are you using, ModLoader or Forge? (doesn't matter but anyways)
// Hey, that tickles! Hehehe!
Time: 12/30/12 11:29 PM
Description: Rendering screen
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
at ban.b(EntityRenderer.java:1158)
at net.minecraft.client.Minecraft.J(Minecraft.java:882)
at net.minecraft.client.Minecraft.run(Minecraft.java:771)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at codechicken.nei.LayoutManager.onPreDraw(LayoutManager.java:95)
at codechicken.nei.forge.GuiContainerManager.preDraw(GuiContainerManager.java:506)
at avf.a(GuiContainer.java:101)
at avv.a(SourceFile:31)
at avs.a(GuiContainerCreative.java:586)
-- Screen render details --
Details:
Screen name: avs
Mouse location: Scaled: (289, 201). Absolute: (579, 76)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [ays['Dustin'/100, l='MpServer', x=102.92, y=85.62, z=-762.47]]
Chunk stats: MultiplayerChunkCache: 60
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options:
Level spawn location: World: (87,4,-773), Chunk: (at 7,0,11 in 5,-49; contains blocks 80,0,-784 to 95,255,-769), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
Level time: 148718 game time, 357351 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 55 total; [qc['Creeper'/19, l='MpServer', x=57.50, y=56.00, z=-758.50], qr['Zombie'/21, l='MpServer', x=55.50, y=56.00, z=-765.50], qc['Creeper'/20, l='MpServer', x=56.50, y=56.00, z=-762.50], qc['Creeper'/22, l='MpServer', x=49.66, y=56.00, z=-751.91], qn['Skeleton'/27, l='MpServer', x=80.34, y=56.00, z=-812.06], qu['Villager'/29, l='MpServer', x=90.69, y=55.00, z=-761.56], qu['Villager'/28, l='MpServer', x=91.56, y=55.00, z=-752.31], pi['Iron Golem'/31, l='MpServer', x=89.41, y=56.00, z=-760.16], pi['Iron Golem'/30, l='MpServer', x=86.00, y=56.00, z=-761.19], px['item.item.rottenFlesh'/34, l='MpServer', x=95.63, y=56.13, z=-766.06], pi['Iron Golem'/35, l='MpServer', x=89.47, y=56.00, z=-762.72], pi['Iron Golem'/32, l='MpServer', x=87.63, y=56.00, z=-761.34], pi['Iron Golem'/33, l='MpServer', x=90.97, y=56.00, z=-758.49], pi['Iron Golem'/38, l='MpServer', x=89.72, y=56.00, z=-754.19], pi['Iron Golem'/39, l='MpServer', x=91.05, y=56.00, z=-760.30], pi['Iron Golem'/36, l='MpServer', x=88.59, y=56.00, z=-756.25], pi['Iron Golem'/37, l='MpServer', x=86.04, y=56.00, z=-754.59], pi['Iron Golem'/42, l='MpServer', x=87.59, y=56.00, z=-759.68], pi['Iron Golem'/43, l='MpServer', x=89.29, y=56.00, z=-758.50], pi['Iron Golem'/40, l='MpServer', x=87.03, y=56.00, z=-758.00], pi['Iron Golem'/41, l='MpServer', x=86.03, y=56.00, z=-763.16], pi['Iron Golem'/46, l='MpServer', x=86.00, y=56.00, z=-750.09], pi['Iron Golem'/44, l='MpServer', x=87.88, y=56.00, z=-754.06], qu['Villager'/45, l='MpServer', x=87.53, y=55.00, z=-750.41], qn['Skeleton'/52, l='MpServer', x=109.75, y=56.00, z=-793.25], qc['Creeper'/59, l='MpServer', x=116.13, y=56.00, z=-769.28], qn['Skeleton'/58, l='MpServer', x=124.25, y=56.00, z=-770.28], qr['Zombie'/57, l='MpServer', x=121.56, y=56.00, z=-770.00], qc['Creeper'/63, l='MpServer', x=118.50, y=56.00, z=-712.50], qc['Creeper'/62, l='MpServer', x=118.50, y=56.00, z=-735.50], qr['Zombie'/61, l='MpServer', x=124.91, y=56.00, z=-751.28], qn['Skeleton'/60, l='MpServer', x=123.16, y=56.00, z=-750.66], qp['Spider'/71, l='MpServer', x=139.88, y=56.00, z=-806.56], qn['Skeleton'/64, l='MpServer', x=123.50, y=56.00, z=-715.50], qc['Creeper'/76, l='MpServer', x=135.50, y=56.00, z=-735.50], qn['Skeleton'/77, l='MpServer', x=132.88, y=56.00, z=-732.69], qr['Zombie'/78, l='MpServer', x=136.56, y=56.00, z=-718.91], qp['Spider'/79, l='MpServer', x=146.59, y=56.00, z=-801.94], qr['Zombie'/72, l='MpServer', x=135.31, y=56.00, z=-752.09], qr['Zombie'/73, l='MpServer', x=133.94, y=56.00, z=-755.28], qr['Zombie'/74, l='MpServer', x=136.50, y=56.00, z=-749.50], qc['Creeper'/75, l='MpServer', x=143.13, y=56.00, z=-750.13], qn['Skeleton'/85, l='MpServer', x=146.28, y=56.00, z=-740.97], qn['Skeleton'/84, l='MpServer', x=157.50, y=56.00, z=-758.50], qp['Spider'/87, l='MpServer', x=144.38, y=56.00, z=-749.50], qp['Spider'/86, l='MpServer', x=154.47, y=56.00, z=-744.78], qc['Creeper'/81, l='MpServer', x=146.66, y=56.00, z=-753.91], qc['Creeper'/80, l='MpServer', x=149.91, y=56.00, z=-762.31], qn['Skeleton'/83, l='MpServer', x=156.50, y=56.00, z=-756.50], qn['Skeleton'/82, l='MpServer', x=158.50, y=56.00, z=-754.50], qn['Skeleton'/92, l='MpServer', x=159.16, y=56.00, z=-780.06], qp['Spider'/89, l='MpServer', x=153.97, y=56.00, z=-715.94], qn['Skeleton'/88, l='MpServer', x=154.50, y=56.00, z=-711.50], qr['Zombie'/90, l='MpServer', x=152.50, y=56.00, z=-710.50], ays['Dustin'/100, l='MpServer', x=102.92, y=85.62, z=-762.47]]
Retry entities: 0 total; []
Stacktrace:
at ayp.a(WorldClient.java:440)
at net.minecraft.client.Minecraft.b(Minecraft.java:2401)
at net.minecraft.client.Minecraft.run(Minecraft.java:787)
at java.lang.Thread.run(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.4.6
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_07, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 239717432 bytes (228 MB) / 519110656 bytes (495 MB) up to 1037959168 bytes (989 MB)
LiteLoader Mods: 0 loaded mod(s)
JVM Flags: 2 total; -Xmx1024M -Xms512M
AABB Pool Size: 6010 (336560 bytes; 0 MB) allocated, 4578 (256368 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.25 FML v4.6.12.511 Minecraft Forge 6.5.0.471 Optifine OptiFine_1.4.6_HD_U_A3 13 mods loaded, 13 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
mod_CodeChickenCore [CodeChicken Core] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
mod_NotEnoughItems [Not Enough Items] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
GuiAPI [GuiAPI] (GuiAPI-0.15.2-1.4.6.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
CustomSpawner [DrZhark's CustomSpawner] (CustomMobSpawner 1.10.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
InfernalMobs [Infernal Mobs] (InfernalMobs_1.4.6.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
mod_InvTweaks [Inventory Tweaks] (InventoryTweaks_v1.49_(1.4.6).zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
MagicYarn [Magic Yarn] (MagicYarn_1.4.6.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
mod_PsycosisHCModernFood [mod_PsycosisHCModernFood] (ModernFoodsMod-146.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
MorePistons [More Pistons] (More Pistons 1.1.1 for [1.4.6].zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
NetherOres [Nether Ores] (NetherOres_1.4.6.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
LWJGL: 2.4.2
OpenGL: GeForce 6150SE nForce 430/integrated/SSE2 GL version 2.1.2, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'forge,fml'
Type: Client (map_client.txt)
Texture Pack: Default
Profiler Position: N/A (disabled)
Vec3 Pool Size: 890 (49840 bytes; 0 MB) allocated, 637 (35672 bytes; 0 MB) used
For me it works fine with NEI both on single player or server. The mods I use are the following and they are all the latest versions available currently (except extended workbench that made my game crash)
Forge 1.4.6 6.5.0.489
Flat Bedrock
Lava Fix
More Village Biomes
Creepers no Creeping
Optifine
ChickenChunks
Ender Storage
Not Enough Items (+ plugins and RP)
Wireless Redstone
TreeCapitator
Backpack
BuildCraft
Chest Transporter
Chococraft
CJB Measure and Moreinfo
Condensed Blocks
Extra Biomes XL
Fancy Fences
Forestry
Damage Indicators
Diamond Buckets Plus
Dimensional Anchors
Tubestuff
Enchanting Plus
Extended Workbench
Factorization
Fancy Fences
Flan's Mod (WWII)
Flowercraft
Haycraft
Industrial Craft 2
InGame Mod List
Inventory Tweaks
Iron Chest
Jammy's Furniture
MAtmos
More Bows
More Pistons
Mystcraft
OmniTools
Plugins for Forestry
PortalGun
Power Converters
Railcraft
Red Power 2
Rei's Minimap
Slabcraft
Special Armor
Staircraft
Steves Carts
Thaumcraft
Traincraft
Twilight Forest
Useful Food
BC3 Additional Pipes Unofficial
BC3 LogisticsPipes
BC3 Thermal Expansion
BC3 ValvePipe
IC2 Advanced Machines Original
IC2 AdvancedSolarPanel
IC2 CompactSolars
IC2 GregTech
IC2 Nuclear Control
IC2 Transformers
actuallyalreadyThe project table does not arrange for me if I press the z button of IT. But the other two buttons || and = work just fine.
Should be the same effect as the z (I guess)
I personally just tried it because it was mentioned in here XD I would not care much about the inventory of my auto crafting tables. But lets try it out... dum dum dum.. When the middle mouse button is used the same thing as pressing z happens. Minecraft locks for 2-3 seconds and nothing gets arranged.
Yeah I get the same crashes, even with just Forge, CCCore, NEI, and invtweaks, since 1.4.4. Perhaps it's a MagicLauncher thing? (I don't actually know why this would ever happen, but sometimes bugs are strange.) As a workaround, I just use creative+ for sp, and actually change my gamemode for mp when the server doesn't have NEI.
Using MultiMC, just to point out even more than it might be magic launcher. I have not used that awesome loader since 1.2.5.
Sooner or later, with Mod API everyone is going to miss both Modloader and Forge.. hopefully XD
The Project Table's inventory changed between pr5 and pr6, with that new template slot.
Should be the correct numbers -- at least those worked for me.
(Edit: And while doing that I realized -- you decompiled it instead of just grabbing the develop_mcp branch from github, didn't you?)
Yes I did, because when I compiled the develop_mcp branch it didn't work for me.
Whenever I opened my inventory I got a crash
By the way, could I use your forge code for 1.50 version when adding your credits?
The important files for forge are the modifed mod_InvTweaks file (Can be renamed to get it out of modloader's way, but there's already an InvTweaks.java...), invtweaks.handlers.ClientTick, and mcmod.info.