aboutsummaryrefslogtreecommitdiff
path: root/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin
diff options
context:
space:
mode:
authorliach <liach@users.noreply.github.com>2020-01-12 14:19:18 +0000
committerLuck <git@lucko.me>2020-01-12 14:19:44 +0000
commitfb53db0025a883bd9b798ddef13196a0b3d05e75 (patch)
treec76f7f7f441aa5e0d0cd49a363549b8bd284ab86 /spark-fabric/src/main/java/me/lucko/spark/fabric/mixin
parent2fe79f4140011f93df1567afcc9b75fababa187e (diff)
downloadspark-fb53db0025a883bd9b798ddef13196a0b3d05e75.tar.gz
spark-fb53db0025a883bd9b798ddef13196a0b3d05e75.tar.bz2
spark-fb53db0025a883bd9b798ddef13196a0b3d05e75.zip
Update fabric mod to 1.15.1
Diffstat (limited to 'spark-fabric/src/main/java/me/lucko/spark/fabric/mixin')
-rw-r--r--spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftClientMixin.java52
-rw-r--r--spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftServerMixin.java53
2 files changed, 0 insertions, 105 deletions
diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftClientMixin.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftClientMixin.java
deleted file mode 100644
index ae7ef5f..0000000
--- a/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftClientMixin.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * This file is part of spark.
- *
- * Copyright (c) lucko (Luck) <luck@lucko.me>
- * Copyright (c) contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package me.lucko.spark.fabric.mixin;
-
-import me.lucko.spark.fabric.FabricSparkGameHooks;
-import me.lucko.spark.fabric.FabricSparkMod;
-import me.lucko.spark.fabric.plugin.FabricClientSparkPlugin;
-import net.minecraft.client.MinecraftClient;
-import net.minecraft.util.NonBlockingThreadExecutor;
-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(MinecraftClient.class)
-public abstract class MinecraftClientMixin extends NonBlockingThreadExecutor<Runnable> {
-
- public MinecraftClientMixin(String string_1) {
- super(string_1);
- }
-
- // Inject at when menu pops up
- @Inject(method = "init()V", at = @At(value = "INVOKE",
- target = "Lnet/minecraft/client/gui/screen/SplashScreen;method_18819(Lnet/minecraft/client/MinecraftClient;)V"))
- public void onInit(CallbackInfo ci) {
- FabricClientSparkPlugin.register(FabricSparkMod.getMod(), (MinecraftClient) (Object) this);
- }
-
- @Inject(method = "tick()V", at = @At("RETURN"))
- public void onTick(CallbackInfo ci) {
- FabricSparkGameHooks.INSTANCE.tickClientCounters();
- }
-
-}
diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftServerMixin.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftServerMixin.java
deleted file mode 100644
index 4e3a0ab..0000000
--- a/spark-fabric/src/main/java/me/lucko/spark/fabric/mixin/MinecraftServerMixin.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * This file is part of spark.
- *
- * Copyright (c) lucko (Luck) <luck@lucko.me>
- * Copyright (c) contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package me.lucko.spark.fabric.mixin;
-
-import me.lucko.spark.fabric.FabricSparkGameHooks;
-import me.lucko.spark.fabric.FabricSparkMod;
-import me.lucko.spark.fabric.plugin.FabricServerSparkPlugin;
-import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.ServerTask;
-import net.minecraft.util.NonBlockingThreadExecutor;
-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(MinecraftServer.class)
-public abstract class MinecraftServerMixin extends NonBlockingThreadExecutor<ServerTask> {
-
- public MinecraftServerMixin(String string_1) {
- super(string_1);
- }
-
- // Inject before set favicon call
- @Inject(method = "run()V",
- at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;setFavicon(Lnet/minecraft/server/ServerMetadata;)V"))
- public void onRun(CallbackInfo ci) {
- FabricServerSparkPlugin.register(FabricSparkMod.getMod(), (MinecraftServer) (Object) this);
- }
-
- @Inject(method = "tick(Ljava/util/function/BooleanSupplier;)V", at = @At("RETURN"))
- public void onTick(CallbackInfo ci) {
- FabricSparkGameHooks.INSTANCE.tickServerCounters();
- }
-
-}