Skip to content

Instantly share code, notes, and snippets.

View Xalcon's full-sized avatar

Xalcon Xalcon

View GitHub Profile
@Xalcon
Xalcon / mega_troch.json
Last active June 15, 2017 17:29
Example
{
"conditions": [
{
"type": "mod_loaded",
"mod": "minecraft"
}
],
"type": "minecraft:crafting_shaped",
"group": "torchmaster",
"pattern": [
@Xalcon
Xalcon / PotionBaubles.java
Last active August 1, 2017 09:47
Adds the lingering potions as a bauble to Baubles (Needs capability feature! https://github.com/Xalcon/Baubles/tree/feature/bauble_capability)
package baubles.common;
import baubles.api.BaubleType;
import baubles.api.IBauble;
import baubles.api.cap.BaubleItem;
import baubles.api.cap.BaublesCapabilities;
import baubles.common.Baubles;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@Xalcon
Xalcon / HasTileEntity.java
Created June 3, 2017 09:15
Quick example on auto tileentity registration
package net.xalcon.ecotec.experimental;
import net.minecraft.tileentity.TileEntity;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME) // this means the annotation is available at runtime and will not be stripped by the compiler
public @interface HasTileEntity
{
@Xalcon
Xalcon / reporizer.sh
Last active May 22, 2017 14:51
Copies all mods from the mods folder into a maven style directory structure and creates a mods.txt containing the maven coordinates. This can be used to create a ModList file (https://github.com/MinecraftForge/FML/wiki/New-JSON-Modlist-format). This script requires jq to work (https://stedolan.github.io/jq/)
#!/bin/bash
modsDir=mods/*.jar
repoDir=repo/mods
for file in $modsDir
do
mcmodInfo=`unzip -p "$file" mcmod.info 2> /dev/null`
if [[ $? -ne 0 ]]; then
echo "$file has no mcmeta.info"
continue;