Started looking to also do fabric support
This commit is contained in:
parent
1d96edc291
commit
72dab8254c
28
build.gradle
28
build.gradle
|
@ -1,10 +1,5 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url "http://repo.maven.apache.org/maven2" }
|
||||
}
|
||||
dependencies {
|
||||
}
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.2.0-SNAPSHOT'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
|
@ -12,6 +7,7 @@ apply plugin: 'maven'
|
|||
apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
archivesBaseName = "advancedportals"
|
||||
group = 'com.sekwah.advancedportals'
|
||||
version = '1.0.0'
|
||||
|
||||
|
@ -34,6 +30,9 @@ repositories {
|
|||
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
||||
}
|
||||
|
||||
minecraft {
|
||||
}
|
||||
|
||||
// includeLibs just says to include the library in the final jar
|
||||
dependencies {
|
||||
includeLibs group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
|
||||
|
@ -41,6 +40,13 @@ dependencies {
|
|||
includeLibs group: 'com.google.inject', name: 'guice', version:'4.0'
|
||||
compile group: 'com.google.inject', name: 'guice', version:'4.0'
|
||||
compile "org.bukkit:bukkit:1.13-R0.1-SNAPSHOT"
|
||||
|
||||
minecraft "com.mojang:minecraft:19w03c"
|
||||
mappings "net.fabricmc:yarn:19w03c.6"
|
||||
modCompile "net.fabricmc:fabric-loader:0.3.3.101"
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modCompile "net.fabricmc:fabric:0.1.4.78"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -60,3 +66,11 @@ task runJar() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,6 @@
|
|||
#Mon Aug 22 17:36:22 EDT 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.sekwah.advancedportals.fabric;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
public class AdvancedPortalsMod implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||
// However, some things (like resources) may still be uninitialized.
|
||||
// Proceed with mild caution.
|
||||
|
||||
System.out.println("Hello Fabric world!");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.sekwah.advancedportals.fabric.mixins.common;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
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(PlayerEntity.class)
|
||||
public class PlayerMixin {
|
||||
|
||||
@Inject(method="setPosition", at=@At("HEAD"))
|
||||
public void setPosition(double x, double y, double z, CallbackInfo info) {
|
||||
System.out.println("MOVE");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "com.sekwah.advancedportals.fabric.mixins.common",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"id": "advancedportals",
|
||||
"name": "Advanced Portals",
|
||||
"description": "A portal mod for minecraft",
|
||||
"version": "1.0.0",
|
||||
"side": "universal",
|
||||
"initializers": [
|
||||
"com.sekwah.advancedportals.fabric.AdvancedPortalsMod"
|
||||
],
|
||||
"requires": {
|
||||
"fabric": "*"
|
||||
},
|
||||
"mixins": {
|
||||
"common": "modid.common.json"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue