Do i want to use a file that ive made with the tesselator thing, or and obj? ive been unable to figure out how to link in a .obj, and with a file made with the tesselator, it never shows up. the game acts as though there is a projectile, i just cant see it.
they are all outdated, or not for models, so what do I use for the model, the tesselator stuff? If so, do you know where i can find a tutorial on using it that is up to date?
they are all outdated, or not for models, so what do I use for the model, the tesselator stuff? If so, do you know where i can find a tutorial on using it that is up to date?
Do you HAVE to use an .obj / wavefront type of model, or can you make it in Tabula? It's easy if you have a class extending ModelBase (which is what the .java output of Tabula would give you), and you can see examples of using those types of models all over vanilla Minecraft.
Do i need to do anything to the tabula .java output file for mc 1.8? i fixed my original problem, but now it only fires white cubes.
I feel like you are not following the tutorial. Did you see step 5? Did you make and register a Render class that uses your model? If not, please read the tutorial; if so, please post your code using pastebin, gist, or a similar service.
okay so here is my question. I know it's not in the tutorial but I was wondering. So I have this variable
here
public int timer = 20;
I want to make it change the texture and power of the sword until it releases the entity. How would I go about doing this exactly.
Here is the code for the item class.
package com.BearOfDoom.Items;
import java.util.ArrayList;
import javax.swing.Icon;
import com.BearOfDoom.EntityProjectiles.EntitygetsugaTensho;
import com.BearOfDoom.Main.Main;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class Zangetsu extends ItemSword {
public int timer = 20;
public static float powerlevel = 14.0F;
private ArrayList<Icon> BowDrawingIcons = new ArrayList<Icon>();
public Zangetsu(ToolMaterial mat) {
super(mat);
this.BowDrawingIcons.add("anime:zangetsu_1");
this.BowDrawingIcons.add("anime:zangetsu_2");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
if (usingItem == null) { return itemIcon; }
int ticksInUse = stack.getMaxItemUseDuration() - useRemaining;
if (this.timer <= 10) {
return iconArray[2];
} else if (this.timer <= 15) {
return iconArray[1];
} else if (this.timer <= 20) {
return iconArray[0];
} else {
return itemIcon;
}
}
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
timer--;
if(timer <= 15) {
this.powerlevel = 16.0F;
}
if(timer <=10) {
this.powerlevel = 16.0F;
}
if(timer <= 0) {
player.worldObj.playSoundAtEntity((Entity)player, "anime:getsuga", 0.2f, 1.0f);
if (!world.isRemote) {
world.spawnEntityInWorld(new EntitygetsugaTensho(world, player));
timer = 20;
}
}
return stack;
}
}
@BearOfDoom That is beyond the scope of this tutorial. For such questions, you are far better off posting them directly in the Modification Development section.
@BearOfDoom That is beyond the scope of this tutorial. For such questions, you are far better off posting them directly in the Modification Development section.
I am trying to set it so that when it hits a block, it says still, but i just floats through blocks.
Also, can I make it so it has no arch, and just starts in front and above the player then falls?
Thanks!
Rollback Post to RevisionRollBack
There is one God. The creator of the heavens and the earth, who sent his son down to earth to save us... he loves you and he's pursuing you. Return to him.
"Some may say that you are a Christian because you were raised in a christian family, but even if my mother was a calculus teacher, no mater what she told me, two plus two would still equal four." - Dr. S. Jenkins
"I'm not a hater, I just know you're wrong. You need to realize that." - Unknown
BUT, that's not the 'latest' Forge - starting from at least 1.9, you now need to register using a RenderFactory (or maybe IRenderFactory, don't recall exactly), and it must now be done during pre-init.
All you need to do is create a class (anonymous or otherwise) implementing that interface and return whatever Render class (e.g. RenderSnowball, as before) from the single method it requires. E.g. (and this won't be proper code):
WhateverRegistry.register(new RenderFactory() {
@Override
public Render factoryMethod(RenderMananger manager, other parameters) {
return new RenderSnowball(manager, other stuff as needed);
}
});
You can find real examples on Github and by searching around on MinecraftForge.net.
The main/only purpose of the RenderFactory is so that Forge can delay instantiating Render classes registered in pre-init until the init phase, as that is the point at which the RenderManager is ready to be used (it is NULL before this point). In other words, the Render class is no longer registered directly, but via callback through the factory.
I have a problem. I've been trying to make a throwable tridents mod (I was intrigued when I ran across a thread a while back with people wanting tridents in Minecraft, so I decided to oblige them). I'm currently still using 1.7.10 because an old favorite mod resurfaced, but it's being made for 1.7.10 first before being updated.
I want to know if there's a way to make the mod in a way that won't require too much change each time I update to the next version of Minecraft in keeping up with this old favorite.
Also, I've been using a few other mods as references up until now, but now that I've found this tutorial, I think I should start my work over.
Now, another problem is that I don't want the trident to disappear on impact, but instead either stick in the ground/wall/ceiling when it hits a block (like an arrow does) or bounce off of mobs after hitting them, then stick in the ground straight down. I also need the correct amount of rotation in the initial rotation of the trident to allow the prongs to point straight forward after being thrown, kind of like an arrow. The textures for the tridents all point to the upper left instead of the upper right so that they stab when swung instead of slashing like a sword, so I don't know what to do with the rotation.
I also need the tridents to consume 1 durability with each throw, whether they hit an enemy or not. I also need them to be able to be picked up by right-clicking them if they get stuck in a block, but be unable to be picked up by anyone but the thrower in that state. The tomawaks mod has a similar guard function, so i think I can look there, but it has the tomahawk flip over and over in the air, so using it for the spin is out of the question.
Since I intend for them to be able to stab, I also need them to lose 1 durability upon hitting a mob with a stab.
If you can help with any of this at all, I'd greatly appreciate it, for I'm java illiterate (mostly. I'm learning some of the coding language, but it's mostly trial and error for me right now. That, and some cutting and pasting).
Rollback Post to RevisionRollBack
Be friendly to me, & I'll be friendly to you. Sounds easy, right?
No, there isn't really a way to code your mod in a way that will prevent you from suffering from the major changes Mojang makes each version, especially not in some general 'do things like this and you'll be fine' kind of way that lends itself to suitable advice.
For keeping your trident stuck in the ground rather than disappearing, check the EntityArrow class (and related, such as the render class and ItemBow). ItemBow will also show you how to reduce durability.
Your lack of Java knowledge will likely make this extremely difficult for you, but if you persevere and take your time reading through the vanilla code, you should be able to piece it together. I won't be able to provide you more help than this here if you have other questions, I suggest you post them in the Modification Development section. Good luck!
Thanks for the info. It doesn't matter that it wasn't much. Even a little is better than none at all.
I'll be sure to check the class files you recommended, and I think I'll also try submitting my questions to the Modification Development section, as per your suggestion. Thanks for pointing me in the right direction. I know it'll take a while, but I'm certain it'll be worth the trouble since there a sizeable amount of people in the forum thread I mentioned before.
Finally, thanks for the good wishes. People wishing me good luck actually is something I actually like, for it means they believe in me. So, thanks. I'll be sure to give it my all!
Rollback Post to RevisionRollBack
Be friendly to me, & I'll be friendly to you. Sounds easy, right?
figured out the compiler problems, but im confused on how to point the renderer to my .obj file im trying to use.
Do i want to use a file that ive made with the tesselator thing, or and obj? ive been unable to figure out how to link in a .obj, and with a file made with the tesselator, it never shows up. the game acts as though there is a projectile, i just cant see it.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSorry, I don't know anything about using .obj files. There are, however, quite a lot of posts about them in various forums if you do some searching.
they are all outdated, or not for models, so what do I use for the model, the tesselator stuff? If so, do you know where i can find a tutorial on using it that is up to date?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumDo you HAVE to use an .obj / wavefront type of model, or can you make it in Tabula? It's easy if you have a class extending ModelBase (which is what the .java output of Tabula would give you), and you can see examples of using those types of models all over vanilla Minecraft.
Do i need to do anything to the tabula .java output file for mc 1.8? i fixed my original problem, but now it only fires white cubes.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI feel like you are not following the tutorial. Did you see step 5? Did you make and register a Render class that uses your model? If not, please read the tutorial; if so, please post your code using pastebin, gist, or a similar service.
here
public int timer = 20;
I want to make it change the texture and power of the sword until it releases the entity. How would I go about doing this exactly.
Here is the code for the item class.
package com.BearOfDoom.Items; import java.util.ArrayList; import javax.swing.Icon; import com.BearOfDoom.EntityProjectiles.EntitygetsugaTensho; import com.BearOfDoom.Main.Main; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class Zangetsu extends ItemSword { public int timer = 20; public static float powerlevel = 14.0F; private ArrayList<Icon> BowDrawingIcons = new ArrayList<Icon>(); public Zangetsu(ToolMaterial mat) { super(mat); this.BowDrawingIcons.add("anime:zangetsu_1"); this.BowDrawingIcons.add("anime:zangetsu_2"); } @Override @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) { if (usingItem == null) { return itemIcon; } int ticksInUse = stack.getMaxItemUseDuration() - useRemaining; if (this.timer <= 10) { return iconArray[2]; } else if (this.timer <= 15) { return iconArray[1]; } else if (this.timer <= 20) { return iconArray[0]; } else { return itemIcon; } } public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { timer--; if(timer <= 15) { this.powerlevel = 16.0F; } if(timer <=10) { this.powerlevel = 16.0F; } if(timer <= 0) { player.worldObj.playSoundAtEntity((Entity)player, "anime:getsuga", 0.2f, 1.0f); if (!world.isRemote) { world.spawnEntityInWorld(new EntitygetsugaTensho(world, player)); timer = 20; } } return stack; } }-
View User Profile
-
View Posts
-
Send Message
Curse Premium@BearOfDoom That is beyond the scope of this tutorial. For such questions, you are far better off posting them directly in the Modification Development section.
okay thanks anyway!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHi, I have a little problem:
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemThrowingExplosiveDoll {
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (!player.capabilities.isCreativeMode) {
--stack.stackSize;
}
world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!world.isRemote) {
world.spawnEntityInWorld(new EntityThrowingExplosiveDoll(world, player));
}
return stack;
}
}
itemRand cannot be resolved :<
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou didn't extend Item... might want to learn some Java
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYus, thank you so much XD
I'm so confused.
I am trying to set it so that when it hits a block, it says still, but i just floats through blocks.
Also, can I make it so it has no arch, and just starts in front and above the player then falls?
Thanks!
There is one God. The creator of the heavens and the earth, who sent his son down to earth to save us... he loves you and he's pursuing you. Return to him.
"Some may say that you are a Christian because you were raised in a christian family, but even if my mother was a calculus teacher, no mater what she told me, two plus two would still equal four." - Dr. S. Jenkins
"I'm not a hater, I just know you're wrong. You need to realize that." - Unknown
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhateverRegistry.register(new RenderFactory() { @Override public Render factoryMethod(RenderMananger manager, other parameters) { return new RenderSnowball(manager, other stuff as needed); } });You can find real examples on Github and by searching around on MinecraftForge.net.The main/only purpose of the RenderFactory is so that Forge can delay instantiating Render classes registered in pre-init until the init phase, as that is the point at which the RenderManager is ready to be used (it is NULL before this point). In other words, the Render class is no longer registered directly, but via callback through the factory.
I have a problem. I've been trying to make a throwable tridents mod (I was intrigued when I ran across a thread a while back with people wanting tridents in Minecraft, so I decided to oblige them). I'm currently still using 1.7.10 because an old favorite mod resurfaced, but it's being made for 1.7.10 first before being updated.
I want to know if there's a way to make the mod in a way that won't require too much change each time I update to the next version of Minecraft in keeping up with this old favorite.
Also, I've been using a few other mods as references up until now, but now that I've found this tutorial, I think I should start my work over.
Now, another problem is that I don't want the trident to disappear on impact, but instead either stick in the ground/wall/ceiling when it hits a block (like an arrow does) or bounce off of mobs after hitting them, then stick in the ground straight down. I also need the correct amount of rotation in the initial rotation of the trident to allow the prongs to point straight forward after being thrown, kind of like an arrow. The textures for the tridents all point to the upper left instead of the upper right so that they stab when swung instead of slashing like a sword, so I don't know what to do with the rotation.
I also need the tridents to consume 1 durability with each throw, whether they hit an enemy or not. I also need them to be able to be picked up by right-clicking them if they get stuck in a block, but be unable to be picked up by anyone but the thrower in that state. The tomawaks mod has a similar guard function, so i think I can look there, but it has the tomahawk flip over and over in the air, so using it for the spin is out of the question.
Since I intend for them to be able to stab, I also need them to lose 1 durability upon hitting a mob with a stab.
If you can help with any of this at all, I'd greatly appreciate it, for I'm java illiterate (mostly. I'm learning some of the coding language, but it's mostly trial and error for me right now. That, and some cutting and pasting).
Be friendly to me, & I'll be friendly to you. Sounds easy, right?

