Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bs] update for Jenkins and apply spotless and remove wildcards #13

Merged
merged 2 commits into from
Jan 9, 2024
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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1704650211
//version: 1704751096
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -786,7 +786,7 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4')
}

java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Add your dependencies here

dependencies {
compileOnly('com.github.GTNewHorizons:waila:1.5.19:api')
compileOnly('com.github.GTNewHorizons:waila:1.6.5:api')
}
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,3 @@ usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
#customArchiveBaseName =

disableSpotless = true
# TODO: Remove when you modify this repository, it's been put in for automatic buildscript updates
disableCheckstyle = true
8 changes: 0 additions & 8 deletions repositories.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
// Add any additional repositories for your dependencies here

repositories {
maven {
name 'GTNH Maven'
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol
}
maven {
url 'https://jitpack.io'
}
}
9 changes: 4 additions & 5 deletions src/main/java/vswe/stevesfactory/CollisionHelper.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package vswe.stevesfactory;

/**
* Created with IntelliJ IDEA.
* User: Vswe
* Date: 17/12/13
* Time: 04:18
* To change this template use File | Settings | File Templates.
* Created with IntelliJ IDEA. User: Vswe Date: 17/12/13 Time: 04:18 To change this template use File | Settings | File
* Templates.
*/
public class CollisionHelper {

public static boolean disableInBoundsCheck;

public static boolean inBounds(int leftX, int topY, int width, int height, int mX, int mY) {
if (disableInBoundsCheck) {
return false;
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/vswe/stevesfactory/GuiHandler.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package vswe.stevesfactory;

import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import vswe.stevesfactory.blocks.ITileEntityInterface;

import cpw.mods.fml.common.network.IGuiHandler;
import vswe.stevesfactory.blocks.ITileEntityInterface;

public class GuiHandler implements IGuiHandler {

public GuiHandler() {

}
Expand All @@ -17,8 +18,8 @@ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int
TileEntity te = world.getTileEntity(x, y, z);

if (te != null && te instanceof ITileEntityInterface) {
return ((ITileEntityInterface)te).getContainer(te, player.inventory);
}else{
return ((ITileEntityInterface) te).getContainer(te, player.inventory);
} else {
return null;
}
}
Expand All @@ -28,8 +29,8 @@ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int
TileEntity te = world.getTileEntity(x, y, z);

if (te != null && te instanceof ITileEntityInterface) {
return ((ITileEntityInterface)te).getGui(te, player.inventory);
}else{
return ((ITileEntityInterface) te).getGui(te, player.inventory);
} else {
return null;
}
}
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/vswe/stevesfactory/Localization.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package vswe.stevesfactory;


import net.minecraft.util.StatCollector;

public enum Localization {

TRIGGER_SHORT,
TRIGGER_LONG,
INPUT_SHORT,
Expand Down Expand Up @@ -37,7 +37,7 @@ public enum Localization {
CAMOUFLAGE_SHORT,
CAMOUFLAGE_LONG,
SIGN_SHORT,
SIGN_LONG ,
SIGN_LONG,

CONNECTION_INPUT,
CONNECTION_OUTPUT,
Expand Down Expand Up @@ -335,7 +335,6 @@ public enum Localization {
ENLARGE_INTERFACES,
AUTO_MOVE_FIRST,


GIVE_PERMISSION,
REVOKE_PERMISSION,
ACTIVATE_USER,
Expand All @@ -353,7 +352,7 @@ public enum Localization {
EDITOR_DESCRIPTION_SHORT,
USER_DESCRIPTION_SHORT,
EDITOR_DESCRIPTION_LONG,
USER_DESCRIPTION_LONG ,
USER_DESCRIPTION_LONG,
PERMISSION_OWNER,
PERMISSION_EDITOR,
PERMISSION_USER,
Expand All @@ -362,8 +361,6 @@ public enum Localization {
PERMISSION_INVENTORY,
PERMISSION_DENIED;



private String name;

private Localization() {
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/vswe/stevesfactory/SFMLogging.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
package vswe.stevesfactory;

import java.util.concurrent.ThreadLocalRandom;

import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.ChatComponentTranslation;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.FormattedMessageFactory;
import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.apache.logging.log4j.message.ParameterizedMessageFactory;
import org.lwjgl.Sys;

import java.util.concurrent.ThreadLocalRandom;

public class SFMLogging {

public static final Logger LOGGER = LogManager.getLogger("SteveFactoryManager");

public static void reportIncident(Exception ex, String location, Iterable<EntityPlayerMP> receivers) {
String incidentId = "" + System.currentTimeMillis() + ThreadLocalRandom.current().nextInt(1000);
Message message = new ParameterizedMessage("Exception in {}. Incident ID {}.", new Object[] {location, incidentId}, ex);
Message message = new ParameterizedMessage(
"Exception in {}. Incident ID {}.",
new Object[] { location, incidentId },
ex);
LOGGER.error(message);
for (EntityPlayerMP player : receivers) {
player.addChatMessage(new ChatComponentTranslation("chat.sfm.ContainerInternalServerError", incidentId));
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/vswe/stevesfactory/StevesFactoryManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package vswe.stevesfactory;

import net.minecraft.launchwrapper.Launch;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
Expand All @@ -8,7 +10,6 @@
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.FMLEventChannel;
import cpw.mods.fml.common.network.NetworkRegistry;
import net.minecraft.launchwrapper.Launch;
import vswe.stevesfactory.blocks.ModBlocks;
import vswe.stevesfactory.components.ModItemHelper;
import vswe.stevesfactory.network.FileHelper;
Expand All @@ -18,14 +19,15 @@
@Mod(modid = "StevesFactoryManager", name = "Steve's Factory Manager", version = "GRADLETOKEN_VERSION")
public class StevesFactoryManager {


public static final String RESOURCE_LOCATION = "stevesfactory";
public static final String CHANNEL = "FactoryManager";
public static final String UNLOCALIZED_START = "sfm.";

public static FMLEventChannel packetHandler;

@SidedProxy(clientSide = "vswe.stevesfactory.proxy.ClientProxy", serverSide = "vswe.stevesfactory.proxy.CommonProxy")
@SidedProxy(
clientSide = "vswe.stevesfactory.proxy.ClientProxy",
serverSide = "vswe.stevesfactory.proxy.CommonProxy")
public static CommonProxy proxy;

@Mod.Instance("StevesFactoryManager")
Expand All @@ -40,7 +42,6 @@ public static boolean isDevelopmentEnvironment() {
return inDev;
}


@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
packetHandler = NetworkRegistry.INSTANCE.newEventDrivenChannel(CHANNEL);
Expand All @@ -53,7 +54,7 @@ public void init(FMLInitializationEvent event) {
proxy.init();
packetHandler.register(new PacketEventHandler());
ModBlocks.addRecipes();
//new ChatListener();
// new ChatListener();
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
FMLInterModComms.sendMessage("Waila", "register", "vswe.stevesfactory.waila.Provider.callbackRegister");
}
Expand Down
Loading