42386e1fbe
Update commentary on otmRandom
2025-03-15 10:08:02 +07:00
5d15425fa4
Merge branch '1.21' into new-container-api
2025-03-15 10:06:27 +07:00
b7b2b8095c
Revert "Remove otmRandom"
...
This reverts commit 5a016bef
The way OTM uses random generator in its code will quickly cause LCG used in Minecraft to show its bias
because LCG in minecraft samples its highest 48 bits, which gives us at best 2^16 period in the lowest bit returned by LCG.
Which it doesn't sound bad, it quickly causes RNG become biased the quicker/more it is sampled on each tick, especially considering
some may use `level.random.nextInt(chance) == 0` to determine chance of something happening,
which will get extremely biased on heavy RNG congested environment
If we avoid sampling Level's generator this much, we won't suffer from bias in our own code, as well as avoid biasing other mods this much.
The "2^16 period" problem is also might be the reason why Entities get their own instance of RandomSource, and Mob Goals use random exactly the way described above (`nextInt(chance)`), which can and will suffer from bias the moment mob exists in world for more than 2^16 ticks (but actual bias will happen sooner because RNG is not sampled only once per tick, obviously)
2025-03-15 10:04:16 +07:00
0efc520782
Implement faster lookup methods for Slotted Container as well
2025-03-15 00:18:02 +07:00
8b38504a26
Derive hasEmptySlots, isEmpty, countItem from other methods
2025-03-14 23:10:25 +07:00
69d9aaab50
Fast implementation of some methods in EnhancedContainer
2025-03-14 22:15:58 +07:00
448041fe2e
More specialized versions of iterators in IEnhancedContainer
2025-03-14 22:09:32 +07:00
54012cf136
Bump kommons
2025-03-14 21:06:23 +07:00
bc5ad7f37b
кипяточек
2025-03-14 19:47:13 +07:00
70c5382e9d
Always use slotted addItem implementation in containers
2025-03-14 19:45:28 +07:00
01215d647c
Cache hasFilterableSlots in CombinedContainer
2025-03-14 19:40:01 +07:00
3a5f37bd76
Specify argument names explicitly
2025-03-14 19:32:17 +07:00
4ab667b37e
Ooprs!!1
2025-03-14 19:32:04 +07:00
2943026dd5
Add generic param to CombinedContainer
2025-03-14 19:06:49 +07:00
90a22a093d
Don't create filter syncher for IPlayerInventorySlot
2025-03-14 18:57:14 +07:00
c43be6eb62
Remove IContainer
2025-03-14 18:40:10 +07:00
59eab74b44
Remove IMatteryContainer
2025-03-14 18:38:28 +07:00
bdeb740df0
Remove ShadowContainer and MatteryContainer
2025-03-14 18:35:22 +07:00
621661c9fe
Remove MatteryCraftingContainer usage
2025-03-14 18:34:19 +07:00
d0904da1db
Remove remaining MatteryContainer usages
2025-03-14 18:32:28 +07:00
05bdff6a37
Remove unused class
2025-03-14 18:31:01 +07:00
b076d29560
Declare IEnhancedContainer as having generic parameter Slot
2025-03-14 18:29:51 +07:00
a2263c5725
Update MatteryPlayer to use Enhanced containers instead of Mattery containers
2025-03-14 18:11:39 +07:00
d57371ca13
Merge branch '1.21' into new-container-api
2025-03-14 17:47:09 +07:00
579445fbbe
Nerf food for androids further
2025-03-14 17:44:26 +07:00
80ff50b937
Nullify excess hunger when eating as android
2025-03-14 17:40:16 +07:00
ca37b4959f
Bring back old behavior where exhaustion is immediately nullified by energy buffer on Androids
2025-03-14 17:36:55 +07:00
305ddbd0d4
Merge branch 'player-improvements' into new-container-api
2025-03-14 12:14:36 +07:00
b42a503096
Merge branch '1.21' into new-container-api
2025-03-14 12:14:06 +07:00
5d8f2d5a4a
Add REGENERATE_ENERGY_EFFICIENCY_FOOD and REGENERATE_ENERGY_EFFICIENCY_SATURATION
2025-03-14 12:04:16 +07:00
e06928a4b5
Update mixin signature
2025-03-14 11:24:58 +07:00
d10b1b4ee1
Aeugh
2025-03-14 11:21:08 +07:00
922f94b9de
e
2025-03-14 11:02:08 +07:00
b23bda2f6a
Move android package to player package
2025-03-14 10:54:08 +07:00
c4d5ffefa5
Move all logic regarding food / regeneration to MatteryFoodData
2025-03-14 10:37:54 +07:00
a34b485e68
Base replacement for FoodData
2025-03-14 08:52:36 +07:00
c3b2681e89
Rename AndroidConfig to PlayerConfig
2025-03-12 20:57:57 +07:00
cfd6b101d8
Fix addEatEffect hook
2025-03-12 20:31:59 +07:00
0424dd1944
Rename mattery player reference in coremod
2025-03-12 19:34:26 +07:00
05a081d9cb
Move MatteryPlayer to player subpackage
2025-03-12 19:33:20 +07:00
b68b1d724a
Move IMatteryPlayer as well as shortcuts to player subpackage
2025-03-12 19:28:54 +07:00
ade2c0499d
Move Item Monitor to new container API
2025-03-12 18:42:04 +07:00
e699147f9f
Merge ChargeMenuSlot into BatteryMenuSlot
2025-03-12 16:49:19 +07:00
4dad60dfbb
Move Matter Hatch to Slotted Container
2025-03-12 16:47:45 +07:00
55c3c16172
Update Energy Interface to use SlottedContainer
2025-03-11 21:10:19 +07:00
1455e12da3
Fix TooltipList not using proper container class
2025-03-11 21:08:31 +07:00
566538f8a7
Update Drive Viewer to use EnhancedContainer
2025-03-11 20:59:11 +07:00
c08ea8a43d
Update Driver Rack to use SlottedContainer
2025-03-11 20:50:59 +07:00
4df51ce126
Add better random to recommended mods
2025-03-11 17:53:18 +07:00
a6ba428518
Remove custom random generators except for gjrand64 which is used for worldgen
2025-03-11 16:56:51 +07:00