Started looking to also do fabric support

This commit is contained in:
Sekwah 2019-01-29 10:49:43 +00:00 committed by Sekwah
parent 70ea92bac3
commit 811c790b64
7 changed files with 74 additions and 0 deletions

View File

@ -51,6 +51,7 @@ if (branch != null) {
}
def isCanary = version.toString().contains('canary')
archivesBaseName = "advancedportals"
group = 'com.sekwah.advancedportals'
description = ""
@ -89,6 +90,9 @@ repositories {
maven { url 'https://maven.enginehub.org/repo/' } // WorldEdit
}
minecraft {
}
// includeLibs just says to include the library in the final jar
dependencies {

View File

@ -1,6 +1,8 @@
#Mon Aug 22 17:36:22 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip

10
settings.gradle Normal file
View File

@ -0,0 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}

View File

@ -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!");
}
}

View File

@ -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");
}
}

View File

@ -0,0 +1,10 @@
{
"required": true,
"package": "com.sekwah.advancedportals.fabric.mixins.common",
"compatibilityLevel": "JAVA_8",
"mixins": [
],
"injectors": {
"defaultRequire": 1
}
}

View File

@ -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"
}
}