carpet is not the only fabric mod in the world
This commit is contained in:
1 parent
e32f915967
commit
98289b92fd
2 files changed
-50
No files matched your search
@@ -1,39 +0,0 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.hud.DebugHud;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(DebugHud.class)
|
||||
public class DebugHudMixin
|
||||
{
|
||||
@Redirect(method = "getLeftText", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/MinecraftClient;getGameVersion()Ljava/lang/String;"
|
||||
))
|
||||
private String getCarpetClient(MinecraftClient minecraftClient)
|
||||
{
|
||||
return "vanilla enough";
|
||||
}
|
||||
|
||||
@Redirect(method = "getLeftText", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/ClientBrandRetriever;getClientModName()Ljava/lang/String;"
|
||||
))
|
||||
private String getModName()
|
||||
{
|
||||
return "don't even...";
|
||||
}
|
||||
|
||||
@Redirect(method = "getLeftText", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/MinecraftClient;getVersionType()Ljava/lang/String;"
|
||||
))
|
||||
private String getVersionType(MinecraftClient minecraftClient)
|
||||
{
|
||||
return "release";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
@@ -20,13 +18,4 @@ public class MinecraftClientMixin
|
||||
//CM start game hook
|
||||
CarpetServer.onGameStarted();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author gnembon
|
||||
*/
|
||||
@Overwrite
|
||||
public String getVersionType()
|
||||
{
|
||||
return "carpet "+ CarpetSettings.carpetVersion;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user