[BUG] Disable vanish on forge, since it doesn't have a forge version anymore
This commit is contained in:
@@ -3,7 +3,7 @@ archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Compat
|
// Compat
|
||||||
modImplementation("maven.modrinth:vanishmod:${vanishmod}")
|
// NOT AVAILABLE ON FORGE modImplementation("maven.modrinth:vanishmod:${vanishmod}")
|
||||||
|
|
||||||
// Do not edit or remove
|
// Do not edit or remove
|
||||||
implementation project(":Common")
|
implementation project(":Common")
|
||||||
|
@@ -2,7 +2,6 @@ package com.hypherionmc.craterlib;
|
|||||||
|
|
||||||
import com.hypherionmc.craterlib.api.events.client.LateInitEvent;
|
import com.hypherionmc.craterlib.api.events.client.LateInitEvent;
|
||||||
import com.hypherionmc.craterlib.common.ForgeServerEvents;
|
import com.hypherionmc.craterlib.common.ForgeServerEvents;
|
||||||
import com.hypherionmc.craterlib.compat.Vanish;
|
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||||
import com.hypherionmc.craterlib.core.networking.CraterPacketNetwork;
|
import com.hypherionmc.craterlib.core.networking.CraterPacketNetwork;
|
||||||
import com.hypherionmc.craterlib.core.networking.data.PacketSide;
|
import com.hypherionmc.craterlib.core.networking.data.PacketSide;
|
||||||
@@ -33,9 +32,5 @@ public class CraterLib {
|
|||||||
LateInitEvent event = new LateInitEvent(new BridgedMinecraft(), BridgedOptions.of(Minecraft.getInstance().options));
|
LateInitEvent event = new LateInitEvent(new BridgedMinecraft(), BridgedOptions.of(Minecraft.getInstance().options));
|
||||||
CraterEventBus.INSTANCE.postEvent(event);
|
CraterEventBus.INSTANCE.postEvent(event);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ModloaderEnvironment.INSTANCE.isModLoaded("vmod")) {
|
|
||||||
MinecraftForge.EVENT_BUS.register(new Vanish());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,24 +0,0 @@
|
|||||||
package com.hypherionmc.craterlib.compat;
|
|
||||||
|
|
||||||
import com.hypherionmc.craterlib.api.events.server.CraterPlayerEvent;
|
|
||||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
|
||||||
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
||||||
import redstonedubstep.mods.vanishmod.api.PlayerVanishEvent;
|
|
||||||
|
|
||||||
public class Vanish {
|
|
||||||
|
|
||||||
public Vanish() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void vanishevent(PlayerVanishEvent event) {
|
|
||||||
if (event.isVanished()) {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedOut(BridgedPlayer.of(event.getEntity())));
|
|
||||||
} else {
|
|
||||||
CraterEventBus.INSTANCE.postEvent(new CraterPlayerEvent.PlayerLoggedIn(BridgedPlayer.of(event.getEntity())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user