-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Backported some stuff from 1.12 - Updated Gradle and mappings
- Loading branch information
Jacky1356400
committed
Jul 9, 2017
1 parent
241bb0d
commit 521679b
Showing
37 changed files
with
277 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. | ||
# This is required to provide enough memory for the Minecraft decompilation process. | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.jvmargs=-Xmx4G | ||
mc_version=1.11.2 | ||
forge_version=13.20.0.2315 | ||
mod_version=1.1 | ||
mappings_version=20161220 | ||
forge_version=13.20.1.2393 | ||
mod_version=1.2 | ||
mappings_version=snapshot_20170612 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/me/jacky1356400/exchangers/item/ItemExchangerBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
package me.jacky1356400.exchangers.item; | ||
|
||
import me.jacky1356400.exchangers.handler.ExchangerHandler; | ||
import me.jacky1356400.exchangers.helper.StringHelper; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import java.util.List; | ||
|
||
import static me.jacky1356400.exchangers.helper.StringHelper.localize; | ||
|
||
public class ItemExchangerBase extends ExchangerHandler { | ||
|
||
public boolean showDurabilityBar(ItemStack stack) { | ||
return stack.isItemDamaged(); | ||
} | ||
|
||
public boolean isPowered() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean bool) { | ||
super.addInformation(stack, player, tooltip, bool); | ||
if (!isPowered()){ | ||
tooltip.add(StringHelper.formatNumber(stack.getMaxDamage() - stack.getItemDamage()) + " / " + StringHelper.formatNumber(stack.getMaxDamage()) + " " + localize("tooltip.durability")); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.