Sorry for the lack of videos lately, I was focusing on my own mod and on my YouTube series, but I got a tutorial for tonight, and will be putting out more tutorials eventually, just here to basically say that the series did not end, there will still be tutorials coming out.
In about 15 mins I have a vid coming out on updating your MCP (5.6) for Minecraft 1.1, also how to update your mod.
Hey robbie or even someone else that would know, anyways so im making a mob that is agressive but spawns in the day and im not sure on how to do it... my mob spawns fine in the night and in dark caves and ive even tried changing "extends entityMob" To "extends entityCreature" but now it gives me errors on the "attackStrength = 7;" because i need to change it back to entityMob, so if someone could tell me how to do it or what im doing wrong even though the mob itself works fine just i need it to spawn in the day, If you could help that would be awesome! :laugh.gif:
Love the tuts BTW!
Hey robbie or even someone else that would know, anyways so im making a mob that is agressive but spawns in the day and im not sure on how to do it... my mob spawns fine in the night and in dark caves and ive even tried changing "extends entityMob" To "extends entityCreature" but now it gives me errors on the "attackStrength = 7;" because i need to change it back to entityMob, so if someone could tell me how to do it or what im doing wrong even though the mob itself works fine just i need it to spawn in the day, If you could help that would be awesome! :laugh.gif:
Love the tuts BTW!
EntityMob has a
public boolean getCanSpawnHere()
method, try to override that in your entity class, and play around with it a bit.
Hey Robbie, I have a problem with eclipse... It gives me a warning that says "Build path specifies execution environment JavaSE-1.6. There are no JRE's installed in the workspace that are strictly compatible with this environment." HELP!?!?!?!
method, try to override that in your entity class, and play around with it a bit.
OMFG i freakin love you! It worked and i did most of it by myself and im so proud of myself :laugh.gif: but i wouldn't of done it without you!!!!!! :biggrin.gif: , the only thing is that doing that code really messed it up because their rarity is at 150 and the minimum and max is like 40 and 50 somthing and they only spawn a few each time.
Anyways thanks so much for that!
EDIT: its because i was stupid and put the 50 for the minimum and like 40 for the max, so i guess it kinda messed up the rarity of the mob or somthing.
EDIT YET AGAIN: i also thought robbie or anyone, if they want the code how to do it just let me know in this form. :wink.gif:
I would be very grateful if someone could help me with this:
At day i have a mob(that is not on fire), not aggressive unless you attack(like pigzombies or spider)
=
I have managed that but now comes the tricky part:
At night the first mob, changes texture pack or it becomes another entity that is agressive
but when it becomes day again it changes back.
If you couldn't understand my idea then reply or if you can help me, plz do it!
Well, if you're just using the boat model, it's quite easy. Just create a new class "EntityXXX" where XXX is your intended name. It's the same as coding an entity like Robbie's mod but instead, you copy the code from EntityBoat and just edit it.
If you're using custom models, it's a little more complex. PM me if you want to know abit about that.
----
If I helped, please press the at the bottom of this post. =D
I have a problem. Whenever i try to recompile the mod it come up with this.
== MCP 5.6 (data: 5.6, client: 1.1, server: 1.1) ==
> Recompiling client...
'"C:\Program Files\Java\jdk1.7.0_02\bin\javac.exe" -g -source 1.6 -target 1.6 -c
lasspath "lib;lib\*;jars\bin\minecraft.jar;jars\bin\jinput.jar;jars\bin\lwjgl.ja
r;jars\bin\lwjgl_util.jar" -sourcepath src\minecraft -d bin\minecraft src\minecr
aft\net\minecraft\client\*.java src\minecraft\net\minecraft\isom\*.java src\mine
craft\net\minecraft\src\*.java conf\patches\ga.java conf\patches\Start.java' fai
led : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_test.java:15: error: cannot find symbol
public void GenerateSurface(World world, Random rand, int baseX, int bas
eZ)
^
symbol: class Random
location: class mod_test
1 error
1 warning
==================
FATAL ERROR
Traceback (most recent call last):
File "runtime\recompile.py", line 31, in recompile
commands.recompile(CLIENT)
File "C:\Users\Sam\Desktop\MCP\runtime\commands.py", line 736, in recompile
self.runcmd(forkcmd)
File "C:\Users\Sam\Desktop\MCP\runtime\commands.py", line 779, in runcmd
raise CalledProcessError(returncode, forkcmd, output)
CalledProcessError: Command '"C:\Program Files\Java\jdk1.7.0_02\bin\javac.exe" -
g -source 1.6 -target 1.6 -classpath "lib;lib\*;jars\bin\minecraft.jar;jars\bin\
jinput.jar;jars\bin\lwjgl.jar;jars\bin\lwjgl_util.jar" -sourcepath src\minecraft
-d bin\minecraft src\minecraft\net\minecraft\client\*.java src\minecraft\net\mi
necraft\isom\*.java src\minecraft\net\minecraft\src\*.java conf\patches\ga.java
conf\patches\Start.java' returned non-zero exit status 1
Press any key to continue . . .
And then my code is this.
package net.minecraft.src;
public class mod_test extends BaseMod
{
public static final Block test = new BlockTest (189,0).setHardness(1F);
public mod_test()
{
ModLoader.RegisterBlock(test);
ModLoader.AddName(test,"Test Block");
test.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/TestBlock.png");
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ)
{
for(int x = 0; x < 30; x++)
{
int Xcoord = baseX + rand.textInt(16);
int Ycoord = rand.textInt(70);
int Zcoord = baseZ + rand.textInt(16);
(new WorldGenMinable(test.blockID, 35)).generate(world, rand, Xcoord ,Ycoord, Zcoord);
}
}
public void load(){};
public String getVersion()
{
return "1.1.1";
}
}
Code for the actual block
package net.minecraft.src;
import java.util.Random;
public class BlockTest extends Block
{
protected BlockTest(int x, int y)
{
super(x, y, Material.rock);
}
public int idDropped(int x, Random rand, int y)
{
return 1;
}
public int quantityDropped(Random rand)
{
return 1;
}
}
I have a problem. Whenever i try to recompile the mod it come up with this.
== MCP 5.6 (data: 5.6, client: 1.1, server: 1.1) ==
> Recompiling client...
'"C:\Program Files\Java\jdk1.7.0_02\bin\javac.exe" -g -source 1.6 -target 1.6 -c
lasspath "lib;lib\*;jars\bin\minecraft.jar;jars\bin\jinput.jar;jars\bin\lwjgl.ja
r;jars\bin\lwjgl_util.jar" -sourcepath src\minecraft -d bin\minecraft src\minecr
aft\net\minecraft\client\*.java src\minecraft\net\minecraft\isom\*.java src\mine
craft\net\minecraft\src\*.java conf\patches\ga.java conf\patches\Start.java' fai
led : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_test.java:15: error: cannot find symbol
public void GenerateSurface(World world, Random rand, int baseX, int bas
eZ)
^
symbol: class Random
location: class mod_test
1 error
1 warning
==================
FATAL ERROR
Traceback (most recent call last):
File "runtime\recompile.py", line 31, in recompile
commands.recompile(CLIENT)
File "C:\Users\Sam\Desktop\MCP\runtime\commands.py", line 736, in recompile
self.runcmd(forkcmd)
File "C:\Users\Sam\Desktop\MCP\runtime\commands.py", line 779, in runcmd
raise CalledProcessError(returncode, forkcmd, output)
CalledProcessError: Command '"C:\Program Files\Java\jdk1.7.0_02\bin\javac.exe" -
g -source 1.6 -target 1.6 -classpath "lib;lib\*;jars\bin\minecraft.jar;jars\bin\
jinput.jar;jars\bin\lwjgl.jar;jars\bin\lwjgl_util.jar" -sourcepath src\minecraft
-d bin\minecraft src\minecraft\net\minecraft\client\*.java src\minecraft\net\mi
necraft\isom\*.java src\minecraft\net\minecraft\src\*.java conf\patches\ga.java
conf\patches\Start.java' returned non-zero exit status 1
Press any key to continue . . .
And then my code is this.
package net.minecraft.src;
public class mod_test extends BaseMod
{
public static final Block test = new BlockTest (189,0).setHardness(1F);
public mod_test()
{
ModLoader.RegisterBlock(test);
ModLoader.AddName(test,"Test Block");
test.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/TestBlock.png");
}
public void GenerateSurface(World world, Random rand, int baseX, int baseZ)
{
for(int x = 0; x < 30; x++)
{
int Xcoord = baseX + rand.textInt(16);
int Ycoord = rand.textInt(70);
int Zcoord = baseZ + rand.textInt(16);
(new WorldGenMinable(test.blockID, 35)).generate(world, rand, Xcoord ,Ycoord, Zcoord);
}
}
public void load(){};
public String getVersion()
{
return "1.1.1";
}
}
Code for the actual block
package net.minecraft.src;
import java.util.Random;
public class BlockTest extends Block
{
protected BlockTest(int x, int y)
{
super(x, y, Material.rock);
}
public int idDropped(int x, Random rand, int y)
{
return 1;
}
public int quantityDropped(Random rand)
{
return 1;
}
}
It's "nextInt() not textInt()" :biggrin.gif:
int Xcoord = baseX + rand.textInt(16);
int Ycoord = rand.textInt(70);
int Zcoord = baseZ + rand.textInt(16);
robbie,
I have installed mcp and that and i try to make a block and i do the same you do but making my block and it keeps coming up with errors. Help!
If you ever want to get any help you dont say "it keeps coming up with errors" what you want to say is "I got these errors" and then post what errors you got. No one can help you if you dont say what messed up.
Rollback Post to RevisionRollBack
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:234)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1217)
at net.minecraft.src.ModLoader.init(ModLoader.java:708)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:150)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
at net.minecraft.client.Minecraft.run(Minecraft.java:620)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at net.minecraft.src.EnumArmorMaterial.getDamageReductionAmount(EnumArmorMaterial.java:44)
at net.minecraft.src.ItemArmor.<init>(ItemArmor.java:20)
at net.minecraft.src.mod_Steel.<clinit>(mod_Steel.java:25)
--- BEGIN ERROR REPORT 3be3a3ae --------
Generated 1/16/12 10:59 PM
Minecraft: Minecraft 1.1
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Mobility Radeon HD 5470 version 4.0.9902 Compatibility Profile Context, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.Entity.func_41002_a(Entity.java:617)
at net.minecraft.src.Entity.moveEntity(Entity.java:555)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:811)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:997)
at net.minecraft.src.EntityMob.onLivingUpdate(EntityMob.java:24)
at net.minecraft.src.EntityZombie.onLivingUpdate(EntityZombie.java:45)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:375)
at net.minecraft.src.EntityMob.onUpdate(EntityMob.java:29)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1665)
at net.minecraft.src.World.updateEntity(World.java:1640)
at net.minecraft.src.World.updateEntities(World.java:1540)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1548)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:694)
at net.minecraft.client.Minecraft.run(Minecraft.java:634)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 6ef48657 ----------
In about 15 mins I have a vid coming out on updating your MCP (5.6) for Minecraft 1.1, also how to update your mod.
//Video is uploaded and is #1 in the playlist.
Love the tuts BTW!
EntityMob has a
method, try to override that in your entity class, and play around with it a bit.
OMFG i freakin love you! It worked and i did most of it by myself and im so proud of myself :laugh.gif: but i wouldn't of done it without you!!!!!! :biggrin.gif: , the only thing is that doing that code really messed it up because their rarity is at 150 and the minimum and max is like 40 and 50 somthing and they only spawn a few each time.
Anyways thanks so much for that!
EDIT: its because i was stupid and put the 50 for the minimum and like 40 for the max, so i guess it kinda messed up the rarity of the mob or somthing.
EDIT YET AGAIN: i also thought robbie or anyone, if they want the code how to do it just let me know in this form. :wink.gif:
That would be great and really help ful if you could post that! I've been wondering how to do this for a while now!
Thanks in advance!
I would be very grateful if someone could help me with this:
At day i have a mob(that is not on fire), not aggressive unless you attack(like pigzombies or spider)
=
I have managed that but now comes the tricky part:
At night the first mob, changes texture pack or it becomes another entity that is agressive
but when it becomes day again it changes back.
If you couldn't understand my idea then reply
or if you can help me, plz do it!
I see. Thanks a lot for your help.
And then my code is this.
Code for the actual block
It's "nextInt() not textInt()" :biggrin.gif:
Wait i still have the same error though...
I have installed mcp and that and i try to make a block and i do the same you do but making my block and it keeps coming up with errors. Help!
If you ever want to get any help you dont say "it keeps coming up with errors" what you want to say is "I got these errors" and then post what errors you got. No one can help you if you dont say what messed up.
Code
package net.minecraft.src;
public class ItemWiseManSpawner extends Item {
protected ItemWiseManSpawner(int x) {
super(x);
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
entityplayer.addChatMessage("Spawning A Wise Man");
EntityWiseMan wiseman = new EntityWiseMan(world);
wiseman.setPosition(entityplayer.posX + 3, entityplayer.posY, entityplayer.posZ);
world.entityjoinedworld(wiseman);
return itemstack;
}
}
And Says
The method entityjoinedworld(EntityWiseMan) is undefined for the type World
In 1.1 some of the method names were changed, it's
instead of
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:234)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1217)
at net.minecraft.src.ModLoader.init(ModLoader.java:708)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:150)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
at net.minecraft.client.Minecraft.run(Minecraft.java:620)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at net.minecraft.src.EnumArmorMaterial.getDamageReductionAmount(EnumArmorMaterial.java:44)
at net.minecraft.src.ItemArmor.<init>(ItemArmor.java:20)
at net.minecraft.src.mod_Steel.<clinit>(mod_Steel.java:25)
--- BEGIN ERROR REPORT 3be3a3ae --------
Generated 1/16/12 10:59 PM
Minecraft: Minecraft 1.1
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Mobility Radeon HD 5470 version 4.0.9902 Compatibility Profile Context, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.Entity.func_41002_a(Entity.java:617)
at net.minecraft.src.Entity.moveEntity(Entity.java:555)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:811)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:997)
at net.minecraft.src.EntityMob.onLivingUpdate(EntityMob.java:24)
at net.minecraft.src.EntityZombie.onLivingUpdate(EntityZombie.java:45)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:375)
at net.minecraft.src.EntityMob.onUpdate(EntityMob.java:29)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1665)
at net.minecraft.src.World.updateEntity(World.java:1640)
at net.minecraft.src.World.updateEntities(World.java:1540)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1548)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:694)
at net.minecraft.client.Minecraft.run(Minecraft.java:634)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 6ef48657 ----------