If you are reading this i assume you have successfuly followed
Become a Minecraft Modder
Now were going to make a harder mod. not to hard we like to keep it simple at first but still, ok follow the following steps, change whatever you want on the way.
Infomation
We will be making your player have godmode!
Instructions
Open Notepade++
Open your MCP (Minecraft COders Pack) Folder
Open your srs/Source colder and find EntityPlayer
Youll first see what he starts with, youll see Health, its set at the default 20, change it to something rediculas like 99999 and save it,
now scroll down to the respawn part, you see it setting your health to 20? change it to 9999 aswell, this will make respawn godemode, so if your on your old save and you want godmode just kill yourself and youll have it
.
So heres what were changing
Code:
public EntityPlayer(World world)
{
super(world);
inventory = new InventoryPlayer(this);
field_9371_f = 0;
score = 0;
isSwinging = false;
swingProgressInt = 0;
damageRemainder = 0;
fishEntity = null;
inventorySlots = new CraftingInventoryPlayerCB(inventory, !world.multiplayerWorld);
craftingInventory = inventorySlots;
yOffset = 1.62F;
ChunkCoordinates chunkcoordinates = world.getSpawnPoint();
setLocationAndAngles((double)chunkcoordinates.x + 0.5D, chunkcoordinates.y + 1, (double)chunkcoordinates.z + 0.5D, 0.0F, 0.0F);
health = 20;
field_9351_C = "humanoid";
field_9353_B = 180F;
fireResistance = 20;
texture = "/mob/char.png";
}
To
Code:
public EntityPlayer(World world)
{
super(world);
inventory = new InventoryPlayer(this);
field_9371_f = 0;
score = 0;
isSwinging = false;
swingProgressInt = 0;
damageRemainder = 0;
fishEntity = null;
inventorySlots = new CraftingInventoryPlayerCB(inventory, !world.multiplayerWorld);
craftingInventory = inventorySlots;
yOffset = 1.62F;
ChunkCoordinates chunkcoordinates = world.getSpawnPoint();
setLocationAndAngles((double)chunkcoordinates.x + 0.5D, chunkcoordinates.y + 1, (double)chunkcoordinates.z + 0.5D, 0.0F, 0.0F);
health = 9999;
field_9351_C = "humanoid";
field_9353_B = 180F;
fireResistance = 20;
texture = "/mob/char.png";
}
And respawn from:
Code:
public void preparePlayerToSpawn()
{
yOffset = 1.62F;
setSize(0.6F, 1.8F);
super.preparePlayerToSpawn();
health = 20;
deathTime = 0;
}
To
Code:
public void preparePlayerToSpawn()
{
yOffset = 1.62F;
setSize(0.6F, 1.8F);
super.preparePlayerToSpawn();
health = 99999;
deathTime = 0;
}
Now Recompile with recompile.bat in your Minecraft Coders Pack folder.
Now edit the config file in the MCP/Config the .txt document and add what you modified, so we modified entityplayer so add that and save it
now start the reobfuscate and get the class files in the final_out folder