Skip to content

Instantly share code, notes, and snippets.

@Barteks2x
Barteks2x / liveMcpMappings.sh
Last active July 2, 2019 16:27
A script to start local maven sfile server with live MCPBot exports. Use channel "live" and version number shown just before starting HTTP server in buildscript, add maven repository with URL "http://127.0.0.1:8000/". If everything is working, you should see the mappings file being accessed in HTTP server output.
#!/bin/bash
tmp_dir=$(mktemp -p "" -d -t liveMcpMappings-XXXXXXXXXX)
version_string=$RANDOM
echo Downloading live mappings to temporary directory $tmp_dir
cd $tmp_dir
wget -o /dev/null http://export.mcpbot.bspk.rs/fields.csv || echo "Downloading field.csv failed"
wget -o /dev/null http://export.mcpbot.bspk.rs/methods.csv || echo "Downloading methods.csv failed"
wget -o /dev/null http://export.mcpbot.bspk.rs/params.csv || echo "Downloading params.csv failed"
configurations {
attachSource
}
def loadSourcePaths() {
def result = new HashMap<String, String>()
configurations.attachSource.each {
def depFile = file(it)
def filename = depFile.getName()
def tmpRes = 'build/dependencyATs'
sourceSets.main.resources.srcDirs += [tmpRes]
configurations.compile.copy().each { file ->
logger.lifecycle "Processing ${file.path}..."
copy {
from(zipTree(file.path)) {
include '*_at.cfg'
}
into(tmpRes)
@Unh0lyTigg
Unh0lyTigg / build.gradle
Created July 20, 2014 11:25
custom source attachment for CBs mods
configurations {
attachThisSource
}
dependencies {
compile 'codechicken:CodeChickenCore:1.7.10-1.0.2.11:dev'
compile 'codechicken:CodeChickenLib:1.7.10-1.1.1.95:dev'
compile 'codechicken:ForgeMultipart:1.7.10-1.1.0.297:dev'
compile 'codechicken:NotEnoughItems:1.7.10-1.0.2.28:dev'
attachThisSource 'codechicken:CodeChickenCore:1.7.10-1.0.2.11:src'
package com.examplemod.network;
import io.netty.buffer.ByteBuf;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;