Jump to content
  • 0

[Help] Eclipse Patch bug? "Patch contains 0 added and 0 removed lines"


rallisf1
 Share

Question

I used to be a dev 4 years ago but haven't used Java since then and i am facing some difficulties.

 

I am working on a fresh project based on Coyote's Faction engine (with many modifications and additions). My problem must be really unique coz i didn't find anything about it on any forum or by googling. As i was applying some patches i noticed than parts of the patch were completely ignored. No errors showed .even after i manually corrupt the code to mismatch original revision.

 

Example:

Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 4014)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -682,8 +682,34 @@
public static String L2JMOD_MULTILANG_DEFAULT;
public static boolean L2JMOD_MULTILANG_VOICED_ALLOW;
public static boolean L2WALKER_PROTECTION;

+	//--------------------------------------------------
+	// Faction Engine Related Settings
+	//--------------------------------------------------
+	public static boolean ENABLE_FACTION_ENGINE;
+	public static boolean FACTION_ALLOW_ITEM_REWARD;
+	public static int FACTION_ITEM_NUMBER_REWARD_ON_PVP;
+	public static int FACTION_TEAM1_NAME_COLOR;
+	public static int FACTION_TEAM2_NAME_COLOR;
+	public static String FACTION_TEAM1_NAME;
+	public static String FACTION_TEAM2_NAME;
+	public static int FACTION_TEAM1_BASE_X;
+	public static int FACTION_TEAM1_BASE_Y;
+	public static int FACTION_TEAM1_BASE_Z;
+	public static int FACTION_TEAM2_BASE_X;
+	public static int FACTION_TEAM2_BASE_Y;
+	public static int FACTION_TEAM2_BASE_Z;
+	public static int FACTION_CUSTOM_SPAWN_LOC_X;
+	public static int FACTION_CUSTOM_SPAWN_LOC_Y;
+	public static int FACTION_CUSTOM_SPAWN_LOC_Z;
+	public static boolean NULL_FACTION_STARTING_TITLE;
+	public static int FACTION_ITEM_REWARD_ID;
+	public static boolean AUTO_NOBLESSE;
+	public static boolean ENABLE_ONLINE_VC;
+	public static boolean ENABLE_ONLINE_PLAYERS_ON_ENTERWORLD;
+	public static boolean ENABLE_FINFO_VC;
+
//--------------------------------------------------
// NPC Settings
//--------------------------------------------------
public static boolean ANNOUNCE_MAMMON_SPAWN;

 

is completely ignored no matter what modifications i do, if i apply the patch manually (go to config.java and paste the + lines) the code works and server compiles but i really need to keep my additions in patches so i can keep track of them.

 

for the same file this code works:

Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 4014)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -2193,7 +2220,43 @@
					e.printStackTrace();
					throw new Error("Failed to Load "+L2JMOD_CONFIG_FILE+" File.");
				}
+				
+				// Load The FactionRelated Config File
+				try
+				{
+					L2Properties FactionRelated = new L2Properties();
+					is = new FileInputStream(new File(FACTION_ENGINE_CONFIG_FILE));
+					FactionRelated.load(is);

+					ENABLE_FACTION_ENGINE 						= Boolean.parseBoolean(FactionRelated.getProperty("FactionEngineEnabled", "False"));
+					FACTION_TEAM1_NAME 							= FactionRelated.getProperty("Team1Name", "koofs");
+					FACTION_TEAM2_NAME							= FactionRelated.getProperty("Team2Name", "noobs");
+					FACTION_TEAM1_NAME_COLOR 					= Integer.decode("0x" + FactionRelated.getProperty("Team1ColorName", "00FFFF"));
+					FACTION_TEAM2_NAME_COLOR 					= Integer.decode("0x" + FactionRelated.getProperty("Team2ColorName", "00FF00"));
+					FACTION_ALLOW_ITEM_REWARD 					= Boolean.parseBoolean(FactionRelated.getProperty("FactionPlayerGetItemByPvP", "False"));
+					FACTION_ITEM_NUMBER_REWARD_ON_PVP 			= Integer.parseInt(FactionRelated.getProperty("FactionEngineAmmountItemReward", "1"));
+					FACTION_ITEM_REWARD_ID 						= Integer.parseInt(FactionRelated.getProperty("FactionPvPItemRewardID", "6392"));
+					FACTION_TEAM1_BASE_X						= Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseX", "0"));
+					FACTION_TEAM1_BASE_Y						= Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseY", "0"));
+					FACTION_TEAM1_BASE_Z						= Integer.parseInt(FactionRelated.getProperty("FactionTeam1BaseZ", "0"));
+					FACTION_TEAM2_BASE_X						= Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseX", "0"));
+					FACTION_TEAM2_BASE_Y						= Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseY", "0"));
+					FACTION_TEAM2_BASE_Z						= Integer.parseInt(FactionRelated.getProperty("FactionTeam2BaseZ", "0"));
+					FACTION_CUSTOM_SPAWN_LOC_X					= Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocX", "0"));
+					FACTION_CUSTOM_SPAWN_LOC_Y					= Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocY", "0"));
+					FACTION_CUSTOM_SPAWN_LOC_Z					= Integer.parseInt(FactionRelated.getProperty("FactionCustomSpawnLocZ", "0"));
+					NULL_FACTION_STARTING_TITLE					= Boolean.parseBoolean(FactionRelated.getProperty("NullFactionStartingTitle", "False"));
+					AUTO_NOBLESSE								= Boolean.parseBoolean(FactionRelated.getProperty("EnableTheAutoNoblesseMod", "False"));
+					ENABLE_ONLINE_VC							= Boolean.parseBoolean(FactionRelated.getProperty("EnableOnlinePlayersVC", "False"));
+					ENABLE_ONLINE_PLAYERS_ON_ENTERWORLD			= Boolean.parseBoolean(FactionRelated.getProperty("EnableOnlinePlayersEnterworld", "False"));
+					ENABLE_FINFO_VC								= Boolean.parseBoolean(FactionRelated.getProperty("EnableFactionInfoVC", "False"));
+				}
+				catch (Exception e)
+				{
+					e.printStackTrace();
+					throw new Error("Failed to Load "+FACTION_ENGINE_CONFIG_FILE+" File.");
+				}
+
				// Load PvP L2Properties file (if exists)
				try
				{

but only when i load it from a different file, when both patches are in the same file (i know i don't use index for every section of the same file) eclipse ignores both of them. It's like there is some sort of conflict happening on the first type of code but as i said i took config.java as an example this happens to me in 4 more files.

 

I use latest versions of Eclipse SDK, Subversion, JDK all 64bit on win 2003 standard x64. I don't think there is something wrong with my setup because if i apply the patches manually i can compile fine and also patches i used on the datapack had no such issues or errors.

 

Any help would be very much appreciated.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock