The Wayback Machine - https://web.archive.org/web/20200928051353/https://github.com/cuberite/cuberite/pull/4842
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

Adding Loottables for item grids #4842

Draft
wants to merge 98 commits into
base: master
from
Draft

Conversation

@12xx12
Copy link
Contributor

12xx12 commented Aug 30, 2020

As discussed here we'd like to add loot tables to the server
Minecraft Wiki

Fixes #3803

this is work in progress

This is only for chests. The other ones can be based on this also but are not yet supported

Things i would do

  • add default loot tables
    • add object that distributes them
    • add json parser
    • add function that interprets them
  • add custom loot tables per world

The loot tables are quite powerfull so it takes some time/effort and many enums to actually implement them.

At this point the cosole spamms some error messages because there are some features added in the loot tables that are not in cuberite and this is told to the user

Note: this pull request is quite big because it contains the json files

@12xx12 12xx12 marked this pull request as draft Aug 30, 2020
@12xx12 12xx12 changed the title Adding Loottables Adding Loottables for chests Aug 30, 2020
@12xx12
Copy link
Contributor Author

12xx12 commented Aug 30, 2020

@madmaxoft
@bearbin

There are some errors in some travis-ci build caused from ossupport/file.h

It says that it doesn't know what type AString is.

Edit: I didn't change that file - no clue why it only fails here

Edit 2: Now I know... did the wrong order in the headers in the cpp file... facepalm

Copy link
Member

peterbell10 left a comment

Some random comments, I know this isn't ready for a full review.

src/LootTableProvider.cpp Outdated Show resolved Hide resolved
src/LootTableProvider.cpp Outdated Show resolved Hide resolved
src/LootTableProvider.cpp Outdated Show resolved Hide resolved
src/LootTableProvider.cpp Outdated Show resolved Hide resolved
src/LootTableProvider.cpp Outdated Show resolved Hide resolved
src/LootTableProvider.h Outdated Show resolved Hide resolved
src/LootTableProvider.h Outdated Show resolved Hide resolved
src/LootTableProvider.h Outdated Show resolved Hide resolved
src/LootTableProvider.h Outdated Show resolved Hide resolved
src/LootTableProvider.cpp Outdated Show resolved Hide resolved
@12xx12
Copy link
Contributor Author

12xx12 commented Sep 1, 2020

Some random comments, I know this isn't ready for a full review.

Any help is appreciated - thank you

12xx12 added 25 commits Aug 28, 2020
…cuberite into 12xx12-Loottable"

This reverts commit 9f3be5e, reversing
changes made to 45501d6.
added loot table json files
removed unwanted types from binary
added loot tables to symlink CMakeLists.txt
added loot tables to WindowsExecutables.list and UnixExecutables.list
added cLootTableProvider to World.cpp
added file reading for loot tables - no parsing at this point
added custom loot tables
start of filling with loot
@bearbin bearbin self-requested a review Sep 17, 2020
@12xx12
Copy link
Contributor Author

12xx12 commented Sep 18, 2020

Ok - the loot tables for chests work now. As you can see there a ton of todo's in the code... some will not be resolved in this PR due to missing implementation. Those are marked with a date and my username.

@12xx12
Copy link
Contributor Author

12xx12 commented Sep 18, 2020

I'll add everthing i can add (even the stuff unrelated to chests) and leave and issue with the list of things left

12xx12
12xx12
@12xx12 12xx12 changed the title Adding Loottables for chests Adding Loottables for item grids Sep 24, 2020
@12xx12
Copy link
Contributor Author

12xx12 commented Sep 27, 2020

At the moment each world spits out 20 error messages that some feature isn't added i'm not shure what to do:

Removing the entries in the loot tables doesn't seem fitting.
Disableing the error messages doesn't seem that good because then if someone wan'ts to use the feature he/her isn't notified that this isn't working...

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

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.