Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / RevertNewLayout.md
Last active June 27, 2024 20:26
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
@lukebemish
lukebemish / accessor_vs_at.md
Last active January 2, 2024 20:09
Accessor/Invoke mixins vs AWs/ATs - Which to pick and which is safer?

Accessor/Invoke mixins vs AWs/ATs - Which to pick?

You have realized, for some reason or another, that you need access to something in the vanilla code base that has a big old "private", "final", "protected", or simply conspicuous lack of "public" on it. This generally speaking isn't great, but modding frameworks (Fabric/Quilt and [Neo]Forge) provide several ways to get at private values - there are a special sort of mixin, known as "accessors", which are generally speaking safer than normal mixins and can "access" otherwise private stuff (plus doing a few more things... I'll get to that), and then there are access wideners (fabric/quilt) and access transformers ([neo]forge), which are basically a big file you list things you want transformed in; forgegradle or loom them transforms the things the way you want in your development environment and at runtime. This short gist is written as a primer on the different options, the differences between them, which you should use when, and how to be as certain as

@GizmoTheMoonPig
GizmoTheMoonPig / Materials.md
Last active April 19, 2024 00:36
Materials: where did they go?

Starting in 1.20, the Material class has completely disappeared and has been replaced with a series of properties that are chained to BlockBehavior.Properties.of. This list exists so you can easily figure out which propeties to use to replace the old materials.

Every Material here gives its default MapColor (previously known as MaterialColor), regardless of if it had one or not. It also defines which properties to use to replicate the exact behavior used previously.

The very bottom of this file defines the more complicated replacements to certain material properties.

  • AIR - No MapColor, replaceable
  • STRUCTURAL_AIR - No MapColor, replaceable
  • PORTAL - No MapColor, PushReaction.BLOCK
  • CLOTH_DECORATION - MapColor.WOOL, ignitedByLava