Chore: reformat code

This commit is contained in:
Discreater committed 2021-02-28 19:47:15 +08:00
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);
}
}