Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate default config to prevent NPE on first boot #24

Open
riddle opened this issue Jan 4, 2015 · 2 comments
Open

Generate default config to prevent NPE on first boot #24

riddle opened this issue Jan 4, 2015 · 2 comments
Assignees
Labels

Comments

@riddle
Copy link
Member

riddle commented Jan 4, 2015

Groups:
  Animals:
    ChunkLimit: 30
    ViewDistanceLimit: 150
    WarnOverLimit: true
    HORSE:
      Name: Horses
      ChunkLimit: 16
      ViewDistanceLimit: 150
    COW:
      Name: Cows
      ChunkLimit: 30
      ViewDistanceLimit: 150
    SHEEP:
      Name: Sheep
      ChunkLimit: 30
      ViewDistanceLimit: 150
    CHICKEN:
      Name: Chickens
      ChunkLimit: 30
      ViewDistanceLimit: 150
    PIG:
      Name: Pigs
      ChunkLimit: 30
      ViewDistanceLimit: 150
  Villagers:
    Name: Villagers and Golems
    ChunkLimit: -1
    ViewDistanceLimit: -1
    WarnOverLimit: true
    IRON_GOLEM:
      Name: Golems
      ChunkLimit: 4
      ViewDistanceLimit: 32
    VILLAGER:
      Name: Villagers
      ChunkLimit: 30
      ViewDistanceLimit: 90
EnabledWorlds:
- world
- world_nether

This needs to be added on first boot. Can be hardcoded for now, I don’t mind.

@matejdro
Copy link

matejdro commented Mar 6, 2015

@eliadil How did you do that with TC? I can't find anything.

@eliadil
Copy link

eliadil commented Mar 6, 2015

From what I remember - Tradecraft does not populate most of the nodes in config.yml. It provides a sperarte example.yml from which user can copy-paste it. On its own, Tradecraft will not crash without the nodes provided, it will just do nothing.

Good solution here would be to providde a example.yml, and if config.yml is missing, copy all the nodes from example to the newly created config,instead of using defaults from Setting class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants