This file contains hidden or 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
package dev.isxander.yacl3.mixin; | |
import net.minecraft.client.gui.components.events.ContainerEventHandler; | |
import net.minecraft.client.gui.components.events.GuiEventListener; | |
import net.minecraft.client.gui.components.tabs.TabNavigationBar; | |
import net.minecraft.client.gui.navigation.FocusNavigationEvent; | |
import net.minecraft.client.gui.navigation.ScreenAxis; | |
import net.minecraft.client.gui.navigation.ScreenDirection; | |
import net.minecraft.client.gui.navigation.ScreenRectangle; | |
import org.jetbrains.annotations.Nullable; |
This file contains hidden or 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
var rootLayout = layout.createRowHelper(3); | |
rootLayout.addChild(new TabListWidget<>( | |
() -> new ScreenRectangle(tabArea.position(), tabArea.width() / 3 * 2 + 1, tabArea.height()), | |
this.optionList | |
), 2); | |
var buttonGrid = new GridLayout(); | |
buttonGrid.defaultCellSetting().padding(2, 2, 2, 0); | |
rootLayout.addChild(buttonGrid, 1, rootLayout.newCellSettings().alignHorizontallyRight().alignVerticallyBottom()); |
This file contains hidden or 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
private void addMessage(Component message, @Nullable MessageSignature signature, int ticks, @Nullable GuiMessageTag tag, boolean refresh) { | |
int i = Mth.floor((double)this.getWidth() / this.getScale()); | |
if (tag != null && tag.icon() != null) { | |
i -= tag.icon().width + 4 + 2; | |
} | |
List<FormattedCharSequence> list = ComponentRenderUtils.wrapComponents(message, i, this.minecraft.font); | |
boolean bl = this.isChatFocused(); | |
for(int j = 0; j < list.size(); ++j) { |
This file contains hidden or 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
private void onPress(long window, int button, int action, int modifiers) { | |
boolean bl; | |
if (window != this.minecraft.getWindow().getWindow()) { | |
return; | |
} | |
if (this.minecraft.screen != null) { | |
this.minecraft.setLastInputType(InputType.MOUSE); | |
} | |
boolean bl2 = bl = action == 1; | |
if (Minecraft.ON_OSX && button == 0) { |
This file contains hidden or 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
@Mixin(AbstractContainerScreen.class) | |
public abstract class AbstractContainerScreenMixin implements ScreenProcessorProvider { | |
@Shadow @Nullable protected Slot hoveredSlot; | |
@Shadow protected abstract void slotClicked(Slot slot, int slotId, int button, ClickType actionType); | |
@Unique private final ScreenProcessor<?> screenProcessor = new AbstractContainerScreenProcessor<>((AbstractContainerScreen<?>) (Object) this, () -> hoveredSlot, this::slotClicked); | |
@Override | |
public ScreenProcessor<?> screenProcessor() { |
This file contains hidden or 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
public void renderScrollingString(PoseStack matrices, Font textRenderer, int xOffset, int color) { | |
int i = this.getX() + xOffset; | |
int j = this.getX() + this.getWidth() - xOffset; | |
Component var10002 = this.getMessage(); | |
int var10004 = this.getY(); | |
int var10006 = this.getY() + this.getHeight(); | |
int var7 = this.localvar$zei000$controlify$shiftDrawSize(i); | |
renderScrollingString(matrices, textRenderer, var10002, i, var10004, j, var10006, color); | |
} |
This file contains hidden or 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
public final KeyMapping keySprint = new ToggleKeyMapping("key.sprint", 341, "key.categories.movement", this.toggleSprint::get); |
This file contains hidden or 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
ip = /([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/i | |
url = /https?:\/\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:% +.~#?&//=]*)/i | |
minecraft_sensitive_info = /("access_key":".+"|api.sk1er.club\/auth|LoginPacket|SentryAPI.cpp|"authHash":|"hash":"|--accessToken \S+|\(Session ID is token:|Logging in with details: |Server-Hash: |Checking license key :|USERNAME=.*|https:\/\/api\.hypixel\.net\/.+(\?key=|&key=))/i | |
email = /[a-zA-Z0-9_.+-]{1,50}@[a-zA-Z0-9-]{1,50}\.[a-zA-Z0-9-.]{1,10}/i | |
pastebin = /(?:https?:\/\/)?(?<domain>paste\.ee|pastebin\.com|has?tebin\.com|hasteb\.in|hst\.sh)/(?:raw/|p\/)?([\w-.]+)/i | |
markdown_code_block = /```(?<language>[a-zA-Z0-9]*)\n(?<code>.+)\n```/s | |
windows_mac_username = /Users[\/\\](?<username>[^/\\]+)(?:[\/\\]*.)*/ | |
linux_username = /\/home\/(?<username>[^\/]+)(?:\/*[^\/])*/ | |
forge_mod_regex = /(?<state>(?:U?L?C?H?I?J?A?D?E?)+)\t(?<id>(?: ?[\w-]+)+)\{(?<version>(?:[0-9-\w]\.*)+)\} \[(?<name>(?: ?[\w-]+)+)\] \((?<file>(?: ?(?:[^/<>:\"\\|?* ])+ |
This file contains hidden or 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
package dev.isxander.evergreenhud.installer | |
import co.uk.isxander.libinstaller.InstallerUtils | |
import org.apache.commons.io.FileUtils | |
import java.awt.Font | |
import java.io.* | |
import java.net.HttpURLConnection | |
import java.net.URL | |
import java.nio.charset.Charset | |
import java.util.jar.JarFile |
This file contains hidden or 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
/* | |
* Copyright (C) isXander [2019 - 2021] | |
* This program comes with ABSOLUTELY NO WARRANTY | |
* This is free software, and you are welcome to redistribute it | |
* under the certain conditions that can be found here | |
* https://www.gnu.org/licenses/gpl-3.0.en.html | |
* | |
* If you have any questions or concerns, please create | |
* an issue on the github page that can be found here | |
* https://github.com/isXander/EvergreenHUD |