Jump to content
  • 0

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


Question

Posted

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.

4 answers to this question

Recommended Posts

  • 0
Posted

Sorry

 

lol that was 2 years ago, i guess he didnt mind at all after 2 years hahaha

 

eitherways topic locked.

Guest
This topic is now closed to further replies.


  • Posts

    • Hello community, I’d like to share an improved version of the L2smr editor for StaticMeshes, focused on solving some workflow issues I found in the original tool. CreditsThis project is based on the original acmi/L2smr repository https://github.com/acmi/L2smr , created by acmi, and I updated it to Java 17 with some additional features. Issues in the original L2smr Too many windows: each StaticMesh opened in a new one → cluttered desktop. No search: navigating through hundreds of StaticMeshActors was slow and tedious. Added improvements Flexible views Single Window Mode: reuse one window instead of opening new ones. Multiple Window Mode: still available for those who prefer having several views open simultaneously. Real-time Search Field Instant filtering as you type. Case-insensitive search. “Reset” button to quickly clear the search.     Installation and Execution: Clone the repository: git clone https://github.com/Jeep12/l2smr.git cd l2smr        2.Build the project:   ./gradlew build        3. Run the application:     ./run.bat      Or simply double-click on run.bat.     The run.bat script automatically extracts JavaFX from the included javafx-17.0.2.zip file in the javafx/ directory, sets up the required libraries, and launches the application. You don’t    need to install JavaFX separately.      Repository: https://github.com/Jeep12/l2smr     Maybe these features already existed in another version or fork, and they might not be very big changes, but since I didn’t know about them and found them necessary, I decided to          implement them myself and wanted to share them.      
    • no....Mobius L2Clientdat and L2FileEditor can do that...but still cant works with TaiWanese Grand Crusade ,especially Armorgrp.dat and Armorgrp-Classic.dat
    • L2GOLD - Halcyon x45 Project Classic Interlude   C6 - Classic Interlude: Protocol 110     Is a complete copy of L2Gold in Classic [110 Protocol] with L2OFF files.   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike - Working fully Dreadbane   - AI Mods: Static Time for RB   Automated Events: Squash Watermelon RB Event High rate  (those are fully automated)   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/1d8xe18rvgi04lx/L2_Classic_Interlude_Client_V2.rar/file   Game Patch: https://www.mediafire.com/file/3z4b8ezy93h2z1g/L2Halcyon+Gold+Patch.rar/file   GM Accounts: ID: root pass root [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/o7TxzTN   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 250 Euros )
    • ✨ A Service with Vibes  Vibe SMS ✨   Vibe SMS is not just a platform for working with numbers. We’ve built it to be simple, convenient, and stress-free, so your tasks get done without hassle. We value real communication: we listen to your ideas, provide support, and make sure everyone feels calm and confident. With us, you’re not just a client  you’re part of a space built on trust, support, and a human touch. Vibe SMS is a place where people matter and where we create an atmosphere you’ll want to stay in.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
  • Topics

×
×
  • 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 Disabled AdBlock