Skip to content

Instantly share code, notes, and snippets.

@falseresync
falseresync / dependency.manifesto.packbrew.jsonc
Last active December 4, 2020 15:15
Universal modpack format by false :)
{
"formatVersion": "1.0.0-alpha.1",
"id": "lambdabettergrass",
"meta": {
"name": "LambdaBetterGrass",
"latest": "1.0.1",
"authors": [
{
"name": "LambdAurora",
@falseresync
falseresync / data.txt
Created December 4, 2020 20:05
DFS power grid net average
0 0 0 0 0 0 -3 0 0
0 0 0 0 0 0 x 0 0
0 0 x x x x x x 2
0 0 x 0 x 0 x 0 0
0 0 x 0 x x x x 2
-3 x x 0 0 x 0 0 0
0 0 x x x x 0 0 0
0 0 0 0 0 3 0 0 0
@falseresync
falseresync / stylus.css
Last active October 23, 2021 09:56
Fabric Wiki Fixer
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
body {
background: #f6f5f3;
font-family: Inter;
font-size: 16px !important;
}
#dokuwiki__site {
max-width: 90em;
{
"schemaVersion": 1,
"id": "example",
"version": "<unix timestamp>",
"metadata": {
"displayName": "Example",
"version": "1.0.0-pre.2"
},
"components": [
{
import com.google.common.base.Preconditions;
import net.fabricmc.fabric.api.transfer.v1.storage.Storage;
import net.fabricmc.fabric.api.transfer.v1.storage.StorageView;
import net.fabricmc.fabric.api.transfer.v1.transaction.Participant;
import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction;
import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionResult;
import org.jetbrains.annotations.Nullable;
public class SimpleStorage<T> implements Storage<T>, StorageView<T>, Participant<Long> {
private final long maxAmount;
UpdatesFetcher.instance()
.updateFor("modid") // returns an optional or maybe a future
.ifPresent(update -> {
System.out.println(update.url());
});

Gist of it:

  • Player swapped Apple for callo
  • People got angry about that and called out Player
  • Player responded by silencing people
  • People went crazy shit about silencing and started telling Player all his flaws to the face
  • Player went on a power trip and used the nuclear option: ban and mute 30+ people, he removed several hundreds of messages and managed to kick out of the team several big Fabric and Yarn contributors
  • modmuss left Fabric for a while
  • people are now actually preparing a Fabric fork with better and well defined governance a drop in replacement with decent governance at first, better tech afterwards

Result:

const MODRINTH_API = 'https://staging-api.modrinth.com/v2';
const MODRINTH_DESTINATION = 'https://staging.modrinth.com';
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
@Override
public void render(MagicCauldronBlockEntity entity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {
matrices.push();
var entry = matrices.peek();
var positionMatrix = entry.getPositionMatrix();
var normalMatrix = entry.getNormalMatrix();
var bufferBuilder = vertexConsumers.getBuffer(RenderLayer.getEntitySolid(LAVA_TEX));
bufferBuilder.vertex(positionMatrix,0, 1, 0).color(255, 255, 255,255).texture(0, 0).overlay(OverlayTexture.DEFAULT_UV).light(LightmapTextureManager.MAX_LIGHT_COORDINATE).normal(normalMatrix,0, 1, 0).next();
@falseresync
falseresync / Commands.java
Last active January 28, 2023 20:38
Revelationary commands demo
public class Commands {
public static void register(CommandDispatcher<ServerCommandSource> dispatcher, CommandRegistryAccess registryAccess, CommandManager.RegistrationEnvironment environment) {
var revelationaryNode = CommandManager
.literal("revelationary")
.requires(source -> source.hasPermissionLevel(4))
.build();
dispatcher.getRoot().addChild(revelationaryNode);
var advancementNode = CommandManager.literal("advancement").build();
revelationaryNode.addChild(advancementNode);