Skip to content

Instantly share code, notes, and snippets.

View TheGlitch76's full-sized avatar

glitch TheGlitch76

  • United States
  • 22:23 (UTC -05:00)
View GitHub Profile
@TheGlitch76
TheGlitch76 / keybase.md
Created July 23, 2017 21:50
keybase.md

Keybase proof

I hereby claim:

  • I am theglitch76 on github.
  • I am theglitch76 (https://keybase.io/theglitch76) on keybase.
  • I have a public key whose fingerprint is 34FB B595 C752 ADEB 1393 739F 92AC 5054 310D 355A

To claim this, I am signing this object:

package io.github.theglitch76.glitchbot.listener;
import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.entities.Message;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.core.events.message.guild.react.GuildMessageReactionAddEvent;
import net.dv8tion.jda.core.hooks.ListenerAdapter;
import java.io.FileInputStream;
package io.github.theglitch76.glitchbot.command;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.exceptions.InsufficientPermissionException;
import java.io.File;
import java.io.FileInputStream;

CREDITS

Automatically generated using Pack Info Generator by TheGlitch76.
Mod Name Version Author(s)
CodeChicken Lib 3.2.0.345 ChickenBones, covers1624
CoFH Core 4.5.2.19 Team CoFH
CoFH World 1.2.0.5 Team CoFH
Redstone Flux 2.0.2.3 Team CoFH
Thermal Expansion 5.5.0.29 Team CoFH
@TheGlitch76
TheGlitch76 / mmd-public-pack.md
Last active July 18, 2018 21:34
Generated credits for the MMD Public Pack
@TheGlitch76
TheGlitch76 / NukkitGameProvider.java
Created July 3, 2019 18:59
fabric-loader for nukkit
/*
* Copyright 2016 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Mixin(StatusEffectInstance.class)
public abstract class MixinStatusEffectInstance implements UpdateDurationSuperShim {
@Unique
private static final Object BLANK = new Object();
@Shadow
protected abstract int updateDuration();
@Unique
private ThreadLocal<Object> updateDurationLocal = new ThreadLocal<>();
@Inject(method = "updateDuration", at = @At("HEAD"), cancellable = true)
- Forge mods are remapped, patched, and loaded as full-class Fabric mods.
- Forge mods can be placed in the "mods" folder directly without any issues.
- Forge mods are not replaced, but instead the patched mods are kept in a cache somewhere else.
What we need:
- Two new stages that happen before mixins are applied: "discovery" and "addition" (todo better name for the latter)
discovery:
- Happens after all valid Fabric mods are put on the classpath, but before non-fabric mods are added to the classpath
- Patchwork specifically needs an option to exclude certain jars from being added to the classpath.
- Called "discovery" because this is the stage both Patchwork and Spungbric will use to find the jar files they need to do something with.
addition:
@TheGlitch76
TheGlitch76 / ModProvider.java
Last active April 20, 2020 03:03
interfaces
import java.nio.file.Path;
import net.fabricmc.loader.api.ModContainer;
public interface ModProvider {
/**
* This stage is for scanning a jar and optionally choosing to provide this jar as a /todo link/ ProvidedModContainer.
* No transformations should occur during this stage. This allows Loader to fail hard if two {@link ModProvider}s
* attempt to provide the same modid for a jar.
public class PatchworkModProvider implements ModProvider {
@Override
public void acceptCanidate(ProvidedModCanidateRepresentation representation) {
ModManifest manifest;
try {
manifest = Patchwork.parseManifest(representation.getPath());
} catch (ManifestParseException ex) {
//if its a bad manifest, fail hard
// else: