Fix bugs and improve fishing mechanics parity with TU 31

- Based fishing mechanics off of decompiled java 1.7.2 instead of 1.12.
- Added check for sky access
- Switching between different fishing rods now reels the line back in
- Fixed duplicate assignment in fishingTreasuresArray
- Remove testing weights from catchTypeArray
- Make lureLevel and luckLevel member variables of FishingHook that are calculated upon initialization instead of recalculating every tick.
- Changed random nibbleTimer range from 5 - 30 secs to 5 - 45 secs
- Fixed out of order and incorrect assignments of fishingJunkArray
- Values are now clamped to prevent unintended behavior
- Lure now affects loot rates.
This commit is contained in:
BrainFart17
2026-04-07 08:00:13 -07:00
parent f38bcf1d4e
commit e17e26ff99
4 changed files with 31 additions and 18 deletions
+3 -3
View File
@@ -17,16 +17,16 @@ FishingHelper* FishingHelper::getInstance()
FishingHelper::FishingHelper() : catchTypeArray(3), fishingFishArray(4), fishingJunkArray(11), fishingTreasuresArray(5)
{
// Source: https://github.com/WangTingZheng/mcp940/tree/master/src/minecraft/assets/minecraft/loot_tables/gameplay
catchTypeArray[0] = new CatchTypeWeighedItem(CatchType::FISH, 8); // 850
catchTypeArray[0] = new CatchTypeWeighedItem(CatchType::FISH, 850);
catchTypeArray[1] = new CatchTypeWeighedItem(CatchType::JUNK, 100 );
catchTypeArray[2] = new CatchTypeWeighedItem(CatchType::TREASURE, 5 ); // 50
catchTypeArray[2] = new CatchTypeWeighedItem(CatchType::TREASURE, 50 );
fishingTreasuresArray[0] = new CatchWeighedItem(Item::bow_Id, 1, 0, 1);
fishingTreasuresArray[1] = new CatchWeighedItem(Item::book_Id, 1, 0, 1);
fishingTreasuresArray[2] = new CatchWeighedItem(Item::fishingRod_Id, 1, 0, 1);
fishingTreasuresArray[3] = new CatchWeighedItem(Item::nameTag_Id, 1, 0, 1);
fishingTreasuresArray[4] = new CatchWeighedItem(Item::saddle_Id, 1, 0, 1);
fishingTreasuresArray[4] = new CatchWeighedItem(Tile::waterLily_Id, 1, 0, 1);
fishingTreasuresArray[5] = new CatchWeighedItem(Tile::waterLily_Id, 1, 0, 1);
fishingFishArray[0] = new CatchWeighedItem(Item::fish_raw_Id, 1, 0, 60); // Fish
fishingFishArray[1] = new CatchWeighedItem(Item::fish_raw_Id, 1, 1, 25); // Salmon