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

[1.21.x] TODOs and NBT cleanup for entities #1166

Open
wants to merge 6 commits into
base: 1.21.x
Choose a base branch
from

Conversation

robotgryphon
Copy link
Contributor

  • Deprecates persistent data (use data attachments)
  • Deprecates INBTSerializer for entities (data attachments/workarounds)
  • Method renames for the 1.19 world -> level change

@robotgryphon robotgryphon added 1.21 Targeted at Minecraft 1.21 cleanup Change that isn't an enhancement or a bug fix labels Jun 22, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jun 22, 2024

  • Publish PR to GitHub Packages

Last commit published: ccc630a88211b870383303bfaba5ea860b57bd9d.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #1166' // https://github.com/neoforged/NeoForge/pull/1166
        url 'https://prmaven.neoforged.net/NeoForge/pr1166'
        content {
            includeModule('net.neoforged', 'neoforge')
            includeModule('net.neoforged', 'testframework')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr1166.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1166
cd NeoForge-pr1166
curl -L https://prmaven.neoforged.net/NeoForge/pr1166/net/neoforged/neoforge/21.0.52-beta-pr-1166-feature-nbt-entity-cleanup/mdk-pr1166.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

@Technici4n
Copy link
Member

I believe that there are some uses cases for entity persistent data, for example marking item entities that should not be picked up by magnets, and other similar cases of mod compat.

I agree with the other changes.

@robotgryphon
Copy link
Contributor Author

I believe that there are some uses cases for entity persistent data, for example marking item entities that should not be picked up by magnets, and other similar cases of mod compat.

I agree with the other changes.

You'd rather keep persistent data when attachments exist, for stuff like magnet control? That feels like a capability or attachment thing.. persistent data is like using a sword when you have a scalpel nearby.

@neoforged-compatibility-checks

@robotgryphon, this PR introduces breaking changes.
Fortunately, this project is currently accepting breaking changes, but if they are not intentional, please revert them.
Last checked commit: ccc630a88211b870383303bfaba5ea860b57bd9d.

neoforge (:neoforge)

  • net/neoforged/neoforge/common/extensions/IEntityExtension
    • isAddedToLevel()Z: ❗ Method was made abstract
    • onAddedToLevel()V: ❗ Method was made abstract
    • onRemovedFromLevel()V: ❗ Method was made abstract

* @deprecated Use {@link #onAddedToLevel()} instead.
*/
@Deprecated(forRemoval = true, since = "21.0")
default void onAddedToWorld() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this really need to stay around as baggage? NeoForge's still in the breaking-changes phase of 1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Targeted at Minecraft 1.21 cleanup Change that isn't an enhancement or a bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants