I am using mcp minecraft, and everything in setup process until running is working well, but when I am trying to change block parameter using eclipse editor through Client => src => net.minecraft.block in Block.java file, trying to change value of this.slipperiness into different value other than default, it cannot happen or not implemented when running the game, please any advice ? thanks.
Where exactly are you trying to change it, and what version? I assume you are changing where it is set within the Block base class, which looks like this for 1.6.4:
This should definitely work, as would setting the value within the constructor of a sub-class; for example, BlockIce, which will always have to be set after the call to super so this can't be the problem (if you could set it before then the super would override it but Java doesn't allow this):
You could also search through the code for any references to "slipperiness" to see how it is being used (vanilla 1.6.4 directly references the field with no blocks ever making any special changes other than in the constructor; for comparison, in TMCW I changed it so it is accessed with a method to enable metadata to affect it so packed ice is 0.98 and blue ice, which is a variant of packed ice, returns 1.01. However, blue ice wasn't added to vanilla until 1.13, which removed all block variants, so I doubt they have such a method, unless it is to comply with their encapsulation-oriented programming style since 1.8).
Of course, I assume you've actually recompiled the modified source (I've on occasion wondered why a change I made didn't take effect only to realize I hadn't saved the file), and you are actually using pure MCP, not Forge or anything else, unless it is for a very old version (I modified the MCP-Forge source for my own mods back in 1.6.2 but from what I've heard I have the impression that the source is now only provided for reference).
Also, since "slipperiness" is a public non-final field (at least in 1.6.4) you could directly set it without modifying the Block class or related classes after they have been initialized, except the class you put your code in that accesses them (I prefer to avoid modifying vanilla classes or completely replace them with my own when possible to keep them more "Mojang-friendly" as they frown on distributing their assets, at least more than an unspecified "substantial" amount. Of course, this also helps with compatibility with other mods - you can even do this with a Forge mod):
// Makes stone have the slipperiness of ice
Block.stone.slipperiness = 0.98F;
Without any luck, when the game is running nothing of any slipperiness effect is show, regarding your feedback sure this is will work, but not for me, any advice on which part of MCP class that I must change for make it happened ?
I have no idea how the code has changed between 1.6.4 and 1.12.2 but what you show is very similar so it seems to be used the same way; just to be sure, you can use a search tool (even just Windows search) to search all sources for references to "slipperiness"; for example:
You can also try printing out the value where it is accessed, such as in EntityLivingBase, which is used by all living entities (it is a good idea to do this in a Superflat world with no mobs other than the player as every non-flying mob will be printing it out 20 times per second; the player themselves can control the output by flying):
Otherwise, I've looked around and couldn't find anybody else having issues changing it; I can only think you aren't changing the correct files or they aren't being compiled for some reason (have you made any other changes that work?).
I am using mcp minecraft, and everything in setup process until running is working well, but when I am trying to change block parameter using eclipse editor through Client => src => net.minecraft.block in Block.java file, trying to change value of this.slipperiness into different value other than default, it cannot happen or not implemented when running the game, please any advice ? thanks.
Where exactly are you trying to change it, and what version? I assume you are changing where it is set within the Block base class, which looks like this for 1.6.4:
This should definitely work, as would setting the value within the constructor of a sub-class; for example, BlockIce, which will always have to be set after the call to super so this can't be the problem (if you could set it before then the super would override it but Java doesn't allow this):
You could also search through the code for any references to "slipperiness" to see how it is being used (vanilla 1.6.4 directly references the field with no blocks ever making any special changes other than in the constructor; for comparison, in TMCW I changed it so it is accessed with a method to enable metadata to affect it so packed ice is 0.98 and blue ice, which is a variant of packed ice, returns 1.01. However, blue ice wasn't added to vanilla until 1.13, which removed all block variants, so I doubt they have such a method, unless it is to comply with their encapsulation-oriented programming style since 1.8).
Of course, I assume you've actually recompiled the modified source (I've on occasion wondered why a change I made didn't take effect only to realize I hadn't saved the file), and you are actually using pure MCP, not Forge or anything else, unless it is for a very old version (I modified the MCP-Forge source for my own mods back in 1.6.2 but from what I've heard I have the impression that the source is now only provided for reference).
Also, since "slipperiness" is a public non-final field (at least in 1.6.4) you could directly set it without modifying the Block class or related classes after they have been initialized, except the class you put your code in that accesses them (I prefer to avoid modifying vanilla classes or completely replace them with my own when possible to keep them more "Mojang-friendly" as they frown on distributing their assets, at least more than an unspecified "substantial" amount. Of course, this also helps with compatibility with other mods - you can even do this with a Forge mod):
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?
Hi MasterCaver.
Thanks for the feedback, as the information I used MCP version 1.12.2 trying to implement slipperiness effect to the game through modify Block class :
Without any luck, when the game is running nothing of any slipperiness effect is show, regarding your feedback sure this is will work, but not for me, any advice on which part of MCP class that I must change for make it happened ?
Thanks
I have no idea how the code has changed between 1.6.4 and 1.12.2 but what you show is very similar so it seems to be used the same way; just to be sure, you can use a search tool (even just Windows search) to search all sources for references to "slipperiness"; for example:
You can also try printing out the value where it is accessed, such as in EntityLivingBase, which is used by all living entities (it is a good idea to do this in a Superflat world with no mobs other than the player as every non-flying mob will be printing it out 20 times per second; the player themselves can control the output by flying):
Otherwise, I've looked around and couldn't find anybody else having issues changing it; I can only think you aren't changing the correct files or they aren't being compiled for some reason (have you made any other changes that work?).
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?