Final updates before first release
This commit is contained in:
@@ -173,7 +173,7 @@ publisher {
|
||||
curseID = curse_id
|
||||
modrinthID = modrinth_id
|
||||
versionType = "release"
|
||||
changelog = rootProject.file("changelog.md")
|
||||
changelog = rootProject.file("changelog-forge.md")
|
||||
version = "${minecraft_version}-${project.version}"
|
||||
displayName = "[FORGE 1.20] CraterLib - ${project.version}"
|
||||
gameVersions = ["1.20"]
|
||||
|
@@ -2,9 +2,11 @@ package com.hypherionmc.craterlib;
|
||||
|
||||
import com.hypherionmc.craterlib.api.event.client.LateInitEvent;
|
||||
import com.hypherionmc.craterlib.client.CraterClientBus;
|
||||
import com.hypherionmc.craterlib.common.ForgeServerEvents;
|
||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@@ -13,7 +15,7 @@ public class CraterLib {
|
||||
|
||||
public CraterLib() {
|
||||
CraterEventBus.INSTANCE.registerEventListener(CraterClientBus.class);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new ForgeServerEvents());
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
|
||||
LateInitEvent event = new LateInitEvent(Minecraft.getInstance(), Minecraft.getInstance().options);
|
||||
CraterEventBus.INSTANCE.postEvent(event);
|
||||
|
@@ -1,14 +1,9 @@
|
||||
package com.hypherionmc.craterlib.common;
|
||||
|
||||
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 net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||
import net.minecraftforge.event.server.*;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@@ -23,29 +18,4 @@ public class ForgeCommonEvents {
|
||||
.filter(p -> p.getLeft().get() == tab && p.getRight() != null)
|
||||
.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"
|
||||
loaderVersion = "[46,)"
|
||||
license = "MIT"
|
||||
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/"
|
||||
issueTrackerURL="https://github.com/firstdarkdev/craterLib/issues"
|
||||
|
||||
[[mods]]
|
||||
modId = "craterlib"
|
||||
version = "${file.jarVersion}"
|
||||
displayName = "CraterLib"
|
||||
#updateJSONURL="https://change.me.example.invalid/updates.json"
|
||||
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/"
|
||||
logoFile = "multiloader.png"
|
||||
displayURL="https://modrinth.com/mod/craterlib"
|
||||
logoFile = "craterlib_logo.png"
|
||||
#credits="Thanks for this example mod goes to Java"
|
||||
authors = "HypherionSA, Misha"
|
||||
authors = "HypherionSA, Zenith"
|
||||
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]]
|
||||
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 |
Reference in New Issue
Block a user