Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Cleanup basic machines #755

Merged
merged 4 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1695323114
//version: 1695409603
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -89,6 +89,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
def projectJavaVersion = JavaLanguageVersion.of(8)

boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false

final String CHECKSTYLE_CONFIG = """
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- Use CHECKSTYLE:OFF and CHECKSTYLE:ON comments to suppress checkstyle lints in a block -->
<module name="SuppressionCommentFilter"/>
<module name="AvoidStarImport">
<!-- Allow static wildcard imports for cases like Opcodes and LWJGL classes, these don't get created accidentally by the IDE -->
<property name="allowStaticMemberImports" value="true"/>
</module>
</module>
</module>
"""

checkPropertyExists("modName")
checkPropertyExists("modId")
Expand Down Expand Up @@ -140,6 +157,17 @@ if (!disableSpotless) {
apply from: Blowdryer.file('spotless.gradle')
}

if (!disableCheckstyle) {
apply plugin: 'checkstyle'
tasks.named("checkstylePatchedMc") { enabled = false }
tasks.named("checkstyleMcLauncher") { enabled = false }
tasks.named("checkstyleIdeVirtualMain") { enabled = false }
tasks.named("checkstyleInjectedTags") { enabled = false }
checkstyle {
config = resources.text.fromString(CHECKSTYLE_CONFIG)
}
}

String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
String kotlinSourceDir = "src/main/kotlin/"
Expand Down
5 changes: 2 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
dependencies {

api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.18:dev')
api("com.github.GTNewHorizons:bartworks:0.8.3:dev")
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.22:dev')
api("com.github.GTNewHorizons:bartworks:0.8.5:dev")

implementation('curse.maven:cofh-core-69162:2388751')
// https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static gregtech.api.enums.Mods.GTPlusPlus;

import java.awt.*;
import java.awt.Color;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
Expand Down
18 changes: 16 additions & 2 deletions src/main/java/gtPlusPlus/core/handler/GuiHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox;
import gtPlusPlus.core.container.*;
import gtPlusPlus.core.container.Container_CircuitProgrammer;
import gtPlusPlus.core.container.Container_DecayablesChest;
import gtPlusPlus.core.container.Container_FishTrap;
import gtPlusPlus.core.container.Container_PestKiller;
import gtPlusPlus.core.container.Container_ProjectTable;
import gtPlusPlus.core.container.Container_RoundRobinator;
import gtPlusPlus.core.container.Container_SuperJukebox;
import gtPlusPlus.core.container.Container_VolumetricFlaskSetter;
import gtPlusPlus.core.gui.beta.Gui_ID_Registry;
import gtPlusPlus.core.gui.beta.MU_GuiId;
import gtPlusPlus.core.gui.machine.*;
import gtPlusPlus.core.gui.machine.GUI_CircuitProgrammer;
import gtPlusPlus.core.gui.machine.GUI_DecayablesChest;
import gtPlusPlus.core.gui.machine.GUI_FishTrap;
import gtPlusPlus.core.gui.machine.GUI_PestKiller;
import gtPlusPlus.core.gui.machine.GUI_ProjectTable;
import gtPlusPlus.core.gui.machine.GUI_RoundRobinator;
import gtPlusPlus.core.gui.machine.GUI_SuperJukebox;
import gtPlusPlus.core.gui.machine.GUI_VolumetricFlaskSetter;
import gtPlusPlus.core.interfaces.IGuiManager;
import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer;
import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import static gregtech.api.enums.Mods.GregTech;
import static gregtech.api.enums.Mods.Thaumcraft;

import java.awt.*;
import java.awt.Color;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gtPlusPlus/core/util/Utils.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gtPlusPlus.core.util;

import java.awt.*;
import java.awt.Color;
import java.awt.Graphics;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gtPlusPlus/nei/DecayableRecipeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static gregtech.api.enums.Mods.GTPlusPlus;

import java.awt.*;
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gtPlusPlus.nei;

import java.awt.*;
import java.awt.Rectangle;
import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.api.util.extensions.ArrayExt;

public class GT_MetaTileEntity_ChiselBus extends GT_MetaTileEntity_Hatch_InputBus implements IAddUIWidgets {

Expand All @@ -35,7 +34,7 @@ public static int getSlots(int aTier) {

@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_ChiselBus(this.mName, this.mTier, ArrayExt.of(this.mDescription), this.mTextures);
return new GT_MetaTileEntity_ChiselBus(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional,
2,
9,
aTankCapacity,
2,
5,
"Dehydrator.png",
SoundResource.NONE,
false,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;

import cpw.mods.fml.relauncher.*;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.TAE;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Material_Casings;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.*;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler6;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;

public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ public GregtechMetaAtmosphericReconditioner(int aID, String aName, String aNameR
"Making sure you don't live in Gwalior - Uses 2A",
3,
0,
"Recycler.png",
"",
new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB),
new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active),
Expand All @@ -90,8 +88,8 @@ public GregtechMetaAtmosphericReconditioner(int aID, String aName, String aNameR
}

public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription,
ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName);
ITexture[][][] aTextures) {
super(aName, aTier, 2, aDescription, aTextures, 2, 0);
mPollutionEnabled = PollutionUtils.isPollutionEnabled();
}

Expand All @@ -103,13 +101,7 @@ public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aD

@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaAtmosphericReconditioner(
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
return new GregtechMetaAtmosphericReconditioner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@ public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegi
4,
"Loads " + getMaxChunksToLoadForTier(aTier) + " chunks when powered",
0,
0,
"Recycler.png",
"",
new ITexture[] {});
0);
}

