I want to know in what coordinates a wither spawns from the global sound, is there some mod or tool that can do it? or is there a way i can create it by myself, i know very little Java but i can code in Python 3
The sound a Witehr makes when it spawns is constant regardless of distance or even the dimension (according to the Wiki), so it is impossible to determine the direction, much less coordinates, just from the sound itself. However, the server does send a sound packet to the client; specifically, it calls the following method, where the second to fourth parameters are the coordinates and the first one is the sound ID, 1013 for the Wither spawn sound:
public void broadcastSound(int par1, int par2, int par3, int par4, int par5)
Note that this is from the code for 1.6.4 and it has probably drastically changed since then, either way, you can get access to the decompiled source using MCP (up to 1.12) or Forge (up to 1.16, though I don't think it allows you to modify it directly so you'd need to use much more complicated methods to access/modify it) and look for code that looks like this in EntityWither (the method that makes the sound is World.func_82739_e, which in turn calls the broadcastSound method, which is in various classes, including RenderGlobal, which is client-side):
You can also do this for anything else, even the player's position when reduced debug mode is in effect (which itself is as simple as reading the position of the player entity, which must be known at all times, the debug screen itself simply censors it when the gamerule is enabled). Of course, any of this can be grounds for a ban if you use it for mischief.
How can i transfer a mod compiled in MCP to the official minecraft launcher, if i copy the version and change the file names, the launcher doesn´t seem to recognize it, it only works with the MCP startclient.bat file
How can i transfer a mod compiled in MCP to the official minecraft launcher, if i copy the version and change the file names, the launcher doesn´t seem to recognize it, it only works with the MCP startclient.bat file
You need to make a custom version with a different name from any vanilla version, such as 1.12-modded, by copying the 1.12 (or any other version) folder in the "versions" folder and renaming it and both the files inside to the same name. Then, open the json file and search for the version name, which will be in a section that looks like the following; delete everything shown except for the last line, which is renamed to the name you gave to the version, making sure that the file is formatted correctly (correct/matching commas and braces) and anything not shown here is changed:
While I show 1.12.2 here the json for all versions is formatted the same way; the "id": section is right after the "downloads" that must be deleted to prevent the launcher from redownloading a clean copy (this shows it formatted but that isn't the case anymore; even a direct download from a Wiki link shows it all on one line). Note that editing the json is the most likely cause of issues with manually installing mods; if the version doesn't appear in the version list in the launcher (make sure you restart it first) then there is a formatting error or version ID mismatch.
Of course, you'll also need to delete the META-INF folder from the jar or it will crash with a Java security error.
One more question, i don´t know if i did load the mod in the right way but when i use System.out.println("X") in the code, "X" appears in the startclient.bat console, but it doesn´t appear in the official launcher console, is there another way to print data to the console?
In my experience (with 1.6.4, which has a different logging system than later versions, the launcher prints "Version does not support log configuration, will assume one plaintext entry per line") it should appear in the game output, though it doesn't appear in the game logs saved to disk; however, using the game's own logger should work; for example, I have this code in my own modded version:
// Called by Minecraft.resetWorldData to print per-play session stats to log when exiting a world,
// also resets stats
public static void printStats(ILogAgent logger)
{
int coal = blocksMined[Block.oreCoal.blockID];
int iron = blocksMined[Block.oreIron.blockID];
int gold = blocksMined[Block.oreGold.blockID];
int redstone = blocksMined[Block.oreRedstone.blockID];
int lapis = blocksMined[Block.oreLapis.blockID];
int diamond = blocksMined[Block.oreDiamond.blockID];
int emerald = blocksMined[Block.oreEmerald.blockID];
int amethyst = blocksMined[Block.oreAmethyst.blockID];
int ruby = blocksMined[Block.oreRuby.blockID];
int rails = blocksMined[Block.rail.blockID];
int cobwebs = blocksMined[Block.web.blockID];
int mossStone = blocksMined[Block.cobblestoneMossy.blockID];
int spawners = blocksMined[Block.mobSpawner.blockID];
int totalOre = coal + iron + gold + redstone + lapis + diamond + emerald + amethyst + ruby;
int totalResources = totalOre + rails + cobwebs + mossStone;
int mobs = mobKills[0];
// Order is total resources, total ore, coal, iron, gold, redstone, lapis, diamond, emerald, amethyst, ruby, rails, cobwebs, moss stone, spawners, mobs, XP
if (totalResources > 0 || mobs > 0 || xp > 0)
{
logger.logInfo("Session stats: " + totalResources + " " + totalOre + " " + coal + " " + iron + " " + gold + " " + redstone + " " + lapis + " " + diamond + " " + emerald + " " + amethyst + " " + ruby + " " + rails + " " + cobwebs + " " + mossStone + " " + spawners + " " + mobs + " " + xp);
}
resetBlocksMined();
}
My launcher is replacing the modded version files, i don´t know how to fix it, i think the problem is with the json file, i deleted the client and server "downloads" parts in the file but there are many other downloads and if i delete them all the launcher fails
What version are you using? I can give you a json file that has been modified correctly (you can also find an example in this download (the last file listed), though a json for 1.6.4 likely won't run other versions so you can't just copy it).
I have not tested this but it should work as I modified it in exactly the same way as described above; here is a diff showing what I changed (highlighted in a darker color):
now i know what i was doing wrong but i don´t know how to fix it, when i thought i was copying the modded jar, it was the original (mcp/jars/versions), when i run recompile and reobfuscate.bat i get some jar files, but those have very different contents than the original one, i don´t know what is the jar that i should copy in 1.12.2-modded to play in the original launcher
The files that you want to copy are located in mcp\reobf\minecraft and are individual Java .class files (possibly including subfolders); these are added to the Minecraft jar in .minecraft\versions\customversion, which can be opened with a zip utility like 7Zip or WinRar (I personally never had any success with 7Zip, it gives me an error when I try to add files. It is also possible, at least for some versions, to change the extension to .zip and open it as a normal zip file, changing it back when you are done, but there may be classes with invalid filenames, at least on Windows (e.g. aux.class), and this will break Windows' built-in zip tool). Also, MCP should have instructions on how to use it in mcp\docs\README-MCP.TXT (I've never used newer versions so I can only say how the 1.6.4 version works).
I want to know in what coordinates a wither spawns from the global sound, is there some mod or tool that can do it? or is there a way i can create it by myself, i know very little Java but i can code in Python 3
The sound a Witehr makes when it spawns is constant regardless of distance or even the dimension (according to the Wiki), so it is impossible to determine the direction, much less coordinates, just from the sound itself. However, the server does send a sound packet to the client; specifically, it calls the following method, where the second to fourth parameters are the coordinates and the first one is the sound ID, 1013 for the Wither spawn sound:
Note that this is from the code for 1.6.4 and it has probably drastically changed since then, either way, you can get access to the decompiled source using MCP (up to 1.12) or Forge (up to 1.16, though I don't think it allows you to modify it directly so you'd need to use much more complicated methods to access/modify it) and look for code that looks like this in EntityWither (the method that makes the sound is World.func_82739_e, which in turn calls the broadcastSound method, which is in various classes, including RenderGlobal, which is client-side):
You can also do this for anything else, even the player's position when reduced debug mode is in effect (which itself is as simple as reading the position of the player entity, which must be known at all times, the debug screen itself simply censors it when the gamerule is enabled). Of course, any of this can be grounds for a ban if you use it for mischief.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
How can i transfer a mod compiled in MCP to the official minecraft launcher, if i copy the version and change the file names, the launcher doesn´t seem to recognize it, it only works with the MCP startclient.bat file
You need to make a custom version with a different name from any vanilla version, such as 1.12-modded, by copying the 1.12 (or any other version) folder in the "versions" folder and renaming it and both the files inside to the same name. Then, open the json file and search for the version name, which will be in a section that looks like the following; delete everything shown except for the last line, which is renamed to the name you gave to the version, making sure that the file is formatted correctly (correct/matching commas and braces) and anything not shown here is changed:
While I show 1.12.2 here the json for all versions is formatted the same way; the "id": section is right after the "downloads" that must be deleted to prevent the launcher from redownloading a clean copy (this shows it formatted but that isn't the case anymore; even a direct download from a Wiki link shows it all on one line). Note that editing the json is the most likely cause of issues with manually installing mods; if the version doesn't appear in the version list in the launcher (make sure you restart it first) then there is a formatting error or version ID mismatch.
Of course, you'll also need to delete the META-INF folder from the jar or it will crash with a Java security error.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
One more question, i don´t know if i did load the mod in the right way but when i use System.out.println("X") in the code, "X" appears in the startclient.bat console, but it doesn´t appear in the official launcher console, is there another way to print data to the console?
In my experience (with 1.6.4, which has a different logging system than later versions, the launcher prints "Version does not support log configuration, will assume one plaintext entry per line") it should appear in the game output, though it doesn't appear in the game logs saved to disk; however, using the game's own logger should work; for example, I have this code in my own modded version:
An example of the game output (from the log):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
My launcher is replacing the modded version files, i don´t know how to fix it, i think the problem is with the json file, i deleted the client and server "downloads" parts in the file but there are many other downloads and if i delete them all the launcher fails
What version are you using? I can give you a json file that has been modified correctly (you can also find an example in this download (the last file listed), though a json for 1.6.4 likely won't run other versions so you can't just copy it).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
I'm using 1.12.2
https://www.dropbox.com/s/e6fj2oyfp9a7ukd/1.12.2-modded.json?dl=0
I have not tested this but it should work as I modified it in exactly the same way as described above; here is a diff showing what I changed (highlighted in a darker color):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
now i know what i was doing wrong but i don´t know how to fix it, when i thought i was copying the modded jar, it was the original (mcp/jars/versions), when i run recompile and reobfuscate.bat i get some jar files, but those have very different contents than the original one, i don´t know what is the jar that i should copy in 1.12.2-modded to play in the original launcher
The files that you want to copy are located in mcp\reobf\minecraft and are individual Java .class files (possibly including subfolders); these are added to the Minecraft jar in .minecraft\versions\customversion, which can be opened with a zip utility like 7Zip or WinRar (I personally never had any success with 7Zip, it gives me an error when I try to add files. It is also possible, at least for some versions, to change the extension to .zip and open it as a normal zip file, changing it back when you are done, but there may be classes with invalid filenames, at least on Windows (e.g. aux.class), and this will break Windows' built-in zip tool). Also, MCP should have instructions on how to use it in mcp\docs\README-MCP.TXT (I've never used newer versions so I can only say how the 1.6.4 version works).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?