Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed mending in trinket slots. Close #109
Fixed mending in trinket slots. Close #109
- Loading branch information
1 parent
114fed4
commit 039930e
Showing
7 changed files
with
62 additions
and
7 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
14 changes: 14 additions & 0 deletions
14
Common/src/main/java/com/blamejared/clumps/platform/IPlatformHelper.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.blamejared.clumps.platform; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
|
||
import java.util.function.BiFunction; | ||
|
||
public interface IPlatformHelper { | ||
|
||
default BiFunction<ItemStack, Integer, Float> getRepairRatio(BiFunction<ItemStack, Integer, Float> defaultRepairRatio) { | ||
|
||
return defaultRepairRatio; | ||
} | ||
|
||
} |
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
6 changes: 6 additions & 0 deletions
6
Fabric/src/main/java/com/blamejared/clumps/platform/FabricPlatformHelper.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.blamejared.clumps.platform; | ||
|
||
|
||
public class FabricPlatformHelper implements IPlatformHelper { | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
Fabric/src/main/resources/META-INF/services/com.blamejared.clumps.platform.IPlatformHelper
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
com.blamejared.clumps.platform.FabricPlatformHelper |
15 changes: 15 additions & 0 deletions
15
Forge/src/main/java/com/blamejared/clumps/platform/ForgePlatformHelper.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.blamejared.clumps.platform; | ||
|
||
import net.minecraft.world.item.ItemStack; | ||
|
||
import java.util.function.BiFunction; | ||
|
||
public class ForgePlatformHelper implements IPlatformHelper { | ||
|
||
@Override | ||
public BiFunction<ItemStack, Integer, Float> getRepairRatio(BiFunction<ItemStack, Integer, Float> defaultRepairRatio) { | ||
|
||
return (itemStack, integer) -> itemStack.getXpRepairRatio(); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
Forge/src/main/resources/META-INF/services/com.blamejared.clumps.platform.IPlatformHelper
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
com.blamejared.clumps.platform.ForgePlatformHelper |