Closed 50ap5ud5 closed 3 months ago
@50ap5ud5 Conflicts
Do you want this reviewed now?
I have looked over this, I deem it to be a valid PR and worth merging. I am aware there was more that you wanted to add to this but because there are major fixes in this PR that we require in order to release new versions, I will be merging as-is and you can add your additions in a separated PR
I will not be deleting the branch above as you may still require it
New Features
Note: These additions are optional fields, meaning all existing Pattern datapacks will not need to be updated.
Gameplay Fixes
OPEN
state during terraforming (#299). This has been achieved by cleaning up and unifying door update logic as well as patching the desktop regeneration logic.Technical Debt
tick(ServerLevel level)
,saveData
andloadData
TardisInternalDoor
interface onAbstractDoorBlockEntity
instead of some classes sometimes using the Blockstate property, and other classes sometimes using the BlockState properties directly.ExteriorShell
interface which was introduced early on in the 1.19,2 development but was hidden in a random package and never referenced again.ExteriorShell
interface to another package so that it's more noticeableDirection#getOpposite
in many places to compensate. Previously it created great difficulty to debug teleportation issues.AbstractDoorBlockEntity#isLocked
in favour of a Blockstate Property. This allows the locking logic to use the BlockState Property to be consistent with the Exterior Shell.TardisExteriorManager#setOrUpdateExteriorBlock
to not be as verbose with the parameters. Removed the boolean field, and added a default method calledTardisExteriorManager.placeExteriorBlockForLanding
which implements the correct logic for when the Tardis is landing, and thus requires a new Shell blockstate instance to be created.AestheticHandler
,TardisExteriorManager
andTardisInteriorManager
. This is now unified inTardisLevelOperator
for ease of maintenance.API Changes
LockDoor
andUnlockDoor
, which are fired after the internal door and exterior shell blocks are locked/unlockedOpenDoor
andCloseDoor
events fire after doors have been updated. Previously it fired after the internal door updates, but before the exterior shell updated. This would have caused some issues when addon mods subscribe to these events because it would mean addon mods are applying logic before the exterior shell door has closed, which can have unintended consequences.ShellChangeSource
, an object to identify why a Shell was updated. This provides additional data to use for differentiate logic between updating shell from landing the Tardis to when the shell is updated during terraformingBest Practice Notes
InteractionResult.sidedSuccess(false)
for server-side successful interactions andInteractionResult.sidedSuccess(true)
for client side successful interactions as intended by vanilla. That method is a helper method that returns the correctInteractionResult
depending on the logical side.InteractionResult.SUCCESS
on both the serverside and client side will cause the player hand to swing twice because the hand swing packet is called wheneverInteractionResult.SUCCESS
is called