Downgrade to 1.18.2

This commit is contained in:
Aria 2023-02-22 13:05:45 -07:00
parent c7040f83ae
commit 19573bbd56
63 changed files with 424 additions and 311 deletions

View file

@ -1,15 +1,19 @@
package dev.zontreck.otemod.integrations;
import org.lwjgl.glfw.GLFW;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraftforge.client.settings.KeyConflictContext;
import net.minecraftforge.client.ClientRegistry;
public class KeyBindings {
public static final String KEY_CATEGORY_OTEMOD = "key.category.otemod";
public static final String KEY_OPEN_VAULT = "key.otemod.open_vault";
public static final KeyMapping OPEN_VAULT = new KeyMapping(KEY_OPEN_VAULT, KeyConflictContext.IN_GAME, InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_V, KEY_CATEGORY_OTEMOD);
public static final KeyMapping OPEN_VAULT = registerKeyMapping(KEY_OPEN_VAULT, InputConstants.KEY_V | InputConstants.KEY_LSHIFT, KEY_CATEGORY_OTEMOD);
private static KeyMapping registerKeyMapping(String name, int keycode, String category){
final KeyMapping key = new KeyMapping(name, keycode, category);
ClientRegistry.registerKeyBinding(key);
return key;
}
}

View file

@ -4,6 +4,7 @@ import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.chat.ChatServerOverride;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
@ -34,6 +35,6 @@ public class LuckPermsHelper {
}
public static void sendNoPermissionsMessage(ServerPlayer play, String perm, String group) {
ChatServerOverride.broadcastTo(play.getUUID(), Component.literal(OTEMod.OTEPrefix + ChatColor.doColors(" !Dark_Red!You do not have permission to use that command. You need permission !Gold!"+perm+" !White! or !Gold!"+group)), play.server);
ChatServerOverride.broadcastTo(play.getUUID(), new TextComponent(OTEMod.OTEPrefix + ChatColor.doColors(" !Dark_Red!You do not have permission to use that command. You need permission !Gold!"+perm+" !White! or !Gold!"+group)), play.server);
}
}