Yes yes "Use ModLoader now herpderp" I get that part, believe me, hence why I explicitly stated on the first line that I wasn't using ModLoader. I was asking if anyone had any non-ModLoader solutions. And, no, everything is not 100 times harder without ModLoader. I've gotten plenty far with little hassle, and most of the hassle I have had up until now I would have had even if I was using ModLoader. Jeez.
Jamol, I've tried to use isSprinting() but that doesn't seem to register when the player is riding an entity :3. Sneak does, however. Huh.
For any non-Modloader peeps out there that may have a solution, my current bit of riding code:
public void moveEntity(double d, double d1, double d2)
{
if(riddenByEntity != null)
{
if(riddenByEntity.isSprinting()){
System.out.println("We're Sprinting!"); //Actually.... it is not reaching this so there is obviously a problem with "isSprinting()"
motionX += riddenByEntity.motionX*10;
motionZ += riddenByEntity.motionZ*10;
}
else {
motionX += riddenByEntity.motionX*5;
motionZ += riddenByEntity.motionZ*5;
}
if(isCollidedHorizontally)
{
isJumping = true;
}
super.moveEntity(motionX, motionY, motionZ);
}
else super.moveEntity(d, d1, d2);
}
Elsewise I think I might try key-binding. |D
If the player can already control the horse's movement, why not just make a custom copy of isSprinting() inside the horse file that's activated by the player in the same way as normal but used exclusively by the horse to increase its speed?
Hi, I am back. I finally managed to make it work, now I just need to know where do I change the damage value of the stonepiece when thrown by the slingshot, and still having problem with the render file...I dont know if I need it, as I just want the item texture itself to show.
private double damage = 2.0D;
Change this number -- it gets multiplied based on certain aspects such as velocity and "arrowCritical" during the arrow firing functions.
Also you will need the Render file because it's not just a plain-old item entity. However, making the Render file point at the proper texture has proven a pain in the ass for me...so I have to wish you luck on that one if no one else can help you there.
As a side note you might consider looking into the pathing logic employed by the skeletons in 1.2.3. They now seek out water blocks in daylight. This logic takes care of both finding the block you are looking for in an area, and calculating a path to it if it is reachable.
Oh trust me, I already have. 95% of it is still obfuscated so trying to read it feels kind of like looking into the toilet in a public restroom.
I love let's plays-- especially ones that use my pack. :3
Thanks!
Do Optifine and forge play nice?
Yessir. The rule-enforcing has begun. >:]
*dancedance*
I haven't tested it recently, mostly because last time I tried to use Optifine it mysteriously made none of my mod textures display, despite the fact that the game knew they were all there. (It would have crashed with errors stating that it couldn't find the texture files otherwise)
yes as crueltyinc said, the block ids haven't been implemented yet. my guess is that that will come out at the same time as the official api
and to add to his other comment forge is also recommended if you're making new dimensions, adding arrows, adding redstone type things, adding ladders, adding liquids, and especially adding new tools and armor
Translation:
"Forge is recommended if you plan on doing anything at all interesting, want between zero and extremely few base-class edits, and virtually guaranteed compatibility with some of the largest, most popular, and most well-developed mods out there."
Thank you all for pointing out my stupidity with the automatic null assignment. Now I can finally get to the part of this that actually DOES something...
I wanted to test if this was only a glitch for Flax, so I quickly made this, another naturally generated flower, that has the same problem.
In the tin ore file where you used ModLoader.addOverride() in place of the "0" for the texture index number, just put a 0 here and move that Override to the same place it is in the Flax file, partly because the inconsistency bothers me, but mostly because the inconsistency could be a problem...
If that doesn't help post back and we can try the next thing.
Yeah, so I'm trying to learn a bit of java, and I've noticed in some of minecraft classes the words "par1", par2" and "par3", sometimes with other words with them. Can someone explain to me what they do?
I guess they've got something to do with worlds and such. I'm a newbie.
When you see things like
World par1World
, which used to be
World world
in MCP56, these define a variable for the constructor that has the "type" of that class, meaning you can do things like
world.getBlockID(Xcoord, Ycoord, Zcoord)
This is a method from the "World" class file, thus it's allowing you to use methods from the "world" variable of the type "World".
The others, such as the aforementioned
(par1, par2, par3)
are numbers, or strings, like ints, floats, or doubles that are passed in as arguments to the method when the method is called.
The example "world.getBlockId(Xcoord, Ycoord, Zcoord)" is supposed to accept X, Y, and Z coordinates in the form of a number and return the ID of the block at that location in the world.
If you felt the desire to, you could actually change "par1, par2, par3" in your file to "potato, eggMcMuffin, giantFlyingTurtleZombies" or something similar. In normal non-obfuscated code things like this are given actual useful names so that it's easy to determine what they're for.
public ItemStack getHeldItem()
{ <----Opening bracket
return defaultHeldItem;
}
Woops...looked at the wrong post earlier...Yeah I still see nothing wrong with your code at all, I even copy/pasted it into my own file to see if it gave me an error and it didn't...
...I guess I would just copy anything customized into a completely fresh file, start over, and see if it gives you the same errors.
I ask because nothing seems to respond to it anymore. For instance, I have a boolean isFree(), which I know works as it should. Its setters and getters are also working accordingly.
But when I use-
public boolean isMovementCeased(){
return !isFree();
}
- or any other return statement such as !hasPath(), movement of the entity definitely does not cease. Soooo yeah. I'm guessing I'm a failure or it really is an unused method now.
If the former, am I missing something critical about that method?
If the latter, is there a work around? 'Cuz these animals need to stop gallivanting across the countryside.
You can probably check the monsters current position against the fields for its position in the last tick, I'm fairly sure there's something that allows you to access that information readily.
...and a quick check into Entity revealed this near the top:
public double prevPosX;
public double prevPosY;
public double prevPosZ;
This is how I get the entity's position in something I'm working on at the moment
int hostPosX = (int) (entityHost.posX);
int hostPosY = (int) (entityHost.posY);
int hostPosZ = (int) (entityHost.posZ);
world.getBlockId is throwing NullPointerExceptions, I have no freaking clue why. It's supposed to return an int, I'm checking it against an int. It wants X, Y, and X coords, I'm checking it against correct (I verified this repeatedly) X, Y, and Z coords. The only difference between this usage of world.getBlockId and other instances of its use is that I defined world as "private World world;" rather than placing it in the constructor, since the constructor for this method has to be empty...
...I have to be missing something stupid here but I can't figure out what
I miss this texturepack...I've been stuck in eyeso- I mean default for like the last 2 weeks because Forge API and MCPatcher don't play nice atm...and I had to make 16x block textures before I did them all in 32x
0
If the player can already control the horse's movement, why not just make a custom copy of isSprinting() inside the horse file that's activated by the player in the same way as normal but used exclusively by the horse to increase its speed?
0
Change this number -- it gets multiplied based on certain aspects such as velocity and "arrowCritical" during the arrow firing functions.
Also you will need the Render file because it's not just a plain-old item entity. However, making the Render file point at the proper texture has proven a pain in the ass for me...so I have to wish you luck on that one if no one else can help you there.
0
0
To do this you have to modify the lighting engine. Have fun with that.
0
Oh trust me, I already have. 95% of it is still obfuscated so trying to read it feels kind of like looking into the toilet in a public restroom.
0
I haven't tested it recently, mostly because last time I tried to use Optifine it mysteriously made none of my mod textures display, despite the fact that the game knew they were all there. (It would have crashed with errors stating that it couldn't find the texture files otherwise)
0
Translation:
"Forge is recommended if you plan on doing anything at all interesting, want between zero and extremely few base-class edits, and virtually guaranteed compatibility with some of the largest, most popular, and most well-developed mods out there."
0
0
In the tin ore file where you used ModLoader.addOverride() in place of the "0" for the texture index number, just put a 0 here and move that Override to the same place it is in the Flax file, partly because the inconsistency bothers me, but mostly because the inconsistency could be a problem...
If that doesn't help post back and we can try the next thing.
2
When you see things like , which used to be in MCP56, these define a variable for the constructor that has the "type" of that class, meaning you can do things like This is a method from the "World" class file, thus it's allowing you to use methods from the "world" variable of the type "World".
The others, such as the aforementioned are numbers, or strings, like ints, floats, or doubles that are passed in as arguments to the method when the method is called.
The example "world.getBlockId(Xcoord, Ycoord, Zcoord)" is supposed to accept X, Y, and Z coordinates in the form of a number and return the ID of the block at that location in the world.
If you felt the desire to, you could actually change "par1, par2, par3" in your file to "potato, eggMcMuffin, giantFlyingTurtleZombies" or something similar. In normal non-obfuscated code things like this are given actual useful names so that it's easy to determine what they're for.
0
Woops...looked at the wrong post earlier...Yeah I still see nothing wrong with your code at all, I even copy/pasted it into my own file to see if it gave me an error and it didn't...
...I guess I would just copy anything customized into a completely fresh file, start over, and see if it gives you the same errors.
0
You can probably check the monsters current position against the fields for its position in the last tick, I'm fairly sure there's something that allows you to access that information readily.
...and a quick check into Entity revealed this near the top:
This is how I get the entity's position in something I'm working on at the moment
0
0
...I am now stuck on this.
world.getBlockId is throwing NullPointerExceptions, I have no freaking clue why. It's supposed to return an int, I'm checking it against an int. It wants X, Y, and X coords, I'm checking it against correct (I verified this repeatedly) X, Y, and Z coords. The only difference between this usage of world.getBlockId and other instances of its use is that I defined world as "private World world;" rather than placing it in the constructor, since the constructor for this method has to be empty...
...I have to be missing something stupid here but I can't figure out what
0