Skip to content

Instantly share code, notes, and snippets.

View FireController1847's full-sized avatar

FireController#1847 FireController1847

View GitHub Profile
@FireController1847
FireController1847 / Part 1.1.java
Created October 6, 2020 07:30
Multidimensional Array
int[] array = new int[] { 4, 6, 7, -2, 9 };
for (int i = 0; i < 5; i++) {
System.out.println("(" + i + ") = " + array[i]);
}
@FireController1847
FireController1847 / gist:7764b5f1e3bcfcc043981876d786baea
Last active August 24, 2020 01:44
Minecraft Forge 33.0.20 Build Error
Starting Gradle Daemon...
Gradle Daemon started in 997 ms
> Configure project :
New Dep: net.minecraftforge:forge:1.16.2-33.0.20_mapped_snapshot_20200820-1.16.1
BUILD SUCCESSFUL in 6s
Note: SpongePowered MIXIN Annotation Processor Version=0.8
Note: ObfuscationServiceMCP supports type: "searge"
Note: ObfuscationServiceMCP supports type: "notch"
@FireController1847
FireController1847 / IMoreHealth.java
Last active November 21, 2021 05:34
Minecraft Forge 1.14.4 ~ LevelHearts Capability
package com.firecontroller1847.levelhearts.capabilities;
public interface IMoreHealth {
byte getHeartContainers();
byte getDefaultHealth();
double getModifier();
short getLevelRampPosition();
void setHeartContainers(byte heartContainers);
m.prefix = "x"; // set your prefix here
const mreg = new RegExp(`^<@!?${this.client.user.id}>`);
if (mreg.test(m.content)) { // Test for a tag
m.content = m.prefix + m.content.replace(mreg, "").replace(" ", ""); // Replaces the content of the message with the prefix instead of the tag
m.mentions.users = m.mentions.users.filter(u => u.id != this.client.user.id); // Fixes the user tags to remove the client
// The three lines below will change any tags with "what" and "prefix" to turn it into a "prefix" command.
if (m.content.toLowerCase().includes("what") && m.content.toLowerCase().includes("prefix")) {
m.content = `${m.prefix}prefix`;
}
}
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017
},
"env": {
"es6": true,
"node": true
},
"rules": {
{"lastUpload":"2017-09-01T05:41:10.679Z","extensionVersion":"v2.8.3"}
[12:13:59] [Server thread/ERROR]: Exception caught during firing event cpw.mods.fml.common.gameevent.PlayerEvent$PlayerLoggedOutEvent@443af2e3:
net.shadowfacts.discordchat.repack.net.dv8tion.jda.exceptions.RateLimitedException: The message got Rate-Limited. You are able to send messages again in 2120 ms
at net.shadowfacts.discordchat.repack.net.dv8tion.jda.entities.impl.TextChannelImpl.sendMessage(TextChannelImpl.java:158) ~[TextChannelImpl.class:?]
at net.shadowfacts.discordchat.repack.net.dv8tion.jda.entities.impl.TextChannelImpl.sendMessage(TextChannelImpl.java:144) ~[TextChannelImpl.class:?]
at net.shadowfacts.discordchat.discord.DiscordThread.sendMessageToAllChannels(DiscordThread.java:70) ~[DiscordThread.class:?]
at net.shadowfacts.discordchat.ForgeEventHandler.onPlayerLoggedOut(ForgeEventHandler.java:59) ~[ForgeEventHandler.class:?]
at cpw.mods.fml.common.eventhandler.ASMEventHandler_32_ForgeEventHandler_onPlayerLoggedOut_PlayerLoggedOutEvent.invoke(.dynamic) ~[?:?]
at cpw.mods.fml.common.eventhandler.