Skip to content

Commit

Permalink
applied spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursivePineapple committed Sep 25, 2024
1 parent f0c1a16 commit bf78ab5
Show file tree
Hide file tree
Showing 106 changed files with 273 additions and 218 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import javax.annotation.Nullable;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -80,7 +79,6 @@
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.ParallelHelper;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aP
}

@Override
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY,
float aZ, ItemStack tool) {
if (getBaseMetaTileEntity().isServerSide()) {
this.mode = (this.mode + 1) % 2;
GTUtility.sendLocalizedChatToPlayer(aPlayer, "chat.cal.mode." + this.mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zD
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (getBaseMetaTileEntity().isServerSide()) {
this.mMode++;
if (this.mMode >= 4) this.mMode = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (this.mMaxProgresstime > 0) {
GTUtility.sendChatToPlayer(aPlayer, "HTGR mode cannot be changed while the machine is running.");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (this.mMaxProgresstime > 0) {
GTUtility.sendChatToPlayer(aPlayer, "THTR mode cannot be changed while the machine is running.");
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

import javax.annotation.Nonnull;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@
import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
import static gregtech.api.util.GTStructureUtility.buildHatchAdder;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;

import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
Expand All @@ -50,7 +48,6 @@
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;

public class MTEMegaChemicalReactor extends MegaMultiBlockBase<MTEMegaChemicalReactor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
import java.util.ArrayList;
import java.util.List;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

Expand All @@ -55,7 +53,6 @@
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.common.tileentities.machines.MTEHatchOutputME;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@

import javax.annotation.Nonnull;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
Expand Down Expand Up @@ -66,7 +64,6 @@
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.maps.OilCrackerBackend;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.common.tileentities.machines.IRecipeProcessingAwareHatch;
import gregtech.common.tileentities.machines.MTEHatchInputME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@

import javax.annotation.Nonnull;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

Expand All @@ -59,7 +57,6 @@
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.OverclockCalculator;
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (getBaseMetaTileEntity().isServerSide()) {
if (!aPlayer.isSneaking()) {
--this.aAmps;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/bwcrossmod/galacticgreg/MTEVoidMinerBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ private void handleOutputs() {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
this.mBlacklist = !this.mBlacklist;
GTUtility.sendChatToPlayer(aPlayer, "Mode: " + (this.mBlacklist ? "Blacklist" : "Whitelist"));
return true;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/ggfab/mte/MTEAdvAssLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.stream.IntStream;

import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ggfab/mte/MTELinkedInputBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (aPlayer.isSneaking()) {
if (this.mRealInventory == null) {
aPlayer.addChatMessage(new ChatComponentTranslation("ggfab.info.linked_input_bus.no_channel"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
wirelessEnabled = !wirelessEnabled;
GTUtility.sendChatToPlayer(aPlayer, "Wireless network mode " + (wirelessEnabled ? "enabled." : "disabled."));
if (wirelessEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ protected void onEmptyingContainerWhenEmpty() {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (aPlayer.isSneaking()) {
mMode = (byte) ((mMode + 9) % 10);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public boolean isAccessAllowed(EntityPlayer aPlayer) {
}

@Override
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack toolStack) {
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY,
float aZ, ItemStack toolStack) {
if (aPlayer.isSneaking()) {
this.priority -= 10;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import javax.annotation.Nonnull;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
Expand Down Expand Up @@ -42,7 +41,6 @@
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTStructureUtility;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.OverclockCalculator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.Collections;
import java.util.List;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ public void saveNBTData(NBTTagCompound aNBT) {
}

@Override
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public final boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY,
float aZ, ItemStack tool) {
if (getBaseMetaTileEntity().isServerSide()) {
this.mode = (this.mode + 1) % 2;
GTUtility.sendLocalizedChatToPlayer(aPlayer, "preciseassembler.chat." + this.mode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public int fluidIntoPower(ArrayList<FluidStack> aFluids, TurbineStatCalculator t
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (side == getBaseMetaTileEntity().getFrontFacing()) {
looseFit ^= true;
GTUtility.sendChatToPlayer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ public boolean hasTurbine() {
}

@Override
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack tool) {
public boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack tool) {
if (side == getBaseMetaTileEntity().getFrontFacing()) {
looseFit ^= true;
GTUtility.sendChatToPlayer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,32 +132,38 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
/**
* When a Player right-clicks the Facing with a Screwdriver.
*/
boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack aTool);

/**
* When a Player right-clicks the Facing with a Wrench.
*/
boolean onWrenchRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onWrenchRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer, float aX,
float aY, float aZ, ItemStack aTool);

/**
* When a Player right-clicks the Facing with a wire cutter.
*/
boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer,
float aX, float aY, float aZ, ItemStack aTool);

/**
* When a Player right-clicks the Facing with a soldering iron.
*/
boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer,
float aX, float aY, float aZ, ItemStack aTool);

/**
* When a player right-clicks a side with a hard hammer.
*/
boolean onHardHammerRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onHardHammerRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack aTool);

/**
* When a player right-clicks a side with a jack hammer.
*/
boolean onJackHammerRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ, ItemStack aTool);
boolean onJackHammerRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ,
ItemStack aTool);

/**
* Called right before this Machine explodes
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
Expand Down Expand Up @@ -845,17 +844,18 @@ public boolean onRightclick(EntityPlayer aPlayer, final ForgeDirection side, flo
// Configuration of delicate electronics calls for a tool with precision and subtlety.
final CoverInfo info = getCoverInfoAtSide(coverSide);
info.updateCoverBehavior();
if (info.getCoverBehavior().allowsTickRateAddition()) {
if (info.getCoverBehavior()
.allowsTickRateAddition()) {
info.onCoverJackhammer(aPlayer);
usedTool = true;
} else {
GTUtility.sendLocalizedChatToPlayer(
aPlayer,
"gt.cover.info.chat.tick_rate_not_allowed");
GTUtility
.sendLocalizedChatToPlayer(aPlayer, "gt.cover.info.chat.tick_rate_not_allowed");
return true;
}
} else {
usedTool = mMetaTileEntity.onJackHammerRightClick(coverSide, aPlayer, aX, aY, aZ, tCurrentItem);
usedTool = mMetaTileEntity
.onJackHammerRightClick(coverSide, aPlayer, aX, aY, aZ, tCurrentItem);
}

break;
Expand Down Expand Up @@ -891,7 +891,8 @@ public boolean onRightclick(EntityPlayer aPlayer, final ForgeDirection side, flo
break;
}
case SolderingIron: {
if (mMetaTileEntity.onSolderingToolRightClick(side, wrenchSide, aPlayer, aX, aY, aZ, tCurrentItem)) {
if (mMetaTileEntity
.onSolderingToolRightClick(side, wrenchSide, aPlayer, aX, aY, aZ, tCurrentItem)) {
usedTool = true;
} else if (GTModHandler.useSolderingIron(tCurrentItem, aPlayer)) {
mStrongRedstone ^= wrenchSide.flag;
Expand All @@ -911,7 +912,8 @@ public boolean onRightclick(EntityPlayer aPlayer, final ForgeDirection side, flo
break;
}
case WireCutter: {
if (mMetaTileEntity.onWireCutterRightClick(side, wrenchSide, aPlayer, aX, aY, aZ, tCurrentItem)) {
if (mMetaTileEntity
.onWireCutterRightClick(side, wrenchSide, aPlayer, aX, aY, aZ, tCurrentItem)) {
usedTool = true;

doEnetUpdate();
Expand Down
Loading

0 comments on commit bf78ab5

Please sign in to comment.