mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 12:06:17 +01:00
Started looking to also do fabric support
This commit is contained in:
parent
70ea92bac3
commit
811c790b64
@ -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 {
|
||||
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
10
settings.gradle
Normal file
@ -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");
|
||||
}
|
||||
|
||||
|
||||
}
|
10
src/main/resources/advancedportals.common.json
Normal file
10
src/main/resources/advancedportals.common.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.sekwah.advancedportals.fabric.mixins.common",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
16
src/main/resources/fabric.mod.json
Normal file
16
src/main/resources/fabric.mod.json
Normal 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"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user