Skip to content

Instantly share code, notes, and snippets.

@RubenVerg
Created December 26, 2020 18:47
Show Gist options
  • Save RubenVerg/4ec3bc601ce803182d7342a5ecd10de2 to your computer and use it in GitHub Desktop.
Save RubenVerg/4ec3bc601ce803182d7342a5ecd10de2 to your computer and use it in GitHub Desktop.
:()
interface BlockRegistrar {
public static net.minecraft.block.Block BLOCK = null;
public static void registerBlock(net.minecraft.util.Identifier name) {
// whatever
}
}
class SomeBlockReg implements BlockRegistrar {
public static net.minecraft.block.Block BLOCK = new SomeBlock();
public static void register(String prefix) {
net.minecraft.util.Identifier name = ident(prefix, __, "some_block");
registerBlock(name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment