mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-26 14:52:55 +00:00
Chore: reformat code
This commit is contained in:
1 parent
434c1498de
commit
4b5de3267e
28 files changed
+872
-814
No files matched your search
@@ -4,27 +4,30 @@ 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.*;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent.LoadFromFile;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent.SaveToFile;
|
||||
|
||||
/**
|
||||
* @author Towdium
|
||||
*/
|
||||
public class PlayerEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onLogin(LoadFromFile event){
|
||||
public void onLogin(LoadFromFile event) {
|
||||
JustEnoughCalculation.proxy.getPlayerHandler().handleLogin(event);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSave(SaveToFile event){
|
||||
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){
|
||||
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