Skip to content

Instantly share code, notes, and snippets.

View williambl's full-sized avatar
🕶️
I may be slow to respond.

Will BL williambl

🕶️
I may be slow to respond.
View GitHub Profile
@williambl
williambl / amd-dpm-fix.sh
Last active September 6, 2017 11:21
Changes AMD DPM values to prevent crashes in certain games, including HL2, TF2, L4D2, Garry's Mod, KSP, Stellaris, and CSGO. Run as sudo.
echo 'high' > '/sys/class/drm/card0/device/power_dpm_force_performance_level'
echo 'performance' > '/sys/class/drm/card0/device/power_dpm_state'
@williambl
williambl / Playing and stopping
Last active December 6, 2019 17:44
MovingSound
/*
* Play a moving sound
* Adapted from: https://github.com/williambl/EssentialFeatures/blob/e77a8cd31f80543c9210e9bfac2431d2b92a1cdf/src/main/java/com/williambl/essentialfeatures/client/DistHelper.java
* @Author Willbl3pic
*/
public void playMovingSoundWithDisc(MusicDiscItem disc, PlayerEntity player) {
Minecraft.getInstance().getSoundHandler().play(
new MovingSound(
player,
disc.getSound()

Keybase proof

I hereby claim:

  • I am williambl on github.
  • I am williambl (https://keybase.io/williambl) on keybase.
  • I have a public key ASDYrjg0rqSpNC2dEFtr3IR4kPfwR7qWcHy60vGgmrIONwo

To claim this, I am signing this object:

@williambl
williambl / history.md
Last active May 27, 2023 15:59
History of Fabric

[13:13] Prospector: modmuss started OML (open mod loader) which was targeting minecraft 1.10, as a project mostly for fun. a bunch of people jumped on board with it

[13:14] Prospector: there was a big problem with this project, and that was that it didn't really do anything better than forge. like there was a list of events people wanted to add and it was basically just the forge event list lol

[13:14] Prospector: there weren't very many...new ideas with it

[13:14] Prospector: other than the fact that it used an open set of mappings, instead of MCP (called Open Mappings I believe)

[13:16] Prospector: OML pretty much died, and as 1.11 snapshots were rolling around, asie and modmuss started Fabric (after 2 name changes, Chorus and Prismarine) to play with these snapshots because some interesting changes were being made to the code, specifically to itemstacks. Fabric was determined to do things differently, using a modular approach, so you had fabric-loader, fabric-event-entity, fabric-resources, fabric-comm

10:57:16: Executing task 'jar --debug'...
10:57:16.916 [INFO] [org.gradle.launcher.daemon.server.exec.LogToClient] The client will now receive all logging from the daemon (pid: 3046). The daemon log file: /home/william/.gradle/daemon/4.9/daemon-3046.out.log
10:57:16.916 [INFO] [org.gradle.launcher.daemon.server.exec.LogAndCheckHealth] Starting 8th build in daemon [uptime: 5 mins 26.227 secs, performance: 99%]
10:57:16.916 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has started executing the build.
10:57:16.916 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] Executing build with daemon context: DefaultDaemonContext[uid=bd0a4252-2fd4-4157-895b-a74f21c69e5f,javaHome=/usr/lib/jvm/java-8-adoptopenjdk,daemonRegistryDir=/home/william/.gradle/daemon,pid=3046,idleTimeout=10800000,daemonOpts=-Xmx1G,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]
10:57:16.917 [INFO] [org.gradle.internal.work.DefaultWorkerLeaseService] Using 4 worker leases.
10:57:16.
@williambl
williambl / AAAAAA.zip
Last active August 20, 2024 17:34
some shader packs for 21w10a
@williambl
williambl / uuids.sh
Created October 14, 2022 13:18
sh one-liner to transform list of mc player names into uuids (usage: `./uuids.sh inputfile outputfile`)
#!/bin/sh
cat $1 | sort | uniq | xargs -I USERNAME curl -s "https://playerdb.co/api/player/minecraft/USERNAME" | jq --raw-output .data.player.id > $2
@williambl
williambl / new-data-functions.md
Last active August 28, 2023 21:59
Why I rewrote data-functions (again)

Limitations & Requirements

So the limitations with the previous system were:

  • context arguments sometimes being mentioned and sometimes not is a bit confusing
  • every function's input / output types are set in stone at registration. this means that when making a function like if-else, you have to create and register it for both booleans and numbers
  • mostly due to the point above, the only things a function can output are booleans and numbers, and adding another type that a function can output would involve making another Registry
  • the design of the code weighed too heavily towards making datagen "easier" (i.e. making red squiggly lines appear if you screw up the types) by providing a factory function for each DFunctionType, resulting in massive type signatures where even the simplest looked like DFunctionType<Boolean, ? extends Function<ContextArg<Entity>, ? extends DFunction<Boolean>>>. This also resulted in the huge DFunctionImplementations class.
  • there was no way to create objects from JSON i