StartingInventory

StartingInventory

6M Downloads

Inventory doesn't load on linux-based systems

Haggle1996 opened this issue · 4 comments

commented

Hi there,

Users of my pack do not get starting inventory when they start on a linux-based system (or the server is on a linux-based system). I develop the pack on a Windows-based system, and it works fine for other users on Windows. This is probably related to the age-old issue of how linux and windows differ in line endings.

commented

The 16 apples, torches, and stone tools are the default configuration for StartingInventory. I have a hunch it's not reading the cfg file on the server.

commented

I don't know if it's the same issue, but on our dedicated Debian server the StartingInventory.txt file must be in /config/StartingInventory/ whereas on clients (I'm on Windows) it has to go in the root /config/ folder for it to work. Furthermore, it gives the complete wrong items.

I have this:

TConstruct:pickaxe,1,0,{InfiTool:{BaseDurability:121,Head:3,HeadEXP:1L,BaseAttack:3,ToolEXP:1L,HarvestLevel:0,Attack:3,RenderHead:3,ModDurability:0.0f,Handle:0,Broken:0b,Shoddy:0.0f,RenderHandle:0,Accessory:0,MiningSpeed:400,RenderAccessory:0,ToolLevel:1,HarvestLevelModified:0b,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:121,Modifiers:0},display:{Name:"§fFlint Pickaxe"}}
TConstruct:hatchet,1,0,{InfiTool:{BaseDurability:121,Head:3,BaseAttack:5,ToolEXP:0L,HarvestLevel:1,Attack:5,RenderHead:3,ModDurability:0.0f,Handle:0,Broken:0b,Shoddy:0.0f,RenderHandle:0,MiningSpeed:400,ToolLevel:1,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:121,Modifiers:0},display:{Name:"§fFlint Hatchet"}}
TConstruct:shovel,1,0,{InfiTool:{BaseDurability:121,Head:3,BaseAttack:4,ToolEXP:0L,HarvestLevel:1,Attack:4,RenderHead:3,ModDurability:0.0f,Handle:0,Broken:0b,Shoddy:0.0f,RenderHandle:0,MiningSpeed:400,ToolLevel:1,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:121,Modifiers:0},display:{Name:"§fFlint Shovel"}}
TConstruct:dagger,1,0,{InfiTool:{BaseDurability:121,Head:3,BaseAttack:3,ToolEXP:0L,HarvestLevel:1,Attack:3,RenderHead:3,ModDurability:0.0f,Handle:0,Broken:0b,Shoddy:0.0f,RenderHandle:0,Accessory:0,MiningSpeed:400,RenderAccessory:0,ToolLevel:1,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:121,Modifiers:0},display:{Name:"§fFlint Dagger"}}
flansmod:m9,1,0
OpenBlocks:sleepingBag,1,0
harvestcraft:epicbaconItem,2,0
flansmod:m9Ammo,5,0

Which works fine on the windows client (in root config folder), but once I move it to the sub directory on the server (otherwise it has zero effect) it will instead give me a few stone tools, 16 apples, and 16 torches.

Note that I am on 1.7.10, I am guessing that development for it has long stopped.

commented

Figured as much. Well, I solved it by deleting the config on the server, logging in, using creative mode to give myself the same items, then running "/startinginv save" command - it's working now.

The startingInventory.txt was created in the same location (not in a subdirectory), the EOL encoding is the same (Windows/DOS) but the txt on the Linux machine is UTF-8 whereas the Windows txt was ANSI. This encoding difference may be the problem, but the txt is also slightly different:

TConstruct:pickaxe,1,0,{InfiTool:{BaseDurability:60,Head:3,HeadEXP:0L,BaseAttack:3,ToolEXP:0L,Built:1b,HarvestLevel:0,Attack:3,RenderHead:3,ModDurability:0.0f,Handle:3,Broken:0b,Shoddy:0.0f,RenderHandle:3,Accessory:3,MiningSpeed:280,RenderAccessory:3,ToolLevel:1,HarvestLevelModified:0b,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:60,Modifiers:0,},display:{Name:"?fFlint Pickaxe",},}
TConstruct:hatchet,1,0,{InfiTool:{BaseDurability:60,Head:3,BaseAttack:5,ToolEXP:0L,Built:1b,HarvestLevel:1,Attack:5,RenderHead:3,ModDurability:0.0f,Handle:3,Broken:0b,Shoddy:0.0f,RenderHandle:3,MiningSpeed:280,ToolLevel:1,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:60,Modifiers:0,},display:{Name:"?fFlint Hatchet",},}
TConstruct:shovel,1,0,{InfiTool:{BaseDurability:60,Head:3,BaseAttack:4,ToolEXP:0L,Built:1b,HarvestLevel:1,Attack:4,RenderHead:3,ModDurability:0.0f,Handle:3,Broken:0b,Shoddy:0.0f,RenderHandle:3,MiningSpeed:280,ToolLevel:1,Unbreaking:0,ExtraRedstone:1,Damage:0,BonusDurability:0,TotalDurability:60,Modifiers:0,},display:{Name:"?fFlint Shovel",},}
TConstruct:dagger,1,0,{InfiTool:{BaseDurability:60,Head:3,BaseAttack:3,ToolEXP:0L,Built:1b,HarvestLevel:1,Attack:3,RenderHead:3,ModDurability:0.0f,Handle:3,Broken:0b,Shoddy:0.0f,RenderHandle:3,Accessory:3,MiningSpeed:280,RenderAccessory:3,ToolLevel:1,Unbreaking:0,Damage:0,BonusDurability:0,TotalDurability:60,Modifiers:0,},display:{Name:"?fFlint Dagger",},}
flansmod:m9,1,0,{attachments:{barrel:{},grip:{},generic_0:{},scope:{},stock:{},},ammo:[0:{},],Paint:"M9",}
flansmod:m9Ammo,1,0
OpenBlocks:sleepingBag,1,0
harvestcraft:epicbaconItem,2,0

Notice the extra information given to the m9, and the reduced durability of the flint tools. Maybe one of those is the problem too, but I don't know.

Regardless, conclusion is that it seems Starting Inventory is silently failing at parsing this txt file but only on Linux, for one of these two reasons.

commented

Interesting, I will have a look.

On Aug 21, 2015, at 6:08 PM, Haggle1996 [email protected] wrote:

Hi there,

Users of my pack do not get starting inventory when they start on a linux-based system (or the server is on a linux-based system). I develop the pack on a Windows-based system, and it works fine for other users on Windows. This is probably related to the age-old issue of how linux and windows differ in line endings.


Reply to this email directly or view it on GitHub.