Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View AbrarSyed's full-sized avatar

Abrar Syed AbrarSyed

View GitHub Profile
@AbrarSyed
AbrarSyed / gist:7244604
Last active July 24, 2017 11:54
New features planned for SecretRoomsMod

FE support

Storing the owner of a Secret Block (username). This can be used for permission checking in the /srm-show command... This should also be used in the CamoGate, where the setting of the blocks can post block events.

New Features

  • Anti-Camo Dust Thrown in the air. Shows camo blocks for a limited amount of time (5 seconds? 10 seconds?)
  • Anti-Camo Cannon Shoots camo dust (high consumption, a stack a second?) and permanently shows camo blocks, until they are re-camoed by right-clicking with camo-paste.
@AbrarSyed
AbrarSyed / ApplyCsv.groovy
Last active August 29, 2015 13:56
A script to help out with people updating their MCP mappings.
import java.util.Map;
import java.util.regex.Matcher;
// args[] is an array of the arguments..
// should be..
// srcDIr MethodCsv FieldCsv
// define constants
def METHOD = /func_[0-9]+_[a-zA-Z_]+/
def FIELD = /field_[0-9]+_[a-zA-Z_]+/
import groovy.json.JsonSlurper
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
// This script renames files in the specified directory that have the name format something-something-version.ext
// they will be renamed to something-0something-mcversion-version.ext
// the mcversion information is taken from the mcmod.info file in each file.
// Files that do not follow the above naming convention, or do not have an mcmod.info file are ignored.
// takes 1 arg, jarDir.
@AbrarSyed
AbrarSyed / bootstrap.gradle
Last active January 18, 2018 00:36
This makes gradle compile java6 stuff with the actual java 6 classpath. --- Usage: Drop this file in USER_HOME/.gradle/init.d --- You will probably want to change the path to your java6 instance.
allprojects {
afterEvaluate {
def versions = [
'1.6' : "/usr/lib/jvm/java-6-jdk/jre/lib/",
'1.7' : "/usr/lib/jvm/java-7-openjdk/jre/lib/",
//'1.7' : "C:/Program Files/java/jre7/lib", // windows example (I think)
'1.8' : "/usr/lib/jvm/java-8-openjdk/jre/lib/"
]
// convert map to classpaths
@AbrarSyed
AbrarSyed / build.gradle
Last active August 29, 2015 13:58
A quick gist for how you partially sign a jar
jar {
from(sourceSets.main.output) {
include 'myPackages/**'
}
// set temp location
destinationDir = file("build/tmp")
archiveName = "signed.jar"
// sign it.
@AbrarSyed
AbrarSyed / update.sh
Created April 28, 2014 20:03
Update forgecraft
#! /bin/bash
game=some/place #/home/abrarsyed/pahicraft/ForgeCraft2_mc
seafile=some/other/place #/home/abrarsyed/pahicraft/instances/ForgeCraft2
# just to be sure
mkdir -p $game/config $game/mods $game/hats $game/resourcepacks
#sync mods and configs and hats
rsync -r --delete $seafile/mods $game
public interface IMultiBlockHandler
{
public void addMember(World world, int x, int y, int z);
public void addSpecialHandler(Object obj);
}
@AbrarSyed
AbrarSyed / build.gradle
Last active August 29, 2015 14:02
Put these in a folder, clone projects to that folder to your hearts content. Then run ```` gradle build``` and all the mods will be built and put in the output folder for you. DISCLAIMER: may not work perfectly for all mods
task build
task clean
task setup
ext.output = new File(rootProject.projectDir, "output")
subprojects {
afterEvaluate {
// not using ForgeGradle? skipping you.
if (!hasPlugin("forge") && !hasPlugin("fml") && !hasPlugin("liteloader"))
@AbrarSyed
AbrarSyed / ModjamBuild.gradle
Last active August 29, 2015 14:03
A Starter build.gradle for people to use for Modjam
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"