try to fix crash on server load
This commit is contained in:
+2
-2
@@ -88,8 +88,8 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||||
compileOnly fg.deobf("net.fretux.ascend:Ascend:2.1.1")
|
compileOnly fg.deobf("net.fretux.ascend:Ascend:2.2.1")
|
||||||
runtimeOnly fg.deobf("net.fretux.ascend:Ascend:2.1.1")
|
runtimeOnly fg.deobf("net.fretux.ascend:Ascend:2.2.1")
|
||||||
|
|
||||||
// Iron's Spellbooks
|
// Iron's Spellbooks
|
||||||
compileOnly fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}:api")
|
compileOnly fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}:api")
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ mod_name=Mind & Motion
|
|||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=All Rights Reserved
|
mod_license=All Rights Reserved
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.3.0
|
mod_version=1.3.1
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package net.fretux.mindmotion;
|
package net.fretux.mindmotion;
|
||||||
|
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
import net.fretux.mindmotion.client.Keybinds;
|
|
||||||
import net.fretux.mindmotion.command.SanityCommand;
|
import net.fretux.mindmotion.command.SanityCommand;
|
||||||
import net.fretux.mindmotion.event.CombatEvents;
|
import net.fretux.mindmotion.event.CombatEvents;
|
||||||
import net.fretux.mindmotion.event.PlayerTickHandler;
|
import net.fretux.mindmotion.event.PlayerTickHandler;
|
||||||
import net.fretux.mindmotion.network.ModMessages;
|
import net.fretux.mindmotion.network.ModMessages;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
import net.minecraftforge.fml.ModLoadingContext;
|
import net.minecraftforge.fml.ModLoadingContext;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.config.ModConfig;
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
@@ -23,7 +24,9 @@ public class AscendMindMotion {
|
|||||||
public AscendMindMotion() {
|
public AscendMindMotion() {
|
||||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||||
modEventBus.addListener(this::commonSetup);
|
modEventBus.addListener(this::commonSetup);
|
||||||
modEventBus.addListener(Keybinds::register);
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
|
net.fretux.mindmotion.client.ClientBootstrap.init(modEventBus)
|
||||||
|
);
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
MinecraftForge.EVENT_BUS.register(PlayerTickHandler.class);
|
MinecraftForge.EVENT_BUS.register(PlayerTickHandler.class);
|
||||||
MinecraftForge.EVENT_BUS.register(CombatEvents.class);
|
MinecraftForge.EVENT_BUS.register(CombatEvents.class);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package net.fretux.mindmotion.network;
|
package net.fretux.mindmotion.network;
|
||||||
|
|
||||||
import net.fretux.mindmotion.client.shader.VentShaderHandler;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
import net.minecraftforge.network.NetworkEvent;
|
import net.minecraftforge.network.NetworkEvent;
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@ public class VentClientEffectPacket {
|
|||||||
|
|
||||||
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
||||||
ctx.get().enqueueWork(() -> {
|
ctx.get().enqueueWork(() -> {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () ->
|
||||||
if (mc.player == null) return;
|
net.fretux.mindmotion.client.ClientPacketHandlers.handleVentEffect()
|
||||||
mc.player.swingTime = 10;
|
);
|
||||||
VentShaderHandler.triggerVentShockwave();
|
|
||||||
});
|
});
|
||||||
|
ctx.get().setPacketHandled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user