generated from BocchiKessokuTeam/ForgeTemplateMod-ArchLoom
-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
44 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
## Change | ||
- update Forge & MaFgLib version | ||
- fix item stack issue (#16) |
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
52 changes: 0 additions & 52 deletions
52
src/main/java/fi/dy/masa/minihud/mixin/MixinItemStack.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,7 @@ public BoccHUD() { | |
gui.setParent(screen); | ||
return gui; | ||
}); | ||
|
||
ClientEventHandler.register(); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/main/java/org/thinkingstudio/bocchud/ClientEventHandler.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,40 @@ | ||
package org.thinkingstudio.bocchud; | ||
|
||
import fi.dy.masa.minihud.config.Configs; | ||
import fi.dy.masa.minihud.util.MiscUtils; | ||
import net.minecraft.block.BeehiveBlock; | ||
import net.minecraft.item.BlockItem; | ||
import net.minecraft.item.Items; | ||
import net.minecraftforge.common.MinecraftForge; | ||
import net.minecraftforge.event.entity.player.ItemTooltipEvent; | ||
import net.minecraftforge.eventbus.api.EventPriority; | ||
|
||
public class ClientEventHandler { | ||
public static void register() { | ||
MinecraftForge.EVENT_BUS.<ItemTooltipEvent>addListener(EventPriority.HIGHEST, event -> { | ||
var itemStack = event.getItemStack(); | ||
var list = event.getToolTip(); | ||
|
||
if (Configs.Generic.AXOLOTL_TOOLTIPS.getBooleanValue() && | ||
itemStack.getItem() == Items.AXOLOTL_BUCKET) | ||
{ | ||
MiscUtils.addAxolotlTooltip(itemStack, list); | ||
return; | ||
} | ||
|
||
if (Configs.Generic.BEE_TOOLTIPS.getBooleanValue() && | ||
itemStack.getItem() instanceof BlockItem && | ||
((BlockItem) itemStack.getItem()).getBlock() instanceof BeehiveBlock) | ||
{ | ||
MiscUtils.addBeeTooltip(itemStack, list); | ||
} | ||
|
||
if (Configs.Generic.HONEY_TOOLTIPS.getBooleanValue() && | ||
itemStack.getItem() instanceof BlockItem && | ||
((BlockItem) itemStack.getItem()).getBlock() instanceof BeehiveBlock) | ||
{ | ||
MiscUtils.addHoneyTooltip(itemStack, list); | ||
} | ||
}); | ||
} | ||
} |
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