From 5c137164b3abf0a91a07bac8f3f463a125a26269 Mon Sep 17 00:00:00 2001 From: JAWolfe04 Date: Fri, 22 Jan 2016 15:14:58 -0600 Subject: [PATCH] Initial Commit Initial Commit --- .gitignore | 19 ++++ Setup.bat | 1 + build.bat | 14 +++ build.gradle | 104 ++++++++++++++++++ build.prop | 6 + builds/[1.7.10]TerraFirmaPunkTweaks-1.00.jar | Bin 0 -> 4593 bytes ...1.7.10]TerraFirmaPunkTweaks-deobf-1.00.jar | Bin 0 -> 4392 bytes .../[1.7.10]TerraFirmaPunkTweaks-src-1.00.jar | Bin 0 -> 2859 bytes .../com/onewolfe/tfptweaks/LogHelper.java | 28 +++++ .../com/onewolfe/tfptweaks/PlayerHandler.java | 36 ++++++ .../com/onewolfe/tfptweaks/References.java | 13 +++ .../tfptweaks/TerraFirmaPunkTweaks.java | 21 ++++ src/main/resources/mcmod.info | 21 ++++ 13 files changed, 263 insertions(+) create mode 100644 .gitignore create mode 100644 Setup.bat create mode 100644 build.bat create mode 100644 build.gradle create mode 100644 build.prop create mode 100644 builds/[1.7.10]TerraFirmaPunkTweaks-1.00.jar create mode 100644 builds/[1.7.10]TerraFirmaPunkTweaks-deobf-1.00.jar create mode 100644 builds/[1.7.10]TerraFirmaPunkTweaks-src-1.00.jar create mode 100644 src/main/java/com/onewolfe/tfptweaks/LogHelper.java create mode 100644 src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java create mode 100644 src/main/java/com/onewolfe/tfptweaks/References.java create mode 100644 src/main/java/com/onewolfe/tfptweaks/TerraFirmaPunkTweaks.java create mode 100644 src/main/resources/mcmod.info diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7323db6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +## gradle +/.gradle +/build +/gradle +/gradlew +/gradlew.bat + +## ForgeGradle +/runClient +/runServer + +## eclipse +/eclipse +/.settings +/.metadata +/.classpath +/.project +/bin +/libs \ No newline at end of file diff --git a/Setup.bat b/Setup.bat new file mode 100644 index 0000000..2b6c557 --- /dev/null +++ b/Setup.bat @@ -0,0 +1 @@ +gradlew.bat setupdecompworkspace eclipse \ No newline at end of file diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..7307289 --- /dev/null +++ b/build.bat @@ -0,0 +1,14 @@ +@echo off + +set WORKDIR=%CD% + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. + +cd /d "%DIRNAME%" + +call gradlew.bat build + +cd /d "%WORKDIR%" + +pause \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..1252864 --- /dev/null +++ b/build.gradle @@ -0,0 +1,104 @@ +buildscript +{ + repositories + { + mavenCentral() + maven + { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + maven + { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + } + dependencies + { + classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + } +} + +// define the properties file +ext.configFile = file "build.prop" + +configFile.withReader +{ + // read config. it shall from now on be referenced as simply config or as project.config + def prop = new Properties() + prop.load(it) + project.ext.config = new ConfigSlurper().parse prop +} + +allprojects +{ + apply plugin: 'java' + apply plugin: 'forge' + apply plugin: 'maven' + + group = config.group_name + version = config.mod_version + archivesBaseName = "[${config.minecraft_version}]${config.mod_id}" + + minecraft + { + version = config.minecraft_version + "-" + config.forge_version + + replaceIn "References.java" + replace "@MOD_VERSION@", config.mod_version + + if(file('../run').exists()) + { + runDir = "../run" + } + else + { + runDir = "" + } + } +} + +dependencies { +} + +//Creates a compiled de-obfuscated jar +task deobfJar(type: Jar){ + from sourceSets.main.output + appendix = 'deobf' +} + +//creates a jar containing only the src +task sourceJar(type: Jar){ + from sourceSets.main.allSource + appendix = 'src' +} + +tasks.build.dependsOn('sourceJar', 'deobfJar') + +processResources +{ + // First we just copy in the mcmod.info file + from(sourceSets.main.resources.srcDirs) + { + include '**/*.info' + include '**/*.prop' + + // replaces + expand ([ + 'mod_version': project.config.mod_version, + 'tfc_version': project.config.tfc_version, + 'minecraft_version': project.config.minecraft_version, + ]) + } + // copy everything else, that we didn't copy before + from(sourceSets.main.resources.srcDirs) + { + exclude '**/*.info' + exclude '**/*.prop' + } +} + +task wrapper(type: Wrapper){ + gradleVersion = '2.2.1' +} \ No newline at end of file diff --git a/build.prop b/build.prop new file mode 100644 index 0000000..2d5d7ad --- /dev/null +++ b/build.prop @@ -0,0 +1,6 @@ +minecraft_version=1.7.10 +forge_version=10.13.4.1558-1.7.10 +tfc_version=0.79.27 +mod_version=1.00 +mod_id=TerraFirmaPunkTweaks +group_name=com.onewolfe.tfptweaks \ No newline at end of file diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-1.00.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-1.00.jar new file mode 100644 index 0000000000000000000000000000000000000000..76f4e06f193077e5d6380b6b8e92c233944a1f86 GIT binary patch literal 4593 zcmb7H2T)Vl8V-omAP|927Nvufgc7P$DN83pq$wp-Q3yy!F(@VUPUtAT_a-7mLRFd+ zr6~vqLR6Hc1qFOz-@ZkC!_Mq?=g!=6zVF^S=P&1j>z*QG1W-~^0ssIm;&}`z02x4E z1EDIaZJ-G~d=3Dd0>E`Cj>Z8<{~859k<3UO@i$pt)j(TQ!x#b4*WA<}9MIDhg^beb ziV6)6j?^28O-R07UR);qQ@k#abe)|@WhI^`i<1%G+PS$x|IH84{>5=aIrzG{I6C|* zGWb`rm!rFvuLJU?=f9HSKUqf4%}L9_#ofUJV&{VN^u#9JG#*!B#LRzclY&E--{p}C zrR1qIv@$_Yv$^vd6(h1n4QFda@55%PE*w~X)#znCAUPE5ODb48En#$VT=CPL9sd!z zC(m}zTep*#^-6a|b6qWK&@i>2&25Qknq}HwHGApcdDYByfwz+db7qgqR1_uiQs)59 zf&yK}bXsSov?{3C4mIfS%BjIRYKl4U+mnkIu-LBO_a781wnkKHRq$m3%l$3o^|6m0 z-{M3hX7Do=H+z)e7uC%)4qOa-LKQLB^kvUX>J|6QdwtAL&#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oc*Hk;SZT6J1V?js>Z>t9t*NM0QgKRS_11#2RNkD~(idJ{mk=QU zQ5D{Hc6|Ex`IU{Tf~~JTs=GH}n8DO++wizJVB>@_>=+pf`JV+P=_`?p0kEKUaQ#PK z9)%s1mj})VmKP>WI{yRvMQr}ca8xfIXv)9sVBuS&+XIF9{}2ZX^KUyqJS5#7ApX&t zze4|)-aLe2k3tXC=TVZQ>ho`sgFWy4ndFETJ<54>;6LOfkRRF8FE94rByhl6rQPQJb;gHmklu*9~;P7St+#`Oa|6kR5NH0zb_hIcC!zfAm|Dd920WGA; JHadCm^e?o>F~9%- literal 0 HcmV?d00001 diff --git a/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.00.jar b/builds/[1.7.10]TerraFirmaPunkTweaks-src-1.00.jar new file mode 100644 index 0000000000000000000000000000000000000000..eeda877535c55bb360ef2c11be9bb35dc68bae10 GIT binary patch literal 2859 zcmaJ@2{@E%8y<$CEXgjiWG|yhk}RX7K{J!Fv|uXRV9aKhLzWte-_}eADM~Sxa55-F zS&r1POCd)>vP?$h6lFQ*n@)d&pZ~e8@0)9`>$&gmz3%6EpZmce!F-!RAVEQpUWkDe z2nb%z3y4j?gFfPL2x@%{u^SA+tV(1?^0MWD1UcZ5T$zYIbj%uY#NI&{jhIEZwxEzu z-7XO%bZ2{ON0}Y0XYZS_kulyCWDf!jtOO*j`o94rHo&KWvw%qMB#MVFp6p2>T{&da z2osK(S(38--EXAs%H9krpLi@O4R3BcvWJi;af6RqxE#`b)%+E0G;FAB`$K|7M7Pl_ zRYfrhY($$IA@AMG^nV|(SK!UmP=(#y%RCP6+81%58dCKYZ0#spIao&$V5V7L zYnvGDJFO^r2YDz#s;R#;J*~31QR%UJ%XQt3FW*%E+UN0E;V^HeSMuKtaRWTptzYL0 zE>vXO)fi^oR~sw%q<^tqHucKO+A8S%dp)zFAT2C5PJwmw%pMFDBKun6onl9OkvPO8 zg{NDv>2A_-xNh&g+oh#q6=}RCsES95+DeUulb9FWPxfe=?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|hD-N&UQs=Jp&iRLi7YDksZB%hRvzpViO5Qe;A8=DdU9p?hD)6{akFvw(!`SQ5X5!>d?sI)B`Ua>J$3- zV9lndWN2RR+0^mMXwg6kUmh~U>C6?mDN%|YtW_;YwATe%Og$bL)=AnfkFZn_%_wOK zI=S_L&76jbIn}9qh*e+uP$x-Y)bzF)mVPs}Ycp9^Q?vJN*t48Jf4%#;EneRKy@I*K+}gfzdyH(wXn5Y1}B*lInkVf z_!G8b=UBqjeT*PBgT r+GqS5(yp0QD>>J@(_GFm$cCI7-f#?(A3$-I(aoU8fO;ncIsg6v$zvbu literal 0 HcmV?d00001 diff --git a/src/main/java/com/onewolfe/tfptweaks/LogHelper.java b/src/main/java/com/onewolfe/tfptweaks/LogHelper.java new file mode 100644 index 0000000..963ae9d --- /dev/null +++ b/src/main/java/com/onewolfe/tfptweaks/LogHelper.java @@ -0,0 +1,28 @@ +package com.onewolfe.tfptweaks; + +import cpw.mods.fml.common.FMLLog; +import org.apache.logging.log4j.Level; + +public class LogHelper +{ + public static void log(Level logLevel, Object object) + { + FMLLog.log(References.ModName, logLevel, String.valueOf(object)); + } + + public static void all(Object object){ log(Level.ALL, object); } + + public static void debug(Object object){ log(Level.DEBUG, object); } + + public static void error(Object object){ log(Level.ERROR, object); } + + public static void fatal(Object object){ log(Level.FATAL, object); } + + public static void info(Object object){ log(Level.INFO, object); } + + public static void off(Object object){ log(Level.OFF, object); } + + public static void trace(Object object){ log(Level.TRACE, object); } + + public static void warn(Object object){ log(Level.WARN, object); } +} \ No newline at end of file diff --git a/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java b/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java new file mode 100644 index 0000000..91ecc2c --- /dev/null +++ b/src/main/java/com/onewolfe/tfptweaks/PlayerHandler.java @@ -0,0 +1,36 @@ +package com.onewolfe.tfptweaks; + +import java.util.Random; + +import com.bioxx.tfc.api.TFCBlocks; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.player.EntityItemPickupEvent; + +public class PlayerHandler +{ + @SubscribeEvent + public void onItemPickup(EntityItemPickupEvent event) + { + EntityItem item = event.item; + ItemStack is = item.getEntityItem(); + EntityPlayer player = event.entityPlayer; + Item droppedItem = is.getItem(); + + if(droppedItem.equals(Item.getItemFromBlock(Blocks.chest))) + { + item.delayBeforeCanPickup = 100; + item.setDead(); + item.setInvisible(true); + Random rand = player.worldObj.rand; + player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); + + player.inventory.addItemStackToInventory(new ItemStack(TFCBlocks.chest, 1, 0)); + } + } +} diff --git a/src/main/java/com/onewolfe/tfptweaks/References.java b/src/main/java/com/onewolfe/tfptweaks/References.java new file mode 100644 index 0000000..38b300c --- /dev/null +++ b/src/main/java/com/onewolfe/tfptweaks/References.java @@ -0,0 +1,13 @@ +package com.onewolfe.tfptweaks; + +public class References +{ + public static final String ModID = "terrafirmapunktweaks"; + public static final String ModName = "TerraFirmaPunk Tweaks"; + + public static final String MODID_TFC = "terrafirmacraft"; + public static final String MODNAME_TFC = "TerraFirmaCraft"; + + public static final String ModVersion = "@MOD_VERSION@"; + public static final String ModDependencies = "required-after:" + MODID_TFC; +} diff --git a/src/main/java/com/onewolfe/tfptweaks/TerraFirmaPunkTweaks.java b/src/main/java/com/onewolfe/tfptweaks/TerraFirmaPunkTweaks.java new file mode 100644 index 0000000..24db768 --- /dev/null +++ b/src/main/java/com/onewolfe/tfptweaks/TerraFirmaPunkTweaks.java @@ -0,0 +1,21 @@ +package com.onewolfe.tfptweaks; + +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.common.MinecraftForge; + +@Mod(modid = References.ModID, name = References.ModName, version = References.ModVersion, dependencies = References.ModDependencies) +public class TerraFirmaPunkTweaks +{ + @EventHandler + public void init(FMLInitializationEvent event) + { + } + + @EventHandler + public void initialize(FMLInitializationEvent event) + { + MinecraftForge.EVENT_BUS.register(new PlayerHandler()); + } +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000..d2e205a --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,21 @@ +{ + "modListVersion": 2, + "modList": [{ + "modid": "terrafirmapunktweaks", + "name": "TerraFirmaPunk Tweaks", + "description": "Various tweaks for TerraFirmaPunk.", + "version": "${mod_version}", + "mcversion": "${minecraft_version}", + "url": "", + "updateUrl": "", + "authorList": [""], + "credits": "", + "logoFile": "", + "screenshots": [], + "parent": "", + "requiredMods": [], + "dependencies": ["terrafirmacraft"], + "dependants": [ ], + "useDependencyInformation": "true" + }] +}