Skip to content

Instantly share code, notes, and snippets.

View williewillus's full-sized avatar

Vincent Lee williewillus

View GitHub Profile
@williewillus
williewillus / Primer.md
Last active July 16, 2023 03:18
1.8 rendering primer

1.8 Rendering Primer by williewillus (formatted to markdown by gigaherz)

Note: This primer assumes you are using MinecraftForge 1.8.9 build 1670 or above. Correctness not guaranteed otherwise. Note 2: This primer is for 1.8.x. Changes in 1.9 are on another gist: https://gist.github.com/williewillus/e37edde85dc78d2e138c

This guide is intended for those with a clear knowledge of general modding and want a quick up to speed on how new things work. If you are confused, please hop on IRC and ask for help!

Blocks and Items

  • 1.7: EVERY BLOCK SHAPE EVER was hardcoded into RenderBlocks or your ISBRH. Oh God, just look at that class. Actually don’t, if you value your sanity.
@williewillus
williewillus / grammar.js
Last active January 13, 2024 20:09
ProjectE Custom Conversion JSON Grammar
NOTE: For 1.20.4 and above, see the new grammar: https://gist.github.com/pupnewfster/7b5c411635e16227c1dea9af5e20e4c3
{
"comment": <Optional comment describing the file>,
"groups": {
"<name>": <group>, ...
},
"values": {
"before": <valuemap>,
@williewillus
williewillus / primer.md
Last active December 20, 2020 08:13
1.8.9 to 1.9 quick primer
@williewillus
williewillus / grammar.js
Last active November 4, 2017 15:08
loot table grammar
{
"pools": [ <lootpool> ... ] // Every pool is queried by the table the number of times specified in "rolls"
}
-------------
<lootpool> == {
"name": <autogenerated for vanilla pools | table-unique name for this pool>
"conditions": [ <lootcondition> ... ],
"rolls": <randomvaluerange>
@williewillus
williewillus / primer.md
Last active June 15, 2023 03:33
Capabilities: A Primer (tm)

Capabilities

Another award-winning primer by williewillus

Capabilities...a wondrous new system. That you've probably been forced into using. But let's not talk about that and get straight into the learning!

Terms and definitions

  • Capability System - This entire system; what this primer is about. This system is named very literally for what it does.
    • Capability - the quality of being capable; capacity; ability
  • Capable - having power and ability
@williewillus
williewillus / foo.md
Last active April 20, 2019 20:46
1.9.4 te syncing

1.9.4 TE Syncing

Only accurate for 1922+

When the chunk/block data is sent (client receiving chunks from server):

  • getUpdateTag() called serverside to get compound to sync
  • handleUpdateTag() called to handle it clientside
  • what vanilla does
  • Writes ALL data into this tag by calling writeToNBT
@williewillus
williewillus / breakdown.txt
Last active June 20, 2016 20:22
Fluid Cap breakdown
Personal notes for fluid cap and general fluid grokking since this seems really unintuitive to me.
I have not worked with fluids before and the fluid cap seems very baggage-laden to me.
It feels held back by the previous implementation of Fluids,
and is not consistent with the interface of `IItemHandler`, the inventory cap.
Oh well. Here goes.
Classes:
- `IFluidHandler`: The Capability Interface for the fluid cap.

Git - Quick Primer

A fast-paced introduction to version control and git.

What is version control

Version control is maintaining a detailed report of changes that happen to your codebase. Good version control practice allows you to roll back mistakes, work on features in parallel, and combine them into a final product.

How does Git record history?

@williewillus
williewillus / blargh.js
Last active June 13, 2017 08:00
animation api grokking
/*
- Properties.StaticProperty (PropertyBool)
- when true, show the static parts of the model (the non animated ones)
- when false, show the animated parts
- Properties.AnimationProperty (IUnlistedProperty<IModelState>)
- The model is animated by rebaking it using the value of this property
What is a joint?
- basically, part of a model that you'd like to treat as 1 single unit for animation purposes
@williewillus
williewillus / porting.md
Created January 22, 2017 04:57
how to port a mod

Only half-serious, as opposed to 3/4 serious. Take of it what you will.

  1. Update your gradle and mappings. Get it wrong because you forgot to add the branch name.
  2. Commit so you feel good about taking the first step
  3. Rerun setupDecompWorkspace, refresh Gradle project in your IDE.
  4. Try to compile the mod and cry after seeing the error count
  5. Easy renaming time. If a class (or method/field with distinct name) has been renamed, just do a global find/replace. Congrats, you just added 10000 lines to the diff. Commit.
  6. Easy method signature time. If a method has changed arguments, say to add a hand parameter, just do a global find/replace. You DID name your parameters properly, not p_10101101010_xxx, right? ... Oho, you're going to have fun. Commit.
  7. Easy semantic stuff. This is stuff like changing x y z args to BlockPos, ForgeDirection to EnumFacing, etc. Commit per change.
  8. Missing methods. If something you override from vanilla is no longer there, first check the bot to see if it got renamed (!mh