Skip to content

Commit

Permalink
other band fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TobibusFate committed Apr 16, 2023
1 parent 26ba9fa commit 05b441b
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Metallics Arts 1.19.2-1.5.3
# Metallics Arts 1.19.2-1.5.4



Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

group = 'net.rudahee.metallics_arts' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'metallics_arts'
version = '1.19.2-1.5.3'
version = '1.19.2-1.5.4'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class MetallicsArts {
// Mod id
public static final String MOD_ID = "metallics_arts";

public static final String VERSION = "1.5.3";
public static final String VERSION = "1.5.4";

// Directly reference a log4j logger.
public static final Logger LOGGER = LogManager.getLogger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public enum CTW implements ILanguage {
SLOT("slot", "Slot", "Ranura","", "Slot"),
VIAL ("vial","Vial","Vial","瓶", "Fiolka"),
USES ("uses","Uses","Usos","", "Użycia"),
SHIFT_TO_MORE_INFO("shift_to_more_info","Press [Shift] for more Info","Presione [Shift] para más información","",""),
DECORATIONS ("decorations","Decorations","Decoración","", "Dekoracje"),
GUIDE ("guide","Guide","Guia","", "Poradnik"),
FERUCHEMICAL_SHADING("feruchemical_shading","Shading","feruquimico sombreado","", ""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ModLanguageProviderEN extends LanguageProvider {
put("itemGroup.metallics_arts.decorations", CTW.DECORATIONS.getNameInEnglish() + " " + CTW.METALLICS_ARTS.getNameInEnglish());

put("key.category_powers_metallics_arts", CTW.POWERS.getNameInEnglish() + " " + CTW.METALLICS_ARTS.getNameInEnglish());
put("key.categorymetallics_arts", CTW.METALLICS_ARTS.getNameInEnglish());
put("key.category.metallics_arts", CTW.METALLICS_ARTS.getNameInEnglish());
put("key.metallics_arts.allomantic", CTW.ALLOMANTIC.getNameInEnglish() + " " + CTW.POWER_SELECTOR.getNameInEnglish() );
put("key.metallics_arts.feruchemic", CTW.FERUCHEMICAL.getNameInEnglish() + " " + CTW.POWER_SELECTOR.getNameInEnglish());
put("key.metallics_arts.allomantic_push",CTW.ALLOMANTIC.getNameInEnglish() + " " + CTW.PUSH.getNameInEnglish());
Expand All @@ -52,6 +52,10 @@ public class ModLanguageProviderEN extends LanguageProvider {
put("metallics_arts.mental_mind.owner_someone", CTW.OWNER_SOMEONE.getNameInEnglish());
put("metallics_arts.mental_mind_translate.uses", CTW.USES.getNameInEnglish());

put("metallics_arts.mental_mind_translate.shift_info",CTW.SHIFT_TO_MORE_INFO.getNameInEnglish());



put("item.metallics_arts.obsidian_dagger", CTW.OBSIDIAN_DAGGER.getNameInEnglish());
put("item.metallics_arts.cristal_dagger", CTW.CRYSTAL_DAGGER.getNameInEnglish());
put("item.metallics_arts.koloss_blade", CTW.KOLOSS_BLADE.getNameInEnglish());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ModLanguageProviderES extends LanguageProvider {
put("itemGroup.metallics_arts.decorations", CTW.METALLICS_ARTS.getNameInSpanish() + " " + CTW.DECORATIONS.getNameInSpanish());

put("key.category_powers_metallics_arts", CTW.METALLICS_ARTS.getNameInSpanish() + ": " + CTW.POWERS.getNameInSpanish());
put("key.categorymetallics_arts", CTW.METALLICS_ARTS.getNameInSpanish());
put("key.category.metallics_arts", CTW.METALLICS_ARTS.getNameInSpanish());
put("key.metallics_arts.allomantic", CTW.POWER_SELECTOR.getNameInSpanish() + " " + CTW.ALLOMANTIC.getNameInSpanish());
put("key.metallics_arts.feruchemic", CTW.POWER_SELECTOR.getNameInSpanish() + " " + CTW.FERUCHEMICAL.getNameInSpanish());
put("key.metallics_arts.allomantic_push", CTW.PUSH.getNameInSpanish()+ " " + CTW.ALLOMANTIC.getNameInSpanish());
Expand All @@ -50,6 +50,7 @@ public class ModLanguageProviderES extends LanguageProvider {
put("metallics_arts.mental_mind.nobody", CTW.NOBODY.getNameInSpanish());
put("metallics_arts.mental_mind.owner_someone", CTW.OWNER_SOMEONE.getNameInSpanish());
put("metallics_arts.mental_mind_translate.uses", CTW.USES.getNameInSpanish());
put("metallics_arts.mental_mind_translate.shift_info",CTW.SHIFT_TO_MORE_INFO.getNameInSpanish());

put("item.metallics_arts.obsidian_dagger", CTW.OBSIDIAN_DAGGER.getNameInSpanish());
put("item.metallics_arts.cristal_dagger", CTW.CRYSTAL_DAGGER.getNameInSpanish());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ModLanguageProviderJP extends LanguageProvider {
put("itemGroup.metallics_arts.decorations", CTW.DECORATIONS.getNameInJapanese() + " " + CTW.METALLICS_ARTS.getNameInJapanese());

put("key.category_powers_metallics_arts", CTW.POWERS.getNameInJapanese() + " " + CTW.METALLICS_ARTS.getNameInJapanese());
put("key.categorymetallics_arts", CTW.METALLICS_ARTS.getNameInJapanese());
put("key.category.metallics_arts", CTW.METALLICS_ARTS.getNameInJapanese());
put("key.metallics_arts.allomantic", CTW.ALLOMANTIC.getNameInJapanese() + " " + CTW.POWER_SELECTOR.getNameInJapanese() );
put("key.metallics_arts.feruchemic", CTW.FERUCHEMICAL.getNameInJapanese() + " " + CTW.POWER_SELECTOR.getNameInJapanese());
put("key.metallics_arts.allomantic_push",CTW.ALLOMANTIC.getNameInJapanese() + " " + CTW.PUSH.getNameInJapanese());
Expand All @@ -49,6 +49,7 @@ public class ModLanguageProviderJP extends LanguageProvider {
put("metallics_arts.mental_mind.nobody", CTW.NOBODY.getNameInJapanese());
put("metallics_arts.mental_mind.owner_someone", CTW.OWNER_SOMEONE.getNameInJapanese());
put("metallics_arts.mental_mind_translate.uses", CTW.USES.getNameInJapanese());
put("metallics_arts.mental_mind_translate.shift_info",CTW.SHIFT_TO_MORE_INFO.getNameInJapanese());

put("item.metallics_arts.obsidian_dagger", CTW.OBSIDIAN_DAGGER.getNameInJapanese());
put("item.metallics_arts.cristal_dagger", CTW.CRYSTAL_DAGGER.getNameInJapanese());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ModLanguageProviderPL extends LanguageProvider {
put("itemGroup.metallics_arts.decorations", CTW.METALLICS_ARTS.getNameInPolish() + " " + CTW.DECORATIONS.getNameInPolish());

put("key.category_powers_metallics_arts", CTW.METALLICS_ARTS.getNameInPolish() + ": " + CTW.POWERS.getNameInPolish());
put("key.categorymetallics_arts", CTW.METALLICS_ARTS.getNameInPolish());
put("key.category.metallics_arts", CTW.METALLICS_ARTS.getNameInPolish());
put("key.metallics_arts.allomantic", CTW.POWER_SELECTOR.getNameInPolish() + " " + CTW.ALLOMANTIC.getNameInPolish());
put("key.metallics_arts.feruchemic", CTW.POWER_SELECTOR.getNameInPolish() + " " + CTW.FERUCHEMICAL.getNameInPolish());
put("key.metallics_arts.allomantic_push", CTW.PUSH.getNameInPolish()+ " " + CTW.ALLOMANTIC.getNameInPolish());
Expand All @@ -50,6 +50,7 @@ public class ModLanguageProviderPL extends LanguageProvider {
put("metallics_arts.mental_mind.nobody", CTW.NOBODY.getNameInPolish());
put("metallics_arts.mental_mind.owner_someone", CTW.OWNER_SOMEONE.getNameInPolish());
put("metallics_arts.mental_mind_translate.uses", CTW.USES.getNameInPolish());
put("metallics_arts.mental_mind_translate.shift_info",CTW.SHIFT_TO_MORE_INFO.getNameInPolish());

put("item.metallics_arts.obsidian_dagger", CTW.OBSIDIAN_DAGGER.getNameInPolish());
put("item.metallics_arts.cristal_dagger", CTW.CRYSTAL_DAGGER.getNameInPolish());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {

String metalKey = this.getMetals(0).getNameLower() + "_feruchemic_reserve";
int actualReserve = stack.getTag().getInt(metalKey);
int maxReserve = this.getMetals(0).getMaxReserveRing();
int maxReserve = this.getMetals(0).getMaxReserveBand();

/*
DECANT
Expand Down Expand Up @@ -108,7 +108,7 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {

metalKey = this.getMetals(1).getNameLower() + "_feruchemic_reserve";
actualReserve = stack.getTag().getInt(metalKey);
maxReserve = this.getMetals(1).getMaxReserveRing();
maxReserve = this.getMetals(1).getMaxReserveBand();
/*
DECANT
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,13 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
ex.printCompleteLog();
return;
}
if (!playerCapability.isTapping(MetalTagEnum.ELECTRUM) && !playerCapability.isStoring(MetalTagEnum.ELECTRUM)) {
ElectrumFecuchemicHelper.restoreHearts(player, playerCapability);
}

if (playerCapability.isTapping(MetalTagEnum.ALUMINUM) || playerCapability.isStoring(MetalTagEnum.ALUMINUM)) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
}


String metalKey = this.getMetals(0).getNameLower() + "_feruchemic_reserve";
int actualReserve = stack.getTag().getInt(metalKey);
int maxReserve = this.getMetals(0).getMaxReserveRing();
/**
DECANT
*/
int maxReserve = this.getMetals(0).getMaxReserveBand();
// Tap.
if (playerCapability.isTapping(this.getMetals(0))) {
if (actualReserve > 0) {
stack.setTag(getFirstSupplier().calculateDischarge(nbtLocal, player, playerCapability, actualReserve, metalKey, nicConsumeMet0));
Expand All @@ -97,9 +89,7 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
playerCapability.setTapping(this.getMetals(0), false);
}
/**
STORAGE
*/
// Storage.
} else if (playerCapability.isStoring(this.getMetals(0))) {
if (actualReserve < maxReserve) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, true, this.getMetals(0), this.getMetals(1)));
Expand All @@ -113,10 +103,8 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
}
metalKey = this.getMetals(1).getNameLower() + "_feruchemic_reserve";
actualReserve = stack.getTag().getInt(metalKey);
maxReserve = this.getMetals(1).getMaxReserveRing();
/**
DECANT
*/
maxReserve = this.getMetals(1).getMaxReserveBand();
// Tap.
if (playerCapability.isTapping(this.getMetals(1))) {
if (actualReserve > 0) {
stack.setTag(getSecondSupplier().calculateDischarge(nbtLocal, player, playerCapability, actualReserve, metalKey, nicConsumeMet1));
Expand All @@ -127,10 +115,10 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
playerCapability.setTapping(this.getMetals(1), false);
}
playerCapability.setModifiedHealth(true);
/**
STORAGE
*/
if (!playerCapability.hasModifiedHealth()) {
playerCapability.setModifiedHealth(true);
}
// Storage.
} else if (playerCapability.isStoring(this.getMetals(1))) {
if (actualReserve < maxReserve) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, true, this.getMetals(0), this.getMetals(1)));
Expand Down Expand Up @@ -172,7 +160,6 @@ public void onUnequip(SlotContext slotContext, ItemStack newStack, ItemStack sta
IInvestedPlayerData playerCapability;
try {
playerCapability = CapabilityUtils.getCapability(player);

super.onUnequip(slotContext, newStack, stack);
} catch (PlayerException ex) {
ex.printCompleteLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,13 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
return;
}

if (!playerCapability.isTapping(MetalTagEnum.ELECTRUM) && !playerCapability.isStoring(MetalTagEnum.ELECTRUM)) {
ElectrumFecuchemicHelper.restoreHearts(player, playerCapability);
}

if (playerCapability.isTapping(MetalTagEnum.ALUMINUM) || playerCapability.isStoring(MetalTagEnum.ALUMINUM)) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
}

String metalKey = this.getMetals(0).getNameLower() + "_feruchemic_reserve";
int actualReserve = stack.getTag().getInt(metalKey);
int maxReserve = this.getMetals(0).getMaxReserveRing();
/**
DECANT
*/
// Tap.
if (playerCapability.isTapping(this.getMetals(0))) {
if (actualReserve > 0) {
stack.setTag(getFirstSupplier().calculateDischarge(nbtLocal, player, playerCapability, actualReserve, metalKey, nicConsumeMet0));
Expand All @@ -94,9 +87,7 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
playerCapability.setTapping(this.getMetals(0), false);
}
/**
STORAGE
*/
// Storage.
} else if (playerCapability.isStoring(this.getMetals(0))) {
if (actualReserve < maxReserve) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, true, this.getMetals(0), this.getMetals(1)));
Expand All @@ -111,9 +102,7 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
metalKey = this.getMetals(1).getNameLower() + "_feruchemic_reserve";
actualReserve = stack.getTag().getInt(metalKey);
maxReserve = this.getMetals(1).getMaxReserveRing();
/**
DECANT
*/
// Tap.
if (playerCapability.isTapping(this.getMetals(1))) {
if (actualReserve > 0) {
stack.setTag(getSecondSupplier().calculateDischarge(nbtLocal, player, playerCapability, actualReserve, metalKey, nicConsumeMet1));
Expand All @@ -124,9 +113,10 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, false, this.getMetals(0), this.getMetals(1)));
playerCapability.setTapping(this.getMetals(1), false);
}
/**
STORAGE
*/
if (!playerCapability.hasModifiedHealth()) {
playerCapability.setModifiedHealth(true);
}
// Storage.
} else if (playerCapability.isStoring(this.getMetals(1))) {
if (actualReserve < maxReserve) {
stack.setTag(MetalMindsUtils.changeOwner(player, nbtLocal, true, this.getMetals(0), this.getMetals(1)));
Expand All @@ -137,6 +127,9 @@ public void curioTick(SlotContext slotContext, ItemStack stack) {
} else {
playerCapability.setStoring(this.getMetals(1), false);
}
if (!playerCapability.hasModifiedHealth()) {
playerCapability.setModifiedHealth(true);
}
} else if (playerCapability.hasModifiedHealth()) {
ElectrumFecuchemicHelper.restoreHearts(player, playerCapability);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.InputEvent;
import net.rudahee.metallics_arts.data.enums.implementations.MetalTagEnum;
import net.rudahee.metallics_arts.data.player.IInvestedPlayerData;
import net.rudahee.metallics_arts.modules.error_handling.exceptions.PlayerException;
import net.rudahee.metallics_arts.modules.error_handling.messages.ErrorTypes;
import net.rudahee.metallics_arts.modules.logic.client.custom_guis.selectors.AllomanticSelector;
import net.rudahee.metallics_arts.modules.logic.client.custom_guis.selectors.FeruchemySelector;
import net.rudahee.metallics_arts.setup.registries.ModKeyRegister;
import net.rudahee.metallics_arts.utils.powers_utils.ClientUtils;
import org.lwjgl.glfw.GLFW;

import javax.annotation.Nullable;
Expand Down Expand Up @@ -70,6 +72,17 @@ public static void onKeyInputEvent(InputEvent.Key event, Minecraft minecraft, @N
minecraft.setScreen(new FeruchemySelector());
}
}
for (int i = 0; i< MetalTagEnum.values().length; i++) {
if (ModKeyRegister.powers[i].isDown()) {
if (ModKeyRegister.FERUCHEMIC_DECANT.isDown()) {
ClientUtils.toggleTap(MetalTagEnum.getMetal(i), capability, player);
} else if (ModKeyRegister.FERUCHEMIC_STORAGE.isDown()) {
ClientUtils.toggleStorage(MetalTagEnum.getMetal(i), capability, player);
} else {
ClientUtils.toggleBurn(MetalTagEnum.getMetal(i), capability);
}
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void OnMouseInputEvent(Player player,IInvestedPlayerData capabilit
throw new PlayerException(ErrorTypes.PLAYER_CAPABILITY_ERROR);
}


/*
for (int i = 0; i< MetalTagEnum.values().length; i++) {
if (ModKeyRegister.powers[i].isDown()) {
if (ModKeyRegister.FERUCHEMIC_DECANT.isDown()) {
Expand All @@ -65,6 +65,6 @@ public static void OnMouseInputEvent(Player player,IInvestedPlayerData capabilit
ClientUtils.toggleBurn(MetalTagEnum.getMetal(i), capability);
}
}
}
}*/
}
}

0 comments on commit 05b441b

Please sign in to comment.