Commit Graph

920 Commits

Author SHA1 Message Date
083a35f970 Modernize property type declarations 2022-06-04 18:16:32 +01:00
23695fb900 RegionLoader: remove dead static property
[bc break]
2022-06-02 16:55:22 +01:00
2bb99fa677 Modernize Position and Location
[bc break]
2022-06-01 21:21:31 +01:00
6ee551c5e1 Remove premature optimisation from World::getCollidingEntities()
this is already covered in more fine-grained detail by canCollideWith().

[bc break]
2022-06-01 21:00:54 +01:00
179cac45f5 Merge branch 'stable' into next-minor 2022-05-22 16:21:05 +01:00
7eaf1246a0 Explosion: cap yield at 100%
this could overflow if the explosion size is less than 1.
While this currently doesn't have any negative effects, if we decided to support >100% yield, this would cause some issues.
2022-05-21 22:43:26 +01:00
645c44ae9c Explosion: remove unused variables 2022-05-21 22:41:28 +01:00
33e6b63fe5 Explosion: remove unused local variable in explodeB() 2022-05-21 17:39:11 +01:00
01b0742bd4 LightUpdate: account for virtual nodes in prepareNodes()
fixes #3959
2022-05-21 17:07:49 +01:00
df3a69dcb7 Modernize private property declarations in Threaded classes
I previously avoided this due to being unsure of the effects; however, it's clear that we already use typed properties on Threaded things in other places anyway, and the only known issues are with uninit properties, and arrays.
2022-05-17 22:42:18 +01:00
d4b7f66e15 Promote some constructors 2022-05-17 22:34:58 +01:00
8b1bd5b7ff World: do not hardcode length of day in computeSunAnglePercentage() 2022-05-16 18:17:32 +01:00
9ff1bf6deb Merge remote-tracking branch 'origin/stable' into next-minor 2022-05-11 13:12:45 +01:00
593a4b65ea World: fixed crash when using unloadChunk() during ChunkPopulateEvent, ChunkLoadEvent or when using ChunkListeners
I sure hope there isn't any other cases where this edge case can appear ...

closes #5022
2022-05-10 13:09:26 +01:00
937bb4c6ce Merge branch 'stable' into next-minor 2022-04-28 21:00:23 +01:00
cf15a0913d World: fixed a corner case assertion failure in generation system
This required the following:
- A generation task (taskA) to already be running for any chunk (chunkA)
- A chunk (chunkB) is requested for generation, and the task (taskB) to do the generation
  is commenced immediately
- chunkB generation promise is aborted (e.g. due to chunk unload) and
  taskB is orphaned
- chunkB is subsequently re-requested, but ends up in the generation
  queue because taskB is still running
- taskA completes and drains the generation queue
- chunkB attempts to be populated a second time, but taskB has not yet
  been collected, resulting in an assertion failure.

