mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-12 00:07:57 +00:00
Made some changes, should help mod authors direct bugs to me
This commit is contained in:
1 parent
daddadf7e7
commit
c500a5a580
12 files changed
+35
-11
No files matched your search
@@ -1,22 +1,24 @@
|
||||
package modtweaker2;
|
||||
|
||||
import static modtweaker2.helpers.LogHelper.print;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import minetweaker.api.minecraft.MineTweakerMC;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import modtweaker2.utils.TweakerPlugin;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import static modtweaker2.helpers.LogHelper.*;
|
||||
|
||||
public class ClientEvents {
|
||||
public static int cooldown;
|
||||
public static boolean active;
|
||||
|
||||
|
||||
public static String notice = EnumChatFormatting.DARK_RED + "This item's recipe has been changed by ModTweaker.";
|
||||
@SubscribeEvent
|
||||
public void onDrawTooltip(ItemTooltipEvent event) {
|
||||
|
||||
IPlayer player = MineTweakerMC.getIPlayer(event.entityPlayer);
|
||||
if (player != null) {
|
||||
IItemStack hand = MineTweakerMC.getIItemStack(event.itemStack);
|
||||
@@ -36,8 +38,13 @@ public class ClientEvents {
|
||||
cooldown--;
|
||||
}
|
||||
|
||||
for (ItemStack stack : TweakerPlugin.changed) {
|
||||
if (stack.isItemEqual(event.itemStack) && event.toolTip.contains(notice)) {
|
||||
event.toolTip.add(notice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user