Skip to content

Instantly share code, notes, and snippets.

View TheCurle's full-sized avatar
😉
Did somebody say "new project"?

Curle TheCurle

😉
Did somebody say "new project"?
View GitHub Profile

Governance of the NeoForged project

The NeoForged project is split between github and discord. It is a community of volunteers, maintaining a free and open source ecosystem of modifications to the game Minecraft.

What this document is

This document is:

  • A non-exhaustive list of the working principles of the project.
  • Intended to help direct the project in times of uncertainty.
@TheCurle
TheCurle / MyCapability.java
Last active July 27, 2023 15:34 — forked from niklaswimmer/MyCapability.java
Getting Started with Capabilities: a practical example
public class MyCapability {
public static final Capability<MyCapabilityInterface> INSTANCE = CapabilityManager.get(new CapabilityToken<>() {});
public static void register(RegisterCapabilitiesEvent event) {
event.register(MyCapabilityInterface.class);
}
private MyCapability() {
}

Log4J CVE Advisory

The Problem

Log4J has a feature called Java Naming and Directory Interface (shortened to JNDI in this document), which allows a Java program to reach out to an external source to gather data.
If you put a section of text containing ${jndi:query} into the log, the Log4J library will try to resolve the query.
This can be combined with the Lightweight Directory Access Protocol (LDAP) to connect to a remote server.

However, because JNDI is built for retrieving data, and JNDI is a Java program, if you put a JNDI query using LDAP into a log, it will connect to the given site, download a file, and then execute it.
This is called Remote Code Execution.

@TheCurle
TheCurle / forge.xml
Last active December 11, 2021 02:18
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang.util">
<Appenders>
<Console name="FmlSysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %replace{%msg}{(?i)\u00A7[0-9A-FK-OR]}{}%n" />
</Console>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %replace{%msg}{(?i)\u00A7[0-9A-FK-OR]}{}%n" />
</Console>
<Queue name="ServerGuiConsole" ignoreExceptions="true">
[b]Forge Version:[/b] 38.0.0
[b]Minecraft Version:[/b] 1.18
[b]Downloads:[/b]
[ul]
[li][b]Changelog:[/b] [url=https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.18-38.0.0/forge-1.18-38.0.0-changelog.txt](Direct)[/url]
[li][b]Installer:[/b] [url=https://adfoc.us/serve/sitelinks/?id=271228&url=https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.18-38.0.0/forge-1.18-38.0.0-installer.jar](AdFocus)[/url] [url=https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.18-38.0.0/forge-1.18-38.0.0-installer.jar](Direct)[/url]
[li][b]MDK:[/b] [url=https://adfoc.us/serve/sitelinks/?id=271228&url=https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.18-38.0.0/forge-1.18-38.0.0-mdk.zip](AdFocus)[/url] [url=https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.18-38.0.0/forge-1.18-38.0.0-mdk.zip](Direct)[/url]
[/ul]
[b]Intro:[/b]
@TheCurle
TheCurle / Info.md
Last active December 22, 2023 00:25
[ForgeGradle] Updating the old toolchains; a why, how, and where.

RetroGradle

RetroGradle is an initiative to update the older ForgeGradle toolchains (1.x to 2.3) and the Minecraft versions associated with them, to use the more modern ForgeGradles (3.x and 4.x).
To do that requires a lot of time and scripting, but nothing is "complex".

1.12

The update for 1.12 to the FG3 toolchain is the benchmark for how we're going to do the other versions.
The repo update itself can be found here. The largest change here is the build.gradle script. You'll notice that it looks almost identical to the 1.16.x buildscript, with a few minor differences.
Those being, the MCP version (we'll get to that), the run configs using legacydev.Main(Client/Server) rather than userdev.Main, and some other small adjustments to make 1.12 happy.

@TheCurle
TheCurle / 1.txt
Created March 27, 2021 21:56
[purpuri logs]
****************
Starting Execution
*****************
Execution frame 0, stack begins 0
Executing TestCaseFinalFieldInterface::EntryPoint
@TheCurle
TheCurle / a.txt
Created March 27, 2021 21:51
[gdb log]
34 ObjectMap.emplace((size_t) object.Heap, (size_t) ClassObj);
(gdb) s
std::map<unsigned long long, unsigned long long, std::less<unsigned long long>, std::allocator<std::pair<unsigned long long const, unsigned long long> > >::emplace<unsigned long long, unsigned long long> (this=0x6efcb8, __args#0=@0x6efa28: 3,
__args#1=@0x6efa20: 14778624) at C:/bin/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/stl_map.h:575
575 { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); }
(gdb) s
std::forward<unsigned long long> (__t=@0x6efa20: 14778624)
at C:/bin/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/move.h:75
75 { return static_cast<_Tp&&>(__t); }
(gdb) s
@TheCurle
TheCurle / compile.log
Created March 12, 2021 21:15
[BS First Chroma Compile] #BS #Chroma
$ node bs/Entry.js
Parsing file tree C:/Users/Owner/Desktop/Codings/BS/Chroma/chroma/inc/ from $root/Chroma/chroma/inc/
Appending absolute file C:/Users/Owner/Desktop/Codings/BS/Chroma/chroma/inc/ to source set inc
Parsing file tree C:/Users/Owner/Desktop/Codings/BS/Chroma/font.o from $root/Chroma/font.o
Appending absolute file C:/Users/Owner/Desktop/Codings/BS/Chroma/font.o to source set font
Parsing file tree C:/Users/Owner/Desktop/Codings/BS/Chroma/linker.ld from $root/Chroma/linker.ld
Appending absolute file C:/Users/Owner/Desktop/Codings/BS/Chroma/linker.ld to source set linkerscript
Parsing file tree C:/Users/Owner/Desktop/Codings/BS/Chroma/global/crt0.o from $root/Chroma/global/crt0.o
Appending absolute file C:/Users/Owner/Desktop/Codings/BS/Chroma/global/crt0.o to source set preamble
Parsing file tree C:/Users/Owner/Desktop/Codings/BS/Chroma/global/crti.o from $root/Chroma/global/crti.o
@TheCurle
TheCurle / c.js
Last active March 12, 2021 21:01
[BS plugin for CXX] #BS
const child = require("child_process");
const fs = require("fs");
let defaultCompiler = "gcc";
let tempDir;
let defaultLinkFlags = "%.o"
let defaultOutput = "$name"
let linkCache = "";