mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Merge branch '1.16' into feature/registry-creation-api
This commit is contained in:
22
.github/workflows/snapshot.yml
vendored
Normal file
22
.github/workflows/snapshot.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Snapshot Compile & Release
|
||||
|
||||
on:
|
||||
[pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Upload to Bintray
|
||||
run: ./gradlew bintrayUpload --stacktrace
|
||||
env:
|
||||
BINTRAY_USER: shedaniel
|
||||
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
|
||||
PR_NUM: ${{github.event.number}}
|
||||
18
build.gradle
18
build.gradle
@@ -25,9 +25,21 @@ allprojects {
|
||||
apply plugin: "java"
|
||||
apply plugin: "architectury-plugin"
|
||||
apply plugin: "org.cadixdev.licenser"
|
||||
|
||||
ext {
|
||||
isSnapshot = System.getenv("PR_NUM") != null
|
||||
}
|
||||
|
||||
def runNumber = (System.getenv("GITHUB_RUN_NUMBER") == null ? (((short) new Random().nextInt()).abs() + 1000).toString() : System.getenv("GITHUB_RUN_NUMBER"))
|
||||
|
||||
archivesBaseName = rootProject.archives_base_name
|
||||
version = rootProject.mod_version + "." + (System.getenv("GITHUB_RUN_NUMBER") == null ? "9999" : System.getenv("GITHUB_RUN_NUMBER"))
|
||||
if (!ext.isSnapshot) {
|
||||
version = rootProject.base_version + "." + runNumber
|
||||
archivesBaseName = rootProject.archives_base_name
|
||||
} else {
|
||||
version = rootProject.base_version + "-PR." + System.getenv("PR_NUM") + "." + runNumber
|
||||
archivesBaseName = rootProject.archives_base_name_snapshot
|
||||
}
|
||||
|
||||
group = rootProject.maven_group
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
@@ -55,7 +67,7 @@ allprojects {
|
||||
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
|
||||
ext {
|
||||
releaseChangelog = {
|
||||
def dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm")
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package me.shedaniel.architectury.mixin.fabric.client;
|
||||
|
||||
import com.mojang.blaze3d.shaders.Program;
|
||||
import net.minecraft.client.renderer.EffectInstance;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Unique
|
||||
@Mixin(EffectInstance.class)
|
||||
public class MixinEffectInstance {
|
||||
@Redirect(
|
||||
method = "<init>",
|
||||
at = @At(value = "NEW",
|
||||
target = "(Ljava/lang/String;)Lnet/minecraft/resources/ResourceLocation;",
|
||||
ordinal = 0)
|
||||
)
|
||||
private ResourceLocation mojangPls(String _0, ResourceManager rm, String str) {
|
||||
return mojangPls(new ResourceLocation(str), ".json");
|
||||
}
|
||||
|
||||
@Redirect(
|
||||
method = "getOrCreate",
|
||||
at = @At(value = "NEW",
|
||||
target = "(Ljava/lang/String;)Lnet/minecraft/resources/ResourceLocation;",
|
||||
ordinal = 0)
|
||||
)
|
||||
private static ResourceLocation mojangPls(String _0, ResourceManager rm, Program.Type type, String str) {
|
||||
return mojangPls(new ResourceLocation(str), type.getExtension());
|
||||
}
|
||||
|
||||
private static ResourceLocation mojangPls(ResourceLocation rl, String ext) {
|
||||
return new ResourceLocation(rl.getNamespace(), "shaders/program/" + rl.getPath() + ext);
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,39 @@
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"minVersion": "0.7.11",
|
||||
"client": [
|
||||
"client.MixinClientLevel", "client.MixinClientPacketListener", "client.MixinDebugScreenOverlay", "client.MixinGameRenderer", "client.MixinIntegratedServer",
|
||||
"client.MixinKeyboardHandler", "client.MixinMinecraft", "client.MixinMouseHandler", "client.MixinMultiPlayerGameMode", "client.MixinScreen",
|
||||
"client.MixinTextureAtlas"
|
||||
"client.MixinClientLevel",
|
||||
"client.MixinClientPacketListener",
|
||||
"client.MixinDebugScreenOverlay",
|
||||
"client.MixinGameRenderer",
|
||||
"client.MixinIntegratedServer",
|
||||
"client.MixinKeyboardHandler",
|
||||
"client.MixinMinecraft",
|
||||
"client.MixinMouseHandler",
|
||||
"client.MixinMultiPlayerGameMode",
|
||||
"client.MixinScreen",
|
||||
"client.MixinTextureAtlas",
|
||||
"client.MixinEffectInstance"
|
||||
],
|
||||
"mixins": [
|
||||
"ExplosionPreInvoker", "LivingDeathInvoker", "MixinBlockEntityExtension", "MixinBlockItem", "MixinCommands", "MixinDedicatedServer", "MixinExplosion",
|
||||
"MixinFurnaceResultSlot", "MixinItemEntity", "MixinLivingEntity", "MixinPlayer", "MixinPlayerAdvancements", "MixinPlayerList", "MixinResultSlot",
|
||||
"MixinServerGamePacketListenerImpl", "MixinServerLevel", "MixinServerPlayer", "MixinServerPlayerGameMode", "PlayerAttackInvoker"
|
||||
"ExplosionPreInvoker",
|
||||
"LivingDeathInvoker",
|
||||
"MixinBlockEntityExtension",
|
||||
"MixinBlockItem",
|
||||
"MixinCommands",
|
||||
"MixinDedicatedServer",
|
||||
"MixinExplosion",
|
||||
"MixinFurnaceResultSlot",
|
||||
"MixinItemEntity",
|
||||
"MixinLivingEntity",
|
||||
"MixinPlayer",
|
||||
"MixinPlayerAdvancements",
|
||||
"MixinPlayerList",
|
||||
"MixinResultSlot",
|
||||
"MixinServerGamePacketListenerImpl",
|
||||
"MixinServerLevel",
|
||||
"MixinServerPlayer",
|
||||
"MixinServerPlayerGameMode",
|
||||
"PlayerAttackInvoker"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
@@ -5,7 +5,8 @@ minecraft_version=1.16.4
|
||||
supported_version=1.16.4/5
|
||||
|
||||
archives_base_name=architectury
|
||||
mod_version=1.4
|
||||
archives_base_name_snapshot=architectury-snapshot
|
||||
base_version=1.4
|
||||
maven_group=me.shedaniel
|
||||
|
||||
fabric_loader_version=0.10.8
|
||||
|
||||
Reference in New Issue
Block a user