Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Spectrum to 1.20 #233

Merged
merged 806 commits into from
Nov 22, 2023
Merged

Port Spectrum to 1.20 #233

merged 806 commits into from
Nov 22, 2023

Conversation

Noaaan
Copy link
Collaborator

@Noaaan Noaaan commented Aug 7, 2023

Spectrum 1.20

Will re-target towards a 1.20 branch once I can find the time.
Reason for a PR over directly pushing onto a separate branch is to note down what exactly changed between 1.19 and 1.20.

Non-exhaustive list of version changes

  • LootContextParameters.Builder get() no longer has a nullable. Check for the optional, or assume always safe?
  • MatrixStack replaced most places with DrawContext
  • Format of advancements changed. Most triggers now need a conditions + condition field, with a location predicate. The location predicate follows the old format most of the time, so main challenge is just to find and wrap them.
  • world is now private in tons of places, like entities, meaning you need to use getWorld() instead
  • The minecraft:alternative loot condition is now named minecraft:any_of. A new minecraft:all_of also exists now
  • A lot of packages moved. Registry for example now lives in its own packages instead of util.
  • Damage Sources underwent a major refactor. Since its now tag-driven some testing should be done to ensure it behaves correctly
  • ExplosionModifiers was refactored, and needs testing to see whether it was ported correctly.
  • ...and a ton more smaller changes. its over 1300 files changed, so its a bit hard to review.

Current problems

  • Advancements are broken. Mainly due to malformed location predicates. Now fixed ✅
  • Patchouli does not work due to everything being placed under data. fixed by Daf ✅
  • Colorful Hearts (formerly Health Overlay) does not use a DrawContext, meaning we have to make one ourselves for our compat Now fixed ✅
  • InkProjectileKillingCriterion is not implemented correctly Now fixed ✅
  • Chest Textures do not work, as they are not placed in any atlas at the moment. Only thing holding back updating this is verifying that the chests were properly renamed Now fixed by moving into block atlas ✅ Needs verification as some chest names in lang and classes seem to be un-renamed.
  • SpectrumRegistries should be ported to the new format which does not take in an Entity class, as it is deprecated. Now fixed thanks to Electro ✅
  • ~~GatedSpectrumEmiRecipe should be changed to respect the DynamicRegistryManager. It needs to grab this from some world, or pass an empty DRM (not ideal)~~Fixed by Electro ✅

@DaFuqs DaFuqs changed the base branch from 1.19-deeper-down to 1.20.1 August 11, 2023 06:54
@DaFuqs
Copy link
Owner

DaFuqs commented Aug 11, 2023

Created a 1.20.1 branch 👌

@Suya1671
Copy link

Any updates on this? The last commit was 2 weeks ago

@Noaaan
Copy link
Collaborator Author

Noaaan commented Aug 26, 2023

This branch/PR is still being worked on. I will note that release-wise this will release at a later time than the DD update, so that there is time to test things. Its only a bit behind upstream at the moment

DaFuqs and others added 26 commits October 28, 2023 11:51
…er-down

# Conflicts:
#	src/main/java/de/dafuqs/spectrum/registries/SpectrumBlocks.java
# Conflicts:
#	gradle.properties
#	src/main/java/de/dafuqs/spectrum/SpectrumCommon.java
#	src/main/java/de/dafuqs/spectrum/blocks/chests/HeartboundChestBlock.java
#	src/main/java/de/dafuqs/spectrum/blocks/farming/TilledSlushBlock.java
#	src/main/java/de/dafuqs/spectrum/blocks/pastel_network/network/PastelTransmissionLogic.java
#	src/main/java/de/dafuqs/spectrum/blocks/potion_workshop/PotionWorkshopBlockEntity.java
#	src/main/java/de/dafuqs/spectrum/blocks/redstone/BlockDetectorBlock.java
#	src/main/java/de/dafuqs/spectrum/entity/entity/KindlingEntity.java
#	src/main/java/de/dafuqs/spectrum/entity/render/KindlingEntityRenderer.java
#	src/main/java/de/dafuqs/spectrum/helpers/InWorldInteractionHelper.java
#	src/main/java/de/dafuqs/spectrum/items/GuidebookItem.java
#	src/main/java/de/dafuqs/spectrum/registries/SpectrumBlocks.java
Some game event and world event emitters were added with this. I believe game events trigger things like vibration listeners. Unsure about the world event emitters though, although the game event for a dispenser failing was removed. Because of this I replaced it with a block activate event
@DaFuqs DaFuqs marked this pull request as ready for review November 22, 2023 17:56
@DaFuqs
Copy link
Owner

DaFuqs commented Nov 22, 2023

Merging this, before github gives up.
3.5k files changed. Scary.

@DaFuqs DaFuqs merged commit 5f77931 into DaFuqs:1.20.1 Nov 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants