Skip to content

Commit

Permalink
Fixed damaged item logic on Loot Recycler
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryLoenwind committed May 9, 2016
1 parent 919b5dd commit 29abaea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ minecraft_version=1.7.10
forge_version=10.13.4.1492-1.7.10
forgeDep_version=10.13.4

mod_version=0.10.7
mod_version=0.10.8

#Comment out this line to get rid of the appendix
mod_appendix=beta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ private void drawMaterialLine(ItemStack itemStack, int x, int y0) {
}

private void drawMaterialLineAmount(int amount, int x, int y0) {
if (amount > 1) {
if (amount > 0) {
drawFakeItemsStart();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ public boolean add(ItemStack itemStack) {
int maxDamage = itemStack.getMaxDamage();
int stackSize = itemStack.stackSize;
Map<Integer, Integer> enchantments = EnchantmentHelper.getEnchantments(itemStack);
float factor = (maxDamage - itemDamage) / maxDamage * stackSize * (1f - minloss - (float) rand.nextDouble() * randloss);
float factor = 0;
for (int i = 0; i < stackSize; i++) {
factor += (maxDamage - itemDamage) / (float) maxDamage * (1f - minloss - (float) rand.nextDouble() * randloss);
}
for (Mats mat : mats) {
materialPool[mat.ordinal()] += 1f * factor;
}
Expand Down

0 comments on commit 29abaea

Please sign in to comment.