-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
86 additions
and
102 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
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
32 changes: 0 additions & 32 deletions
32
...gistics-2/src/main/java/lol/bai/megane/module/ae2/mixin/MixinBlockEntityDataProvider.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
...istics-2/src/main/java/lol/bai/megane/module/ae2/mixin/MixinPowerStorageDataProvider.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,35 @@ | ||
package lol.bai.megane.module.ae2.mixin; | ||
|
||
import appeng.api.integrations.igtooltip.TooltipBuilder; | ||
import appeng.api.integrations.igtooltip.TooltipContext; | ||
import appeng.integration.modules.igtooltip.blocks.PowerStorageDataProvider; | ||
import net.minecraft.block.entity.BlockEntity; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
@SuppressWarnings("UnstableApiUsage") | ||
@Mixin(PowerStorageDataProvider.class) | ||
public class MixinPowerStorageDataProvider { | ||
|
||
@Unique | ||
private static final Logger LOGGER = LoggerFactory.getLogger("MixinPowerStorageDataProvider"); | ||
|
||
@Unique | ||
private static boolean firstCall = true; | ||
|
||
/** | ||
* @author deirn | ||
* @reason Remove AE2's own energy tooltip, since megane provides it | ||
*/ | ||
@Overwrite | ||
public void buildTooltip(BlockEntity object, TooltipContext context, TooltipBuilder tooltip) { | ||
if (firstCall) { | ||
firstCall = false; | ||
LOGGER.info("[Megane] Replaced AE2's own energy tooltip with Megane's"); | ||
} | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
"defaultRequire": 1 | ||
}, | ||
"mixins" : [ | ||
"MixinBlockEntityDataProvider" | ||
"MixinPowerStorageDataProvider" | ||
] | ||
} |
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