diff --git a/build.gradle b/build.gradle index d7b1d963..eaffb3f3 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e8be595e..89450af1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..5b60df3d --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +pluginManagement { + repositories { + jcenter() + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + gradlePluginPortal() + } +} diff --git a/src/main/java/com/sekwah/advancedportals/fabric/AdvancedPortalsMod.java b/src/main/java/com/sekwah/advancedportals/fabric/AdvancedPortalsMod.java new file mode 100644 index 00000000..88d82ecc --- /dev/null +++ b/src/main/java/com/sekwah/advancedportals/fabric/AdvancedPortalsMod.java @@ -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!"); + } +} \ No newline at end of file diff --git a/src/main/java/com/sekwah/advancedportals/fabric/mixins/common/PlayerMixin.java b/src/main/java/com/sekwah/advancedportals/fabric/mixins/common/PlayerMixin.java new file mode 100644 index 00000000..fb4736a0 --- /dev/null +++ b/src/main/java/com/sekwah/advancedportals/fabric/mixins/common/PlayerMixin.java @@ -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"); + } + + +} diff --git a/src/main/resources/advancedportals.common.json b/src/main/resources/advancedportals.common.json new file mode 100644 index 00000000..96c01f3f --- /dev/null +++ b/src/main/resources/advancedportals.common.json @@ -0,0 +1,10 @@ +{ + "required": true, + "package": "com.sekwah.advancedportals.fabric.mixins.common", + "compatibilityLevel": "JAVA_8", + "mixins": [ + ], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json new file mode 100644 index 00000000..59b10f7a --- /dev/null +++ b/src/main/resources/fabric.mod.json @@ -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" + } +} \ No newline at end of file