-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: preprocess
Skytils.kt
to 1.16 forge
- Loading branch information
Showing
4 changed files
with
133 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
mod/src/main/kotlin/gg/skytils/skytilsmod/utils/mcUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Skytils - Hypixel Skyblock Quality of Life Mod | ||
* Copyright (C) 2020-2024 Skytils | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero 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 Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package gg.skytils.skytilsmod.utils | ||
|
||
import net.minecraft.launchwrapper.Launch | ||
import net.minecraftforge.fml.common.Loader | ||
|
||
val isDeobfuscatedEnvironment by lazy { | ||
//#if FORGE | ||
//#if MC<11400 | ||
Launch.blackboard.getOrDefault("fml.deobfuscatedEnvironment", false) as Boolean | ||
//#else | ||
//$$ (System.getenv("target") ?: "").lowercase() == "fmluserdevclient" | ||
//#endif | ||
//#endif | ||
} | ||
|
||
fun isModLoaded(id: String) = | ||
//#if FORGE | ||
//#if MC<11400 | ||
Loader.isModLoaded(id) | ||
//#else | ||
//$$ FMLLoader.getLoadingModList().getModFileById(id) | ||
//#endif | ||
//#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
net.minecraft.client.gui.widget.button.Button net.minecraft.client.gui.GuiButton | ||
net.minecraft.client.gui.screen.Screen net.minecraft.client.gui.GuiScreen | ||
net.minecraft.entity.player.PlayerEntity container net.minecraft.entity.player.EntityPlayer inventoryContainer | ||
net.minecraft.inventory.container.ChestContainer net.minecraft.inventory.ContainerChest | ||
net.minecraft.client.gui.screen.inventory.ChestScreen net.minecraft.client.gui.inventory.GuiChest | ||
net.minecraft.network.play.server.SJoinGamePacket net.minecraft.network.play.server.S01PacketJoinGame | ||
net.minecraft.network.play.server.SDisplayObjectivePacket net.minecraft.network.play.server.S3DPacketDisplayScoreboard | ||
net.minecraft.network.play.server.SDisplayObjectivePacket getName() net.minecraft.network.play.server.S3DPacketDisplayScoreboard func_149370_d() | ||
net.minecraft.network.play.server.SEntityMetadataPacket net.minecraft.network.play.server.S1CPacketEntityMetadata | ||
net.minecraft.network.play.server.SEntityMetadataPacket getDataManagerEntries() net.minecraft.network.play.server.S1CPacketEntityMetadata func_149376_c() | ||
net.minecraft.network.play.server.SCustomPayloadPlayPacket net.minecraft.network.play.server.S3FPacketCustomPayload | ||
net.minecraft.network.play.server.SPlayerListItemPacket net.minecraft.network.play.server.S38PacketPlayerListItem | ||
net.minecraft.util.text.ITextComponent getString() net.minecraft.util.IChatComponent getFormattedText() | ||
net.minecraft.network.play.client.CChatMessagePacket net.minecraft.network.play.client.C01PacketChatMessage | ||
net.minecraft.client.gui.screen.IngameMenuScreen net.minecraft.client.gui.GuiIngameMenu | ||
net.minecraft.client.gui.widget.Widget heightRealms net.minecraft.client.gui.GuiButton height | ||
net.minecraft.client.gui.widget.Widget x net.minecraft.client.gui.GuiButton xPosition | ||
net.minecraft.client.gui.widget.Widget y net.minecraft.client.gui.GuiButton yPosition | ||
net.minecraft.client.gui.screen.DeathScreen net.minecraft.client.gui.GuiGameOver |