-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
3,463 additions
and
940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import lambdynamiclights.Constants | ||
import net.fabricmc.loom.LoomGradleExtension | ||
import net.fabricmc.loom.api.mappings.layered.MappingsNamespace | ||
import net.fabricmc.loom.task.RemapJarTask | ||
import net.fabricmc.loom.task.RemapSourcesJarTask | ||
|
||
plugins { | ||
id("lambdynamiclights-common") | ||
} | ||
|
||
base.archivesName.set(Constants.NAME + "-api-mojmap") | ||
|
||
dependencies { | ||
mappings(loom.officialMojangMappings()) | ||
} | ||
|
||
val apiProject = project(":api") | ||
|
||
tasks.remapJar { | ||
val remapJar = apiProject.tasks.named("remapJar", RemapJarTask::class) | ||
dependsOn(remapJar) | ||
|
||
classpath.setFrom((loom as LoomGradleExtension).getMinecraftJarsCollection(MappingsNamespace.INTERMEDIARY)) | ||
inputFile.convention(remapJar.flatMap { it.archiveFile }) | ||
sourceNamespace = "intermediary" | ||
targetNamespace = "named" | ||
} | ||
|
||
// Add the remapped JAR artifact | ||
apiProject.configurations["mojmapApiElements"].artifacts.removeIf{ | ||
true | ||
} | ||
apiProject.artifacts.add("mojmapApiElements", tasks.remapJar) { | ||
classifier = "mojmap" | ||
} | ||
apiProject.configurations["mojmapRuntimeElements"].artifacts.removeIf{ | ||
true | ||
} | ||
apiProject.artifacts.add("mojmapRuntimeElements", tasks.remapJar) { | ||
classifier = "mojmap" | ||
} | ||
|
||
tasks.remapSourcesJar { | ||
val remapJar = apiProject.tasks.named("remapSourcesJar", RemapSourcesJarTask::class) | ||
dependsOn(remapJar) | ||
|
||
classpath.setFrom((loom as LoomGradleExtension).getMinecraftJarsCollection(MappingsNamespace.INTERMEDIARY)) | ||
inputFile.convention(remapJar.flatMap { it.archiveFile }) | ||
archiveClassifier = "sources" | ||
sourceNamespace = "intermediary" | ||
targetNamespace = "named" | ||
} | ||
|
||
// Add the remapped sources artifact | ||
apiProject.configurations["mojmapSourcesElements"].artifacts.removeIf { | ||
true | ||
} | ||
apiProject.artifacts.add("mojmapSourcesElements", tasks.remapSourcesJar) { | ||
classifier = "mojmap-sources" | ||
} |
38 changes: 38 additions & 0 deletions
38
api/src/main/java/dev/lambdaurora/lambdynlights/api/DynamicLightsContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright © 2024 LambdAurora <[email protected]> | ||
* | ||
* This file is part of LambDynamicLights. | ||
* | ||
* Licensed under the Lambda License. For more information, | ||
* see the LICENSE file. | ||
*/ | ||
|
||
package dev.lambdaurora.lambdynlights.api; | ||
|
||
import dev.lambdaurora.lambdynlights.api.entity.EntityLightSourceManager; | ||
import dev.lambdaurora.lambdynlights.api.behavior.DynamicLightBehaviorManager; | ||
import dev.lambdaurora.lambdynlights.api.item.ItemLightSourceManager; | ||
|
||
/** | ||
* Represents the dynamic lights context, containing references to managers for each source type provided by this API. | ||
* | ||
* @author LambdAurora | ||
* @version 4.0.0 | ||
* @since 4.0.0 | ||
*/ | ||
public interface DynamicLightsContext { | ||
/** | ||
* {@return the manager for item light sources} | ||
*/ | ||
ItemLightSourceManager itemLightSourceManager(); | ||
|
||
/** | ||
* {@return the manager for entity light sources} | ||
*/ | ||
EntityLightSourceManager entityLightSourceManager(); | ||
|
||
/** | ||
* {@return the manager for dynamic light behaviors and associated light sources} | ||
*/ | ||
DynamicLightBehaviorManager dynamicLightBehaviorManager(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.