Skip to content

Instantly share code, notes, and snippets.

View Xalcon's full-sized avatar

Xalcon Xalcon

View GitHub Profile
@Daomephsta
Daomephsta / ForgeMavenInterface.java
Created July 12, 2017 05:56
Forge maven and MCPBot interfaces
package leviathan143.fantasticchainsaw.forgemaven;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Arrays;
import java.util.Map;
@LexManos
LexManos / 1-THOUGHTS
Last active September 30, 2018 13:45
1.12 Recipe enhancements
Basic loading.
To be done on ServerInit. This means things will load multiple times on the client.
Benifits:
Allows us to just nuke the custom recipes every server init
Allows us to have save leve overrides.
Primes us for syncing recipe types/contents S->C {Not gunna happen in 1.12, but I expect Mojang to work twards this in 1.13+}
Cons:
Increases single player server load time. No known stats at the moment but shouldn't be TO bad
Loading Process:
@williewillus
williewillus / foo.java
Last active July 4, 2023 01:01
recipe to json dumper
// You can include this in your mod/a pack/whatever you want, as long as that work follows the Mojang EULA.
// The original source is viewable at https://gist.github.com/williewillus/a1a899ce5b0f0ba099078d46ae3dae6e
// This is a janky JSON generator, for porting from below 1.12 to 1.12.
// Simply replace calls to GameRegistry.addShapeless/ShapedRecipe with these methods, which will dump it to a json in RECIPE_DIR
// Also works with OD, replace GameRegistry.addRecipe(new ShapedOreRecipe/ShapelessOreRecipe with the same calls
// After you are done, call generateConstants()
// Note that in many cases, you can combine multiple old recipes into one, since you can now specify multiple possibilities for an ingredient without using the OD. See vanilla for examples.
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
@DeflatedPickle
DeflatedPickle / MinecraftEnergyTypes.md
Last active July 19, 2024 22:21
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
@xiaoyvr
xiaoyvr / Either.cs
Created October 24, 2016 08:47 — forked from siliconbrain/Either.cs
Implemetation of Haskell's Either type in C#
/// <summary>
/// Interface definition of Either
/// </summary>
/// <typeparam name="Tl">type of the Left value</typeparam>
/// <typeparam name="Tr">type of the Right value</typeparam>
public interface IEither<out Tl, out Tr>
{
/// <summary>
/// Check the type of the value held and invoke the matching handler function
/// </summary>
{
"forge_marker": 1,
"defaults": {
"model": "forge:multi-layer",
"custom": {
"base": "yourmod:breaking_block#base",
"Solid": "yourmod:breaking_block#base",
"Translucent": "yourmod:breaking_block#breaking"
},
"transform": "forge:default-block"
{
"forge_marker": 1,
"defaults": {
"model": "forgedebugmodelloaderregistry:scanner.obj",
"custom": { "flip-v": true }
},
"variants": {
"inventory": [{
"transform": {
"firstperson": { "translation": [-0.33, 0.9, -0.33], "rotation": [{ "y": -45 }, { "x": 90 }, { "y": 90 }] },
<blockstate> == {
"forge_marker": 1,
"defaults": <variant>, // optional, added to all variants
"variants": {
"<property>": {
"<value>": <variant> // variant definition for the specified value of this property; variants for multiple values can be specified.
},
"<variant name>": <variant>, // variant definition for the full variant string
"<variant name>": [<variant1>, ...], // array of definitions for the full variant - result will be the random variant
}