436 Commits

Author SHA1 Message Date
Dylan K. Taylor
35fc9abacf
Merge branch 'legacy/pm4' into stable 2023-06-09 01:34:33 +01:00
Dylan K. Taylor
9a04481bec
Entity: broadcast teleports as regular movements
fixes #5810

probably fixes #4986

#5810 was caused by the workaround for #4394, which broke in 1.20 for reasons I'm still unclear on.

As FLAG_TELEPORT does not work at all for non-player entities, and causes bugs with player entities, sending the teleport movement without the flag is the least buggy way to solve all of these issues. Having the client interpolate teleport movements is not ideal, but there doesn't seem to be a way to reliably prevent it without causing even more bugs, so this will have to do.
2023-06-09 01:24:57 +01:00
Dylan K. Taylor
f5a1a0c9cb
ÂInsert PM data version into blockstates, chunks, entities, tiles and level.dat
this information will allow us to correct for any bugs introduced by past versions.

however, we still need to propagate this information to permit actually using it when loading data.
2023-05-29 16:32:24 +01:00
Dylan K. Taylor
edafe9d21f
Entity: Rename and document isImmobile() and friends
while I could implement server-side ability to disable entity movement, I don't think that's particularly useful. However, the intended function of this (disabling client sided AI) is useful, so it makes more sense to rename it to match its functionality, rather than changing its functionality to match the name.

closes #3130
2023-05-26 14:01:21 +01:00
Dylan K. Taylor
926f68d8c5
Move SkinAdapter under TypeConverter, remove SkinAdapterSingleton
this is legacy cruft from PM3, which didn't have TypeConverter or SingletonTrait.
2023-05-06 17:53:24 +01:00
Dylan K. Taylor
ed11fd5a83
CS again... 2023-05-06 17:51:00 +01:00
Dylan K. Taylor
e0a6ec0c24
Start deglobalizing TypeConverter
there's a bunch of places we can't reach with this right now:

- particles
- sounds
- tile NBT
- entity metadata
- crafting data cache
- chunk encoding
- world block update encoding

this is a work in progress, but ultimately we want to get rid of these singletons entirely.
2023-05-06 17:47:09 +01:00
Dylan K. Taylor
289ede669d
BlockTranslator: use less ambiguous function names 2023-05-05 14:47:23 +01:00
Dylan K. Taylor
01f340985a
Centralize all conversion-related stuff under TypeConverter
instead of having singletons for everything, which are a nightmare to manage for multi version
2023-05-03 16:33:17 +01:00
Dylan K. Taylor
6beb80b8fe
Fixed usages of BlockDataUpgrader which weren't accounting for thrown exceptions 2023-05-02 17:13:31 +01:00
Dylan K. Taylor
c878bd8289
Merge remote-tracking branch 'origin/minor-next' into major-next 2023-04-20 00:18:19 +01:00
Dylan K. Taylor
71b78b02d3
Merge remote-tracking branch 'origin/stable' into minor-next 2023-04-19 23:57:26 +01:00
Dylan K. Taylor
9561ae5af7
Entity: micro optimisation for checkBlockIntersections() 2023-04-16 17:57:51 +01:00
Dylan K. Taylor
56fbd45dd5
Entity: avoid double-checking block intersections for moving entities
fixes #1824
2023-04-16 17:38:26 +01:00
Dylan K. Taylor
499b29b53a
Merge branch 'minor-next' into major-next 2023-04-12 21:04:08 +01:00
Dylan K. Taylor
0336394098
Human: remove useless NameTag tag
this is not written anywhere, so this code never does anything.
2023-04-12 16:44:10 +01:00
Dylan K. Taylor
ed88d68fd7
Remove stuff deprecated in 4.19.0 2023-04-11 23:20:58 +01:00
Dylan K. Taylor
a0dadc6e37
Merge branch 'minor-next' into major-next 2023-04-10 14:38:23 +01:00
Dylan K. Taylor
d6c923b525
ExperienceOrb: add get/setDespawnDelay
closes #5645

