Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# General use .gitignore for Minecraft modding.
# gradle

# Directories
/.gradle/
/build/
/eclipse/
/run/
/out/
/asm/
/bin/
/.idea/
/.metadata/
/.settings/
/libs/
.gradle/
build/
out/
classes/

# File Extensions
*.psd
# idea

.idea/
*.iml
*.ipr
*.iws
*.classpath
*.project
*.class

# Specific files
Thumbs.db
# vscode

.settings/
.vscode/
bin/
.classpath
.project

# fabric

run/
27 changes: 24 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.matthewprenger.cursegradle" version "1.4.0"
id 'fabric-loom' version '0.2.4-SNAPSHOT'
id 'fabric-loom' version '0.2.6-SNAPSHOT'
id "maven-publish"
}

Expand All @@ -24,7 +24,7 @@ repositories {

dependencies {
minecraft "com.mojang:minecraft:${mc_version}"
mappings "net.fabricmc:yarn:${mc_version}+build.${mappings_version}"
mappings "net.fabricmc:yarn:${mc_version}+build.${mappings_version}:v2"
modCompile "net.fabricmc:fabric-loader:${loader_version}"
modCompile "com.github.emilyploszaj:trinkets:v${trinkets_version}"
}
Expand All @@ -33,7 +33,7 @@ task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}

/*
publishing {
tasks.publish.dependsOn 'build'
publications {
Expand All @@ -50,6 +50,27 @@ publishing {
}
}
}
*/

publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
mavenLocal()
}
}

curseforge {
if (project.hasProperty('curse_key_TehNut'))
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod_name=ArmorDisguise
package_group=info.tehnut.armordisguise
mod_version=1.0.1
mod_version=1.0.2
curse_id=347849

mc_version=1.14.4
mc_version=1.15.2
mappings_version=14
loader_version=0.6.3+build.167
loader_version=0.7.8+build.184

trinkets_version=2.1.0
trinkets_version=2.4.1
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
#Sun Mar 01 15:26:23 ART 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion src/main/java/info/tehnut/armordisguise/Helper.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static boolean handleEquip(ItemStack stack, ArmorItem armor, PlayerEntity
if (vanillaStack.isEmpty()) {
// Not exactly safe, but we know these slots exist
TrinketSlots.SlotGroup slotGroup = TrinketSlots.slotGroups.stream().filter(g -> g.getName().equals(armor.getSlotType().getName())).findFirst().get();
player.setEquippedStack(armor.getSlotType(), stack.copy());
player.equipStack(armor.getSlotType(), stack.copy());
TrinketsClient.lastEquipped = slotGroup;
TrinketsClient.displayEquipped = 16;
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public abstract class MixinPlayerTrinketComponent {
public abstract Inventory getInventory();

@Inject(method = "equip", at = @At("HEAD"), cancellable = true, remap = false)
public void armordisguise$equip(ItemStack stack, CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
public void armordisguise$equip(ItemStack stack, boolean shiftClick, CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
if (!(stack.getItem() instanceof ArmorItem))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Modifies the stack obtained for rendering on the player. If a trinket "overlay" exists, we want to render that instead
// of the proper armor.
@Mixin(ArmorFeatureRenderer.class)
public class MixinArmorFeatureRenderer<T extends LivingEntity> {
public abstract class MixinArmorFeatureRenderer<T extends LivingEntity> {

@Redirect(method = "renderArmor", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/LivingEntity;getEquippedStack(Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/item/ItemStack;"))
public ItemStack armordisguise$getOverlayArmor(T entity, EquipmentSlot slot) {
Expand Down