mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-22 04:52:29 +00:00
Chore: rename package
This commit is contained in:
1 parent
06f00d4800
commit
434c1498de
49 files changed
+257
-251
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package me.towdium.jecalculation.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import me.towdium.jecalculation.JustEnoughCalculation;
|
||||
import me.towdium.jecalculation.gui.guis.calculator.ContainerCalculator;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent.*;
|
||||
|
||||
/**
|
||||
* @author Towdium
|
||||
*/
|
||||
public class PlayerEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onLogin(LoadFromFile event){
|
||||
JustEnoughCalculation.proxy.getPlayerHandler().handleLogin(event);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSave(SaveToFile event){
|
||||
JustEnoughCalculation.proxy.getPlayerHandler().handleSave(event);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTooltip(ItemTooltipEvent event){
|
||||
if(event.entityPlayer.openContainer instanceof ContainerCalculator){
|
||||
long l = event.itemStack.hasTagCompound() ? (event.itemStack.getTagCompound().getLong("amount")+99)/100 : 0;
|
||||
if(l > 999){
|
||||
event.toolTip.add("Amount: " + l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user