Skip to content

Instantly share code, notes, and snippets.

View thebrightspark's full-sized avatar

bright_spark thebrightspark

View GitHub Profile

What are mixins?

Mixins are a way to inject code or change the minecraft source code directly and should be use with caution. If you can do a PR to Forge or use an event, try those first. If all else fails, then mixins may be a good option to look into. Here are some resources for mixins:

Now, I'll be honest, the official mixin doc is kind of terrible to learn from for most people. It's extremely dense and and really only helps people who already knows in-depth bytecode and stuff. But most modders aren't like that and just wants to do small stuff lol. But I'll give you the run-down here. There's a few kinds of mixins that you will encounter quite often.

@kgriffs
kgriffs / string_util.lua
Created May 27, 2020 17:41
Lua string utilities (contains, startswith, endswith, replace, insert)
function string:contains(sub)
return self:find(sub, 1, true) ~= nil
end
function string:startswith(start)
return self:sub(1, #start) == start
end
function string:endswith(ending)
@Andoryuuta
Andoryuuta / cwb_taming.csv
Created September 20, 2019 07:01
A taming table for Cube World Beta (0.9.1-0)
ID Creature TamingItem
0 ElfMale Bait (0 AKA non-tameable)
1 ElfFemale Bait (1 AKA non-tameable)
2 HumanMale Bait (2 AKA non-tameable)
3 HumanFemale Bait (3 AKA non-tameable)
4 GoblinMale Bait (4 AKA non-tameable)
5 GoblinFemale Bait (5 AKA non-tameable)
6 Bullterrier Bait (6 AKA non-tameable)
7 LizardmanMale Bait (7 AKA non-tameable)
8 LizardmanFemale Bait (8 AKA non-tameable)
@DeflatedPickle
DeflatedPickle / MinecraftEnergyTypes.md
Last active July 28, 2025 10:27
A simple table for Minecraft energy types and a matrix for conversion rates.

Minecraft Energy Types


Energy Name Abbreviation Original Mod Version
Anima AM Anima-Mundi 1.11.2
Blutricity BE (NO) Redpower 1.6.4
Charge RP (NO)/Fz? Factorization 1.7.10
Crystal Flux CF Actually Additions 1.12
@SonarSonic
SonarSonic / ForgeStairs.json
Last active November 21, 2019 17:25
Forge Block State for Stairs, using only one file.
{
"forge_marker": 1,
"defaults": {
"model":"stairs",
"textures": {
"bottom":"myMod:blocks/texture",
"top":"myMod:blocks/texture",
"side":"myMod:blocks/texture"
},
"transform":"forge:default-block",
@seriallos
seriallos / gist.lua
Created February 5, 2013 03:42
ComputerCraft program to download gists as programs. Yo dawg.
local tArgs = { ... }
if (#tArgs ~= 3) then
print( "USAGE: gist get GIST_ID PROGRAM_NAME" )
return
end
local action = tArgs[1]
local gist_id = tArgs[2]