mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
update forge and setup mixins
This commit is contained in:
parent
d1dccffc67
commit
e5b61891fc
15
build.gradle
15
build.gradle
@ -3,9 +3,11 @@ buildscript {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url='https://dist.creeper.host/Sponge/maven' }
|
||||
}
|
||||
dependencies {
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
@ -35,6 +37,8 @@ minecraft {
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
property 'mixin.env.disableRefMap', 'true'
|
||||
arg '-mixin.config=create.mixins.json'
|
||||
property 'forge.logging.console.level', 'info'
|
||||
property 'fml.earlyprogresswindow', 'false'
|
||||
mods {
|
||||
@ -46,6 +50,8 @@ minecraft {
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run/server')
|
||||
property 'mixin.env.disableRefMap', 'true'
|
||||
arg '-mixin.config=create.mixins.json'
|
||||
property 'forge.logging.console.level', 'info'
|
||||
mods {
|
||||
create {
|
||||
@ -131,7 +137,8 @@ jar {
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"Implementation-Vendor" :"simibubi",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||
"MixinConfigs": "create.mixins.json"
|
||||
])
|
||||
}
|
||||
}
|
||||
@ -200,3 +207,9 @@ curseforge {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'org.spongepowered.mixin'
|
||||
|
||||
mixin {
|
||||
add sourceSets.main, "create.refmap.json"
|
||||
}
|
@ -6,7 +6,7 @@ org.gradle.daemon=false
|
||||
# mod version info
|
||||
mod_version=0.3c
|
||||
minecraft_version=1.15.2
|
||||
forge_version=31.2.31
|
||||
forge_version=31.2.47
|
||||
|
||||
# dependency versions
|
||||
registrate_version=0.0.4.18
|
||||
|
@ -0,0 +1,18 @@
|
||||
package com.simibubi.create.foundation.mixin;
|
||||
|
||||
import net.minecraft.client.multiplayer.ClientChunkProvider;
|
||||
import net.minecraft.util.math.SectionPos;
|
||||
import net.minecraft.world.LightType;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientChunkProvider.class)
|
||||
public class LightUpdateMixin {
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "markLightChanged(Lnet/minecraft/world/LightType;Lnet/minecraft/util/math/SectionPos;)V")
|
||||
private void onLightUpdate(LightType type, SectionPos pos, CallbackInfo ci) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.simibubi.create.foundation.mixin;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.multiplayer.ClientChunkProvider;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.util.math.SectionPos;
|
||||
import net.minecraft.world.LightType;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(WorldRenderer.class)
|
||||
public class RenderInLayerMixin {
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "renderLayer")
|
||||
private void renderLayer(RenderType type, MatrixStack stack, double cameraX, double cameraY, double cameraZ, CallbackInfo ci) {
|
||||
|
||||
}
|
||||
}
|
14
src/main/resources/create.mixins.json
Normal file
14
src/main/resources/create.mixins.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.simibubi.create.foundation.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"refmap": "create.refmap.json",
|
||||
"client": [
|
||||
"LightUpdateMixin",
|
||||
"RenderInLayerMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"minVersion": "0.8"
|
||||
}
|
Loading…
Reference in New Issue
Block a user