This bug has been appearing intermittently ever since PM 4.0 release.
For most users there is no obvious effect since production servers don't
have assertions enabled; however, it's unclear what kind of weird side
effects this bug may have had.
2022-04-28 20:23:23 +01:00
3752225ed5 World: fix CS 2022-04-28 16:00:34 +01:00
5cf572892f WorldManager: fixed missing initializer for $defaultWorld 2022-04-28 15:38:20 +01:00
b88a47929f Modernize property declarations in src/world/* 2022-04-28 15:06:17 +01:00
159392e738 wtf is this shitbox code 2022-04-28 14:57:57 +01:00
2f03af51dd Modernize property declarations in src/world/sound 2022-04-28 14:57:01 +01:00
cb76c149e1 Modernize property declarations in src/world/particle 2022-04-28 14:55:53 +01:00
ed2a239334 Modernize property declarations in src/world/generator 2022-04-28 13:16:21 +01:00
de12b701ac Modernize type declarations in src/world/format 2022-04-28 13:07:58 +01:00
c085bf0db4 Changes for 1.18.30 2022-04-20 13:59:50 +01:00
70f923714c Merge branch 'stable' into next-minor 2022-03-02 18:43:34 +00:00
c816bbdb6e Remove unused import that php-cs-fixer doesn't see 2022-02-22 16:46:23 +00:00
75d4c47384 LevelDB: fixed incorrectly writing always newest protocol version in world saves
this made it impossible to tell the difference between PM worlds and bedrock worlds modified post-1.12.
2022-02-20 21:08:31 +00:00
c19a038d47 LevelDB: Added a whole bunch of constants 2022-02-07 00:54:00 +00:00
7ddd547190 Merge remote-tracking branch 'origin/stable' into staging/4.1 2022-02-06 23:55:52 +00:00
7846ea8acc LevelDB: do not barf on chunk version 8
this covers a wide range from 1.2.13 to 1.8.
2022-02-05 04:18:37 +00:00
1dc0d5f96a WorldManager: do not calculate safe spawn if there are no players in the unloaded world 2022-02-04 19:24:51 +00:00
712ffb3e31 WorldManager: fixed loading the default world's spawn chunk when unloading the default world
yo dawg
I heard you like loading and unloading
so I put some loading inside your unloading
so you can load while you unload
2022-02-04 19:22:37 +00:00
a7bdef69e2 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-27 00:40:34 +00:00
6cbc14f2b2 World: fixed block update bug introduced by 3faeb5a556 2022-01-25 21:53:15 +00:00
0bf5f97fe9 Implement furnace sound (#4755)
closes #4363 

The following classes have been added:
- BlastFurnaceSound
- SmokerSound
- FurnaceSound
2022-01-25 18:52:31 +00:00
32b07e0940 World: avoid repeated getInstance() calls in hot paths 2022-01-24 21:08:12 +00:00
e0da99a973 feat: Implement Brewing (#4413)
The following API constants have been added:
- tile\BrewingStand::BREW_TIME_TICKS
The following public API methods have been added:
- utils\BrewingStandSlot->getSlotNumber() : int
- CraftingManager->getPotionTypeRecipes() : array<string, array<string, PotionTypeRecipe>>
- CraftingManager->getPotionContainerChangeRecipes() : array<int, array<string, PotionContainerChangeRecipe>>
- CraftingManager->registerPotionTypeRecipe(PotionTypeRecipe $recipe) : void
- CraftingManager->registerPotionContainerChangeRecipe(PotionContainerChangeRecipe $recipe) : void
The following classes have been added:
- BrewingRecipe
- PotionTypeRecipe
- PotionContainerChangeRecipe
- BrewItemEvent
- BrewingFuelUseEvent
- PotionFinishBrewingSound
2022-01-22 16:54:58 +00:00
aae5962f6a Replace disallowed operators in src/world/ 2022-01-20 19:05:23 +00:00
86bcc49972 Merge branch 'stable' into next-minor 2022-01-20 16:30:49 +00:00
061d851fbd World: do not update entities which have been flagged for despawn
fixes #4718
2022-01-20 16:27:21 +00:00
8cdfef7861 Added missing sound for creating grass path and farmland
closes #2776
2022-01-19 21:49:05 +00:00
a0bb7059c1 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-19 19:48:51 +00:00
858024afb7 Remove useless docs noticed by php-cs-fixer 3.5 2022-01-18 00:24:12 +00:00
d9deb571ed Added LecternPlaceBookSound 2022-01-15 22:26:56 +00:00
51f2a78dcf World: break random tick blocks initializing out of constructor
and fix a variable clobber by foreach as a side effect
2022-01-07 21:36:49 +00:00
3faeb5a556 disable-block-ticking directive now supports names a la /give 2022-01-07 21:06:06 +00:00
75fc7a2d1f Merge branch 'stable' into next-minor 2022-01-07 20:16:35 +00:00
6d249026cc Merge branch 'legacy/pm3' into stable 2022-01-07 20:15:15 +00:00
fb29653ed7 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-06 22:43:57 +00:00