Skip to content

Instantly share code, notes, and snippets.

@Caltinor
Caltinor / info.md
Last active April 23, 2021 17:02
PMMO and NBT Compat examples

the files in this Gist include example templates for nbt reqs for various mods. These templates are intended to assist you with the formatting such that you only need to change the PMMO req settings to meet your needs. The hardest part of setting up NBT reqs is getting the nesting correct. Because every mod can add NBT data in their own way, we have to define in our JSON exactly how to get to the specific NBT key that we want to use. This can be exceptionally deep. the silentgear template below is a good example of deep nesting.

@Caltinor
Caltinor / Networking.java
Last active September 2, 2020 21:27
MC 1.14+ networking template
public class Networking {
private static SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(new ResourceLocation("MOD_ID", "net"),
() -> "1.0",
s -> true,
s -> true);
public static void registerMessages() {
int ID = 0;
//Packet list all packets need to be registered
//This type of packect has variables that need to be encoded/decoded to be used on the destination side