My YouTube channel:
DolphyBlueDrake
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNo, there isn't really a way to code your mod in a way that will prevent you from suffering from the major changes Mojang makes each version, especially not in some general 'do things like this and you'll be fine' kind of way that lends itself to suitable advice.
For keeping your trident stuck in the ground rather than disappearing, check the EntityArrow class (and related, such as the render class and ItemBow). ItemBow will also show you how to reduce durability.
Your lack of Java knowledge will likely make this extremely difficult for you, but if you persevere and take your time reading through the vanilla code, you should be able to piece it together. I won't be able to provide you more help than this here if you have other questions, I suggest you post them in the Modification Development section. Good luck!
Thanks for the info. It doesn't matter that it wasn't much. Even a little is better than none at all.
I'll be sure to check the class files you recommended, and I think I'll also try submitting my questions to the Modification Development section, as per your suggestion. Thanks for pointing me in the right direction. I know it'll take a while, but I'm certain it'll be worth the trouble since there a sizeable amount of people in the forum thread I mentioned before.
Finally, thanks for the good wishes. People wishing me good luck actually is something I actually like, for it means they believe in me. So, thanks. I'll be sure to give it my all!
Be friendly to me, & I'll be friendly to you. Sounds easy, right?

My YouTube channel:
DolphyBlueDrake