I needed to make my old 1.5.2 mod from ModLoader to ForgeML. So I made all new code for ForgeML. I just have two more errors to fix and I'm not sure how to fix them. Here they are.
C:\Users\Stegnokilla\Desktop\mcp2\forge\mcp\src\minecraft\net\minecraft\entity\p
rojectile\EntityZaryteArrow.java:316: error: method causeArrowDamage in class Da
mageSource cannot be applied to given types;
damagesource = DamageSource.causeArrowDamage(this, this)
;
^
required: EntityArrow,Entity
found: EntityZaryteArrow,EntityZaryteArrow
reason: actual argument EntityZaryteArrow cannot be converted to EntityArrow b
y method invocation conversion
C:\Users\Stegnokilla\Desktop\mcp2\forge\mcp\src\minecraft\net\minecraft\entity\p
rojectile\EntityZaryteArrow.java:320: error: method causeArrowDamage in class Da
mageSource cannot be applied to given types;
damagesource = DamageSource.causeArrowDamage(this, this.
shootingEntity);
^
required: EntityArrow,Entity
found: EntityZaryteArrow,Entity
"reason: actual argument EntityZaryteArrow cannot be converted to EntityArrow"
your custom arrow has to be an instance of EntityArrow
hey um sorry for bothering you but i am not that advanced of a coder and i do not understand that kind of stuff that easily, can you tell me what to do or comment the code i am supposed to change?
hey um sorry for bothering you but i am not that advanced of a coder and i do not understand that kind of stuff that easily, can you tell me what to do or comment the code i am supposed to change?
I didn't read through all your code, so I'm not sure what your custom arrows need to do differently from normal arrows, but the fix may be as easy as extending EntityArrow instead of Entity:
public class EntityZaryteArrow extends EntityArrow implements IProjectile {
// constructors
// override whatever methods you need
}
However, EntityArrow's code is set up in a very non-extension-friendly fashion, as most of the good stuff happens in onUpdate, but also a lot of stuff that you don't want to have to copy just to change a single line. I've created a base class called 'EntityCustomArrow' that extends EntityArrow and breaks everything up into easily overridden methods, making it easy to customize many different aspects of your arrows. You should register both EntityCustomArrow and your Entities that extend it to the GameRegistry using registerModEntity. If your arrow looks just like a normal arrow, you won't need a custom render.
I didn't read through all your code, so I'm not sure what your custom arrows need to do differently from normal arrows, but the fix may be as easy as extending EntityArrow instead of Entity:
public class EntityZaryteArrow extends EntityArrow implements IProjectile {
// constructors
// override whatever methods you need
}
However, EntityArrow's code is set up in a very non-extension-friendly fashion, as most of the good stuff happens in onUpdate, but also a lot of stuff that you don't want to have to copy just to change a single line. I've created a base class called 'EntityCustomArrow' that extends EntityArrow and breaks everything up into easily overridden methods, making it easy to customize many different aspects of your arrows. You should register both EntityCustomArrow and your Entities that extend it to the GameRegistry using registerModEntity. If your arrow looks just like a normal arrow, you won't need a custom render.
Here are the lines that the errors are at.
Here is the full code for EntityZaryteArrow.java
If you have any idea how to fix it, comment below please.
hey um sorry for bothering you but i am not that advanced of a coder and i do not understand that kind of stuff that easily, can you tell me what to do or comment the code i am supposed to change?
I didn't read through all your code, so I'm not sure what your custom arrows need to do differently from normal arrows, but the fix may be as easy as extending EntityArrow instead of Entity:
However, EntityArrow's code is set up in a very non-extension-friendly fashion, as most of the good stuff happens in onUpdate, but also a lot of stuff that you don't want to have to copy just to change a single line. I've created a base class called 'EntityCustomArrow' that extends EntityArrow and breaks everything up into easily overridden methods, making it easy to customize many different aspects of your arrows. You should register both EntityCustomArrow and your Entities that extend it to the GameRegistry using registerModEntity. If your arrow looks just like a normal arrow, you won't need a custom render.
Thank you it worked ��������