Skip to content

Instantly share code, notes, and snippets.

View hilburn's full-sized avatar

hilburn hilburn

View GitHub Profile
@hilburn
hilburn / General topics
Last active January 6, 2016 05:20
Modding Tutorial Series
1. Setting up the environment - git, Gradle and base mod file.
2. My first things - an exploration of Items, Blocks, ItemBlocks (mebbe), and recipes
3. More interesting blocks - blocks that do things - redstone interactions, crops, maybe a simple fluid/block, things like that.
4. Witchcraft - advanced items - looking at the different ways to get items to do stuff, maybe make some tools and weapons? custom food?
5. Intro to Events - what can they do for me?
6. Configs - letting users have their way with your precious creation
7. Inventories and basic tile entities
8. Packets and preventing sync issues
9. Guis and Containers - when, how and why to use them.
10. Custom recipes (both crafting and machine) and NEI integration
function toExcel = cal_run_analyzer(filename, col_pressure, col_value, run_start)
[time, data, pressure] = load_data(filename, col_pressure, col_value);
if (isdatetime(time))
time = datenum(time);
end
run_length=400;
result=[];
run=1;
while run_start+run_length < length(data)
if data(run_start) < 50 && data(run_start+10)>50 && data(run_start+50) > 100 && data(run_start+50)<200 && data(run_start+200)>300
package advancedsystemsmanager.commands;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
public class NBTRecipe implements IRecipe
private boolean checkHorizontal(World world, int x, int y, int z) {
ForgeDirection[] VALID_DIRECTIONS = new ForgeDirection[] {
ForgeDirection.NORTH, ForgeDirection.SOUTH,
ForgeDirection.EAST, ForgeDirection.WEST };
for (ForgeDirection dir : VALID_DIRECTIONS) {
int newX = x + dir.offsetX;
int newZ = z + dir.offsetZ;
//Checks adjacent blocks
if (world.getBlock(newX, y, newZ) != Register.BlockMaterials
@hilburn
hilburn / gist:62503d7e1a628c6b3f62
Last active August 29, 2015 14:07
containsWord
public static boolean containsWord(String s, String word) {
Pattern pattern = Pattern.compile("\\s"+word+"[\\s]|\\s"+word+"$|^"+word+"\\s|^"+word+"$");
Matcher matcher = pattern.matcher(s);
return matcher.find();
}