Various fixes to the enchanting and loot system #206

Open
LizzyFleckenstein03 wants to merge 5 commits from LizzyFleckenstein03/Mineclonia:enchanting_loot into master
Contributor
Problem

Doesn't really fix a singular problem, just some general enchanting/loot code cleanup.
Also adds features requested in #204.

Solution
  • enchanted loot generated by mapgen now uses PseudoRandom for randomness
  • prevent fishing loot from being calculated 32767 times (!!!) every time you fish
  • bows and fishing rods obtained from the treasure section of fishing loot are now enchanted
  • there is now a function to uniform enchant items other than books
  • removed stupidity and mistakes my previous me made
Details

Please don't make a big problem out of the fact that this fixes multiple things at once. If something is broken, fix it. Don't bitch about it please, this is much faster than making a separate PR for each issue, it saves my time and the reviewer's time.

You didn't investigate my enchanting code when I wrote it for the first time, so why make a problem out of me improving it now. Please just review this and don't create artificial problems. Thank you.

Testing Steps
  1. Fishing
  2. Dungeon loot
  3. Mineshaft loot
  4. Desert temple loot

It might be useful to add various loot chests as items to be able to place them and check their loot for testing this. Minecraft even has that feature.

##### Problem Doesn't really fix a singular problem, just some general enchanting/loot code cleanup. Also adds features requested in #204. ##### Solution - enchanted loot generated by mapgen now uses PseudoRandom for randomness - prevent fishing loot from being calculated 32767 times (!!!) every time you fish - bows and fishing rods obtained from the treasure section of fishing loot are now enchanted - there is now a function to uniform enchant items other than books - removed stupidity and mistakes my previous me made ##### Details Please don't make a big problem out of the fact that this fixes multiple things at once. If something is broken, fix it. Don't bitch about it please, this is much faster than making a separate PR for each issue, it saves my time and the reviewer's time. You didn't investigate my enchanting code when I wrote it for the first time, so why make a problem out of me improving it now. Please just review this and don't create artificial problems. Thank you. ##### Testing Steps 1. Fishing 2. Dungeon loot 3. Mineshaft loot 4. Desert temple loot It might be useful to add various loot chests as items to be able to place them and check their loot for testing this. Minecraft even has that feature.
LizzyFleckenstein03 added 5 commits 2021-12-07 18:29:03 +01:00
af8f1ea1bb
Various fixes to the enchanting and loot system
- enchanted loot generated by mapgen now uses PseudoRandom for randomness
- prevent fishing loot from generating loot 32767 times (!!!) when only 1 is needed
- bows and fishing rods obtained from the treasure section of fishing loot are now enchanted
- there is now a function to uniform enchant items other than books
Owner

Please don't make a big problem out of the fact that this fixes multiple things at once. If something is broken, fix it. Don't bitch about it please, this is much faster than making a separate PR for each issue, it saves my time and the reviewer's time.

I won't complain about it here, but the thing is, with bigger PRs it is easier for the committer, but harder for the reviewer because they have to review/test everything at once or they can't approve it.

> Please don't make a big problem out of the fact that this fixes multiple things at once. If something is broken, fix it. Don't bitch about it please, this is much faster than making a separate PR for each issue, it saves my time and the reviewer's time. I won't complain about it here, but the thing is, with bigger PRs it is easier for the committer, but harder for the reviewer because they have to review/test everything at once or they can't approve it.
Owner

Testing Steps

  1. Fishing
  2. Dungeon loot
  3. Mineshaft loot
  4. Desert temple loot

Please provide more detailed testing steps. I have no idea what you expect to be verified here – in particular, what the difference to the previous loot generation should be.

Please provide a mapgen with settings and a seed so a reviewer can verify that the loot generation is deterministic.

It might be useful to add various loot chests as items to be able to place them and check their loot for testing this. Minecraft even has that feature.

Might be, but testers can place structures with debug privilege too – except Mineshafts, but those are common.

> Testing Steps > > 1. Fishing > 2. Dungeon loot > 3. Mineshaft loot > 4. Desert temple loot Please provide more detailed testing steps. I have no idea what you expect to be verified here – in particular, what the difference to the previous loot generation should be. Please provide a mapgen with settings and a seed so a reviewer can verify that the loot generation is deterministic. > It might be useful to add various loot chests as items to be able to place them and check their loot for testing this. Minecraft even has that feature. Might be, but testers can place structures with `debug` privilege too – except Mineshafts, but those are common.
erlehmann added a new dependency 2021-12-08 03:45:22 +01:00
Owner

bows and fishing rods obtained from the treasure section of fishing loot are now enchanted

Nice. I noticed this has been missing even before this PR.

> bows and fishing rods obtained from the treasure section of fishing loot are now enchanted Nice. I noticed this has been missing even before this PR.
This repo is archived. You cannot comment on pull requests.
No description provided.