diff --git a/build.gradle b/build.gradle index 707385ed1a9..e9303586e8a 100644 --- a/build.gradle +++ b/build.gradle @@ -72,28 +72,22 @@ immaculate { return fileContents } - def interfaceChange = Pattern.compile('^[-+].*(implements|(interface.*extends)).*\$', Pattern.UNIX_LINES | Pattern.MULTILINE) - custom 'noInterfaceRemoval', { String fileContents -> - def interfaceChanges = fileContents.findAll(interfaceChange) + def interfaceChange = Pattern.compile('[-+].*(implements|(interface.*extends))(.*)\\{') + custom 'noInterfaceModifications', { String fileContents -> + def interfaceChanges = fileContents.lines().filter { it.matches(interfaceChange) }.toList() if (interfaceChanges.isEmpty()) return fileContents - String removalChange = "" + String oldInterfaces = "" + // we expect interface additions/removals in pairs of - and then + interfaceChanges.each { String change -> + final match = change =~ interfaceChange + match.find() + final values = match.group(3).trim() if (change.startsWith('-')) { - //Skip the - and the ending brace - int implementsIndex = change.indexOf("implements") - if (implementsIndex == -1) implementsIndex = change.indexOf("extends") - //It should never still be -1 based on our initial matching regex, but if it does fail so we can figure out why - if (implementsIndex == -1) implementsIndex = 1 - removalChange = change.substring(implementsIndex, change.length() - 1).trim() - } else if (!removalChange.isEmpty() && !change.contains(removalChange)) { - throw new GradleException("Removal of interfaces via patches is not allowed!") - } else { - removalChange = "" + oldInterfaces = values + } else if (oldInterfaces != values) { + throw new GradleException("Modification of interfaces via patches is not allowed!") } } - if (!removalChange.isEmpty()) { - throw new GradleException("Removal of interfaces via patches is not allowed!") - } return fileContents } diff --git a/buildSrc/src/main/java/net/neoforged/neodev/GenerateSourcePatches.java b/buildSrc/src/main/java/net/neoforged/neodev/GenerateSourcePatches.java index c6e1c7e7302..25a3ab21c43 100644 --- a/buildSrc/src/main/java/net/neoforged/neodev/GenerateSourcePatches.java +++ b/buildSrc/src/main/java/net/neoforged/neodev/GenerateSourcePatches.java @@ -9,6 +9,8 @@ import org.gradle.api.file.RegularFileProperty; import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.InputFile; +import org.gradle.api.tasks.Optional; +import org.gradle.api.tasks.OutputDirectory; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.PathSensitive; import org.gradle.api.tasks.PathSensitivity; @@ -25,9 +27,14 @@ abstract class GenerateSourcePatches extends DefaultTask { @PathSensitive(PathSensitivity.RELATIVE) public abstract DirectoryProperty getModifiedSources(); + @Optional @OutputFile public abstract RegularFileProperty getPatchesJar(); + @Optional + @OutputDirectory + public abstract DirectoryProperty getPatchesFolder(); + @Inject public GenerateSourcePatches() {} @@ -37,7 +44,7 @@ public void generateSourcePatches() throws IOException { .logTo(getLogger()::lifecycle) .baseInput(MultiInput.detectedArchive(getOriginalJar().get().getAsFile().toPath())) .changedInput(MultiInput.folder(getModifiedSources().get().getAsFile().toPath())) - .patchesOutput(MultiOutput.detectedArchive(getPatchesJar().get().getAsFile().toPath())) + .patchesOutput(getPatchesJar().isPresent() ? MultiOutput.detectedArchive(getPatchesJar().get().getAsFile().toPath()) : MultiOutput.folder(getPatchesFolder().getAsFile().get().toPath())) .autoHeader(true) .level(io.codechicken.diffpatch.util.LogLevel.WARN) .summary(false) diff --git a/buildSrc/src/main/java/net/neoforged/neodev/NeoDevPlugin.java b/buildSrc/src/main/java/net/neoforged/neodev/NeoDevPlugin.java index 0a5afa25390..58a9596d8f4 100644 --- a/buildSrc/src/main/java/net/neoforged/neodev/NeoDevPlugin.java +++ b/buildSrc/src/main/java/net/neoforged/neodev/NeoDevPlugin.java @@ -100,24 +100,39 @@ public void apply(Project project) { ); var applyAt = configureAccessTransformer( project, - configurations, createSourceArtifacts, neoDevBuildDir, atFiles); applyAt.configure(task -> task.mustRunAfter(genAtsTask)); - // 3. Apply patches to the source jar from 2. + // 3. Apply interface injections after the ATs + // this jar is only used for the patches in the repo + var applyInterfaceInjection = project.getTasks().register("applyInterfaceInjection", TransformSources.class, task -> { + task.getInputJar().set(applyAt.flatMap(TransformSources::getOutputJar)); + task.getInterfaceInjectionData().from(project.getRootProject().file("src/main/resources/META-INF/injected-interfaces.json")); + task.getOutputJar().set(neoDevBuildDir.map(dir -> dir.file("artifacts/interface-injected-sources.jar"))); + }); + + tasks.withType(TransformSources.class, task -> { + task.setGroup(INTERNAL_GROUP); + task.classpath(configurations.getExecutableTool(Tools.JST)); + + task.getLibraries().from(configurations.neoFormClasspath); + task.getLibrariesFile().set(neoDevBuildDir.map(dir -> dir.file("minecraft-libraries-for-" + task.getName() + ".txt"))); + }); + + // 4. Apply patches to the source jar from 3. var patchesFolder = project.getRootProject().file("patches"); var applyPatches = tasks.register("applyPatches", ApplyPatches.class, task -> { task.setGroup(INTERNAL_GROUP); - task.getOriginalJar().set(applyAt.flatMap(ApplyAccessTransformer::getOutputJar)); + task.getOriginalJar().set(applyInterfaceInjection.flatMap(TransformSources::getOutputJar)); task.getPatchesFolder().set(patchesFolder); task.getPatchedJar().set(neoDevBuildDir.map(dir -> dir.file("artifacts/patched-sources.jar"))); task.getRejectsFolder().set(project.getRootProject().file("rejects")); }); - // 4. Unpack jar from 3. + // 5. Unpack jar from 4. var mcSourcesPath = project.file("src/main/java"); tasks.register("setup", Sync.class, task -> { task.setGroup(GROUP); @@ -185,14 +200,22 @@ public void apply(Project project) { * OTHER TASKS */ - // Generate source patches into a patch archive. + // Generate source patches into a patch archive, based on the jar with injected interfaces. var genSourcePatches = tasks.register("generateSourcePatches", GenerateSourcePatches.class, task -> { task.setGroup(INTERNAL_GROUP); - task.getOriginalJar().set(applyAt.flatMap(ApplyAccessTransformer::getOutputJar)); + task.getOriginalJar().set(applyInterfaceInjection.flatMap(TransformSources::getOutputJar)); task.getModifiedSources().set(project.file("src/main/java")); task.getPatchesJar().set(neoDevBuildDir.map(dir -> dir.file("source-patches.zip"))); }); + // Generate source patches that are based on the production environment (without separate interface injection) + var genProductionPatches = tasks.register("generateProductionSourcePatches", GenerateSourcePatches.class, task -> { + task.setGroup(INTERNAL_GROUP); + task.getOriginalJar().set(applyAt.flatMap(TransformSources::getOutputJar)); + task.getModifiedSources().set(project.file("src/main/java")); + task.getPatchesFolder().set(neoDevBuildDir.map(dir -> dir.dir("production-source-patches"))); + }); + // Update the patch/ folder with the current patches. tasks.register("genPatches", Sync.class, task -> { task.setGroup(GROUP); @@ -245,7 +268,7 @@ public void apply(Project project) { configurations, createCleanArtifacts, neoDevBuildDir, - patchesFolder + genProductionPatches.flatMap(GenerateSourcePatches::getPatchesFolder) ); // Launcher profile = the version.json file used by the Minecraft launcher. @@ -411,7 +434,7 @@ public void apply(Project project) { task.from(binaryPatchOutputs.binaryPatchesForMerged(), spec -> { spec.rename(s -> "joined.lzma"); }); - task.from(project.zipTree(genSourcePatches.flatMap(GenerateSourcePatches::getPatchesJar)), spec -> { + task.from(project.fileTree(genProductionPatches.flatMap(GenerateSourcePatches::getPatchesFolder)), spec -> { spec.into("patches/"); }); }); @@ -444,24 +467,19 @@ public void apply(Project project) { setupProductionServerTest(project, installerJar); } - private static TaskProvider configureAccessTransformer( + private static TaskProvider configureAccessTransformer( Project project, - NeoDevConfigurations configurations, TaskProvider createSourceArtifacts, Provider neoDevBuildDir, List atFiles) { // Pass -PvalidateAccessTransformers to validate ATs. var validateAts = project.getProviders().gradleProperty("validateAccessTransformers").map(p -> true).orElse(false); - return project.getTasks().register("applyAccessTransformer", ApplyAccessTransformer.class, task -> { - task.setGroup(INTERNAL_GROUP); - task.classpath(configurations.getExecutableTool(Tools.JST)); + return project.getTasks().register("applyAccessTransformer", TransformSources.class, task -> { task.getInputJar().set(createSourceArtifacts.flatMap(CreateMinecraftArtifacts::getSourcesArtifact)); task.getAccessTransformers().from(atFiles); - task.getValidate().set(validateAts); + task.getValidateAccessTransformers().set(validateAts); task.getOutputJar().set(neoDevBuildDir.map(dir -> dir.file("artifacts/access-transformed-sources.jar"))); - task.getLibraries().from(configurations.neoFormClasspath); - task.getLibrariesFile().set(neoDevBuildDir.map(dir -> dir.file("minecraft-libraries-for-jst.txt"))); }); } @@ -469,7 +487,7 @@ private static BinaryPatchOutputs configureBinaryPatchCreation(Project project, NeoDevConfigurations configurations, TaskProvider createCleanArtifacts, Provider neoDevBuildDir, - File sourcesPatchesFolder) { + Provider sourcesPatchesFolder) { var tasks = project.getTasks(); var artConfig = configurations.getExecutableTool(Tools.AUTO_RENAMING_TOOL); diff --git a/buildSrc/src/main/java/net/neoforged/neodev/ApplyAccessTransformer.java b/buildSrc/src/main/java/net/neoforged/neodev/TransformSources.java similarity index 65% rename from buildSrc/src/main/java/net/neoforged/neodev/ApplyAccessTransformer.java rename to buildSrc/src/main/java/net/neoforged/neodev/TransformSources.java index 2456766cef4..a62bfd92a62 100644 --- a/buildSrc/src/main/java/net/neoforged/neodev/ApplyAccessTransformer.java +++ b/buildSrc/src/main/java/net/neoforged/neodev/TransformSources.java @@ -10,6 +10,7 @@ import org.gradle.api.tasks.InputFiles; import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.JavaExec; +import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.OutputFile; import org.gradle.api.tasks.TaskAction; @@ -22,20 +23,23 @@ import java.util.Arrays; /** - * Runs JavaSourceTransformer to apply - * access transformers to the Minecraft source code for extending the access level of existing classes/methods/etc. - *

- * Note that at runtime, FML also applies access transformers. + * Runs JavaSourceTransformer over the Minecraft source code. */ -abstract class ApplyAccessTransformer extends JavaExec { - @InputFile - public abstract RegularFileProperty getInputJar(); - +abstract class TransformSources extends JavaExec { + @Optional @InputFiles public abstract ConfigurableFileCollection getAccessTransformers(); @Input - public abstract Property getValidate(); + @Optional + public abstract Property getValidateAccessTransformers(); + + @Optional + @InputFiles + public abstract ConfigurableFileCollection getInterfaceInjectionData(); + + @InputFile + public abstract RegularFileProperty getInputJar(); @OutputFile public abstract RegularFileProperty getOutputJar(); @@ -48,7 +52,7 @@ abstract class ApplyAccessTransformer extends JavaExec { public abstract RegularFileProperty getLibrariesFile(); @Inject - public ApplyAccessTransformer() {} + public TransformSources() {} @Override @TaskAction @@ -63,15 +67,29 @@ public void exec() { } var args = new ArrayList<>(Arrays.asList( - "--enable-accesstransformers", - "--access-transformer-validation", getValidate().get() ? "error" : "log", "--libraries-list", getLibrariesFile().getAsFile().get().getAbsolutePath() )); - for (var file : getAccessTransformers().getFiles()) { + if (!getAccessTransformers().isEmpty()) { args.addAll(Arrays.asList( - "--access-transformer", file.getAbsolutePath() + "--enable-accesstransformers", + "--access-transformer-validation", getValidateAccessTransformers().get() ? "error" : "log" )); + for (var file : getAccessTransformers().getFiles()) { + args.addAll(Arrays.asList( + "--access-transformer", file.getAbsolutePath() + )); + } + } + + if (!getInterfaceInjectionData().isEmpty()) { + args.add("--enable-interface-injection"); + + for (var file : getInterfaceInjectionData().getFiles()) { + args.addAll(Arrays.asList( + "--interface-injection-data", file.getAbsolutePath() + )); + } } args.addAll(Arrays.asList( diff --git a/gradle.properties b/gradle.properties index ff36da3e270..c4bfeb5e247 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,7 +22,7 @@ neoform_version=20241203.161809 neoforge_snapshot_next_stable=21.5 # renovate: net.neoforged.jst:jst-cli-bundle -jst_version=1.0.45 +jst_version=1.0.67 legacyinstaller_version=3.0.+ # renovate: net.neoforged:AutoRenamingTool art_version=2.0.3 diff --git a/patches/com/mojang/blaze3d/vertex/PoseStack.java.patch b/patches/com/mojang/blaze3d/vertex/PoseStack.java.patch deleted file mode 100644 index c3b47049f8b..00000000000 --- a/patches/com/mojang/blaze3d/vertex/PoseStack.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/com/mojang/blaze3d/vertex/PoseStack.java -+++ b/com/mojang/blaze3d/vertex/PoseStack.java -@@ -14,7 +_,7 @@ - import org.joml.Vector3f; - - @OnlyIn(Dist.CLIENT) --public class PoseStack { -+public class PoseStack implements net.neoforged.neoforge.client.extensions.IPoseStackExtension { - private final Deque poseStack = Util.make(Queues.newArrayDeque(), p_85848_ -> { - Matrix4f matrix4f = new Matrix4f(); - Matrix3f matrix3f = new Matrix3f(); diff --git a/patches/com/mojang/blaze3d/vertex/VertexConsumer.java.patch b/patches/com/mojang/blaze3d/vertex/VertexConsumer.java.patch index 30c19c43bf7..de103fa5b94 100644 --- a/patches/com/mojang/blaze3d/vertex/VertexConsumer.java.patch +++ b/patches/com/mojang/blaze3d/vertex/VertexConsumer.java.patch @@ -1,14 +1,5 @@ --- a/com/mojang/blaze3d/vertex/VertexConsumer.java +++ b/com/mojang/blaze3d/vertex/VertexConsumer.java -@@ -13,7 +_,7 @@ - import org.lwjgl.system.MemoryStack; - - @OnlyIn(Dist.CLIENT) --public interface VertexConsumer { -+public interface VertexConsumer extends net.neoforged.neoforge.client.extensions.IVertexConsumerExtension { - VertexConsumer addVertex(float p_350761_, float p_350704_, float p_350711_); - - VertexConsumer setColor(int p_350535_, int p_350875_, int p_350886_, int p_350775_); @@ -131,11 +_,14 @@ f5 = p_331397_[i1] * p_85992_ * 255.0F; } diff --git a/patches/com/mojang/blaze3d/vertex/VertexFormatElement.java.patch b/patches/com/mojang/blaze3d/vertex/VertexFormatElement.java.patch index 58433a6f82c..cb320950112 100644 --- a/patches/com/mojang/blaze3d/vertex/VertexFormatElement.java.patch +++ b/patches/com/mojang/blaze3d/vertex/VertexFormatElement.java.patch @@ -16,16 +16,14 @@ @OnlyIn(Dist.CLIENT) public static enum Type { FLOAT(4, "Float", 5126), -@@ -113,7 +_,8 @@ +@@ -113,6 +_,7 @@ } @OnlyIn(Dist.CLIENT) -- public static enum Usage { + @net.neoforged.fml.common.asm.enumextension.NamedEnum -+ public static enum Usage implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public static enum Usage implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { POSITION( "Position", - (p_349733_, p_349734_, p_349735_, p_349736_, p_349737_) -> GlStateManager._vertexAttribPointer( @@ -163,6 +_,10 @@ @OnlyIn(Dist.CLIENT) public interface SetupState { diff --git a/patches/com/mojang/math/Transformation.java.patch b/patches/com/mojang/math/Transformation.java.patch index ee4ad52b536..0b7d57931dd 100644 --- a/patches/com/mojang/math/Transformation.java.patch +++ b/patches/com/mojang/math/Transformation.java.patch @@ -1,20 +1,9 @@ --- a/com/mojang/math/Transformation.java +++ b/com/mojang/math/Transformation.java -@@ -13,7 +_,7 @@ - import org.joml.Quaternionf; - import org.joml.Vector3f; - --public final class Transformation { -+public final class Transformation implements net.neoforged.neoforge.common.extensions.ITransformationExtension { - private final Matrix4f matrix; - public static final Codec CODEC = RecordCodecBuilder.create( - p_269604_ -> p_269604_.group( -@@ -157,6 +_,19 @@ - @Override - public int hashCode() { +@@ -159,6 +_,19 @@ return Objects.hash(this.matrix); -+ } -+ + } + + private Matrix3f normalTransform = null; + public Matrix3f getNormalMatrix() { + checkNormalTransform(); @@ -26,6 +15,8 @@ + normalTransform.invert(); + normalTransform.transpose(); + } - } - ++ } ++ public Transformation slerp(Transformation p_175938_, float p_175939_) { + Vector3f vector3f = this.getTranslation(); + Quaternionf quaternionf = this.getLeftRotation(); diff --git a/patches/net/minecraft/advancements/Advancement.java.patch b/patches/net/minecraft/advancements/Advancement.java.patch index 8a488857dc6..4faeee7d894 100644 --- a/patches/net/minecraft/advancements/Advancement.java.patch +++ b/patches/net/minecraft/advancements/Advancement.java.patch @@ -8,12 +8,3 @@ public Advancement( Optional p_300893_, -@@ -111,7 +_,7 @@ - }); - } - -- public static class Builder { -+ public static class Builder implements net.neoforged.neoforge.common.extensions.IAdvancementBuilderExtension { - private Optional parent = Optional.empty(); - private Optional display = Optional.empty(); - private AdvancementRewards rewards = AdvancementRewards.EMPTY; diff --git a/patches/net/minecraft/client/KeyMapping.java.patch b/patches/net/minecraft/client/KeyMapping.java.patch index 3fb1afaedfc..2c47949a5dd 100644 --- a/patches/net/minecraft/client/KeyMapping.java.patch +++ b/patches/net/minecraft/client/KeyMapping.java.patch @@ -1,11 +1,8 @@ --- a/net/minecraft/client/KeyMapping.java +++ b/net/minecraft/client/KeyMapping.java -@@ -15,9 +_,9 @@ - import net.neoforged.api.distmarker.OnlyIn; - +@@ -17,7 +_,7 @@ @OnlyIn(Dist.CLIENT) --public class KeyMapping implements Comparable { -+public class KeyMapping implements Comparable, net.neoforged.neoforge.client.extensions.IKeyMappingExtension { + public class KeyMapping implements Comparable, net.neoforged.neoforge.client.extensions.IKeyMappingExtension { private static final Map ALL = Maps.newHashMap(); - private static final Map MAP = Maps.newHashMap(); + private static final net.neoforged.neoforge.client.settings.KeyMappingLookup MAP = new net.neoforged.neoforge.client.settings.KeyMappingLookup(); diff --git a/patches/net/minecraft/client/Minecraft.java.patch b/patches/net/minecraft/client/Minecraft.java.patch index c43825a3508..04429bcce30 100644 --- a/patches/net/minecraft/client/Minecraft.java.patch +++ b/patches/net/minecraft/client/Minecraft.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java -@@ -250,7 +_,7 @@ - import org.slf4j.Logger; - - @OnlyIn(Dist.CLIENT) --public class Minecraft extends ReentrantBlockableEventLoop implements WindowEventHandler { -+public class Minecraft extends ReentrantBlockableEventLoop implements WindowEventHandler, net.neoforged.neoforge.client.extensions.IMinecraftExtension { - static Minecraft instance; - private static final Logger LOGGER = LogUtils.getLogger(); - public static final boolean ON_OSX = Util.getPlatform() == Util.OS.OSX; @@ -432,7 +_,6 @@ } }, Util.nonCriticalIoPool()); diff --git a/patches/net/minecraft/client/gui/Font.java.patch b/patches/net/minecraft/client/gui/Font.java.patch index f147a8bcdca..30fa8897c41 100644 --- a/patches/net/minecraft/client/gui/Font.java.patch +++ b/patches/net/minecraft/client/gui/Font.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/gui/Font.java +++ b/net/minecraft/client/gui/Font.java -@@ -32,7 +_,7 @@ - import org.joml.Matrix4f; - - @OnlyIn(Dist.CLIENT) --public class Font { -+public class Font implements net.neoforged.neoforge.client.extensions.IFontExtension { - private static final float EFFECT_DEPTH = 0.01F; - public static final float SHADOW_DEPTH = 0.03F; - public static final int NO_SHADOW = 0; @@ -42,6 +_,8 @@ private final Function fonts; final boolean filterFishyGlyphs; diff --git a/patches/net/minecraft/client/gui/Gui.java.patch b/patches/net/minecraft/client/gui/Gui.java.patch index 333bdeda698..f48725af159 100644 --- a/patches/net/minecraft/client/gui/Gui.java.patch +++ b/patches/net/minecraft/client/gui/Gui.java.patch @@ -386,7 +386,7 @@ this.toolHighlightTimer = (int)(40.0 * this.minecraft.options.notificationDisplayTime().get()); } else if (this.toolHighlightTimer > 0) { this.toolHighlightTimer--; -@@ -1321,8 +_,17 @@ +@@ -1321,6 +_,15 @@ } } @@ -400,11 +400,8 @@ + } + @OnlyIn(Dist.CLIENT) -- public static enum HeartType { -+ public static enum HeartType implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public static enum HeartType implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { CONTAINER( - ResourceLocation.withDefaultNamespace("hud/heart/container"), - ResourceLocation.withDefaultNamespace("hud/heart/container_blinking"), @@ -1438,8 +_,13 @@ } else { gui$hearttype = NORMAL; diff --git a/patches/net/minecraft/client/gui/GuiGraphics.java.patch b/patches/net/minecraft/client/gui/GuiGraphics.java.patch index 472cc1b8367..54f09a0d26f 100644 --- a/patches/net/minecraft/client/gui/GuiGraphics.java.patch +++ b/patches/net/minecraft/client/gui/GuiGraphics.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/gui/GuiGraphics.java +++ b/net/minecraft/client/gui/GuiGraphics.java -@@ -52,7 +_,7 @@ - import org.joml.Vector2ic; - - @OnlyIn(Dist.CLIENT) --public class GuiGraphics { -+public class GuiGraphics implements net.neoforged.neoforge.client.extensions.IGuiGraphicsExtension { - public static final float MAX_GUI_Z = 10000.0F; - public static final float MIN_GUI_Z = -10000.0F; - private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE = 2; @@ -229,6 +_,11 @@ } diff --git a/patches/net/minecraft/client/gui/components/AbstractWidget.java.patch b/patches/net/minecraft/client/gui/components/AbstractWidget.java.patch index 6022c53dcfb..998248a6395 100644 --- a/patches/net/minecraft/client/gui/components/AbstractWidget.java.patch +++ b/patches/net/minecraft/client/gui/components/AbstractWidget.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/gui/components/AbstractWidget.java +++ b/net/minecraft/client/gui/components/AbstractWidget.java -@@ -25,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public abstract class AbstractWidget implements Renderable, GuiEventListener, LayoutElement, NarratableEntry { -+public abstract class AbstractWidget implements Renderable, GuiEventListener, LayoutElement, NarratableEntry, net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension { - private static final double PERIOD_PER_SCROLLED_PIXEL = 0.5; - private static final double MIN_SCROLL_PERIOD = 3.0; - protected int width; @@ -123,6 +_,8 @@ renderScrollingString(p_281857_, p_282790_, this.getMessage(), i, this.getY(), j, this.getY() + this.getHeight(), p_282944_); } diff --git a/patches/net/minecraft/client/gui/font/providers/GlyphProviderType.java.patch b/patches/net/minecraft/client/gui/font/providers/GlyphProviderType.java.patch index f3abf97df80..e9a7272d9c5 100644 --- a/patches/net/minecraft/client/gui/font/providers/GlyphProviderType.java.patch +++ b/patches/net/minecraft/client/gui/font/providers/GlyphProviderType.java.patch @@ -1,15 +1,13 @@ --- a/net/minecraft/client/gui/font/providers/GlyphProviderType.java +++ b/net/minecraft/client/gui/font/providers/GlyphProviderType.java -@@ -8,7 +_,8 @@ +@@ -8,6 +_,7 @@ import net.neoforged.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) --public enum GlyphProviderType implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.NamedEnum -+public enum GlyphProviderType implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum GlyphProviderType implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { BITMAP("bitmap", BitmapProvider.Definition.CODEC), TTF("ttf", TrueTypeGlyphProviderDefinition.CODEC), - SPACE("space", SpaceProvider.Definition.CODEC), @@ -31,5 +_,9 @@ public MapCodec mapCodec() { diff --git a/patches/net/minecraft/client/model/HumanoidModel.java.patch b/patches/net/minecraft/client/model/HumanoidModel.java.patch index 94cf1ee81c8..ddddb0a77a4 100644 --- a/patches/net/minecraft/client/model/HumanoidModel.java.patch +++ b/patches/net/minecraft/client/model/HumanoidModel.java.patch @@ -18,15 +18,6 @@ } } -@@ -372,7 +_,7 @@ - } - - @OnlyIn(Dist.CLIENT) -- public static enum ArmPose { -+ public static enum ArmPose implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { - EMPTY(false), - ITEM(false), - BLOCK(false), @@ -385,13 +_,31 @@ BRUSH(false); diff --git a/patches/net/minecraft/client/renderer/DimensionSpecialEffects.java.patch b/patches/net/minecraft/client/renderer/DimensionSpecialEffects.java.patch index 285c14a5b27..e766df72708 100644 --- a/patches/net/minecraft/client/renderer/DimensionSpecialEffects.java.patch +++ b/patches/net/minecraft/client/renderer/DimensionSpecialEffects.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/renderer/DimensionSpecialEffects.java +++ b/net/minecraft/client/renderer/DimensionSpecialEffects.java -@@ -13,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public abstract class DimensionSpecialEffects { -+public abstract class DimensionSpecialEffects implements net.neoforged.neoforge.client.extensions.IDimensionSpecialEffectsExtension { - private static final Object2ObjectMap EFFECTS = Util.make(new Object2ObjectArrayMap<>(), p_108881_ -> { - DimensionSpecialEffects.OverworldEffects dimensionspecialeffects$overworldeffects = new DimensionSpecialEffects.OverworldEffects(); - p_108881_.defaultReturnValue(dimensionspecialeffects$overworldeffects); @@ -36,7 +_,7 @@ } diff --git a/patches/net/minecraft/client/renderer/block/model/BlockModel.java.patch b/patches/net/minecraft/client/renderer/block/model/BlockModel.java.patch index d2bc7750928..95b1f391bda 100644 --- a/patches/net/minecraft/client/renderer/block/model/BlockModel.java.patch +++ b/patches/net/minecraft/client/renderer/block/model/BlockModel.java.patch @@ -1,11 +1,7 @@ --- a/net/minecraft/client/renderer/block/model/BlockModel.java +++ b/net/minecraft/client/renderer/block/model/BlockModel.java -@@ -26,15 +_,17 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public class BlockModel implements UnbakedModel { -+public class BlockModel implements UnbakedModel, net.neoforged.neoforge.client.model.ExtendedUnbakedModel { +@@ -29,12 +_,14 @@ + public class BlockModel implements UnbakedModel, net.neoforged.neoforge.client.model.ExtendedUnbakedModel { @VisibleForTesting public static final Gson GSON = new GsonBuilder() + .registerTypeHierarchyAdapter(UnbakedModel.class, new net.neoforged.neoforge.client.model.UnbakedModelParser.Deserializer()) diff --git a/patches/net/minecraft/client/renderer/block/model/ItemModelGenerator.java.patch b/patches/net/minecraft/client/renderer/block/model/ItemModelGenerator.java.patch index 4028b1df800..2f8078c3215 100644 --- a/patches/net/minecraft/client/renderer/block/model/ItemModelGenerator.java.patch +++ b/patches/net/minecraft/client/renderer/block/model/ItemModelGenerator.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/renderer/block/model/ItemModelGenerator.java +++ b/net/minecraft/client/renderer/block/model/ItemModelGenerator.java -@@ -20,7 +_,7 @@ - import org.joml.Vector3f; - - @OnlyIn(Dist.CLIENT) --public class ItemModelGenerator implements UnbakedModel { -+public class ItemModelGenerator implements UnbakedModel, net.neoforged.neoforge.client.model.ExtendedUnbakedModel { - public static final ResourceLocation GENERATED_ITEM_MODEL_ID = ResourceLocation.withDefaultNamespace("builtin/generated"); - public static final List LAYERS = List.of("layer0", "layer1", "layer2", "layer3", "layer4"); - private static final float MIN_Z = 7.5F; @@ -43,13 +_,23 @@ } diff --git a/patches/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java.patch b/patches/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java.patch deleted file mode 100644 index be61f89054c..00000000000 --- a/patches/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java -+++ b/net/minecraft/client/renderer/blockentity/BlockEntityRenderer.java -@@ -8,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public interface BlockEntityRenderer { -+public interface BlockEntityRenderer extends net.neoforged.neoforge.client.extensions.IBlockEntityRendererExtension { - void render(T p_112307_, float p_112308_, PoseStack p_112309_, MultiBufferSource p_112310_, int p_112311_, int p_112312_); - - default boolean shouldRenderOffScreen(T p_112306_) { diff --git a/patches/net/minecraft/client/resources/model/BakedModel.java.patch b/patches/net/minecraft/client/resources/model/BakedModel.java.patch index e2ff9814850..6c812decd03 100644 --- a/patches/net/minecraft/client/resources/model/BakedModel.java.patch +++ b/patches/net/minecraft/client/resources/model/BakedModel.java.patch @@ -1,11 +1,9 @@ --- a/net/minecraft/client/resources/model/BakedModel.java +++ b/net/minecraft/client/resources/model/BakedModel.java -@@ -12,7 +_,9 @@ - import net.neoforged.api.distmarker.OnlyIn; +@@ -13,6 +_,8 @@ @OnlyIn(Dist.CLIENT) --public interface BakedModel { -+public interface BakedModel extends net.neoforged.neoforge.client.extensions.IBakedModelExtension { + public interface BakedModel extends net.neoforged.neoforge.client.extensions.IBakedModelExtension { + /**@deprecated Forge: Use {@link #getQuads(BlockState, Direction, RandomSource, net.neoforged.neoforge.client.model.data.ModelData, net.minecraft.client.renderer.RenderType)}*/ + @Deprecated List getQuads(@Nullable BlockState p_235039_, @Nullable Direction p_235040_, RandomSource p_235041_); diff --git a/patches/net/minecraft/client/resources/model/ModelBaker.java.patch b/patches/net/minecraft/client/resources/model/ModelBaker.java.patch deleted file mode 100644 index db7b52b0bf9..00000000000 --- a/patches/net/minecraft/client/resources/model/ModelBaker.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/client/resources/model/ModelBaker.java -+++ b/net/minecraft/client/resources/model/ModelBaker.java -@@ -6,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public interface ModelBaker { -+public interface ModelBaker extends net.neoforged.neoforge.client.extensions.IModelBakerExtension { - BakedModel bake(ResourceLocation p_250776_, ModelState p_251280_); - - SpriteGetter sprites(); diff --git a/patches/net/minecraft/client/resources/model/MultiPartBakedModel.java.patch b/patches/net/minecraft/client/resources/model/MultiPartBakedModel.java.patch index 012bbbffabd..9c908670673 100644 --- a/patches/net/minecraft/client/resources/model/MultiPartBakedModel.java.patch +++ b/patches/net/minecraft/client/resources/model/MultiPartBakedModel.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/resources/model/MultiPartBakedModel.java +++ b/net/minecraft/client/resources/model/MultiPartBakedModel.java -@@ -16,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public class MultiPartBakedModel extends DelegateBakedModel { -+public class MultiPartBakedModel extends DelegateBakedModel implements net.neoforged.neoforge.client.model.IDynamicBakedModel { - private final List selectors; - private final Map selectorCache = new Reference2ObjectOpenHashMap<>(); - @@ -33,11 +_,7 @@ this.selectors = p_119462_; } diff --git a/patches/net/minecraft/client/resources/model/UnbakedModel.java.patch b/patches/net/minecraft/client/resources/model/UnbakedModel.java.patch index 965a6a63041..e554a061a31 100644 --- a/patches/net/minecraft/client/resources/model/UnbakedModel.java.patch +++ b/patches/net/minecraft/client/resources/model/UnbakedModel.java.patch @@ -1,11 +1,6 @@ --- a/net/minecraft/client/resources/model/UnbakedModel.java +++ b/net/minecraft/client/resources/model/UnbakedModel.java -@@ -9,10 +_,14 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public interface UnbakedModel extends ResolvableModel { -+public interface UnbakedModel extends ResolvableModel, net.neoforged.neoforge.client.extensions.IUnbakedModelExtension { +@@ -13,6 +_,10 @@ boolean DEFAULT_AMBIENT_OCCLUSION = true; UnbakedModel.GuiLight DEFAULT_GUI_LIGHT = UnbakedModel.GuiLight.SIDE; diff --git a/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch b/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch index ecca5f27539..05d5e04219a 100644 --- a/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch +++ b/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/client/resources/model/WeightedBakedModel.java +++ b/net/minecraft/client/resources/model/WeightedBakedModel.java -@@ -12,7 +_,7 @@ - import net.neoforged.api.distmarker.OnlyIn; - - @OnlyIn(Dist.CLIENT) --public class WeightedBakedModel extends DelegateBakedModel { -+public class WeightedBakedModel extends DelegateBakedModel implements net.neoforged.neoforge.client.model.IDynamicBakedModel { - private final SimpleWeightedRandomList list; - - public WeightedBakedModel(SimpleWeightedRandomList p_371780_) { @@ -20,8 +_,15 @@ this.list = p_371780_; } diff --git a/patches/net/minecraft/commands/CommandSourceStack.java.patch b/patches/net/minecraft/commands/CommandSourceStack.java.patch deleted file mode 100644 index 09ebb7cb46e..00000000000 --- a/patches/net/minecraft/commands/CommandSourceStack.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/commands/CommandSourceStack.java -+++ b/net/minecraft/commands/CommandSourceStack.java -@@ -46,7 +_,7 @@ - import net.minecraft.world.phys.Vec2; - import net.minecraft.world.phys.Vec3; - --public class CommandSourceStack implements ExecutionCommandSource, SharedSuggestionProvider { -+public class CommandSourceStack implements ExecutionCommandSource, SharedSuggestionProvider, net.neoforged.neoforge.common.extensions.ICommandSourceStackExtension { - public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player")); - public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity")); - public final CommandSource source; diff --git a/patches/net/minecraft/core/Holder.java.patch b/patches/net/minecraft/core/Holder.java.patch index 4cb8ce7c06c..b9282b7b3ef 100644 --- a/patches/net/minecraft/core/Holder.java.patch +++ b/patches/net/minecraft/core/Holder.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/core/Holder.java +++ b/net/minecraft/core/Holder.java -@@ -11,7 +_,7 @@ - import net.minecraft.resources.ResourceLocation; - import net.minecraft.tags.TagKey; - --public interface Holder { -+public interface Holder extends net.neoforged.neoforge.common.extensions.IHolderExtension { - T value(); - - boolean isBound(); @@ -229,6 +_,14 @@ } } diff --git a/patches/net/minecraft/core/HolderLookup.java.patch b/patches/net/minecraft/core/HolderLookup.java.patch index aa44414fdbb..152c9748c38 100644 --- a/patches/net/minecraft/core/HolderLookup.java.patch +++ b/patches/net/minecraft/core/HolderLookup.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/core/HolderLookup.java +++ b/net/minecraft/core/HolderLookup.java -@@ -26,7 +_,7 @@ - return this.listTags().map(HolderSet.Named::key); - } - -- public interface Provider extends HolderGetter.Provider { -+ public interface Provider extends HolderGetter.Provider, net.neoforged.neoforge.common.extensions.IHolderLookupProviderExtension { - Stream>> listRegistryKeys(); - - default Stream> listRegistries() { @@ -96,6 +_,18 @@ }; } diff --git a/patches/net/minecraft/core/HolderSet.java.patch b/patches/net/minecraft/core/HolderSet.java.patch index 6c2a44d7f0b..cf5fbcc5337 100644 --- a/patches/net/minecraft/core/HolderSet.java.patch +++ b/patches/net/minecraft/core/HolderSet.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/core/HolderSet.java +++ b/net/minecraft/core/HolderSet.java -@@ -15,7 +_,7 @@ - import net.minecraft.util.RandomSource; - import org.jetbrains.annotations.VisibleForTesting; - --public interface HolderSet extends Iterable> { -+public interface HolderSet extends Iterable>, net.neoforged.neoforge.common.extensions.IHolderSetExtension { - Stream> stream(); - - int size(); @@ -182,6 +_,9 @@ void bind(List> p_205836_) { diff --git a/patches/net/minecraft/core/Registry.java.patch b/patches/net/minecraft/core/Registry.java.patch index b12790d266b..8989ba6a7b8 100644 --- a/patches/net/minecraft/core/Registry.java.patch +++ b/patches/net/minecraft/core/Registry.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/core/Registry.java +++ b/net/minecraft/core/Registry.java -@@ -21,7 +_,7 @@ - import net.minecraft.util.ExtraCodecs; - import net.minecraft.util.RandomSource; - --public interface Registry extends Keyable, HolderLookup.RegistryLookup, IdMap { -+public interface Registry extends Keyable, HolderLookup.RegistryLookup, IdMap, net.neoforged.neoforge.registries.IRegistryExtension { - @Override - ResourceKey> key(); - @@ -48,7 +_,7 @@ } diff --git a/patches/net/minecraft/core/component/DataComponentHolder.java.patch b/patches/net/minecraft/core/component/DataComponentHolder.java.patch deleted file mode 100644 index d8a88115de6..00000000000 --- a/patches/net/minecraft/core/component/DataComponentHolder.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/core/component/DataComponentHolder.java -+++ b/net/minecraft/core/component/DataComponentHolder.java -@@ -3,7 +_,7 @@ - import java.util.stream.Stream; - import javax.annotation.Nullable; - --public interface DataComponentHolder { -+public interface DataComponentHolder extends net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension { - DataComponentMap getComponents(); - - @Nullable diff --git a/patches/net/minecraft/core/component/DataComponentMap.java.patch b/patches/net/minecraft/core/component/DataComponentMap.java.patch deleted file mode 100644 index d87add71077..00000000000 --- a/patches/net/minecraft/core/component/DataComponentMap.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/core/component/DataComponentMap.java -+++ b/net/minecraft/core/component/DataComponentMap.java -@@ -134,7 +_,7 @@ - }; - } - -- public static class Builder { -+ public static class Builder implements net.neoforged.neoforge.common.extensions.IDataComponentMapBuilderExtensions { - private final Reference2ObjectMap, Object> map = new Reference2ObjectArrayMap<>(); - - Builder() { diff --git a/patches/net/minecraft/data/recipes/RecipeOutput.java.patch b/patches/net/minecraft/data/recipes/RecipeOutput.java.patch index 18206b3385b..a2675ba98db 100644 --- a/patches/net/minecraft/data/recipes/RecipeOutput.java.patch +++ b/patches/net/minecraft/data/recipes/RecipeOutput.java.patch @@ -1,14 +1,12 @@ --- a/net/minecraft/data/recipes/RecipeOutput.java +++ b/net/minecraft/data/recipes/RecipeOutput.java -@@ -6,8 +_,10 @@ - import net.minecraft.resources.ResourceKey; +@@ -7,7 +_,9 @@ import net.minecraft.world.item.crafting.Recipe; --public interface RecipeOutput { + public interface RecipeOutput extends net.neoforged.neoforge.common.extensions.IRecipeOutputExtension { - void accept(ResourceKey> p_380042_, Recipe p_312328_, @Nullable AdvancementHolder p_312176_); -+public interface RecipeOutput extends net.neoforged.neoforge.common.extensions.IRecipeOutputExtension { -+ default void accept(ResourceKey> p_312249_, Recipe p_312328_, @Nullable AdvancementHolder p_312176_) { -+ accept(p_312249_, p_312328_, p_312176_, new net.neoforged.neoforge.common.conditions.ICondition[0]); ++ default void accept(ResourceKey> p_380042_, Recipe p_312328_, @Nullable AdvancementHolder p_312176_) { ++ accept(p_380042_, p_312328_, p_312176_, new net.neoforged.neoforge.common.conditions.ICondition[0]); + } Advancement.Builder advancement(); diff --git a/patches/net/minecraft/data/tags/IntrinsicHolderTagsProvider.java.patch b/patches/net/minecraft/data/tags/IntrinsicHolderTagsProvider.java.patch index 2bdb95ee8d6..77d5adc360b 100644 --- a/patches/net/minecraft/data/tags/IntrinsicHolderTagsProvider.java.patch +++ b/patches/net/minecraft/data/tags/IntrinsicHolderTagsProvider.java.patch @@ -61,8 +61,7 @@ + return new IntrinsicHolderTagsProvider.IntrinsicTagAppender<>(tagbuilder, this.keyExtractor, this.modId); } -- public static class IntrinsicTagAppender extends TagsProvider.TagAppender { -+ public static class IntrinsicTagAppender extends TagsProvider.TagAppender implements net.neoforged.neoforge.common.extensions.IIntrinsicHolderTagAppenderExtension { + public static class IntrinsicTagAppender extends TagsProvider.TagAppender implements net.neoforged.neoforge.common.extensions.IIntrinsicHolderTagAppenderExtension { private final Function> keyExtractor; - IntrinsicTagAppender(TagBuilder p_256108_, Function> p_256433_) { diff --git a/patches/net/minecraft/data/tags/TagsProvider.java.patch b/patches/net/minecraft/data/tags/TagsProvider.java.patch index 7cf15ff1f62..ce4a79ab1f2 100644 --- a/patches/net/minecraft/data/tags/TagsProvider.java.patch +++ b/patches/net/minecraft/data/tags/TagsProvider.java.patch @@ -108,12 +108,7 @@ return this.builders.computeIfAbsent(p_236452_.location(), p_236442_ -> TagBuilder.create()); } -@@ -127,11 +_,19 @@ - }); - } - -- public static class TagAppender { -+ public static class TagAppender implements net.neoforged.neoforge.common.extensions.ITagAppenderExtension { +@@ -131,7 +_,15 @@ private final TagBuilder builder; protected TagAppender(TagBuilder p_256426_) { diff --git a/patches/net/minecraft/network/FriendlyByteBuf.java.patch b/patches/net/minecraft/network/FriendlyByteBuf.java.patch index b6e2de94ff4..33a5e0bf6ec 100644 --- a/patches/net/minecraft/network/FriendlyByteBuf.java.patch +++ b/patches/net/minecraft/network/FriendlyByteBuf.java.patch @@ -1,22 +1,12 @@ --- a/net/minecraft/network/FriendlyByteBuf.java +++ b/net/minecraft/network/FriendlyByteBuf.java -@@ -67,7 +_,7 @@ - import org.joml.Quaternionf; - import org.joml.Vector3f; - --public class FriendlyByteBuf extends ByteBuf { -+public class FriendlyByteBuf extends ByteBuf implements net.neoforged.neoforge.common.extensions.IFriendlyByteBufExtension { - public static final int DEFAULT_NBT_QUOTA = 2097152; - private final ByteBuf source; - public static final short MAX_STRING_LENGTH = 32767; -@@ -1623,5 +_,10 @@ - @Override +@@ -1624,4 +_,9 @@ public boolean release(int p_130347_) { return this.source.release(p_130347_); -+ } + } + + @org.jetbrains.annotations.ApiStatus.Internal + public ByteBuf getSource() { + return this.source; - } ++ } } diff --git a/patches/net/minecraft/network/protocol/PacketFlow.java.patch b/patches/net/minecraft/network/protocol/PacketFlow.java.patch deleted file mode 100644 index 1a455bdb82b..00000000000 --- a/patches/net/minecraft/network/protocol/PacketFlow.java.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/net/minecraft/network/protocol/PacketFlow.java -+++ b/net/minecraft/network/protocol/PacketFlow.java -@@ -1,6 +_,6 @@ - package net.minecraft.network.protocol; - --public enum PacketFlow { -+public enum PacketFlow implements net.neoforged.neoforge.common.extensions.IPacketFlowExtension { - SERVERBOUND("serverbound"), - CLIENTBOUND("clientbound"); - diff --git a/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch b/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch deleted file mode 100644 index 1b6b85fcf95..00000000000 --- a/patches/net/minecraft/network/protocol/common/ClientCommonPacketListener.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/network/protocol/common/ClientCommonPacketListener.java -+++ b/net/minecraft/network/protocol/common/ClientCommonPacketListener.java -@@ -2,7 +_,7 @@ - - import net.minecraft.network.protocol.cookie.ClientCookiePacketListener; - --public interface ClientCommonPacketListener extends ClientCookiePacketListener { -+public interface ClientCommonPacketListener extends ClientCookiePacketListener, net.neoforged.neoforge.common.extensions.IClientCommonPacketListenerExtension { - void handleKeepAlive(ClientboundKeepAlivePacket p_295236_); - - void handlePing(ClientboundPingPacket p_296451_); diff --git a/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch b/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch deleted file mode 100644 index c503189ba12..00000000000 --- a/patches/net/minecraft/network/protocol/common/ServerCommonPacketListener.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/network/protocol/common/ServerCommonPacketListener.java -+++ b/net/minecraft/network/protocol/common/ServerCommonPacketListener.java -@@ -2,7 +_,7 @@ - - import net.minecraft.network.protocol.cookie.ServerCookiePacketListener; - --public interface ServerCommonPacketListener extends ServerCookiePacketListener { -+public interface ServerCommonPacketListener extends ServerCookiePacketListener, net.neoforged.neoforge.common.extensions.IServerCommonPacketListenerExtension { - void handleKeepAlive(ServerboundKeepAlivePacket p_296457_); - - void handlePong(ServerboundPongPacket p_294309_); diff --git a/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch b/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch deleted file mode 100644 index 6badab3f246..00000000000 --- a/patches/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java -+++ b/net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener.java -@@ -3,7 +_,7 @@ - import net.minecraft.network.ConnectionProtocol; - import net.minecraft.network.protocol.common.ServerCommonPacketListener; - --public interface ServerConfigurationPacketListener extends ServerCommonPacketListener { -+public interface ServerConfigurationPacketListener extends ServerCommonPacketListener, net.neoforged.neoforge.common.extensions.IServerConfigurationPacketListenerExtension { - @Override - default ConnectionProtocol protocol() { - return ConnectionProtocol.CONFIGURATION; diff --git a/patches/net/minecraft/network/protocol/game/ServerGamePacketListener.java.patch b/patches/net/minecraft/network/protocol/game/ServerGamePacketListener.java.patch deleted file mode 100644 index 141ddf719f8..00000000000 --- a/patches/net/minecraft/network/protocol/game/ServerGamePacketListener.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/network/protocol/game/ServerGamePacketListener.java -+++ b/net/minecraft/network/protocol/game/ServerGamePacketListener.java -@@ -4,7 +_,7 @@ - import net.minecraft.network.protocol.common.ServerCommonPacketListener; - import net.minecraft.network.protocol.ping.ServerPingPacketListener; - --public interface ServerGamePacketListener extends ServerPingPacketListener, ServerCommonPacketListener { -+public interface ServerGamePacketListener extends ServerPingPacketListener, ServerCommonPacketListener, net.neoforged.neoforge.common.extensions.IServerGamePacketListenerExtension { - @Override - default ConnectionProtocol protocol() { - return ConnectionProtocol.PLAY; diff --git a/patches/net/minecraft/resources/ResourceKey.java.patch b/patches/net/minecraft/resources/ResourceKey.java.patch index f4deb2c344d..bad91232f88 100644 --- a/patches/net/minecraft/resources/ResourceKey.java.patch +++ b/patches/net/minecraft/resources/ResourceKey.java.patch @@ -1,25 +1,16 @@ --- a/net/minecraft/resources/ResourceKey.java +++ b/net/minecraft/resources/ResourceKey.java -@@ -9,7 +_,7 @@ - import net.minecraft.core.registries.Registries; - import net.minecraft.network.codec.StreamCodec; - --public class ResourceKey { -+public class ResourceKey implements Comparable> { - private static final ConcurrentMap> VALUES = new MapMaker().weakValues().makeMap(); - private final ResourceLocation registryName; - private final ResourceLocation location; -@@ -64,6 +_,13 @@ - - public ResourceKey> registryKey() { +@@ -66,6 +_,13 @@ return createRegistryKey(this.registryName); -+ } -+ + } + + @Override + public int compareTo(ResourceKey o) { + int ret = this.registry().compareTo(o.registry()); + if (ret == 0) ret = this.location().compareTo(o.location()); + return ret; - } - ++ } ++ static record InternKey(ResourceLocation registry, ResourceLocation location) { + } + } diff --git a/patches/net/minecraft/server/level/ServerChunkCache.java.patch b/patches/net/minecraft/server/level/ServerChunkCache.java.patch index 36cf9ecf4d5..5a5ade2f1e9 100644 --- a/patches/net/minecraft/server/level/ServerChunkCache.java.patch +++ b/patches/net/minecraft/server/level/ServerChunkCache.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -52,7 +_,7 @@ - import net.minecraft.world.level.storage.LevelStorageSource; - import org.slf4j.Logger; - --public class ServerChunkCache extends ChunkSource { -+public class ServerChunkCache extends ChunkSource implements net.neoforged.neoforge.common.extensions.IServerChunkCacheExtension { - private static final Logger LOGGER = LogUtils.getLogger(); - private final DistanceManager distanceManager; - public final ServerLevel level; @@ -165,6 +_,10 @@ } } diff --git a/patches/net/minecraft/server/packs/PackResources.java.patch b/patches/net/minecraft/server/packs/PackResources.java.patch deleted file mode 100644 index 9ad60847cd9..00000000000 --- a/patches/net/minecraft/server/packs/PackResources.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/server/packs/PackResources.java -+++ b/net/minecraft/server/packs/PackResources.java -@@ -11,7 +_,7 @@ - import net.minecraft.server.packs.repository.KnownPack; - import net.minecraft.server.packs.resources.IoSupplier; - --public interface PackResources extends AutoCloseable { -+public interface PackResources extends AutoCloseable, net.neoforged.neoforge.common.extensions.IPackResourcesExtension { - String METADATA_EXTENSION = ".mcmeta"; - String PACK_META = "pack.mcmeta"; - diff --git a/patches/net/minecraft/server/packs/PackType.java.patch b/patches/net/minecraft/server/packs/PackType.java.patch index ebc29fdb6e2..b46adf47391 100644 --- a/patches/net/minecraft/server/packs/PackType.java.patch +++ b/patches/net/minecraft/server/packs/PackType.java.patch @@ -1,21 +1,12 @@ --- a/net/minecraft/server/packs/PackType.java +++ b/net/minecraft/server/packs/PackType.java -@@ -1,6 +_,6 @@ - package net.minecraft.server.packs; - --public enum PackType { -+public enum PackType implements net.minecraft.util.StringRepresentable { - CLIENT_RESOURCES("assets"), - SERVER_DATA("data"); - -@@ -12,5 +_,10 @@ - +@@ -13,4 +_,9 @@ public String getDirectory() { return this.directory; -+ } + } + + @Override + public String getSerializedName() { + return name().toLowerCase(); - } ++ } } diff --git a/patches/net/minecraft/tags/TagBuilder.java.patch b/patches/net/minecraft/tags/TagBuilder.java.patch index 9d8a64fbbbe..b9be606b52c 100644 --- a/patches/net/minecraft/tags/TagBuilder.java.patch +++ b/patches/net/minecraft/tags/TagBuilder.java.patch @@ -1,11 +1,9 @@ --- a/net/minecraft/tags/TagBuilder.java +++ b/net/minecraft/tags/TagBuilder.java -@@ -4,7 +_,17 @@ - import java.util.List; +@@ -5,6 +_,16 @@ import net.minecraft.resources.ResourceLocation; --public class TagBuilder { -+public class TagBuilder implements net.neoforged.neoforge.common.extensions.ITagBuilderExtension { + public class TagBuilder implements net.neoforged.neoforge.common.extensions.ITagBuilderExtension { + // FORGE: Remove entries are used for datagen. + private final List removeEntries = new ArrayList<>(); + public java.util.stream.Stream getRemoveEntries() { return this.removeEntries.stream(); } diff --git a/patches/net/minecraft/world/MenuProvider.java.patch b/patches/net/minecraft/world/MenuProvider.java.patch deleted file mode 100644 index 4823532c3a9..00000000000 --- a/patches/net/minecraft/world/MenuProvider.java.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/net/minecraft/world/MenuProvider.java -+++ b/net/minecraft/world/MenuProvider.java -@@ -3,6 +_,6 @@ - import net.minecraft.network.chat.Component; - import net.minecraft.world.inventory.MenuConstructor; - --public interface MenuProvider extends MenuConstructor { -+public interface MenuProvider extends MenuConstructor, net.neoforged.neoforge.client.extensions.IMenuProviderExtension { - Component getDisplayName(); - } diff --git a/patches/net/minecraft/world/damagesource/DamageEffects.java.patch b/patches/net/minecraft/world/damagesource/DamageEffects.java.patch index 1055ddb0c8d..ad82114ac98 100644 --- a/patches/net/minecraft/world/damagesource/DamageEffects.java.patch +++ b/patches/net/minecraft/world/damagesource/DamageEffects.java.patch @@ -1,16 +1,14 @@ --- a/net/minecraft/world/damagesource/DamageEffects.java +++ b/net/minecraft/world/damagesource/DamageEffects.java -@@ -5,7 +_,9 @@ +@@ -5,6 +_,8 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.util.StringRepresentable; --public enum DamageEffects implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.NamedEnum +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+public enum DamageEffects implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum DamageEffects implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { HURT("hurt", SoundEvents.PLAYER_HURT), THORNS("thorns", SoundEvents.THORNS_HIT), - DROWNING("drowning", SoundEvents.PLAYER_HURT_DROWN), @@ -15,11 +_,33 @@ public static final Codec CODEC = StringRepresentable.fromEnum(DamageEffects::values); diff --git a/patches/net/minecraft/world/damagesource/DamageScaling.java.patch b/patches/net/minecraft/world/damagesource/DamageScaling.java.patch index 150fa2ae4ca..5185beb98f6 100644 --- a/patches/net/minecraft/world/damagesource/DamageScaling.java.patch +++ b/patches/net/minecraft/world/damagesource/DamageScaling.java.patch @@ -1,16 +1,15 @@ --- a/net/minecraft/world/damagesource/DamageScaling.java +++ b/net/minecraft/world/damagesource/DamageScaling.java -@@ -3,20 +_,55 @@ +@@ -3,6 +_,8 @@ import com.mojang.serialization.Codec; import net.minecraft.util.StringRepresentable; --public enum DamageScaling implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.NamedEnum +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+public enum DamageScaling implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum DamageScaling implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { NEVER("never"), WHEN_CAUSED_BY_LIVING_NON_PLAYER("when_caused_by_living_non_player"), - ALWAYS("always"); +@@ -10,13 +_,46 @@ public static final Codec CODEC = StringRepresentable.fromEnum(DamageScaling::values); private final String id; diff --git a/patches/net/minecraft/world/damagesource/DeathMessageType.java.patch b/patches/net/minecraft/world/damagesource/DeathMessageType.java.patch index a575f01d40e..a78a0e40465 100644 --- a/patches/net/minecraft/world/damagesource/DeathMessageType.java.patch +++ b/patches/net/minecraft/world/damagesource/DeathMessageType.java.patch @@ -1,16 +1,15 @@ --- a/net/minecraft/world/damagesource/DeathMessageType.java +++ b/net/minecraft/world/damagesource/DeathMessageType.java -@@ -3,20 +_,55 @@ +@@ -3,6 +_,8 @@ import com.mojang.serialization.Codec; import net.minecraft.util.StringRepresentable; --public enum DeathMessageType implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.NamedEnum +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+public enum DeathMessageType implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum DeathMessageType implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { DEFAULT("default"), FALL_VARIANTS("fall_variants"), - INTENTIONAL_GAME_DESIGN("intentional_game_design"); +@@ -10,13 +_,46 @@ public static final Codec CODEC = StringRepresentable.fromEnum(DeathMessageType::values); private final String id; diff --git a/patches/net/minecraft/world/effect/MobEffect.java.patch b/patches/net/minecraft/world/effect/MobEffect.java.patch index ed25ba16ea3..6ffb32f3e09 100644 --- a/patches/net/minecraft/world/effect/MobEffect.java.patch +++ b/patches/net/minecraft/world/effect/MobEffect.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/effect/MobEffect.java +++ b/net/minecraft/world/effect/MobEffect.java -@@ -36,7 +_,7 @@ - import net.minecraft.world.flag.FeatureFlagSet; - import net.minecraft.world.flag.FeatureFlags; - --public class MobEffect implements FeatureElement { -+public class MobEffect implements FeatureElement, net.neoforged.neoforge.common.extensions.IMobEffectExtension { - public static final Codec> CODEC = BuiltInRegistries.MOB_EFFECT.holderByNameCodec(); - public static final StreamCodec> STREAM_CODEC = ByteBufCodecs.holderRegistry(Registries.MOB_EFFECT); - private static final int AMBIENT_ALPHA = Mth.floor(38.25F); @@ -65,6 +_,16 @@ this.particleFactory = p_333515_ -> p_333716_; } diff --git a/patches/net/minecraft/world/entity/Entity.java.patch b/patches/net/minecraft/world/entity/Entity.java.patch index 35d70c49b2f..b8e2a06fbb8 100644 --- a/patches/net/minecraft/world/entity/Entity.java.patch +++ b/patches/net/minecraft/world/entity/Entity.java.patch @@ -4,7 +4,7 @@ import net.minecraft.world.scores.Team; import org.slf4j.Logger; --public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder { +-public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, net.neoforged.neoforge.common.extensions.IEntityExtension { +public abstract class Entity extends net.neoforged.neoforge.attachment.AttachmentHolder implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, net.neoforged.neoforge.common.extensions.IEntityExtension { private static final Logger LOGGER = LogUtils.getLogger(); public static final String ID_TAG = "id"; diff --git a/patches/net/minecraft/world/entity/LivingEntity.java.patch b/patches/net/minecraft/world/entity/LivingEntity.java.patch index 2527407caef..e32dd8f9da8 100644 --- a/patches/net/minecraft/world/entity/LivingEntity.java.patch +++ b/patches/net/minecraft/world/entity/LivingEntity.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -136,7 +_,7 @@ - import net.minecraft.world.scores.Scoreboard; - import org.slf4j.Logger; - --public abstract class LivingEntity extends Entity implements Attackable { -+public abstract class LivingEntity extends Entity implements Attackable, net.neoforged.neoforge.common.extensions.ILivingEntityExtension { - private static final Logger LOGGER = LogUtils.getLogger(); - private static final String TAG_ACTIVE_EFFECTS = "active_effects"; - private static final ResourceLocation SPEED_MODIFIER_POWDER_SNOW_ID = ResourceLocation.withDefaultNamespace("powder_snow"); @@ -178,13 +_,18 @@ public static final float EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT = 0.5F; public static final float DEFAULT_BABY_SCALE = 0.5F; diff --git a/patches/net/minecraft/world/entity/MobCategory.java.patch b/patches/net/minecraft/world/entity/MobCategory.java.patch index f6931a27a47..82a67a6f1ca 100644 --- a/patches/net/minecraft/world/entity/MobCategory.java.patch +++ b/patches/net/minecraft/world/entity/MobCategory.java.patch @@ -1,15 +1,13 @@ --- a/net/minecraft/world/entity/MobCategory.java +++ b/net/minecraft/world/entity/MobCategory.java -@@ -3,7 +_,8 @@ +@@ -3,6 +_,7 @@ import com.mojang.serialization.Codec; import net.minecraft.util.StringRepresentable; --public enum MobCategory implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.NamedEnum -+public enum MobCategory implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum MobCategory implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { MONSTER("monster", 70, false, false, 128), CREATURE("creature", 10, true, true, 128), - AMBIENT("ambient", 15, true, false, 128), @@ -56,5 +_,9 @@ public int getNoDespawnDistance() { diff --git a/patches/net/minecraft/world/entity/Shearable.java.patch b/patches/net/minecraft/world/entity/Shearable.java.patch index 58aef72f93f..bd44536e0fe 100644 --- a/patches/net/minecraft/world/entity/Shearable.java.patch +++ b/patches/net/minecraft/world/entity/Shearable.java.patch @@ -4,12 +4,11 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.item.ItemStack; --public interface Shearable { +/** + * @deprecated Neo: Use {@link net.neoforged.neoforge.common.IShearable} instead. + */ +@Deprecated -+public interface Shearable extends net.neoforged.neoforge.common.IShearable { + public interface Shearable extends net.neoforged.neoforge.common.IShearable { + /** + * @deprecated Neo: Use {@link net.neoforged.neoforge.common.IShearable#onSheared(net.minecraft.world.entity.player.Player, net.minecraft.world.item.ItemStack, net.minecraft.world.level.Level, net.minecraft.core.BlockPos)} instead. + */ diff --git a/patches/net/minecraft/world/entity/ai/attributes/Attribute.java.patch b/patches/net/minecraft/world/entity/ai/attributes/Attribute.java.patch index 3863a37e988..28a6452f6cf 100644 --- a/patches/net/minecraft/world/entity/ai/attributes/Attribute.java.patch +++ b/patches/net/minecraft/world/entity/ai/attributes/Attribute.java.patch @@ -1,20 +1,9 @@ --- a/net/minecraft/world/entity/ai/attributes/Attribute.java +++ b/net/minecraft/world/entity/ai/attributes/Attribute.java -@@ -9,7 +_,7 @@ - import net.minecraft.network.codec.ByteBufCodecs; - import net.minecraft.network.codec.StreamCodec; - --public class Attribute { -+public class Attribute implements net.neoforged.neoforge.common.extensions.IAttributeExtension { - public static final Codec> CODEC = BuiltInRegistries.ATTRIBUTE.holderByNameCodec(); - public static final StreamCodec> STREAM_CODEC = ByteBufCodecs.holderRegistry(Registries.ATTRIBUTE); - private final double defaultValue; -@@ -50,6 +_,21 @@ - - public ChatFormatting getStyle(boolean p_347715_) { +@@ -52,6 +_,21 @@ return this.sentiment.getStyle(p_347715_); -+ } -+ + } + + // Neo: Patch in the default implementation of IAttributeExtension#getMergedStyle since we need access to Attribute#sentiment + + protected static final net.minecraft.network.chat.TextColor MERGED_RED = net.minecraft.network.chat.TextColor.fromRgb(0xF93131); @@ -28,6 +17,8 @@ + case NEGATIVE -> isPositive ? MERGED_RED : MERGED_BLUE; + case NEUTRAL -> MERGED_GRAY; + }; - } - ++ } ++ public static enum Sentiment { + POSITIVE, + NEUTRAL, diff --git a/patches/net/minecraft/world/entity/player/Player.java.patch b/patches/net/minecraft/world/entity/player/Player.java.patch index 52a2dd2d7c7..5323ec6b622 100644 --- a/patches/net/minecraft/world/entity/player/Player.java.patch +++ b/patches/net/minecraft/world/entity/player/Player.java.patch @@ -1,11 +1,9 @@ --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -117,7 +_,8 @@ - import net.minecraft.world.scores.Team; +@@ -118,6 +_,7 @@ import org.slf4j.Logger; --public abstract class Player extends LivingEntity { -+public abstract class Player extends LivingEntity implements net.neoforged.neoforge.common.extensions.IPlayerExtension { + public abstract class Player extends LivingEntity implements net.neoforged.neoforge.common.extensions.IPlayerExtension { + public static final String PERSISTED_NBT_TAG = "PlayerPersisted"; private static final Logger LOGGER = LogUtils.getLogger(); public static final HumanoidArm DEFAULT_MAIN_HAND = HumanoidArm.RIGHT; diff --git a/patches/net/minecraft/world/entity/raid/Raid.java.patch b/patches/net/minecraft/world/entity/raid/Raid.java.patch index 1518312f9ef..7c1a8abeece 100644 --- a/patches/net/minecraft/world/entity/raid/Raid.java.patch +++ b/patches/net/minecraft/world/entity/raid/Raid.java.patch @@ -18,15 +18,6 @@ Raider raider1 = null; if (i == this.getNumGroups(Difficulty.NORMAL)) { raider1 = EntityType.PILLAGER.create(this.level, EntitySpawnReason.EVENT); -@@ -828,7 +_,7 @@ - } - } - -- public static enum RaiderType { -+ public static enum RaiderType implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { - VINDICATOR(EntityType.VINDICATOR, new int[]{0, 0, 2, 0, 1, 4, 2, 5}), - EVOKER(EntityType.EVOKER, new int[]{0, 0, 0, 0, 0, 1, 1, 2}), - PILLAGER(EntityType.PILLAGER, new int[]{0, 4, 3, 3, 4, 4, 4, 2}), @@ -836,12 +_,26 @@ RAVAGER(EntityType.RAVAGER, new int[]{0, 0, 0, 1, 0, 1, 0, 2}); diff --git a/patches/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch b/patches/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch index c389491313b..b75343a303b 100644 --- a/patches/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch +++ b/patches/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java -@@ -45,7 +_,7 @@ - import net.minecraft.world.phys.shapes.Shapes; - import net.minecraft.world.phys.shapes.VoxelShape; - --public abstract class AbstractBoat extends VehicleEntity implements Leashable { -+public abstract class AbstractBoat extends VehicleEntity implements Leashable, net.neoforged.neoforge.common.extensions.IAbstractBoatExtension { - private static final EntityDataAccessor DATA_ID_PADDLE_LEFT = SynchedEntityData.defineId(AbstractBoat.class, EntityDataSerializers.BOOLEAN); - private static final EntityDataAccessor DATA_ID_PADDLE_RIGHT = SynchedEntityData.defineId(AbstractBoat.class, EntityDataSerializers.BOOLEAN); - private static final EntityDataAccessor DATA_ID_BUBBLE_TIME = SynchedEntityData.defineId(AbstractBoat.class, EntityDataSerializers.INT); @@ -478,7 +_,7 @@ for (int i2 = i1; i2 < j1; i2++) { blockpos$mutableblockpos.set(l1, k1, i2); diff --git a/patches/net/minecraft/world/inventory/MenuType.java.patch b/patches/net/minecraft/world/inventory/MenuType.java.patch index 7d0eaf4e2d5..180fe2e4bf8 100644 --- a/patches/net/minecraft/world/inventory/MenuType.java.patch +++ b/patches/net/minecraft/world/inventory/MenuType.java.patch @@ -1,26 +1,17 @@ --- a/net/minecraft/world/inventory/MenuType.java +++ b/net/minecraft/world/inventory/MenuType.java -@@ -8,7 +_,7 @@ - import net.minecraft.world.flag.FeatureFlagSet; - import net.minecraft.world.flag.FeatureFlags; - --public class MenuType implements FeatureElement { -+public class MenuType implements FeatureElement, net.neoforged.neoforge.common.extensions.IMenuTypeExtension { - public static final MenuType GENERIC_9x1 = register("generic_9x1", ChestMenu::oneRow); - public static final MenuType GENERIC_9x2 = register("generic_9x2", ChestMenu::twoRows); - public static final MenuType GENERIC_9x3 = register("generic_9x3", ChestMenu::threeRows); -@@ -52,6 +_,14 @@ +@@ -55,6 +_,14 @@ + } - public T create(int p_39986_, Inventory p_39987_) { - return this.constructor.create(p_39986_, p_39987_); -+ } -+ -+ @Override + @Override + public T create(int windowId, Inventory playerInv, net.minecraft.network.RegistryFriendlyByteBuf extraData) { + if (this.constructor instanceof net.neoforged.neoforge.network.IContainerFactory) { + return ((net.neoforged.neoforge.network.IContainerFactory) this.constructor).create(windowId, playerInv, extraData); + } + return create(windowId, playerInv); ++ } ++ ++ @Override + public FeatureFlagSet requiredFeatures() { + return this.requiredFeatures; } - - @Override diff --git a/patches/net/minecraft/world/inventory/RecipeBookType.java.patch b/patches/net/minecraft/world/inventory/RecipeBookType.java.patch index a178e91a5f5..8a3cdd55ebb 100644 --- a/patches/net/minecraft/world/inventory/RecipeBookType.java.patch +++ b/patches/net/minecraft/world/inventory/RecipeBookType.java.patch @@ -3,9 +3,8 @@ @@ -1,8 +_,13 @@ package net.minecraft.world.inventory; --public enum RecipeBookType { +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+public enum RecipeBookType implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum RecipeBookType implements net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { CRAFTING, FURNACE, BLAST_FURNACE, diff --git a/patches/net/minecraft/world/item/DispensibleContainerItem.java.patch b/patches/net/minecraft/world/item/DispensibleContainerItem.java.patch index 0c745137ad1..5eb1a31c739 100644 --- a/patches/net/minecraft/world/item/DispensibleContainerItem.java.patch +++ b/patches/net/minecraft/world/item/DispensibleContainerItem.java.patch @@ -1,11 +1,6 @@ --- a/net/minecraft/world/item/DispensibleContainerItem.java +++ b/net/minecraft/world/item/DispensibleContainerItem.java -@@ -6,9 +_,10 @@ - import net.minecraft.world.level.Level; - import net.minecraft.world.phys.BlockHitResult; - --public interface DispensibleContainerItem { -+public interface DispensibleContainerItem extends net.neoforged.neoforge.common.extensions.IDispensibleContainerItemExtension { +@@ -10,5 +_,6 @@ default void checkExtraContent(@Nullable Player p_150817_, Level p_150818_, ItemStack p_150819_, BlockPos p_150820_) { } diff --git a/patches/net/minecraft/world/item/Item.java.patch b/patches/net/minecraft/world/item/Item.java.patch index 63ce8433900..1b76d96038e 100644 --- a/patches/net/minecraft/world/item/Item.java.patch +++ b/patches/net/minecraft/world/item/Item.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/item/Item.java +++ b/net/minecraft/world/item/Item.java -@@ -70,7 +_,7 @@ - import net.minecraft.world.phys.Vec3; - import org.slf4j.Logger; - --public class Item implements FeatureElement, ItemLike { -+public class Item implements FeatureElement, ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension { - public static final Codec> CODEC = BuiltInRegistries.ITEM - .holderByNameCodec() - .validate( @@ -79,7 +_,7 @@ : DataResult.success(p_381630_) ); @@ -98,15 +89,6 @@ } public ItemStack getDefaultInstance() { -@@ -326,7 +_,7 @@ - return false; - } - -- public static class Properties { -+ public static class Properties implements net.neoforged.neoforge.common.extensions.IItemPropertiesExtensions { - private static final DependantName BLOCK_DESCRIPTION_ID = p_371954_ -> Util.makeDescriptionId("block", p_371954_.location()); - private static final DependantName ITEM_DESCRIPTION_ID = p_371511_ -> Util.makeDescriptionId("item", p_371511_.location()); - private final DataComponentMap.Builder components = DataComponentMap.builder().addAll(DataComponents.COMMON_ITEM_COMPONENTS); @@ -337,6 +_,12 @@ private ResourceKey id; private DependantName descriptionId = ITEM_DESCRIPTION_ID; diff --git a/patches/net/minecraft/world/item/ItemDisplayContext.java.patch b/patches/net/minecraft/world/item/ItemDisplayContext.java.patch index 8b3daba123e..fd1d65cbc6e 100644 --- a/patches/net/minecraft/world/item/ItemDisplayContext.java.patch +++ b/patches/net/minecraft/world/item/ItemDisplayContext.java.patch @@ -1,17 +1,15 @@ --- a/net/minecraft/world/item/ItemDisplayContext.java +++ b/net/minecraft/world/item/ItemDisplayContext.java -@@ -5,7 +_,10 @@ +@@ -5,6 +_,9 @@ import net.minecraft.util.ByIdMap; import net.minecraft.util.StringRepresentable; --public enum ItemDisplayContext implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.IndexedEnum +@net.neoforged.fml.common.asm.enumextension.NamedEnum(1) +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+public enum ItemDisplayContext implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum ItemDisplayContext implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { NONE(0, "none"), THIRD_PERSON_LEFT_HAND(1, "thirdperson_lefthand"), - THIRD_PERSON_RIGHT_HAND(2, "thirdperson_righthand"), @@ -20,10 +_,22 @@ public static final IntFunction BY_ID = ByIdMap.continuous(ItemDisplayContext::getId, values(), ByIdMap.OutOfBoundsStrategy.ZERO); private final byte id; diff --git a/patches/net/minecraft/world/item/ItemStack.java.patch b/patches/net/minecraft/world/item/ItemStack.java.patch index f826fb0dfc7..02635eecc58 100644 --- a/patches/net/minecraft/world/item/ItemStack.java.patch +++ b/patches/net/minecraft/world/item/ItemStack.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -97,7 +_,7 @@ - import org.apache.commons.lang3.mutable.MutableBoolean; - import org.slf4j.Logger; - --public final class ItemStack implements DataComponentHolder { -+public final class ItemStack implements DataComponentHolder, net.neoforged.neoforge.common.extensions.IItemStackExtension, net.neoforged.neoforge.common.MutableDataComponentHolder { - private static final List OP_NBT_WARNING = List.of( - Component.translatable("item.op_warning.line1").withStyle(ChatFormatting.RED, ChatFormatting.BOLD), - Component.translatable("item.op_warning.line2").withStyle(ChatFormatting.RED), @@ -242,6 +_,10 @@ return !this.isEmpty() && this.components.hasNonDefault(p_389426_); } diff --git a/patches/net/minecraft/world/item/ItemUseAnimation.java.patch b/patches/net/minecraft/world/item/ItemUseAnimation.java.patch index 9e2141275ff..81b65c326f4 100644 --- a/patches/net/minecraft/world/item/ItemUseAnimation.java.patch +++ b/patches/net/minecraft/world/item/ItemUseAnimation.java.patch @@ -1,17 +1,15 @@ --- a/net/minecraft/world/item/ItemUseAnimation.java +++ b/net/minecraft/world/item/ItemUseAnimation.java -@@ -8,7 +_,10 @@ +@@ -8,6 +_,9 @@ import net.minecraft.util.ByIdMap; import net.minecraft.util.StringRepresentable; --public enum ItemUseAnimation implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.IndexedEnum +@net.neoforged.fml.common.asm.enumextension.NamedEnum(1) +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.BIDIRECTIONAL) -+public enum ItemUseAnimation implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum ItemUseAnimation implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { NONE(0, "none"), EAT(1, "eat"), - DRINK(2, "drink"), @@ -39,5 +_,9 @@ @Override public String getSerializedName() { diff --git a/patches/net/minecraft/world/item/Rarity.java.patch b/patches/net/minecraft/world/item/Rarity.java.patch index b2d929a1261..3f8da0a2eff 100644 --- a/patches/net/minecraft/world/item/Rarity.java.patch +++ b/patches/net/minecraft/world/item/Rarity.java.patch @@ -1,17 +1,15 @@ --- a/net/minecraft/world/item/Rarity.java +++ b/net/minecraft/world/item/Rarity.java -@@ -9,7 +_,10 @@ +@@ -9,6 +_,9 @@ import net.minecraft.util.ByIdMap; import net.minecraft.util.StringRepresentable; --public enum Rarity implements StringRepresentable { +@net.neoforged.fml.common.asm.enumextension.IndexedEnum +@net.neoforged.fml.common.asm.enumextension.NamedEnum(1) +@net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.BIDIRECTIONAL) -+public enum Rarity implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public enum Rarity implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { COMMON(0, "common", ChatFormatting.WHITE), UNCOMMON(1, "uncommon", ChatFormatting.YELLOW), - RARE(2, "rare", ChatFormatting.AQUA), @@ -21,19 +_,38 @@ private final int id; private final String name; diff --git a/patches/net/minecraft/world/item/component/FireworkExplosion.java.patch b/patches/net/minecraft/world/item/component/FireworkExplosion.java.patch index ca06424293f..4e6ebf3f46c 100644 --- a/patches/net/minecraft/world/item/component/FireworkExplosion.java.patch +++ b/patches/net/minecraft/world/item/component/FireworkExplosion.java.patch @@ -1,17 +1,15 @@ --- a/net/minecraft/world/item/component/FireworkExplosion.java +++ b/net/minecraft/world/item/component/FireworkExplosion.java -@@ -107,7 +_,10 @@ +@@ -107,6 +_,9 @@ return new FireworkExplosion(this.shape, this.colors, new IntArrayList(p_330678_), this.hasTrail, this.hasTwinkle); } -- public static enum Shape implements StringRepresentable { + @net.neoforged.fml.common.asm.enumextension.IndexedEnum + @net.neoforged.fml.common.asm.enumextension.NamedEnum(1) + @net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.BIDIRECTIONAL) -+ public static enum Shape implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public static enum Shape implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { SMALL_BALL(0, "small_ball"), LARGE_BALL(1, "large_ball"), - STAR(2, "star"), @@ -142,6 +_,10 @@ @Override public String getSerializedName() { diff --git a/patches/net/minecraft/world/level/BaseSpawner.java.patch b/patches/net/minecraft/world/level/BaseSpawner.java.patch index 6a423f6cca6..6ffc1f9ea12 100644 --- a/patches/net/minecraft/world/level/BaseSpawner.java.patch +++ b/patches/net/minecraft/world/level/BaseSpawner.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -26,7 +_,7 @@ - import net.minecraft.world.phys.AABB; - import org.slf4j.Logger; - --public abstract class BaseSpawner { -+public abstract class BaseSpawner implements net.neoforged.neoforge.common.extensions.IOwnedSpawner { - public static final String SPAWN_DATA_TAG = "SpawnData"; - private static final Logger LOGGER = LogUtils.getLogger(); - private static final int EVENT_SPAWN = 1; @@ -151,16 +_,14 @@ entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), randomsource.nextFloat() * 360.0F, 0.0F); diff --git a/patches/net/minecraft/world/level/BlockAndTintGetter.java.patch b/patches/net/minecraft/world/level/BlockAndTintGetter.java.patch deleted file mode 100644 index 26fcdd0c467..00000000000 --- a/patches/net/minecraft/world/level/BlockAndTintGetter.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/BlockAndTintGetter.java -+++ b/net/minecraft/world/level/BlockAndTintGetter.java -@@ -4,7 +_,7 @@ - import net.minecraft.core.Direction; - import net.minecraft.world.level.lighting.LevelLightEngine; - --public interface BlockAndTintGetter extends BlockGetter { -+public interface BlockAndTintGetter extends BlockGetter, net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension { - float getShade(Direction p_45522_, boolean p_45523_); - - LevelLightEngine getLightEngine(); diff --git a/patches/net/minecraft/world/level/BlockGetter.java.patch b/patches/net/minecraft/world/level/BlockGetter.java.patch index 60f517c0ab7..e5a442ea0cc 100644 --- a/patches/net/minecraft/world/level/BlockGetter.java.patch +++ b/patches/net/minecraft/world/level/BlockGetter.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/BlockGetter.java +++ b/net/minecraft/world/level/BlockGetter.java -@@ -20,7 +_,7 @@ - import net.minecraft.world.phys.Vec3; - import net.minecraft.world.phys.shapes.VoxelShape; - --public interface BlockGetter extends LevelHeightAccessor { -+public interface BlockGetter extends LevelHeightAccessor, net.neoforged.neoforge.common.extensions.IBlockGetterExtension { - int MAX_BLOCK_ITERATIONS_ALONG_TRAVEL = 16; - - @Nullable @@ -36,7 +_,7 @@ FluidState getFluidState(BlockPos p_45569_); diff --git a/patches/net/minecraft/world/level/Level.java.patch b/patches/net/minecraft/world/level/Level.java.patch index e76860b35bd..fa99b6ae50f 100644 --- a/patches/net/minecraft/world/level/Level.java.patch +++ b/patches/net/minecraft/world/level/Level.java.patch @@ -4,7 +4,7 @@ import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.Scoreboard; --public abstract class Level implements LevelAccessor, AutoCloseable { +-public abstract class Level implements LevelAccessor, AutoCloseable, net.neoforged.neoforge.common.extensions.ILevelExtension { +public abstract class Level extends net.neoforged.neoforge.attachment.AttachmentHolder implements LevelAccessor, AutoCloseable, net.neoforged.neoforge.common.extensions.ILevelExtension { public static final Codec> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION); public static final ResourceKey OVERWORLD = ResourceKey.create(Registries.DIMENSION, ResourceLocation.withDefaultNamespace("overworld")); diff --git a/patches/net/minecraft/world/level/LevelReader.java.patch b/patches/net/minecraft/world/level/LevelReader.java.patch deleted file mode 100644 index bab6ca4b115..00000000000 --- a/patches/net/minecraft/world/level/LevelReader.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/LevelReader.java -+++ b/net/minecraft/world/level/LevelReader.java -@@ -22,7 +_,7 @@ - import net.minecraft.world.level.levelgen.Heightmap; - import net.minecraft.world.phys.AABB; - --public interface LevelReader extends BlockAndTintGetter, CollisionGetter, SignalGetter, BiomeManager.NoiseBiomeSource { -+public interface LevelReader extends BlockAndTintGetter, CollisionGetter, SignalGetter, BiomeManager.NoiseBiomeSource, net.neoforged.neoforge.common.extensions.ILevelReaderExtension { - @Nullable - ChunkAccess getChunk(int p_46823_, int p_46824_, ChunkStatus p_330944_, boolean p_46826_); - diff --git a/patches/net/minecraft/world/level/biome/BiomeSpecialEffects.java.patch b/patches/net/minecraft/world/level/biome/BiomeSpecialEffects.java.patch index b0904a498af..752f0067145 100644 --- a/patches/net/minecraft/world/level/biome/BiomeSpecialEffects.java.patch +++ b/patches/net/minecraft/world/level/biome/BiomeSpecialEffects.java.patch @@ -1,16 +1,14 @@ --- a/net/minecraft/world/level/biome/BiomeSpecialEffects.java +++ b/net/minecraft/world/level/biome/BiomeSpecialEffects.java -@@ -242,7 +_,9 @@ +@@ -242,6 +_,8 @@ } } -- public static enum GrassColorModifier implements StringRepresentable { + @net.neoforged.fml.common.asm.enumextension.NamedEnum + @net.neoforged.fml.common.asm.enumextension.NetworkedEnum(net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck.CLIENTBOUND) -+ public static enum GrassColorModifier implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { + public static enum GrassColorModifier implements StringRepresentable, net.neoforged.fml.common.asm.enumextension.IExtensibleEnum { NONE("none") { @Override - public int modifyColor(double p_48081_, double p_48082_, int p_48083_) { @@ -264,12 +_,22 @@ }; diff --git a/patches/net/minecraft/world/level/block/BaseRailBlock.java.patch b/patches/net/minecraft/world/level/block/BaseRailBlock.java.patch index cf64085b389..48e5efa9b94 100644 --- a/patches/net/minecraft/world/level/block/BaseRailBlock.java.patch +++ b/patches/net/minecraft/world/level/block/BaseRailBlock.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/block/BaseRailBlock.java +++ b/net/minecraft/world/level/block/BaseRailBlock.java -@@ -23,7 +_,7 @@ - import net.minecraft.world.phys.shapes.CollisionContext; - import net.minecraft.world.phys.shapes.VoxelShape; - --public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBlock { -+public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBlock, net.neoforged.neoforge.common.extensions.IBaseRailBlockExtension { - protected static final VoxelShape FLAT_AABB = Block.box(0.0, 0.0, 0.0, 16.0, 2.0, 16.0); - protected static final VoxelShape HALF_BLOCK_AABB = Block.box(0.0, 0.0, 0.0, 16.0, 8.0, 16.0); - public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; @@ -51,7 +_,7 @@ @Override diff --git a/patches/net/minecraft/world/level/block/Block.java.patch b/patches/net/minecraft/world/level/block/Block.java.patch index 651346f4506..756f4874c0e 100644 --- a/patches/net/minecraft/world/level/block/Block.java.patch +++ b/patches/net/minecraft/world/level/block/Block.java.patch @@ -1,11 +1,6 @@ --- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java -@@ -60,11 +_,11 @@ - import net.minecraft.world.phys.shapes.VoxelShape; - import org.slf4j.Logger; - --public class Block extends BlockBehaviour implements ItemLike { -+public class Block extends BlockBehaviour implements ItemLike, net.neoforged.neoforge.common.extensions.IBlockExtension { +@@ -64,7 +_,7 @@ public static final MapCodec CODEC = simpleCodec(Block::new); private static final Logger LOGGER = LogUtils.getLogger(); private final Holder.Reference builtInRegistryHolder = BuiltInRegistries.BLOCK.createIntrusiveHolder(this); diff --git a/patches/net/minecraft/world/level/block/BucketPickup.java.patch b/patches/net/minecraft/world/level/block/BucketPickup.java.patch index ae9ee774cc4..15c2a238266 100644 --- a/patches/net/minecraft/world/level/block/BucketPickup.java.patch +++ b/patches/net/minecraft/world/level/block/BucketPickup.java.patch @@ -1,11 +1,7 @@ --- a/net/minecraft/world/level/block/BucketPickup.java +++ b/net/minecraft/world/level/block/BucketPickup.java -@@ -9,8 +_,9 @@ - import net.minecraft.world.level.LevelAccessor; - import net.minecraft.world.level.block.state.BlockState; - --public interface BucketPickup { -+public interface BucketPickup extends net.neoforged.neoforge.common.extensions.IBucketPickupExtension { +@@ -12,5 +_,6 @@ + public interface BucketPickup extends net.neoforged.neoforge.common.extensions.IBucketPickupExtension { ItemStack pickupBlock(@Nullable Player p_294682_, LevelAccessor p_152719_, BlockPos p_152720_, BlockState p_152721_); + @Deprecated//Forge: Use state sensitive variant instead diff --git a/patches/net/minecraft/world/level/block/DeadBushBlock.java.patch b/patches/net/minecraft/world/level/block/DeadBushBlock.java.patch deleted file mode 100644 index 6f13c44fe00..00000000000 --- a/patches/net/minecraft/world/level/block/DeadBushBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/DeadBushBlock.java -+++ b/net/minecraft/world/level/block/DeadBushBlock.java -@@ -9,7 +_,7 @@ - import net.minecraft.world.phys.shapes.CollisionContext; - import net.minecraft.world.phys.shapes.VoxelShape; - --public class DeadBushBlock extends BushBlock { -+public class DeadBushBlock extends BushBlock implements net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(DeadBushBlock::new); - protected static final float AABB_OFFSET = 6.0F; - protected static final VoxelShape SHAPE = Block.box(2.0, 0.0, 2.0, 14.0, 13.0, 14.0); diff --git a/patches/net/minecraft/world/level/block/Fallable.java.patch b/patches/net/minecraft/world/level/block/Fallable.java.patch deleted file mode 100644 index 4f0be6f7e3f..00000000000 --- a/patches/net/minecraft/world/level/block/Fallable.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/Fallable.java -+++ b/net/minecraft/world/level/block/Fallable.java -@@ -7,7 +_,7 @@ - import net.minecraft.world.level.Level; - import net.minecraft.world.level.block.state.BlockState; - --public interface Fallable { -+public interface Fallable extends net.neoforged.neoforge.common.extensions.IFallableExtension { - default void onLand(Level p_153220_, BlockPos p_153221_, BlockState p_153222_, BlockState p_153223_, FallingBlockEntity p_153224_) { - } - diff --git a/patches/net/minecraft/world/level/block/LeavesBlock.java.patch b/patches/net/minecraft/world/level/block/LeavesBlock.java.patch deleted file mode 100644 index 7807a016b13..00000000000 --- a/patches/net/minecraft/world/level/block/LeavesBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/LeavesBlock.java -+++ b/net/minecraft/world/level/block/LeavesBlock.java -@@ -26,7 +_,7 @@ - import net.minecraft.world.phys.shapes.Shapes; - import net.minecraft.world.phys.shapes.VoxelShape; - --public class LeavesBlock extends Block implements SimpleWaterloggedBlock { -+public class LeavesBlock extends Block implements SimpleWaterloggedBlock, net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(LeavesBlock::new); - public static final int DECAY_DISTANCE = 7; - public static final IntegerProperty DISTANCE = BlockStateProperties.DISTANCE; diff --git a/patches/net/minecraft/world/level/block/SeagrassBlock.java.patch b/patches/net/minecraft/world/level/block/SeagrassBlock.java.patch deleted file mode 100644 index f596a92bef0..00000000000 --- a/patches/net/minecraft/world/level/block/SeagrassBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/SeagrassBlock.java -+++ b/net/minecraft/world/level/block/SeagrassBlock.java -@@ -23,7 +_,7 @@ - import net.minecraft.world.phys.shapes.CollisionContext; - import net.minecraft.world.phys.shapes.VoxelShape; - --public class SeagrassBlock extends BushBlock implements BonemealableBlock, LiquidBlockContainer { -+public class SeagrassBlock extends BushBlock implements BonemealableBlock, LiquidBlockContainer, net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(SeagrassBlock::new); - protected static final float AABB_OFFSET = 6.0F; - protected static final VoxelShape SHAPE = Block.box(2.0, 0.0, 2.0, 14.0, 12.0, 14.0); diff --git a/patches/net/minecraft/world/level/block/TallGrassBlock.java.patch b/patches/net/minecraft/world/level/block/TallGrassBlock.java.patch deleted file mode 100644 index 9e99ad43d62..00000000000 --- a/patches/net/minecraft/world/level/block/TallGrassBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/TallGrassBlock.java -+++ b/net/minecraft/world/level/block/TallGrassBlock.java -@@ -12,7 +_,7 @@ - import net.minecraft.world.phys.shapes.CollisionContext; - import net.minecraft.world.phys.shapes.VoxelShape; - --public class TallGrassBlock extends BushBlock implements BonemealableBlock { -+public class TallGrassBlock extends BushBlock implements BonemealableBlock, net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(TallGrassBlock::new); - protected static final float AABB_OFFSET = 6.0F; - protected static final VoxelShape SHAPE = Block.box(2.0, 0.0, 2.0, 14.0, 13.0, 14.0); diff --git a/patches/net/minecraft/world/level/block/VineBlock.java.patch b/patches/net/minecraft/world/level/block/VineBlock.java.patch index 70537e1e0e5..2f39745cfd2 100644 --- a/patches/net/minecraft/world/level/block/VineBlock.java.patch +++ b/patches/net/minecraft/world/level/block/VineBlock.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/block/VineBlock.java +++ b/net/minecraft/world/level/block/VineBlock.java -@@ -25,7 +_,7 @@ - import net.minecraft.world.phys.shapes.Shapes; - import net.minecraft.world.phys.shapes.VoxelShape; - --public class VineBlock extends Block { -+public class VineBlock extends Block implements net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(VineBlock::new); - public static final BooleanProperty UP = PipeBlock.UP; - public static final BooleanProperty NORTH = PipeBlock.NORTH; @@ -192,7 +_,7 @@ @Override protected void randomTick(BlockState p_222655_, ServerLevel p_222656_, BlockPos p_222657_, RandomSource p_222658_) { diff --git a/patches/net/minecraft/world/level/block/WebBlock.java.patch b/patches/net/minecraft/world/level/block/WebBlock.java.patch deleted file mode 100644 index 46e92a07149..00000000000 --- a/patches/net/minecraft/world/level/block/WebBlock.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/WebBlock.java -+++ b/net/minecraft/world/level/block/WebBlock.java -@@ -10,7 +_,7 @@ - import net.minecraft.world.level.block.state.BlockState; - import net.minecraft.world.phys.Vec3; - --public class WebBlock extends Block { -+public class WebBlock extends Block implements net.neoforged.neoforge.common.IShearable { - public static final MapCodec CODEC = simpleCodec(WebBlock::new); - - @Override diff --git a/patches/net/minecraft/world/level/block/entity/BlockEntity.java.patch b/patches/net/minecraft/world/level/block/entity/BlockEntity.java.patch index c2a70f7e4a1..a63fb7ef6cf 100644 --- a/patches/net/minecraft/world/level/block/entity/BlockEntity.java.patch +++ b/patches/net/minecraft/world/level/block/entity/BlockEntity.java.patch @@ -4,7 +4,7 @@ import net.minecraft.world.level.block.state.BlockState; import org.slf4j.Logger; --public abstract class BlockEntity { +-public abstract class BlockEntity implements net.neoforged.neoforge.common.extensions.IBlockEntityExtension { +public abstract class BlockEntity extends net.neoforged.neoforge.attachment.AttachmentHolder implements net.neoforged.neoforge.common.extensions.IBlockEntityExtension { private static final Logger LOGGER = LogUtils.getLogger(); + @Deprecated // Neo: always use getType() diff --git a/patches/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch b/patches/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch index 7e157d8a3bc..0f84d9658f6 100644 --- a/patches/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch +++ b/patches/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java -@@ -44,7 +_,7 @@ - import net.minecraft.world.phys.Vec3; - import net.minecraft.world.phys.shapes.CollisionContext; - --public final class TrialSpawner { -+public final class TrialSpawner implements net.neoforged.neoforge.common.extensions.IOwnedSpawner { - public static final String NORMAL_CONFIG_TAG_NAME = "normal_config"; - public static final String OMINOUS_CONFIG_TAG_NAME = "ominous_config"; - public static final int DETECT_PLAYER_SPAWN_BUFFER = 40; @@ -237,9 +_,9 @@ } diff --git a/patches/net/minecraft/world/level/block/state/BlockState.java.patch b/patches/net/minecraft/world/level/block/state/BlockState.java.patch deleted file mode 100644 index bbfe37b02e7..00000000000 --- a/patches/net/minecraft/world/level/block/state/BlockState.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/world/level/block/state/BlockState.java -+++ b/net/minecraft/world/level/block/state/BlockState.java -@@ -7,7 +_,7 @@ - import net.minecraft.world.level.block.Block; - import net.minecraft.world.level.block.state.properties.Property; - --public class BlockState extends BlockBehaviour.BlockStateBase { -+public class BlockState extends BlockBehaviour.BlockStateBase implements net.neoforged.neoforge.common.extensions.IBlockStateExtension { - public static final Codec CODEC = codec(BuiltInRegistries.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); - - public BlockState(Block p_61042_, Reference2ObjectArrayMap, Comparable> p_326238_, MapCodec p_61044_) { diff --git a/patches/net/minecraft/world/level/chunk/ChunkAccess.java.patch b/patches/net/minecraft/world/level/chunk/ChunkAccess.java.patch index 303f56095aa..e8913c06ca7 100644 --- a/patches/net/minecraft/world/level/chunk/ChunkAccess.java.patch +++ b/patches/net/minecraft/world/level/chunk/ChunkAccess.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -57,7 +_,7 @@ - import net.minecraft.world.ticks.TickContainerAccess; - import org.slf4j.Logger; - --public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, LightChunk, StructureAccess { -+public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, LightChunk, StructureAccess, net.neoforged.neoforge.attachment.IAttachmentHolder { - public static final int NO_FILLED_SECTION = -1; - private static final Logger LOGGER = LogUtils.getLogger(); - private static final LongSet EMPTY_REFERENCE_SET = new LongOpenHashSet(); @@ -327,10 +_,19 @@ @Override diff --git a/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch b/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch index 4a9a08cd9f0..ae2940ed0db 100644 --- a/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch +++ b/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -52,7 +_,7 @@ - import net.minecraft.world.ticks.TickContainerAccess; - import org.slf4j.Logger; - --public class LevelChunk extends ChunkAccess { -+public class LevelChunk extends ChunkAccess implements net.neoforged.neoforge.attachment.IAttachmentHolder { - static final Logger LOGGER = LogUtils.getLogger(); - private static final TickingBlockEntity NULL_TICKER = new TickingBlockEntity() { - @Override @@ -146,6 +_,7 @@ this.setAllStarts(p_196851_.getAllStarts()); this.setAllReferences(p_196851_.getAllReferences()); diff --git a/patches/net/minecraft/world/level/material/Fluid.java.patch b/patches/net/minecraft/world/level/material/Fluid.java.patch index 918a9f72f44..68b0cad7bf0 100644 --- a/patches/net/minecraft/world/level/material/Fluid.java.patch +++ b/patches/net/minecraft/world/level/material/Fluid.java.patch @@ -1,25 +1,16 @@ --- a/net/minecraft/world/level/material/Fluid.java +++ b/net/minecraft/world/level/material/Fluid.java -@@ -21,7 +_,7 @@ - import net.minecraft.world.phys.Vec3; - import net.minecraft.world.phys.shapes.VoxelShape; - --public abstract class Fluid { -+public abstract class Fluid implements net.neoforged.neoforge.common.extensions.IFluidExtension { - public static final IdMapper FLUID_STATE_REGISTRY = new IdMapper<>(); - protected final StateDefinition stateDefinition; - private FluidState defaultFluidState; -@@ -101,6 +_,13 @@ - } +@@ -102,6 +_,13 @@ public abstract VoxelShape getShape(FluidState p_76137_, BlockGetter p_76138_, BlockPos p_76139_); -+ + + private net.neoforged.neoforge.fluids.FluidType forgeFluidType; + @Override + public net.neoforged.neoforge.fluids.FluidType getFluidType() { + if (forgeFluidType == null) forgeFluidType = net.neoforged.neoforge.common.CommonHooks.getVanillaFluidType(this); + return forgeFluidType; + } - ++ public Optional getPickupSound() { return Optional.empty(); + } diff --git a/patches/net/minecraft/world/level/material/FluidState.java.patch b/patches/net/minecraft/world/level/material/FluidState.java.patch index acc03677a45..78a1d9d156d 100644 --- a/patches/net/minecraft/world/level/material/FluidState.java.patch +++ b/patches/net/minecraft/world/level/material/FluidState.java.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/world/level/material/FluidState.java +++ b/net/minecraft/world/level/material/FluidState.java -@@ -22,7 +_,7 @@ - import net.minecraft.world.phys.Vec3; - import net.minecraft.world.phys.shapes.VoxelShape; - --public final class FluidState extends StateHolder { -+public final class FluidState extends StateHolder implements net.neoforged.neoforge.common.extensions.IFluidStateExtension { - public static final Codec CODEC = codec(BuiltInRegistries.FLUID.byNameCodec(), Fluid::defaultFluidState).stable(); - public static final int AMOUNT_MAX = 9; - public static final int AMOUNT_FULL = 8; @@ -114,6 +_,7 @@ return this.getType() == p_192918_; } diff --git a/src/main/resources/META-INF/injected-interfaces.json b/src/main/resources/META-INF/injected-interfaces.json new file mode 100644 index 00000000000..459a8b4ab79 --- /dev/null +++ b/src/main/resources/META-INF/injected-interfaces.json @@ -0,0 +1,274 @@ +{ + "com/mojang/blaze3d/vertex/PoseStack": [ + "net/neoforged/neoforge/client/extensions/IPoseStackExtension" + ], + "com/mojang/blaze3d/vertex/VertexConsumer": [ + "net/neoforged/neoforge/client/extensions/IVertexConsumerExtension" + ], + "com/mojang/math/Transformation": [ + "net/neoforged/neoforge/common/extensions/ITransformationExtension" + ], + "net/minecraft/advancements/Advancement$Builder": [ + "net/neoforged/neoforge/common/extensions/IAdvancementBuilderExtension" + ], + "net/minecraft/client/KeyMapping": [ + "net/neoforged/neoforge/client/extensions/IKeyMappingExtension" + ], + "net/minecraft/client/Minecraft": [ + "net/neoforged/neoforge/client/extensions/IMinecraftExtension" + ], + "net/minecraft/client/gui/Font": [ + "net/neoforged/neoforge/client/extensions/IFontExtension" + ], + "net/minecraft/client/gui/GuiGraphics": [ + "net/neoforged/neoforge/client/extensions/IGuiGraphicsExtension" + ], + "net/minecraft/client/gui/components/AbstractWidget": [ + "net/neoforged/neoforge/client/extensions/IAbstractWidgetExtension" + ], + "net/minecraft/client/renderer/DimensionSpecialEffects": [ + "net/neoforged/neoforge/client/extensions/IDimensionSpecialEffectsExtension" + ], + "net/minecraft/client/renderer/block/model/BlockModel": [ + "net/neoforged/neoforge/client/model/ExtendedUnbakedModel" + ], + "net/minecraft/client/renderer/block/model/ItemModelGenerator": [ + "net/neoforged/neoforge/client/model/ExtendedUnbakedModel" + ], + "net/minecraft/client/renderer/blockentity/BlockEntityRenderer": [ + "net/neoforged/neoforge/client/extensions/IBlockEntityRendererExtension" + ], + "net/minecraft/client/resources/model/BakedModel": [ + "net/neoforged/neoforge/client/extensions/IBakedModelExtension" + ], + "net/minecraft/client/resources/model/ModelBaker": [ + "net/neoforged/neoforge/client/extensions/IModelBakerExtension" + ], + "net/minecraft/client/resources/model/MultiPartBakedModel": [ + "net/neoforged/neoforge/client/model/IDynamicBakedModel" + ], + "net/minecraft/client/resources/model/UnbakedModel": [ + "net/neoforged/neoforge/client/extensions/IUnbakedModelExtension" + ], + "net/minecraft/client/resources/model/WeightedBakedModel": [ + "net/neoforged/neoforge/client/model/IDynamicBakedModel" + ], + "net/minecraft/commands/CommandSourceStack": [ + "net/neoforged/neoforge/common/extensions/ICommandSourceStackExtension" + ], + "net/minecraft/core/Holder": [ + "net/neoforged/neoforge/common/extensions/IHolderExtension" + ], + "net/minecraft/core/HolderLookup$Provider": [ + "net/neoforged/neoforge/common/extensions/IHolderLookupProviderExtension" + ], + "net/minecraft/core/HolderSet": [ + "net/neoforged/neoforge/common/extensions/IHolderSetExtension" + ], + "net/minecraft/core/Registry": [ + "net/neoforged/neoforge/registries/IRegistryExtension" + ], + "net/minecraft/core/component/DataComponentHolder": [ + "net/neoforged/neoforge/common/extensions/IDataComponentHolderExtension" + ], + "net/minecraft/core/component/DataComponentMap$Builder": [ + "net/neoforged/neoforge/common/extensions/IDataComponentMapBuilderExtensions" + ], + "net/minecraft/data/recipes/RecipeOutput": [ + "net/neoforged/neoforge/common/extensions/IRecipeOutputExtension" + ], + "net/minecraft/data/tags/IntrinsicHolderTagsProvider$IntrinsicTagAppender": [ + "net/neoforged/neoforge/common/extensions/IIntrinsicHolderTagAppenderExtension" + ], + "net/minecraft/data/tags/TagsProvider$TagAppender": [ + "net/neoforged/neoforge/common/extensions/ITagAppenderExtension" + ], + "net/minecraft/network/FriendlyByteBuf": [ + "net/neoforged/neoforge/common/extensions/IFriendlyByteBufExtension" + ], + "net/minecraft/network/protocol/PacketFlow": [ + "net/neoforged/neoforge/common/extensions/IPacketFlowExtension" + ], + "net/minecraft/network/protocol/common/ClientCommonPacketListener": [ + "net/neoforged/neoforge/common/extensions/IClientCommonPacketListenerExtension" + ], + "net/minecraft/network/protocol/common/ServerCommonPacketListener": [ + "net/neoforged/neoforge/common/extensions/IServerCommonPacketListenerExtension" + ], + "net/minecraft/network/protocol/configuration/ServerConfigurationPacketListener": [ + "net/neoforged/neoforge/common/extensions/IServerConfigurationPacketListenerExtension" + ], + "net/minecraft/network/protocol/game/ServerGamePacketListener": [ + "net/neoforged/neoforge/common/extensions/IServerGamePacketListenerExtension" + ], + "net/minecraft/resources/ResourceKey": [ + "java/lang/Comparable>" + ], + "net/minecraft/server/level/ServerChunkCache": [ + "net/neoforged/neoforge/common/extensions/IServerChunkCacheExtension" + ], + "net/minecraft/server/packs/PackResources": [ + "net/neoforged/neoforge/common/extensions/IPackResourcesExtension" + ], + "net/minecraft/server/packs/PackType": [ + "net/minecraft/util/StringRepresentable" + ], + "net/minecraft/server/players/PlayerList": [ + "net/neoforged/neoforge/common/extensions/IPlayerListExtension" + ], + "net/minecraft/tags/TagBuilder": [ + "net/neoforged/neoforge/common/extensions/ITagBuilderExtension" + ], + "net/minecraft/world/MenuProvider": [ + "net/neoforged/neoforge/client/extensions/IMenuProviderExtension" + ], + "net/minecraft/world/effect/MobEffect": [ + "net/neoforged/neoforge/common/extensions/IMobEffectExtension" + ], + "net/minecraft/world/entity/Entity": [ + "net/neoforged/neoforge/common/extensions/IEntityExtension" + ], + "net/minecraft/world/entity/LivingEntity": [ + "net/neoforged/neoforge/common/extensions/ILivingEntityExtension" + ], + "net/minecraft/world/entity/Shearable": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/entity/ai/attributes/Attribute": [ + "net/neoforged/neoforge/common/extensions/IAttributeExtension" + ], + "net/minecraft/world/entity/player/Player": [ + "net/neoforged/neoforge/common/extensions/IPlayerExtension" + ], + "net/minecraft/world/entity/vehicle/AbstractBoat": [ + "net/neoforged/neoforge/common/extensions/IAbstractBoatExtension" + ], + "net/minecraft/world/inventory/MenuType": [ + "net/neoforged/neoforge/common/extensions/IMenuTypeExtension" + ], + "net/minecraft/world/item/DispensibleContainerItem": [ + "net/neoforged/neoforge/common/extensions/IDispensibleContainerItemExtension" + ], + "net/minecraft/world/item/Item": [ + "net/neoforged/neoforge/common/extensions/IItemExtension" + ], + "net/minecraft/world/item/Item$Properties": [ + "net/neoforged/neoforge/common/extensions/IItemPropertiesExtensions" + ], + "net/minecraft/world/item/ItemStack": [ + "net/neoforged/neoforge/common/extensions/IItemStackExtension", + "net/neoforged/neoforge/common/MutableDataComponentHolder" + ], + "net/minecraft/world/level/BaseSpawner": [ + "net/neoforged/neoforge/common/extensions/IOwnedSpawner" + ], + "net/minecraft/world/level/BlockAndTintGetter": [ + "net/neoforged/neoforge/common/extensions/IBlockAndTintGetterExtension" + ], + "net/minecraft/world/level/BlockGetter": [ + "net/neoforged/neoforge/common/extensions/IBlockGetterExtension" + ], + "net/minecraft/world/level/Level": [ + "net/neoforged/neoforge/common/extensions/ILevelExtension" + ], + "net/minecraft/world/level/LevelReader": [ + "net/neoforged/neoforge/common/extensions/ILevelReaderExtension" + ], + "net/minecraft/world/level/block/BaseRailBlock": [ + "net/neoforged/neoforge/common/extensions/IBaseRailBlockExtension" + ], + "net/minecraft/world/level/block/Block": [ + "net/neoforged/neoforge/common/extensions/IBlockExtension" + ], + "net/minecraft/world/level/block/BucketPickup": [ + "net/neoforged/neoforge/common/extensions/IBucketPickupExtension" + ], + "net/minecraft/world/level/block/DeadBushBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/Fallable": [ + "net/neoforged/neoforge/common/extensions/IFallableExtension" + ], + "net/minecraft/world/level/block/LeavesBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/SeagrassBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/TallGrassBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/VineBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/WebBlock": [ + "net/neoforged/neoforge/common/IShearable" + ], + "net/minecraft/world/level/block/entity/BlockEntity": [ + "net/neoforged/neoforge/common/extensions/IBlockEntityExtension" + ], + "net/minecraft/world/level/block/entity/trialspawner/TrialSpawner": [ + "net/neoforged/neoforge/common/extensions/IOwnedSpawner" + ], + "net/minecraft/world/level/block/state/BlockState": [ + "net/neoforged/neoforge/common/extensions/IBlockStateExtension" + ], + "net/minecraft/world/level/chunk/ChunkAccess": [ + "net/neoforged/neoforge/attachment/IAttachmentHolder" + ], + "net/minecraft/world/level/chunk/LevelChunk": [ + "net/neoforged/neoforge/attachment/IAttachmentHolder" + ], + "net/minecraft/world/level/material/Fluid": [ + "net/neoforged/neoforge/common/extensions/IFluidExtension" + ], + "net/minecraft/world/level/material/FluidState": [ + "net/neoforged/neoforge/common/extensions/IFluidStateExtension" + ], + + "com/mojang/blaze3d/vertex/VertexFormatElement$Usage": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/client/gui/Gui$HeartType": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/client/gui/font/providers/GlyphProviderType": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/client/model/HumanoidModel$ArmPose": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/damagesource/DamageEffects": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/damagesource/DamageScaling": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/damagesource/DeathMessageType": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/entity/MobCategory": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/entity/raid/Raid$RaiderType": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/inventory/RecipeBookType": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/item/ItemDisplayContext": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/item/ItemUseAnimation": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/item/Rarity": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/item/component/FireworkExplosion$Shape": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ], + "net/minecraft/world/level/biome/BiomeSpecialEffects$GrassColorModifier": [ + "net/neoforged/fml/common/asm/enumextension/IExtensibleEnum" + ] +}