If i made a video on this mod (i'm the guy from before) would you post it on the forum page for this mod or would you just leave it in the comments? Just wondering because it would be awesome if you put it in the post at the top of the page!! Thanks for responding to my message before.
Problem is I don't know what the coordinates are of the camera plane are (They seem to keep changing due to Minecraft's method of rendering the gui after the world).
If anyone can help, I'll add your name to the credits.
I need it to properly implement the homing enchantment.
I'm going to place some suggestions here i put on another enchantment mod a looong time ago...
Fury: Sword: Makes the mob hit have a 1/2 chance to ignore the player and attack the closest non-player mob.
Purifier: Helmet: Food gives you a little more hunger back when wearing a purifier helmet.
Iron Stomach: Chestplate: Rotten Flesh, Spider Eyes, and Raw meat no longer poison the player.
Smelt: Pick: Ores collected with a smelt pick drop their respective furnace items. (IE Mining iron ore gives iron ingot)
Gliding: Boots: Wearing gliding boots causes the player to glide like a chicken when moving off blocks. The higher the level, the faster the gliding.
Extermination: Sword: Just like Smite and Bane of Arthropods, but for Endermen and Creepers.
Classic: Hoe: Hoeing grass can now drop seeds like earlier versions.
Aqua: Hoe: Hoeing dirt or grass into farmland gives a 1/5 chance (higher the level higher the chance) to hydrate the farmland instantly, even without water nearby.
*no name*: Axe: Axes with this enchantment can drop double the wood, 1/4 of the time.
Hellish Reclaim: Sword: Drags the mob underground into the blocks below it to suffocate. Only happens about 1/15 of the time. Squid, Flying Mobs, and any mob over water cannot be dragged down.
Teleport: Sword and Pick: Right clicking with this rare enchantment can carry you a total distance of 15 blocks to your destination.... But it costs 10 uses of the weapons durability instead of just one.
Silence: Leggings: You make no noise while moving. Makes it harder for mobs to see you.
Ninja: Leggings: A rarer, upgraded version of silence. Makes it even harder for mobs to see you, and if you hit a mob while undetected you do a very large amount of damage.
Gravity: Chestplate: Items are attracted to you. The higher the level the farther you can pick them up from.
Some of these were put into the mod, like Classic and Fury. Fury was by far my favorite. :3
Hey guys, Sorry I've been unavailable for the past 4-5 days, I've had to organize some work for a client.
I'm delighted to see how much interest this mod has generated.
Will you eventually add all the enchantments from Original Enchantments? That would be sick.
Rest assured there will be many more enchantments. I'll prioritize those that will work well in multiplayer and are compatible
with playerAPI.
XkYouChoux said he'd like to help, so I'll make available the source code of those that require editing of base classes when I get to them later.
Please not however, that enchantments that are too superflous (e.g. blessed/burning touch)
will be dropped, in favour of more game changing ones.
Fury: Maybe not on the sword, but I have an idea to add a splash confusion enchantment on the bow.
Blurs other players FOV and leaves them with a FOV of nausea.
Gliding: I had a similar idea with a hover enchantment for boots. Basically legend of zelda style, where the player walks in the air for about 6 seconds/ maybe walk on water.
I'm not sure how implementable this will be without risking compatibility issues with other mods as that requires me to change the onUpdate() method.
Teleport. I had a similar idea for the bow.
I'm a bit worried about that becoming overpowered in multiplayer though, especially as enderpearls already serve a similar function. Perhaps hitting something will create a portal, for you to warp through by crouching?
Gravity: might be good in PvP (It's always annoying when another player successfully steals items that you just earnt after slaying an opponent).
Silence/Ninja: Nice idea, but Minecraft makes mobs detect you according to whether they can see you or not, so it won't have any effect.
The one's that won't be implemented:
Purifier/Iron Stomach: I've already got Leech/ which rewards player with hunger/small health, for engaging in combat.
Smelt: Kind of unnescessary, when coal is in abundance.
Classic (seeder): I know this was in the very first enchanting mod, however I don't think it's nescessary.
It gives you random seeds that you would have otherwise found by exploring (or trading).
Getting netherwart for tilling grass - enough said.
Aqua: The hydrated farmland will just revert back without a steady supply of water.
Hellish reclaim: What if you want to collect drops from the mob you just slayed, and you hit him above obsidian.
More Wood: Player's can duplicate blocks, that maybe rare on certain adventure maps.
I personally would prefer to have unbreaking/haste/efficiency so probably not.
I'm going to place some suggestions here i put on another enchantment mod a looong time ago...
Fury: Sword: Makes the mob hit have a 1/2 chance to ignore the player and attack the closest non-player mob.
Purifier: Helmet: Food gives you a little more hunger back when wearing a purifier helmet.
Iron Stomach: Chestplate: Rotten Flesh, Spider Eyes, and Raw meat no longer poison the player.
Smelt: Pick: Ores collected with a smelt pick drop their respective furnace items. (IE Mining iron ore gives iron ingot)
Gliding: Boots: Wearing gliding boots causes the player to glide like a chicken when moving off blocks. The higher the level, the faster the gliding.
Extermination: Sword: Just like Smite and Bane of Arthropods, but for Endermen and Creepers.
Classic: Hoe: Hoeing grass can now drop seeds like earlier versions.
Aqua: Hoe: Hoeing dirt or grass into farmland gives a 1/5 chance (higher the level higher the chance) to hydrate the farmland instantly, even without water nearby.
*no name*: Axe: Axes with this enchantment can drop double the wood, 1/4 of the time.
Hellish Reclaim: Sword: Drags the mob underground into the blocks below it to suffocate. Only happens about 1/15 of the time. Squid, Flying Mobs, and any mob over water cannot be dragged down.
Teleport: Sword and Pick: Right clicking with this rare enchantment can carry you a total distance of 15 blocks to your destination.... But it costs 10 uses of the weapons durability instead of just one.
Silence: Leggings: You make no noise while moving. Makes it harder for mobs to see you.
Ninja: Leggings: A rarer, upgraded version of silence. Makes it even harder for mobs to see you, and if you hit a mob while undetected you do a very large amount of damage.
Gravity: Chestplate: Items are attracted to you. The higher the level the farther you can pick them up from.
Some of these were put into the mod, like Classic and Fury. Fury was by far my favorite. :3
Is it possible to add an enchantment that when you block for 5 seconds, it becomes charged and on next hit will launch a ghast fireball, or maybe a thunder, however it costs a quite chunk of the durability?
Would be quite cool
Cool idea, but could turn into a griefers dream on some multiplayer servers.
Maybe as an optional enchantment that could be added with a config file.
How about an Aqua Aspect enchantment for the sword? Boosting damage vs fire based mobs(Blazes, Magma Cubes, and perhaps the Ghast(not that this one is needed, as they die in one hit anyway most of the time, but I guess it would make it a sure thing)?), with perhaps a max ranked one even able to solidify lava on right click with the sword at the cost of durability(Not that OP, just saves you the inventory slot of a water bucket).
Of course, it couldn't stack with the Fire Aspect. That just wouldn't make sense. Could also make this for bow as well. Gives the Fire Aspect a nice counter aspect, and perhaps opens the line for other elemental enchantment ideas?
I have a suggestion! You should make it where when you go into the enchantment table, instead of a whole bunch of weird symbols, it would actually tell you what each one is gonna do so you don't get some random enchantment!
Already a mod for that, Enchantments Plus. Lets you pick what you get out of the enchantment, and such, as well as offers a method of repairing enchanted gear without losing any enchantments on it, as well as a method of stripping gear of its enchantments in exchange for levels.
I have a suggestion! You should make it where when you go into the enchantment table, instead of a whole bunch of weird symbols, it would actually tell you what each one is gonna do so you don't get some random enchantment!
Also, maybe you could talk to
Thank you soo much i will get started right away!
are you using SPC? because i was also experiencing the same thing... it was because of SPC
I tried using OpenGL commands, but it seems that Minecraft resets the transformation matrix each step, so they're not working.
My first attempt involved adapting code from http://stackoverflow.com/questions/10009771/
public Vec3D get2DFrom3D(float x, float y, float z)
{
/*
FloatBuffer screen_coords = GLAllocation.createDirectFloatBuffer(4);
IntBuffer viewport = GLAllocation.createDirectIntBuffer(16);
FloatBuffer modelview = GLAllocation.createDirectFloatBuffer(16);
FloatBuffer projection = GLAllocation.createDirectFloatBuffer(16);
*/
FloatBuffer screen_coords = BufferUtils.createFloatBuffer(4);
IntBuffer viewport =BufferUtils.createIntBuffer(16);
FloatBuffer modelview =BufferUtils.createFloatBuffer(16);
FloatBuffer projection = BufferUtils.createFloatBuffer(16);
GL11.glGetFloat(2982 /*GL_MODELVIEW_MATRIX*/, modelview);
GL11.glGetFloat(2983 /*GL_PROJECTION_MATRIX*/, projection);
GL11.glGetInteger(2978 /*GL_VIEWPORT*/, viewport);
boolean result = GLU.gluProject(x, y, z, modelview, projection, viewport, screen_coords);
if (result)
{
//System.out.printf("Convert [ %6.2f %6.2f %6.2f ] -> Screen [ %4d %4d ]\n", x, y, z, (int)screen_coords[0], (int)(screen_coords[3] - screen_coords[1]));
System.out.printf("Convert [ %6.2f %6.2f %6.2f ] -> Screen [ %4d %4d ]\n", x, y, z, (int)screen_coords.get(0), (int)(screen_coords.get(3) - screen_coords.get(1)));
return Vec3D.createVectorHelper((int)screen_coords.get(0), (int)(screen_coords.get(3) - screen_coords.get(1)),0);
}
else
{
System.out.printf("Failed to convert 3D coords to 2D screen coords");
return null;
}
}
After that failed, I tried doing some 3D geometry with planes and lines:
public Vec3D closestLinePartToPoint(Vec3D start,Vec3D end,Vec3D point){
if(end==null || start==null || point==null)
return null;
Vec3D u=Vec3D.createVectorHelper(end.xCoord-start.xCoord,end.yCoord-start.yCoord,end.zCoord-start.zCoord);
Vec3D v=Vec3D.createVectorHelper(point.xCoord-start.xCoord,point.yCoord-start.yCoord,point.zCoord-start.zCoord);
u=u.normalize();
double s=u.dotProduct(v);
return Vec3D.createVectorHelper(start.xCoord+u.xCoord*s, start.yCoord+u.yCoord*s,start.zCoord+u.zCoord*s);
}
public double distanceFromLine(Vec3D start,Vec3D end,Vec3D point){
double totalDist=0;
Vec3D closestPoint=closestLinePartToPoint(start,end,point);
if(closestPoint!=null){
totalDist=Math.sqrt((closestPoint.xCoord-point.xCoord)*(closestPoint.xCoord-point.xCoord)+(closestPoint.yCoord-point.yCoord)*(closestPoint.yCoord-point.yCoord)+(closestPoint.zCoord-point.zCoord)*(closestPoint.zCoord-point.zCoord));
}
return totalDist;
}
public Vec3D calculatePlaneNormal(Vec3D plane_p1,Vec3D plane_p2,Vec3D plane_p3){
double x1=plane_p1.xCoord;
double x2=plane_p2.xCoord;
double x3=plane_p3.xCoord;
double y1=plane_p1.yCoord;
double y2=plane_p2.yCoord;
double y3=plane_p3.yCoord;
double z1=plane_p1.zCoord;
double z2=plane_p2.zCoord;
double z3=plane_p3.zCoord;
double a= y1*(z2 - z3) + y2*(z3 - z1) + y3*(z1 - z2);
double b=z1*(x2 - x3) + z2*(x3 - x1) + z3*(x1 - x2);
double c=x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2);
return Vec3D.createVectorHelper(a, b, c);
}
public Vec3D lineIntersectPlane(Vec3D line_p1,Vec3D line_p2,Vec3D plane_p1,Vec3D plane_p2,Vec3D plane_p3,boolean inLimits){
Vec3D lineDir=Vec3D.createVectorHelper(line_p2.xCoord-line_p1.xCoord,line_p2.yCoord-line_p1.yCoord,line_p2.zCoord-line_p1.zCoord);
Vec3D planeNormal=calculatePlaneNormal(plane_p1,plane_p2,plane_p3);
Vec3D diffPoint=Vec3D.createVectorHelper(plane_p1.xCoord-line_p1.xCoord,plane_p1.yCoord-line_p1.yCoord,plane_p1.zCoord-line_p1.zCoord);
double denom=lineDir.dotProduct(diffPoint);
if(denom==0){
return null;
}
double dist=diffPoint.dotProduct(planeNormal)/denom;
if(inLimits){
double maxDist=vecMagDiff(line_p1,line_p2);
if(dist<0 || dist>maxDist){
return null;
}
}
return Vec3D.createVectorHelper(line_p1.xCoord+(line_p2.xCoord-line_p1.xCoord)*dist, line_p1.yCoord+(line_p2.yCoord-line_p1.yCoord)*dist,line_p1.yCoord+(line_p2.yCoord-line_p1.yCoord)*dist);
}
public boolean lineIntersectsQuad(Vec3D line_p1,Vec3D line_p2,Vec3D sq_p1,Vec3D sq_p2,Vec3D sq_p3,Vec3D sq_p4){
Vec3D intersectionPoint=lineIntersectPlane(line_p1,line_p2,sq_p1,sq_p2,sq_p3,true);
if(intersectionPoint==null){
return false;
}
double maxDist=0;
if(vecMagDiff(sq_p1,sq_p2)>maxDist)
maxDist=vecMagDiff(sq_p1,sq_p2);
if(vecMagDiff(sq_p1,sq_p3)>maxDist)
maxDist=vecMagDiff(sq_p1,sq_p3);
if(vecMagDiff(sq_p1,sq_p4)>maxDist)
maxDist=vecMagDiff(sq_p1,sq_p4);
if(vecMagDiff(sq_p1,intersectionPoint)<=maxDist)
return true;
return false;
}
Problem is I don't know what the coordinates are of the camera plane are (They seem to keep changing due to Minecraft's method of rendering the gui after the world).
If anyone can help, I'll add your name to the credits.
I need it to properly implement the homing enchantment.
MegaMuffin, managed to use it with Single Player Commands without any problems.
http://www.cognitiveforge.com/
thanks to LucasAntunes998 for making this banner!
Fury: Sword: Makes the mob hit have a 1/2 chance to ignore the player and attack the closest non-player mob.
Purifier: Helmet: Food gives you a little more hunger back when wearing a purifier helmet.
Iron Stomach: Chestplate: Rotten Flesh, Spider Eyes, and Raw meat no longer poison the player.
Smelt: Pick: Ores collected with a smelt pick drop their respective furnace items. (IE Mining iron ore gives iron ingot)
Gliding: Boots: Wearing gliding boots causes the player to glide like a chicken when moving off blocks. The higher the level, the faster the gliding.
Extermination: Sword: Just like Smite and Bane of Arthropods, but for Endermen and Creepers.
Classic: Hoe: Hoeing grass can now drop seeds like earlier versions.
Aqua: Hoe: Hoeing dirt or grass into farmland gives a 1/5 chance (higher the level higher the chance) to hydrate the farmland instantly, even without water nearby.
*no name*: Axe: Axes with this enchantment can drop double the wood, 1/4 of the time.
Hellish Reclaim: Sword: Drags the mob underground into the blocks below it to suffocate. Only happens about 1/15 of the time. Squid, Flying Mobs, and any mob over water cannot be dragged down.
Teleport: Sword and Pick: Right clicking with this rare enchantment can carry you a total distance of 15 blocks to your destination.... But it costs 10 uses of the weapons durability instead of just one.
Silence: Leggings: You make no noise while moving. Makes it harder for mobs to see you.
Ninja: Leggings: A rarer, upgraded version of silence. Makes it even harder for mobs to see you, and if you hit a mob while undetected you do a very large amount of damage.
Gravity: Chestplate: Items are attracted to you. The higher the level the farther you can pick them up from.
Some of these were put into the mod, like Classic and Fury. Fury was by far my favorite. :3
I'm delighted to see how much interest this mod has generated.
Rest assured there will be many more enchantments. I'll prioritize those that will work well in multiplayer and are compatible
with playerAPI.
XkYouChoux said he'd like to help, so I'll make available the source code of those that require editing of base classes when I get to them later.
Please not however, that enchantments that are too superflous (e.g. blessed/burning touch)
will be dropped, in favour of more game changing ones.
Yes it should.
Sorry, the playerAPI implementation makes use of all of them, and the classes are interdependant.
http://www.cognitiveforge.com/
Here's the ones I like:
Getting netherwart for tilling grass - enough said.
http://www.cognitiveforge.com/
Thanks for reviewing my ideas. About 2 of the enchantments, i think i should have been more descriptive:
Reclaim would shoot the items out after the mob died, this probably wouldnt even need to be scripted since items already do this.
More wood would drop 4-8 wooden planks instead of wooden logs, disabling duplicating.
I'm not trying to sound picky, just felt like i should have been more specific. Thanks for reviewing them though!
I'm experimenting with several other enchantments.
I've also figured out how to got sharpshooter/homing working:
The arrows home in on the point aimed at the player (Whether on a block or entity),
but you can also target mobs by holding sneak.
however, I'll wait till 1.3 before releasing it and several others in the next update.
Fortune for the hoe, was in the old enchantments mod and I intend to implement it latter
Cool idea, but could turn into a griefers dream on some multiplayer servers.
Maybe as an optional enchantment that could be added with a config file.
Already been suggested.
http://www.cognitiveforge.com/
Of course, it couldn't stack with the Fire Aspect. That just wouldn't make sense. Could also make this for bow as well. Gives the Fire Aspect a nice counter aspect, and perhaps opens the line for other elemental enchantment ideas?
Already a mod for that, Enchantments Plus. Lets you pick what you get out of the enchantment, and such, as well as offers a method of repairing enchanted gear without losing any enchantments on it, as well as a method of stripping gear of its enchantments in exchange for levels.