Skip to content

Instantly share code, notes, and snippets.

View TheGlitch76's full-sized avatar

glitch TheGlitch76

  • United States
  • 06:39 (UTC -05:00)
View GitHub Profile
@TheGlitch76
TheGlitch76 / Dockerfile
Created October 1, 2020 01:54
Distcc daemon for running gentoo on a raspberry pi
FROM gentoo/portage:latest as portage
FROM gentoo/stage3-amd64:latest as gentoo
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
RUN emerge -1q crossdev
RUN USE="${USE} crossdev" emerge -1q distcc
RUN mkdir -p /var/db/repos/localrepo-crossdev/{profiles,metadata} && \
echo 'crossdev' > /var/db/repos/localrepo-crossdev/profiles/repo_name && \
echo "masters = gentoo" > /var/db/repos/localrepo-crossdev/metadata/layout.conf && \
chown -R portage:portage /var/db/repos/localrepo-crossdev
RUN mkdir -p /etc/portage/repos.conf

Mixin style proposals

Mixin is a powerful bytecode manipluation tool, but despite Mumfrey's best attmepts to not let you shoot yourself in the foot, Mixin's defaults can cause all sorts of tiny, hard to catch problems to crop up in the kind of transformations common in Minecraft modding.

Ordinals

By default, Mixin has an ordinal of -1. This means that every instance of an @At injection point is matched.

Unless you are explicitly trying to target every instance, an ordinal must be provided.

If your ordinal is greater than 1 you must use a slice. The slice may have a higher ordinal than 1, but should use a point that is both as close to your injection point as possible and has the smallest ordinal.

@TheGlitch76
TheGlitch76 / a_1.16.4.txt
Last active January 2, 2021 03:29
SpecialBunny statistics
collected 2021-01-02 at 02:30 UTC
Total mods: 2781
Total mods using MCreator: 97 (5.0% of Forge mods)
Total mods with core mods: 56 (2.9% of Forge mods, 3.0% excluding MCreator)
Total mods with access transformers: 471 (24.5% of Forge mods, 25.9% excluding MCreator)
Forge mods using Mixins: 220 (11.4% of Forge mods, 12.1% excluding MCreator)
Fabric mods using Mixins: 728 (85.9% of Fabric mods)
Fabric: 847 (30.4%) Forge: 1915 (68.8%) Both: 14 (0.5%) Forge 1.12 or below: 1 (0.0%) Neither: 4 (0.1%)
// thank HalfOfTwo for this monstrosity
public class Scanner implements PreLaunchEntrypoint {
private static final Field ACTIVE_TRANSFORMER, MIXIN_TRANSFORMER;
static {
Transformer.init();
System.out.println("I am become Mass ASM, destroyer of LexManos");
try {
public interface Duck {
@AutoImplement(Helper.class) // allowed at class or method level
void shim(Bar someArg);
@ManualImplement // to opt out in the case of class-level annotation, assumed by default otherwise
void implementedByMixin();
}
2e664a88ff499689d61d4cafd3ea5a3a80b2702864c11e8d7e2475e13296a839