public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
String aGUIName, String aNEIName) {
super(aName, aTier, 4, aDescription, aTextures, 0, 0, aGUIName, aNEIName);
public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 4, aDescription, aTextures, 0, 0);
}

public static int getMaxChunksToLoadForTier(int aTier) {
Expand Down Expand Up @@ -187,13 +183,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f

@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityChunkLoader(
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public GregtechMetaTileEntity_AutoChisel(int aID, String aName, String aNameRegi
"Chisels things, Gregtech style",
1,
1,
"Compressor.png",
"",
new ITexture[] { new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE),
new GT_RenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB),
new GT_RenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE),
Expand All @@ -55,20 +53,13 @@ public GregtechMetaTileEntity_AutoChisel(int aID, String aName, String aNameRegi
new GT_RenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB) });
}

public GregtechMetaTileEntity_AutoChisel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
public GregtechMetaTileEntity_AutoChisel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1);
}

@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_AutoChisel(
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
return new GregtechMetaTileEntity_AutoChisel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public GregtechMetaTileEntity_BasicWasher(int aID, String aName, String aNameReg
"It's like an automatic Cauldron for washing dusts.",
1,
1,
"PotionBrewer.png",
"",
new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
Expand All @@ -40,9 +38,9 @@ public GregtechMetaTileEntity_BasicWasher(int aID, String aName, String aNameReg
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) });
}

public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription,
ITexture[][][] aTextures) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1);
}

@Override
Expand All @@ -53,13 +51,7 @@ public String[] getDescription() {

@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_BasicWasher(
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
return new GregtechMetaTileEntity_BasicWasher(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNam
"Just like the Arctic",
2,
9,
"Dehydrator.png",
"",
new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE),
new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE),
new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE),
Expand All @@ -41,8 +39,8 @@ public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNam
}

public GregtechMetaTileEntity_ReactorColdTrap(String aName, int aTier, String[] aDescription,
ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9, aGUIName, aNEIName);
ITexture[][][] aTextures) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9);
}

@Override
Expand All @@ -56,9 +54,7 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public GregtechMetaTileEntity_ReactorProcessingUnit(int aID, String aName, Strin
"Processes Nuclear things",
2,
9,
"Dehydrator.png",
"",
new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE),
new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE),
new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE),
Expand All @@ -41,8 +39,8 @@ public GregtechMetaTileEntity_ReactorProcessingUnit(int aID, String aName, Strin
}

public GregtechMetaTileEntity_ReactorProcessingUnit(String aName, int aTier, String[] aDescription,
ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9, aGUIName, aNEIName);
ITexture[][][] aTextures) {
super(aName, aTier, 1, aDescription, aTextures, 2, 9);
}

@Override
Expand All @@ -56,9 +54,7 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
this.mName,
this.mTier,
this.mDescriptionArray,
this.mTextures,
this.mGUIName,
this.mNEIName);
this.mTextures);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
package gtPlusPlus.xmod.gregtech.loaders;

import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.*;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks6;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocksPipeGearbox;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMachineCasings;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings2;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaTieredCasingBlocks1;

public class Gregtech_Blocks {

Expand Down
Loading