Skip to content

Commit

Permalink
replace Default/TaskedMappingsProjectPlugin/DefaultTaskedMappingsProj…
Browse files Browse the repository at this point in the history
…ectPlugin with DefaultExtensionedMappingsProjectPlugin + Default/TaskedExtension

access Tasks objects and MapIntermediaryPlugin's intermediaryFile via extension instances obtained via plugin instances instead of directly via plugin instances
  • Loading branch information
supersaiyansubtlety committed Nov 11, 2024
1 parent cda4060 commit 5f1af63
Show file tree
Hide file tree
Showing 21 changed files with 264 additions and 152 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import org.gradle.api.internal.file.FileOperations
import quilt.internal.constants.Classifiers
import quilt.internal.constants.Constants
import quilt.internal.plugin.MapIntermediaryPlugin

import static org.gradle.api.plugins.JavaPlugin.JAVADOC_TASK_NAME

Expand All @@ -11,8 +10,6 @@ plugins {
alias libs.plugins.licenser
}

final INTERMEDIARY_PROVIDER = plugins.apply(MapIntermediaryPlugin).provideIntermediary()

final USE_SNAPSHOT_HASHES = false

final ENV = System.getenv()
Expand Down Expand Up @@ -272,11 +269,11 @@ publishing {
}

tasks.withType(AbstractPublishToMaven).configureEach {
// Won't run if INTERMEDIARY_PROVIDER is absent
// Won't run if mapIntermediary.intermediaryFile is absent
dependsOn buildIntermediary

doFirst {
if (INTERMEDIARY_PROVIDER.isPresent()) {
if (mapIntermediary.intermediaryFile.isPresent()) {
final addArtifact = { Task task, String artifactClassifier ->
if (publication.artifacts.findAll { it.classifier == artifactClassifier }.isEmpty()) {
publication.artifact(task) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package quilt.internal.extension;

import org.gradle.api.file.RegularFile;
import org.gradle.api.provider.Provider;

public abstract class MapIntermediaryExtension {
public static final String NAME = "mapIntermediary";

private final Provider<RegularFile> intermediaryFile;

public Provider<RegularFile> getIntermediaryFile() {
return this.intermediaryFile;
}

public MapIntermediaryExtension(Provider<RegularFile> intermediaryFile) {
this.intermediaryFile = intermediaryFile;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package quilt.internal.extension;

import quilt.internal.extension.abstraction.DefaultTaskedExtension;
import quilt.internal.plugin.MapMinecraftJarsPlugin;

public abstract class MapMinecraftJarsExtension extends DefaultTaskedExtension<MapMinecraftJarsPlugin.Tasks> {
public static final String NAME = "mapMinecraftJars";

public MapMinecraftJarsExtension(MapMinecraftJarsPlugin.Tasks tasks) {
super(tasks);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package quilt.internal.extension;

import quilt.internal.extension.abstraction.DefaultTaskedExtension;
import quilt.internal.plugin.MapV2Plugin;

public abstract class MapV2Extension extends DefaultTaskedExtension<MapV2Plugin.Tasks> {
public static final String NAME = "mapV2";

public MapV2Extension(MapV2Plugin.Tasks tasks) {
super(tasks);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package quilt.internal.extension;

import quilt.internal.extension.abstraction.DefaultTaskedExtension;
import quilt.internal.plugin.MinecraftJarsPlugin;

public abstract class MinecraftJarsExtension extends DefaultTaskedExtension<MinecraftJarsPlugin.Tasks> {
public static final String NAME = "minecraftJars";

public MinecraftJarsExtension(MinecraftJarsPlugin.Tasks tasks) {
super(tasks);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package quilt.internal.extension;

import quilt.internal.extension.abstraction.DefaultTaskedExtension;
import quilt.internal.plugin.ProcessMappingsPlugin;

public abstract class ProcessMappingsExtension extends DefaultTaskedExtension<ProcessMappingsPlugin.Tasks> {
public static final String NAME = "processMappings";

public ProcessMappingsExtension(ProcessMappingsPlugin.Tasks tasks) {
super(tasks);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package quilt.internal;
package quilt.internal.extension;

import org.gradle.api.GradleException;
import org.gradle.api.Project;
Expand All @@ -23,7 +23,7 @@ public abstract class QuiltMappingsExtension {
/**
* {@linkplain ExtensionContainer#create Created} by {@link QuiltMappingsBasePlugin}.
*/
public static final String EXTENSION_NAME = "quiltMappings";
public static final String NAME = "quiltMappings";

private static final String DEFAULT_CATALOG_NAME = "libs";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package quilt.internal.extension.abstraction;

import org.gradle.api.plugins.ExtensionContainer;

/**
* Aids in a common pattern for implementing {@link TaskedExtension}.
* <p>
* Plugins that create {@code DefaultTaskedExtension}s must pass their {@code tasks} instance as a
* {@link ExtensionContainer#create(String, Class, Object...) construction argument} when creating their extension.
*
* @param <T> a type that provides access to some of the tasks registered by the plugin that creates this extension
*/
public abstract class DefaultTaskedExtension<T> implements TaskedExtension<T> {
private final T tasks;

@Override
public final T getTasks() {
return this.tasks;
}

public DefaultTaskedExtension(T tasks) {
this.tasks = tasks;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package quilt.internal.extension.abstraction;

import org.gradle.api.Plugin;
import org.gradle.api.Task;
import org.gradle.api.plugins.ExtensionContainer;
import org.gradle.api.tasks.TaskContainer;
import quilt.internal.plugin.abstraction.ExtensionedMappingsProjectPlugin;

/**
* An extension that provides access to some of the {@link Task}s {@linkplain TaskContainer#register registered}
* by the {@link Plugin plugin} that {@linkplain ExtensionContainer#create creates} it.
* <p>
* Prefer retrieving {@link Task}s via {@link #getTasks()} to {@link TaskContainer#named} methods.
*
* @param <T> a type that provides access to some of the tasks registered by the plugin that creates this extension
*
* @see DefaultTaskedExtension
* @see ExtensionedMappingsProjectPlugin
*/
public interface TaskedExtension<T> {
T getTasks();
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ public void apply(@NotNull Project project) {

// configures EnigmaProfileConsumingTasks + MappingsDirConsumingTasks
// (mappings, mappingsUnpicked, mappingsServer, mappingsUnpickedServer)
plugins.apply(QuiltMappingsBasePlugin.class).getExt();
plugins.apply(QuiltMappingsBasePlugin.class);

final MapMinecraftJarsPlugin.Tasks mapMinecraftJarsTasks =
plugins.apply(MapMinecraftJarsPlugin.class).getTasks();
plugins.apply(MapMinecraftJarsPlugin.class).getExt().getTasks();
final TaskProvider<MapPerVersionMappingsJarTask> mapPerVersionMappingsJar =
mapMinecraftJarsTasks.mapPerVersionMappingsJar();

final MapV2Plugin.Tasks mappingsV2Tasks =
plugins.apply(MapV2Plugin.class).getTasks();
plugins.apply(MapV2Plugin.class).getExt().getTasks();
final TaskProvider<UnpickJarTask> unpickHashedJar =
mappingsV2Tasks.unpickHashedJar();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
import org.gradle.api.tasks.TaskContainer;
import org.gradle.api.tasks.TaskProvider;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import quilt.internal.constants.Classifiers;
import quilt.internal.constants.Extensions;
import quilt.internal.QuiltMappingsExtension;
import quilt.internal.extension.MapIntermediaryExtension;
import quilt.internal.extension.QuiltMappingsExtension;
import quilt.internal.constants.Namespaces;
import quilt.internal.plugin.abstraction.MappingsProjectPlugin;
import quilt.internal.plugin.abstraction.DefaultExtensionedMappingsProjectPlugin;
import quilt.internal.task.build.BuildIntermediaryTask;
import quilt.internal.task.build.IntermediaryMappingsV2JarTask;
import quilt.internal.task.build.MergeIntermediaryTask;
Expand All @@ -27,8 +27,6 @@
import quilt.internal.task.setup.ExtractTinyMappingsTask;
import quilt.internal.task.setup.IntermediaryDependantTask;

import java.util.Objects;

/**
* {@linkplain TaskContainer#register Registers} tasks related to {@value Namespaces#INTERMEDIARY} mappings.
* <p>
Expand All @@ -49,24 +47,11 @@
* successfully {@linkplain Configuration#resolve() resolves}
* </ul>
*/
public abstract class MapIntermediaryPlugin implements MappingsProjectPlugin {
public abstract class MapIntermediaryPlugin extends DefaultExtensionedMappingsProjectPlugin<MapIntermediaryExtension> {
public static final String INTERMEDIARY_MAPPINGS_CONFIGURATION_NAME = Namespaces.INTERMEDIARY;

@Nullable
private Provider<RegularFile> intermediaryProvider;

/**
* @throws NullPointerException if this plugin hasn't finished {@linkplain #apply(Project) applying}
*/
public Provider<RegularFile> provideIntermediary() {
return Objects.requireNonNull(
this.intermediaryProvider,
Namespaces.INTERMEDIARY + " not yet populated"
);
}

@Override
public void apply(@NotNull Project project) {
protected MapIntermediaryExtension applyImpl(@NotNull Project project) {
final ConfigurationContainer configurations = project.getConfigurations();
final Configuration intermediaryMappings = configurations.create(INTERMEDIARY_MAPPINGS_CONFIGURATION_NAME);

Expand All @@ -76,7 +61,7 @@ public void apply(@NotNull Project project) {
final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt();

final MapV2Plugin.Tasks mappingsV2Tasks =
plugins.apply(MapV2Plugin.class).getTasks();
plugins.apply(MapV2Plugin.class).getExt().getTasks();
final TaskProvider<MergeTinyV2Task> mergeTinyV2 =
mappingsV2Tasks.mergeTinyV2();

Expand All @@ -93,19 +78,20 @@ public void apply(@NotNull Project project) {
}
);

final Provider<RegularFile> intermediaryFile;
{
final Property<RegularFile> intermediaryProperty = this.getObjects().fileProperty();
intermediaryProperty.set(this.provideOptionalFile(intermediaryMappings));

this.intermediaryProvider = intermediaryProperty;
intermediaryFile = intermediaryProperty;
}

tasks.withType(IntermediaryDependantTask.class).configureEach(task -> {
task.onlyIf(unused -> this.intermediaryProvider.isPresent());
task.onlyIf(unused -> intermediaryFile.isPresent());
});

extractTinyIntermediaryMappings.configure(task -> {
task.getZippedFile().convention(this.intermediaryProvider);
task.getZippedFile().convention(intermediaryFile);
});

final var mergeIntermediary = tasks.register(
Expand Down Expand Up @@ -165,5 +151,9 @@ public void apply(@NotNull Project project) {
task.dependsOn(intermediaryV2MappingsJar, intermediaryV2MergedMappingsJar);
}
);

return project.getExtensions().create(
MapIntermediaryExtension.NAME, MapIntermediaryExtension.class, intermediaryFile
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
import quilt.internal.constants.Constants;
import quilt.internal.constants.Classifiers;
import quilt.internal.constants.Extensions;
import quilt.internal.QuiltMappingsExtension;
import quilt.internal.extension.MapMinecraftJarsExtension;
import quilt.internal.extension.QuiltMappingsExtension;
import quilt.internal.constants.Namespaces;
import quilt.internal.plugin.abstraction.DefaultTaskedMappingsProjectPlugin;
import quilt.internal.plugin.abstraction.DefaultExtensionedMappingsProjectPlugin;
import quilt.internal.task.build.AddProposedMappingsTask;
import quilt.internal.task.build.BuildMappingsTinyTask;
import quilt.internal.task.build.CompressTinyTask;
Expand Down Expand Up @@ -68,11 +69,12 @@
* <li> {@value Namespaces#INTERMEDIARY} mappings are created by {@link MapIntermediaryPlugin} tasks
* </ul>
*/
public abstract class MapMinecraftJarsPlugin extends DefaultTaskedMappingsProjectPlugin<MapMinecraftJarsPlugin.Tasks> {
public abstract class MapMinecraftJarsPlugin extends
DefaultExtensionedMappingsProjectPlugin<MapMinecraftJarsExtension> {
public static final String INTERMEDIATE_MAPPINGS_CONFIGURATION_NAME = Namespaces.INTERMEDIATE;

@Override
protected Tasks applyImpl(@NotNull Project project) {
protected MapMinecraftJarsExtension applyImpl(@NotNull Project project) {
final Configuration perVersionMappings =
project.getConfigurations().create(INTERMEDIATE_MAPPINGS_CONFIGURATION_NAME);

Expand All @@ -86,7 +88,7 @@ protected Tasks applyImpl(@NotNull Project project) {
final QuiltMappingsExtension ext = plugins.apply(QuiltMappingsBasePlugin.class).getExt();

final MinecraftJarsPlugin.Tasks minecraftJarsTasks =
plugins.apply(MinecraftJarsPlugin.class).getTasks();
plugins.apply(MinecraftJarsPlugin.class).getExt().getTasks();
final TaskProvider<DownloadMinecraftLibrariesTask> downloadMinecraftLibraries =
minecraftJarsTasks.downloadMinecraftLibraries();
final TaskProvider<MergeJarsTask> mergeJars =
Expand Down Expand Up @@ -239,7 +241,9 @@ protected Tasks applyImpl(@NotNull Project project) {
GeneratePackageInfoMappingsTask.GENERATE_PACKAGE_INFO_MAPPINGS_TASK_NAME,
GeneratePackageInfoMappingsTask.class,
task -> {
task.getInputJar().convention(mapPerVersionMappingsJar.flatMap(MapPerVersionMappingsJarTask::getOutputJar));
task.getInputJar().convention(
mapPerVersionMappingsJar.flatMap(MapPerVersionMappingsJarTask::getOutputJar)
);
}
);

Expand Down Expand Up @@ -282,7 +286,10 @@ protected Tasks applyImpl(@NotNull Project project) {
tasks.named(LifecycleBasePlugin.CHECK_TASK_NAME).configure(task -> task.dependsOn(mappingLint));
});

return new Tasks(mapPerVersionMappingsJar, invertPerVersionMappings, insertAutoGeneratedMappings);
return project.getExtensions().create(
MapMinecraftJarsExtension.NAME, MapMinecraftJarsExtension.class,
new Tasks(mapPerVersionMappingsJar, invertPerVersionMappings, insertAutoGeneratedMappings)
);
}

public record Tasks(
Expand Down
Loading

8 comments on commit 5f1af63

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 2 file(s) were updated with 3 line(s) added and 3 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:22:04.268437426 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:20:56.683849932 +0000
@@ -19,8 +19,8 @@
     * Mapping not found
     */
    @Override
-   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
-      return WorldView.super.getBlockEntity(pos, type);
+   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2) {
+      return WorldView.super.getBlockEntity(pos, arg2);
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/world/TestableWorld.java namedSrc/net/minecraft/world/TestableWorld.java
--- namedTargetSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:22:04.116436260 +0000
+++ namedSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:20:56.415847550 +0000
@@ -29,7 +29,7 @@
     * @mapping {@literal hashed m_mfgvkamg Lnet/minecraft/unmapped/C_agsukcmb;m_mfgvkamg(Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_wgqvodus;)Ljava/util/Optional;}
     * @mapping {@literal named getBlockEntity Lnet/minecraft/world/TestableWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;}
     */
-   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type);
+   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2);
 
    /**
     * @mapping {@literal hashed m_yirkkvqk Lnet/minecraft/unmapped/C_agsukcmb;m_yirkkvqk(Lnet/minecraft/unmapped/C_ybztoekc$C_wkdeqzbn;Lnet/minecraft/unmapped/C_hynzadkk;)Lnet/minecraft/unmapped/C_hynzadkk;}

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 3 file(s) were updated with 4 line(s) added and 4 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java namedSrc/net/minecraft/world/chunk/ChunkCache.java
--- namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:31:33.930247549 +0000
+++ namedSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:30:26.405579731 +0000
@@ -135,7 +135,7 @@
     * Mapping not found
     */
    @Override
-   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
+   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
       return List.of();
    }
 
diff -bur namedTargetSrc/net/minecraft/world/CollisionView.java namedSrc/net/minecraft/world/CollisionView.java
--- namedTargetSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:31:33.842246668 +0000
+++ namedSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:30:26.329578978 +0000
@@ -124,7 +124,7 @@
     * @mapping {@literal hashed m_lrisnbsp Lnet/minecraft/unmapped/C_vxzrjtdu;m_lrisnbsp(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/util/List;}
     * @mapping {@literal named getEntityCollisions Lnet/minecraft/world/CollisionView;getEntityCollisions(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;)Ljava/util/List;}
     */
-   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box);
+   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2);
 
    /**
     * @mapping {@literal hashed m_ypwqnrxo Lnet/minecraft/unmapped/C_vxzrjtdu;m_ypwqnrxo(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/lang/Iterable;}
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:31:34.046248710 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:30:26.521580879 +0000
@@ -27,8 +27,8 @@
     * Mapping not found
     */
    @Override
-   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
-      return EntityView.super.getEntityCollisions(entity, box);
+   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
+      return EntityView.super.getEntityCollisions(entity, arg2);
    }
 
    /**

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 4 file(s) were updated with 7 line(s) added and 7 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java namedSrc/net/minecraft/world/chunk/ChunkCache.java
--- namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:38:05.004412685 +0000
+++ namedSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:36:57.436429664 +0000
@@ -135,7 +135,7 @@
     * Mapping not found
     */
    @Override
-   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
+   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
       return List.of();
    }
 
diff -bur namedTargetSrc/net/minecraft/world/CollisionView.java namedSrc/net/minecraft/world/CollisionView.java
--- namedTargetSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:38:04.948412704 +0000
+++ namedSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:36:57.348429662 +0000
@@ -124,7 +124,7 @@
     * @mapping {@literal hashed m_lrisnbsp Lnet/minecraft/unmapped/C_vxzrjtdu;m_lrisnbsp(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/util/List;}
     * @mapping {@literal named getEntityCollisions Lnet/minecraft/world/CollisionView;getEntityCollisions(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;)Ljava/util/List;}
     */
-   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2);
+   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box);
 
    /**
     * @mapping {@literal hashed m_ypwqnrxo Lnet/minecraft/unmapped/C_vxzrjtdu;m_ypwqnrxo(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/lang/Iterable;}
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:38:05.088412657 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:36:57.576429667 +0000
@@ -19,16 +19,16 @@
     * Mapping not found
     */
    @Override
-   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2) {
-      return WorldView.super.getBlockEntity(pos, arg2);
+   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
+      return WorldView.super.getBlockEntity(pos, type);
    }
 
    /**
     * Mapping not found
     */
    @Override
-   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
-      return EntityView.super.getEntityCollisions(entity, arg2);
+   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
+      return EntityView.super.getEntityCollisions(entity, box);
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/world/TestableWorld.java namedSrc/net/minecraft/world/TestableWorld.java
--- namedTargetSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:38:04.948412704 +0000
+++ namedSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:36:57.348429662 +0000
@@ -29,7 +29,7 @@
     * @mapping {@literal hashed m_mfgvkamg Lnet/minecraft/unmapped/C_agsukcmb;m_mfgvkamg(Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_wgqvodus;)Ljava/util/Optional;}
     * @mapping {@literal named getBlockEntity Lnet/minecraft/world/TestableWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;}
     */
-   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2);
+   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type);
 
    /**
     * @mapping {@literal hashed m_yirkkvqk Lnet/minecraft/unmapped/C_agsukcmb;m_yirkkvqk(Lnet/minecraft/unmapped/C_ybztoekc$C_wkdeqzbn;Lnet/minecraft/unmapped/C_hynzadkk;)Lnet/minecraft/unmapped/C_hynzadkk;}

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 3 file(s) were updated with 4 line(s) added and 4 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java namedSrc/net/minecraft/world/chunk/ChunkCache.java
--- namedTargetSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:44:22.298751124 +0000
+++ namedSrc/net/minecraft/world/chunk/ChunkCache.java	2024-11-11 09:43:16.170690775 +0000
@@ -135,7 +135,7 @@
     * Mapping not found
     */
    @Override
-   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
+   public List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
       return List.of();
    }
 
diff -bur namedTargetSrc/net/minecraft/world/CollisionView.java namedSrc/net/minecraft/world/CollisionView.java
--- namedTargetSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:44:22.214751043 +0000
+++ namedSrc/net/minecraft/world/CollisionView.java	2024-11-11 09:43:16.090690692 +0000
@@ -124,7 +124,7 @@
     * @mapping {@literal hashed m_lrisnbsp Lnet/minecraft/unmapped/C_vxzrjtdu;m_lrisnbsp(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/util/List;}
     * @mapping {@literal named getEntityCollisions Lnet/minecraft/world/CollisionView;getEntityCollisions(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Box;)Ljava/util/List;}
     */
-   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2);
+   List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box);
 
    /**
     * @mapping {@literal hashed m_ypwqnrxo Lnet/minecraft/unmapped/C_vxzrjtdu;m_ypwqnrxo(Lnet/minecraft/unmapped/C_astfners;Lnet/minecraft/unmapped/C_hbcjzgoe;)Ljava/lang/Iterable;}
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:44:22.422751243 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:43:16.270690880 +0000
@@ -27,8 +27,8 @@
     * Mapping not found
     */
    @Override
-   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box arg2) {
-      return EntityView.super.getEntityCollisions(entity, arg2);
+   default List<VoxelShape> getEntityCollisions(@Nullable Entity entity, Box box) {
+      return EntityView.super.getEntityCollisions(entity, box);
    }
 
    /**

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 2 file(s) were updated with 3 line(s) added and 3 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:50:42.985634003 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:49:35.793861482 +0000
@@ -19,8 +19,8 @@
     * Mapping not found
     */
    @Override
-   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2) {
-      return WorldView.super.getBlockEntity(pos, arg2);
+   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
+      return WorldView.super.getBlockEntity(pos, type);
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/world/TestableWorld.java namedSrc/net/minecraft/world/TestableWorld.java
--- namedTargetSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:50:42.837634502 +0000
+++ namedSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:49:35.609862111 +0000
@@ -29,7 +29,7 @@
     * @mapping {@literal hashed m_mfgvkamg Lnet/minecraft/unmapped/C_agsukcmb;m_mfgvkamg(Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_wgqvodus;)Ljava/util/Optional;}
     * @mapping {@literal named getBlockEntity Lnet/minecraft/world/TestableWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;}
     */
-   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2);
+   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type);
 
    /**
     * @mapping {@literal hashed m_yirkkvqk Lnet/minecraft/unmapped/C_agsukcmb;m_yirkkvqk(Lnet/minecraft/unmapped/C_ybztoekc$C_wkdeqzbn;Lnet/minecraft/unmapped/C_hynzadkk;)Lnet/minecraft/unmapped/C_hynzadkk;}

@github-actions
Copy link

Choose a reason for hiding this comment

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

With commit 5f1af63, 2 file(s) were updated with 3 line(s) added and 3 removed compared to the latest Quilt Mappings version.

View the diff here:
diff -bur namedTargetSrc/net/minecraft/world/RegistryWorldView.java namedSrc/net/minecraft/world/RegistryWorldView.java
--- namedTargetSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:56:23.092460743 +0000
+++ namedSrc/net/minecraft/world/RegistryWorldView.java	2024-11-11 09:55:14.903995750 +0000
@@ -19,8 +19,8 @@
     * Mapping not found
     */
    @Override
-   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
-      return WorldView.super.getBlockEntity(pos, type);
+   default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2) {
+      return WorldView.super.getBlockEntity(pos, arg2);
    }
 
    /**
diff -bur namedTargetSrc/net/minecraft/world/TestableWorld.java namedSrc/net/minecraft/world/TestableWorld.java
--- namedTargetSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:56:22.940459697 +0000
+++ namedSrc/net/minecraft/world/TestableWorld.java	2024-11-11 09:55:14.691994299 +0000
@@ -29,7 +29,7 @@
     * @mapping {@literal hashed m_mfgvkamg Lnet/minecraft/unmapped/C_agsukcmb;m_mfgvkamg(Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_wgqvodus;)Ljava/util/Optional;}
     * @mapping {@literal named getBlockEntity Lnet/minecraft/world/TestableWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/entity/BlockEntityType;)Ljava/util/Optional;}
     */
-   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type);
+   <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> arg2);
 
    /**
     * @mapping {@literal hashed m_yirkkvqk Lnet/minecraft/unmapped/C_agsukcmb;m_yirkkvqk(Lnet/minecraft/unmapped/C_ybztoekc$C_wkdeqzbn;Lnet/minecraft/unmapped/C_hynzadkk;)Lnet/minecraft/unmapped/C_hynzadkk;}

@github-actions
Copy link

Choose a reason for hiding this comment

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

No difference between head and target.

@github-actions
Copy link

Choose a reason for hiding this comment

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

No difference between head and target.

Please sign in to comment.