Final updates before first release
This commit is contained in:
@@ -145,7 +145,7 @@ publisher {
|
|||||||
curseID = curse_id
|
curseID = curse_id
|
||||||
modrinthID = modrinth_id
|
modrinthID = modrinth_id
|
||||||
versionType = "release"
|
versionType = "release"
|
||||||
changelog = rootProject.file("changelog.md")
|
changelog = rootProject.file("changelog-fabric.md")
|
||||||
version = "${minecraft_version}-${project.version}"
|
version = "${minecraft_version}-${project.version}"
|
||||||
displayName = "[FABRIC/QUILT 1.20] CraterLib - ${project.version}"
|
displayName = "[FABRIC/QUILT 1.20] CraterLib - ${project.version}"
|
||||||
gameVersions = ["1.20"]
|
gameVersions = ["1.20"]
|
||||||
|
@@ -3,7 +3,6 @@ package com.hypherionmc.craterlib;
|
|||||||
import com.hypherionmc.craterlib.api.event.server.CraterRegisterCommandEvent;
|
import com.hypherionmc.craterlib.api.event.server.CraterRegisterCommandEvent;
|
||||||
import com.hypherionmc.craterlib.api.event.server.CraterServerLifecycleEvent;
|
import com.hypherionmc.craterlib.api.event.server.CraterServerLifecycleEvent;
|
||||||
import com.hypherionmc.craterlib.common.FabricCommonPlatform;
|
import com.hypherionmc.craterlib.common.FabricCommonPlatform;
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEvent;
|
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||||
|
@@ -15,7 +15,6 @@ import net.minecraft.client.renderer.item.ItemProperties;
|
|||||||
import net.minecraft.network.Connection;
|
import net.minecraft.network.Connection;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.Item;
|
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
BIN
Fabric/src/main/resources/assets/craterlib/craterlib_logo.png
Normal file
BIN
Fabric/src/main/resources/assets/craterlib/craterlib_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
@@ -3,17 +3,17 @@
|
|||||||
"id": "craterlib",
|
"id": "craterlib",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "CraterLib",
|
"name": "CraterLib",
|
||||||
"description": "A library mod used by HypherionSA's Mods",
|
"description": "A library mod used by First Dark Development and HypherionSA Mods",
|
||||||
"authors": [
|
"authors": [
|
||||||
"HypherionSA",
|
"HypherionSA",
|
||||||
"Misha"
|
"Misha"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://fabricmc.net/",
|
"homepage": "https://modrinth.com/mod/craterlib",
|
||||||
"sources": "https://github.com/FabricMC/fabric-example-mod"
|
"sources": "https://github.com/firstdarkdev/craterLib/"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "assets/modid/icon.png",
|
"icon": "assets/craterlib/craterlib_logo.png",
|
||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
|
@@ -173,7 +173,7 @@ publisher {
|
|||||||
curseID = curse_id
|
curseID = curse_id
|
||||||
modrinthID = modrinth_id
|
modrinthID = modrinth_id
|
||||||
versionType = "release"
|
versionType = "release"
|
||||||
changelog = rootProject.file("changelog.md")
|
changelog = rootProject.file("changelog-forge.md")
|
||||||
version = "${minecraft_version}-${project.version}"
|
version = "${minecraft_version}-${project.version}"
|
||||||
displayName = "[FORGE 1.20] CraterLib - ${project.version}"
|
displayName = "[FORGE 1.20] CraterLib - ${project.version}"
|
||||||
gameVersions = ["1.20"]
|
gameVersions = ["1.20"]
|
||||||
|
@@ -2,9 +2,11 @@ package com.hypherionmc.craterlib;
|
|||||||
|
|
||||||
import com.hypherionmc.craterlib.api.event.client.LateInitEvent;
|
import com.hypherionmc.craterlib.api.event.client.LateInitEvent;
|
||||||
import com.hypherionmc.craterlib.client.CraterClientBus;
|
import com.hypherionmc.craterlib.client.CraterClientBus;
|
||||||
|
import com.hypherionmc.craterlib.common.ForgeServerEvents;
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
@@ -13,7 +15,7 @@ public class CraterLib {
|
|||||||
|
|
||||||
public CraterLib() {
|
public CraterLib() {
|
||||||
CraterEventBus.INSTANCE.registerEventListener(CraterClientBus.class);
|
CraterEventBus.INSTANCE.registerEventListener(CraterClientBus.class);
|
||||||
|
MinecraftForge.EVENT_BUS.register(new ForgeServerEvents());
|
||||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
|
||||||
LateInitEvent event = new LateInitEvent(Minecraft.getInstance(), Minecraft.getInstance().options);
|
LateInitEvent event = new LateInitEvent(Minecraft.getInstance(), Minecraft.getInstance().options);
|
||||||
CraterEventBus.INSTANCE.postEvent(event);
|
CraterEventBus.INSTANCE.postEvent(event);
|
||||||
|
@@ -1,14 +1,9 @@
|
|||||||
package com.hypherionmc.craterlib.common;
|
package com.hypherionmc.craterlib.common;
|
||||||
|
|
||||||
import com.hypherionmc.craterlib.CraterConstants;
|
import com.hypherionmc.craterlib.CraterConstants;
|
||||||
import com.hypherionmc.craterlib.api.event.server.CraterRegisterCommandEvent;
|
|
||||||
import com.hypherionmc.craterlib.api.event.server.CraterServerLifecycleEvent;
|
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
|
||||||
import com.hypherionmc.craterlib.core.systems.internal.CreativeTabRegistry;
|
import com.hypherionmc.craterlib.core.systems.internal.CreativeTabRegistry;
|
||||||
import net.minecraft.world.item.CreativeModeTab;
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
||||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
|
||||||
import net.minecraftforge.event.server.*;
|
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
@@ -23,29 +18,4 @@ public class ForgeCommonEvents {
|
|||||||
.filter(p -> p.getLeft().get() == tab && p.getRight() != null)
|
.filter(p -> p.getLeft().get() == tab && p.getRight() != null)
|
||||||
.forEach(itemPair -> event.accept(itemPair.getRight()));
|
.forEach(itemPair -> event.accept(itemPair.getRight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void serverStarting(ServerStartingEvent event) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Starting(event.getServer()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void serverStarted(ServerStartedEvent event) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Started());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void serverStopping(ServerStoppingEvent event) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Stopping());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void serverStopped(ServerStoppedEvent event) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Stopped());
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onCommandRegister(RegisterCommandsEvent event) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterRegisterCommandEvent(event.getDispatcher()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,40 @@
|
|||||||
|
package com.hypherionmc.craterlib.common;
|
||||||
|
|
||||||
|
import com.hypherionmc.craterlib.api.event.server.CraterRegisterCommandEvent;
|
||||||
|
import com.hypherionmc.craterlib.api.event.server.CraterServerLifecycleEvent;
|
||||||
|
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||||
|
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||||
|
import net.minecraftforge.event.server.ServerStartedEvent;
|
||||||
|
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||||
|
import net.minecraftforge.event.server.ServerStoppedEvent;
|
||||||
|
import net.minecraftforge.event.server.ServerStoppingEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
|
||||||
|
public class ForgeServerEvents {
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void serverStarting(ServerStartingEvent event) {
|
||||||
|
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Starting(event.getServer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void serverStarted(ServerStartedEvent event) {
|
||||||
|
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Started());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void serverStopping(ServerStoppingEvent event) {
|
||||||
|
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Stopping());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void serverStopped(ServerStoppedEvent event) {
|
||||||
|
CraterEventBus.INSTANCE.postEvent(new CraterServerLifecycleEvent.Stopped());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onCommandRegister(RegisterCommandsEvent event) {
|
||||||
|
CraterEventBus.INSTANCE.postEvent(new CraterRegisterCommandEvent(event.getDispatcher()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,20 +1,20 @@
|
|||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "[46,)"
|
loaderVersion = "[46,)"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/"
|
issueTrackerURL="https://github.com/firstdarkdev/craterLib/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "craterlib"
|
modId = "craterlib"
|
||||||
version = "${file.jarVersion}"
|
version = "${file.jarVersion}"
|
||||||
displayName = "CraterLib"
|
displayName = "CraterLib"
|
||||||
#updateJSONURL="https://change.me.example.invalid/updates.json"
|
displayURL="https://modrinth.com/mod/craterlib"
|
||||||
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/"
|
logoFile = "craterlib_logo.png"
|
||||||
logoFile = "multiloader.png"
|
|
||||||
#credits="Thanks for this example mod goes to Java"
|
#credits="Thanks for this example mod goes to Java"
|
||||||
authors = "HypherionSA, Misha"
|
authors = "HypherionSA, Zenith"
|
||||||
description = '''
|
description = '''
|
||||||
A library mod used by HypherionSA's Mods
|
A library mod used by First Dark Development and HypherionSA Mods
|
||||||
'''
|
'''
|
||||||
|
displayTest = "MATCH_VERSION"
|
||||||
|
|
||||||
[[dependencies.craterlib]]
|
[[dependencies.craterlib]]
|
||||||
modId = "forge"
|
modId = "forge"
|
||||||
|
BIN
Forge/src/main/resources/craterlib_logo.png
Normal file
BIN
Forge/src/main/resources/craterlib_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
44
Jenkinsfile
vendored
Normal file
44
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label "master"
|
||||||
|
}
|
||||||
|
tools {
|
||||||
|
jdk "JAVA17"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("Notify Discord") {
|
||||||
|
steps {
|
||||||
|
discordSend webhookURL: env.FDD_WH_ADMIN,
|
||||||
|
title: "Deploy Started: CraterLib 1.20 Deploy #${BUILD_NUMBER}",
|
||||||
|
link: env.BUILD_URL,
|
||||||
|
result: 'SUCCESS',
|
||||||
|
description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Prepare") {
|
||||||
|
steps {
|
||||||
|
sh "curl https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-forge.md --output changelog-forge.md"
|
||||||
|
sh "curl https://raw.githubusercontent.com/hypherionmc/changelogs/main/craterlib/changelog-fabric.md --output changelog-fabric.md"
|
||||||
|
sh "chmod +x ./gradlew"
|
||||||
|
sh "./gradlew clean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Publish") {
|
||||||
|
steps {
|
||||||
|
sh "./gradlew publishMod publish -Prelease=true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh "./gradlew --stop"
|
||||||
|
deleteDir()
|
||||||
|
|
||||||
|
discordSend webhookURL: env.FDD_WH_ADMIN,
|
||||||
|
title: "CraterLib 1.20 Deploy #${BUILD_NUMBER}",
|
||||||
|
link: env.BUILD_URL,
|
||||||
|
result: currentBuild.currentResult,
|
||||||
|
description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})\nStatus: ${currentBuild.currentResult}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
changelog-forge.md
Normal file
1
changelog-forge.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Dummy file. To be filled by Jenkins
|
Reference in New Issue
Block a user