the code for this is borrowed from ItemEntity. I didn't feel like a base class was appropriate, and we can't (yet) declare constants in traits.
2023-04-07 22:33:30 +01:00
IvanCraft623
bea878e9e9
Implement anvil fall damage (#5312) 2023-03-27 20:17:08 +01:00
Dylan K. Taylor
7cdab75b05
Merge branch 'minor-next' into major-next 2023-03-20 22:12:54 +00:00
João
2751e1ec02
replacing new Vector3(0, 0, 0) with Vector3::zero() (#5640) 2023-03-20 12:54:28 +00:00
Dylan K. Taylor
054c06fab9
Add specialized entityBaseTick timer for item entities
since item merging is a potential hotspot, we want to know if this code section is a performance problem.
Current timers only tell us whether overall ticking of a particular entity is slow, but that includes movement and therefore isn't particularly helpful.
2023-03-19 15:59:06 +00:00
Dylan K. Taylor
607bdfa42f
Timings: added new timers for entity move collision checks and projectile move ray tracing
projectiles get their own distinct sub-timer, since the logic is completely different from regular entities.
2023-03-19 15:49:35 +00:00
Dylan K. Taylor
abd4ef01eb
Merge branch 'minor-next' into major-next 2023-03-15 23:02:41 +00:00
Dylan K. Taylor
337a254768
Use NetworkBroadcastUtils for broadcasting packets
this eradicates all but 4 usages of Server in Entity, which is extremely cool.
2023-03-15 22:28:51 +00:00
Dylan K. Taylor
cc8660629b
First look at shared EntityEventBroadcaster,
this improves performance in PvP servers and other areas where lots of players or entities exist in one space.

fixes #5622
2023-03-15 18:22:56 +00:00
Dylan K. Taylor
50b8d39aba
Merge branch 'next-minor' into next-major 2023-02-21 15:41:57 +00:00
Dylan K. Taylor
c4ecb3d128
Merge branch 'stable' into next-minor 2023-02-21 15:37:06 +00:00
Armen Deroian
59a04c971f
Getter and setter for gravity (#5584)
closes #5525
2023-02-21 15:01:22 +00:00
Dylan K. Taylor
b56b35b10d
ItemEntity: fixed a bunch of suspicious logic in entityBaseTick()
closes #5580
2023-02-17 20:14:38 +00:00
Dylan K. Taylor
074e7586cb
Merge branch 'next-minor' into next-major 2023-02-11 17:17:08 +00:00
Dylan K. Taylor
5a4550a4fc
CS 2023-02-08 18:55:49 +00:00
Dylan K. Taylor
3ba662f64f
1.19.60 2023-02-08 18:46:37 +00:00
Dylan K. Taylor
0a3ecfdae9
Clean up terminology around block state IDs and their handling 2023-01-25 19:01:15 +00:00
Dylan K. Taylor
9b4b960eb2
Remove deprecated methods 2023-01-08 17:07:22 +00:00
Dylan K. Taylor
2a81a421f3
Merge branch 'next-minor' into next-major 2022-12-24 17:23:30 +00:00
Dylan K. Taylor
3d038b28ff
SplashPotion: const-ify missed NBT key 2022-12-24 15:19:56 +00:00
Dylan K. Taylor
16f90f4120
EntityFactory: remove legacy save IDs
this can be more cleanly handled using BedrockData.
2022-12-19 16:04:32 +00:00
Dylan K. Taylor
f38b15cf83
Added tag for fire blocks 2022-12-19 15:22:09 +00:00
Dylan K. Taylor
6e2685cbbb
Merge branch 'next-minor' into next-major 2022-12-18 22:25:32 +00:00
Dylan K. Taylor
b2017c8462
and more 2022-12-18 22:14:31 +00:00
Dylan K. Taylor
bf44edd179
Constify a bunch of NBT keys, pass 1 2022-12-18 22:12:15 +00:00
Dylan K. Taylor
ffa88aff67
Merge branch 'next-minor' into next-major 2022-12-18 21:05:26 +00:00
IvanCraft623
1785cbb6b5
Implement FallingBlock missing sounds (#5348) 2022-12-18 19:33:50 +00:00
Dylan K. Taylor
3d75094874
Standardize explosion radius terminology
closes #5061
2022-12-15 22:43:36 +00:00
Javier León
c5d716dc9d
Added keep on death methods for items (#5395) 2022-12-15 20:10:20 +00:00
Dylan K. Taylor
4d79aced07
Merge branch 'next-minor' into next-major 2022-12-15 19:50:27 +00:00
Dylan K. Taylor
95d0a3bf41
Merge branch 'stable' into next-minor 2022-12-15 19:38:22 +00:00
IvanCraft623
84f9136b95
Implement anvil damage on fall (#5345) 2022-12-15 19:12:18 +00:00