Skip to content

Commit

Permalink
1.2 Update
Browse files Browse the repository at this point in the history
- Fixed infinity armor no clip breaking spectator mode (finally), closes #4

- Corrected wordings on the infinity sword tooltip

- Added GunpowderLib as a required dependency, refactored some codes to call methods from new library
  • Loading branch information
JackyyTV committed Oct 3, 2020
1 parent 1beca12 commit 66f5755
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 140 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Submit any bug reports / suggestions via [issue tracker](https://github.com/Jack
## Contact Me

- Twitter DM - [@JackyyTV](https://twitter.com/JackyyTV)
- Discord DM - Jacky#3044
- Discord DM - Jacky#1234
- Twitch PM - [Jackyy](https://www.twitch.tv/jackyy)
- Reddit DM - [Jacky1356400](https://www.reddit.com/message/compose/?to=Jacky1356400)
- Reddit DM - [JackyyTV](https://www.reddit.com/message/compose/?to=JackyyTV)

---

Expand All @@ -37,7 +37,7 @@ If you would like to set up the workspace yourself to submit PRs of features add
- Decompiled source: `gradlew setupDecompWorkspace`
- Obfuscated source: `gradlew setupDevWorkspace`
- CI server: `gradlew setupCIWorkspace`

3. Either use `gradlew build` to build the jar file (Output is in `build/libs`), or setup the IDE if you are going to modify any codes. Both IntelliJ IDEA and Eclipse are included below since they're more popular IDEs.
- IntelliJ IDEA: Do `gradlew idea`, open the `.ipr` file and import the gradle file, then execute the `genIntellijRuns` task in the "Gradle" tab.
- Eclipse: Do `gradlew eclipse` and open the directory as project.
117 changes: 58 additions & 59 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

Expand All @@ -15,80 +15,79 @@ archivesBaseName = "AvaritiaTweaks"

sourceCompatibility = targetCompatibility = "1.8"
compileJava {
sourceCompatibility = targetCompatibility = "1.8"
sourceCompatibility = targetCompatibility = "1.8"
}

minecraft {
version = "${forge_version}"
runDir = "run"
mappings = "${mappings_version}"
version = "${forge_version}"
runDir = "run"
mappings = "${mappings_version}"

replace '@FINGERPRINT@', project.findProperty('signSHA1')
replaceIn "AvaritiaTweaks.java"
replace '@FINGERPRINT@', project.findProperty('signSHA1')
replaceIn "AvaritiaTweaks.java"
}

repositories {
maven {
name = "JEI Maven"
url = "http://dvs1.progwml6.com/files/maven"
}
maven {
name = "Hwyla Maven"
url = "https://tehnut.info/maven"
}
maven {
name = "CB Maven"
url = "http://chickenbones.net/maven"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name = "CraftTweaker Maven"
url = "http://maven.blamejared.com"
}
maven {
name = "JEI Maven"
url = "https://dvs1.progwml6.com/files/maven"
}
maven {
name = "CB Maven"
url = "http://chickenbones.net/maven"
}
maven {
name = "CoFH Maven"
url = "http://maven.covers1624.net"
}
maven {
name = "Curse Maven"
url = "https://www.cursemaven.com"
}
}

dependencies {
deobfCompile "mezz.jei:jei_1.12.2:+"
deobfCompile "mcp.mobius.waila:Hwyla:+"
deobfCompile "codechicken:CodeChickenLib:1.12.2-+:universal"
deobfCompile "morph.avaritia:Avaritia:1.12-+:universal"
deobfCompile "vazkii.botania:Botania:+:universal"
deobfCompile "mezz.jei:jei_1.12.2:+"
deobfCompile "curse.maven:hwyla:2568751" //1.8.26-B41_1.12.2
deobfCompile "curse.maven:gunpowderlib:2852431" //1.12.2-1.0
deobfCompile "codechicken:CodeChickenLib:1.12.2-+:universal"
deobfCompile("morph.avaritia:Avaritia:1.12.2-+:universal") {
transitive = false
}
deobfCompile "curse.maven:botania:2846950" //r1.10-363
}

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

task signJar(type: SignJar, dependsOn: reobfJar) {
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
onlyIf {
project.hasProperty('keyStore')
}
keyStore = project.findProperty('keyStore')
alias = project.findProperty('keyStoreAlias')
storePass = project.findProperty('keyStorePass')
keyPass = project.findProperty('keyStoreKeyPass')
inputFile = jar.archivePath
outputFile = jar.archivePath
}

build.dependsOn signJar

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
from sourceSets.main.output
classifier = 'deobf'
}

artifacts {
archives deobfJar
archives deobfJar
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx4G
mc_version=1.12.2
forge_version=1.12.2-14.23.2.2611
mod_version=1.1
mappings_version=snapshot_20180204
forge_version=1.12.2-14.23.5.2847
mod_version=1.2
mappings_version=stable_39
6 changes: 3 additions & 3 deletions src/main/java/jackyy/avaritiatweaks/AvaritiaTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public class AvaritiaTweaks {

public static final String MODID = "avaritiatweaks";
public static final String MODNAME = "Avaritia Tweaks";
public static final String VERSION = "1.12.2-1.1";
public static final String VERSION = "1.12.2-1.2";
public static final String MCVERSION = "[1.12,1.13)";
public static final String DEPENDS = "required-after:avaritia;required-after:codechickenlib;after:botania;";
public static final String DEPENDS = "required-after:avaritia;required-after:codechickenlib;required-after:gunpowderlib;after:botania;";
public static final String COMMON_PROXY = "jackyy.avaritiatweaks.proxy.CommonProxy";
public static final String CLIENT_PROXY = "jackyy.avaritiatweaks.proxy.ClientProxy";
public static final CreativeTabs TAB = new CreativeTabs(MODID) {
@Override
public ItemStack getTabIconItem() {
public ItemStack createIcon() {
return new ItemStack(ModTweaks.enhancementCrystal);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jackyy.avaritiatweaks.compat.botania.tile.TileInfinitato;
import jackyy.avaritiatweaks.config.ModConfig;
import jackyy.avaritiatweaks.util.ModUtils;
import jackyy.gunpowderlib.helper.ObjectHelper;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Items;
Expand Down Expand Up @@ -66,7 +67,7 @@ public String getUnlocalizedLoreTextForStack(ItemStack stack) {
}
if (ModConfig.compats.botania.infinitato) {
e.getRegistry().register(infinitato);
GameRegistry.registerTileEntity(TileInfinitato.class, "Avaritia_Infinitato");
GameRegistry.registerTileEntity(TileInfinitato.class, new ResourceLocation(AvaritiaTweaks.MODID, "infinitato_tile"));
}
}

Expand Down Expand Up @@ -116,9 +117,9 @@ public static void initRecipes() {
GameRegistry.addShapedRecipe(
new ResourceLocation(AvaritiaTweaks.MODID, "gaia_ingots_to_block"), null, new ItemStack(gaiaBlock),
"XXX", "XXX", "XXX",
'X', ModUtils.getStackFromName("botania:manaresource", 1, 14)
'X', ObjectHelper.getItemStackByName("botania:manaresource", 1, 14)
);
GameRegistry.addShapelessRecipe(new ResourceLocation(AvaritiaTweaks.MODID, "gaia_block_to_ingots"), null, ModUtils.getStackFromName("botania:manaresource", 9, 14), Ingredient.fromStacks(new ItemStack(gaiaBlock)));
GameRegistry.addShapelessRecipe(new ResourceLocation(AvaritiaTweaks.MODID, "gaia_block_to_ingots"), null, ObjectHelper.getItemStackByName("botania:manaresource", 9, 14), Ingredient.fromStacks(new ItemStack(gaiaBlock)));
}
if (ModConfig.compats.botania.soarleander) {
BotaniaAPI.registerRuneAltarRecipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class BlockGaia extends Block {
public BlockGaia() {
super(Material.IRON);
setRegistryName("gaia_block");
setUnlocalizedName(AvaritiaTweaks.MODID + ".gaia_block");
setTranslationKey(AvaritiaTweaks.MODID + ".gaia_block");
setSoundType(SoundType.METAL);
setHarvestLevel("pickaxe", 3);
setHardness(50.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class BlockInfinitato extends BlockContainer implements ILexiconable {
public BlockInfinitato() {
super(Material.CLOTH);
setRegistryName("infinitato");
setUnlocalizedName(AvaritiaTweaks.MODID + ".infinitato");
setTranslationKey(AvaritiaTweaks.MODID + ".infinitato");
setHardness(0.25F);
setCreativeTab(AvaritiaTweaks.TAB);
}
Expand Down Expand Up @@ -155,7 +155,7 @@ public boolean isNormalCube(IBlockState state) {
return false;
}

@Override
@Override @SuppressWarnings("deprecation")
public EnumBlockRenderType getRenderType(IBlockState state) {
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package jackyy.avaritiatweaks.compat.botania.tile;

import jackyy.avaritiatweaks.util.ModUtils;
import jackyy.gunpowderlib.helper.ObjectHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
Expand All @@ -26,7 +26,7 @@ public void interact(EntityPlayer player, EnumHand hand, ItemStack stack, EnumFa
jump();
if(name.equalsIgnoreCase("shia labeouf") && !world.isRemote && nextDoIt == 0) {
nextDoIt = 40;
world.playSound(player, player.getPosition(), ModUtils.getSoundFromName("botania:doit"),
world.playSound(player, player.getPosition(), ObjectHelper.getSoundByName("botania", "doit"),
SoundCategory.BLOCKS, 2.5F, 0.7F);
}
double radius = 10.5;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/jackyy/avaritiatweaks/compat/jei/JEICompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import jackyy.avaritiatweaks.tweaks.ModTweaks;
import mezz.jei.api.*;
import mezz.jei.api.ingredients.IModIngredientRegistration;
import mezz.jei.api.ingredients.VanillaTypes;
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
import morph.avaritia.init.ModBlocks;
import morph.avaritia.init.ModItems;
Expand All @@ -29,9 +30,9 @@ public void registerCategories(IRecipeCategoryRegistration registry) {
public void register(IModRegistry registry) {
if (ModConfig.compats.jeiCompat) {
if (ModConfig.compats.jei.descriptions) {
registry.addIngredientInfo(ModItems.neutron_pile, ItemStack.class, "desc.avaritiatweaks.neutron_pile");
registry.addIngredientInfo(new ItemStack(ModBlocks.neutron_collector), ItemStack.class, "desc.avaritiatweaks.neutron_collector");
registry.addIngredientInfo(new ItemStack(ModTweaks.enhancementCrystal), ItemStack.class, "desc.avaritiatweaks.enhancement_crystal");
registry.addIngredientInfo(ModItems.neutron_pile, VanillaTypes.ITEM, "desc.avaritiatweaks.neutron_pile");
registry.addIngredientInfo(new ItemStack(ModBlocks.neutron_collector), VanillaTypes.ITEM, "desc.avaritiatweaks.neutron_collector");
registry.addIngredientInfo(new ItemStack(ModTweaks.enhancementCrystal), VanillaTypes.ITEM, "desc.avaritiatweaks.enhancement_crystal");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ItemEnhancementCrystal extends Item implements IHaloRenderItem {

public ItemEnhancementCrystal() {
setRegistryName("enhancement_crystal");
setUnlocalizedName(AvaritiaTweaks.MODID + ".enhancement_crystal");
setTranslationKey(AvaritiaTweaks.MODID + ".enhancement_crystal");
setCreativeTab(AvaritiaTweaks.TAB);
}

Expand All @@ -45,7 +45,7 @@ public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
}

@Override
public EnumRarity getRarity(ItemStack stack) {
public EnumRarity getForgeRarity(ItemStack stack) {
return ModItems.COSMIC_RARITY;
}

Expand Down
Loading

0 comments on commit 66f5755

Please sign in to comment.