-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format Numbers, Make Mixin Client Only
- Loading branch information
1 parent
a75252c
commit 380b1f9
Showing
3 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerClientMixin.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,26 @@ | ||
package com.nomiceu.nomilabs.mixin.gregtech; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import com.nomiceu.nomilabs.util.LabsTranslate; | ||
|
||
import gregtech.api.util.TextFormattingUtil; | ||
import gregtech.common.metatileentities.multi.MetaTileEntityLargeBoiler; | ||
|
||
/** | ||
* Updates Tooltips for the 10x Fuel Efficiency Increase in {@link BoilerRecipeLogicMixin}. | ||
*/ | ||
@Mixin(value = MetaTileEntityLargeBoiler.class, remap = false) | ||
public class MetaTileEntityLargeBoilerClientMixin { | ||
|
||
@Redirect(method = "addInformation", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/client/resources/I18n;format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", | ||
ordinal = 0, | ||
remap = true)) | ||
private String formatNew(String s, Object[] objects) { | ||
return LabsTranslate.translate(s, TextFormattingUtil.formatNumbers((int) objects[0] * 10)); | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/java/com/nomiceu/nomilabs/mixin/gregtech/MetaTileEntityLargeBoilerMixin.java
This file was deleted.
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