-
-
Notifications
You must be signed in to change notification settings - Fork 186
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.4] Allow modded BE and Entity types to declare that they have NBT data only OPs can set #1730
Conversation
Last commit published: 526c2adf3342f8ee467b4548f244f173f92c3978. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1730' // https://github.com/neoforged/NeoForge/pull/1730
url 'https://prmaven.neoforged.net/NeoForge/pr1730'
content {
includeModule('net.neoforged', 'testframework')
includeModule('net.neoforged', 'neoforge')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1730
cd NeoForge-pr1730
curl -L https://prmaven.neoforged.net/NeoForge/pr1730/net/neoforged/neoforge/21.4.35-beta-pr-1730-op_only_blockentities/mdk-pr1730.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. |
patches/net/minecraft/world/level/block/entity/BlockEntityType.java.patch
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually thinking about it again, the adjustment of our patched-in constructor, while cleaner, is technically a BC we might have to announce... requesting changes on this to block a merge until we decide what to do about that.
@XFactHD, this PR introduces breaking changes.
|
🚀 This PR has been released as NeoForge version |
In 1.21.4,
onlyOpsCanSetNbt()
was moved fromBlockEntity
andEntity
toBlockEntityType
andEntityType
respectively and changed to check a hard-coded set.This PR allows modded BE and Entity types to declare that they have op-only NBT data (such as signs) without having to modify the set. Instead the flag can be provided through the constructor or builder respectively.