I have a request for a tutorial: a crop tut. I have looked and the only ones I have found r hopelessly outdated or don't work. Most people have crops in their "TODO" section and if u could do that tutorial, that would be great! Also, ur tuts look very in depth and thorough. I haven't read it all yet but I will when I add a new bow to my mod (I'm thinking of some sort of hunting aspect [link to mod is in sig]).
Vec3D vec3d = MovingObjectPosition.hitVec;
double x = vec3d.xCoord;
double y = vec3d.yCoord;
double z = vec3d.zCoord;
int i = MathHelper.floor_double(x);
int j = MathHelper.floor_double(y);
int k = MathHelper.floor_double(z);
</code>
This shows an that says it can't make a static reference to the non-static field MovingObjectPosition.hitVec. The only fix is editing the base class MovingObjectPosition. Is there any other fix for this?
Vec3D vec3d = MovingObjectPosition.hitVec;
double x = vec3d.xCoord;
double y = vec3d.yCoord;
double z = vec3d.zCoord;
int i = MathHelper.floor_double(x);
int j = MathHelper.floor_double(y);
int k = MathHelper.floor_double(z);
</code>
This shows an that says it can't make a static reference to the non-static field MovingObjectPosition.hitVec. The only fix is editing the base class MovingObjectPosition. Is there any other fix for this?
I belive that it movingobjectposition needs to be lowercase
package net.minecraft.src;
import java.util.Random;
public class ItemRod extends Item
{
public ItemRod(int par1)
{
super(par1);
maxStackSize = 1;
setMaxDamage(384);
}
/**
* called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount
*/
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
{
int i = getMaxItemUseDuration(par1ItemStack) - par4;
float f = (float)i / 20F;
f = (f * f + f * 2.0F) / 3F;
if ((double)f < 0.10000000000000001D)
{
return;
}
if (f > 1.0F)
{
f = 1.0F;
}
EntityBolt entitybolt = new EntityBolt(par2World, par3EntityPlayer, 1.1f * 5.0F);
if (f == 1.0F)
{
entitybolt.arrowCritical = true;
}
int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);
if (j > 0)
{
entitybolt.setDamage(entitybolt.getDamage() + (double)j * 0.5D + 0.5D);
}
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (k > 0)
{
entitybolt.func_46023_b(k);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
entitybolt.setFire(100);
}
par1ItemStack.damageItem(1, par3EntityPlayer);
par2World.playSoundAtEntity(par3EntityPlayer, "fire.ignite", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(entitybolt);
}
}
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
}
return par1ItemStack;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return 50;
}
}
Fix your render file.
Art by me: MrPancakeWolfie@DeviantArt
Be sure to check out my texture pack: Easy Ores!
<code>
Vec3D vec3d = MovingObjectPosition.hitVec;
double x = vec3d.xCoord;
double y = vec3d.yCoord;
double z = vec3d.zCoord;
int i = MathHelper.floor_double(x);
int j = MathHelper.floor_double(y);
int k = MathHelper.floor_double(z);
</code>
This shows an that says it can't make a static reference to the non-static field MovingObjectPosition.hitVec. The only fix is editing the base class MovingObjectPosition. Is there any other fix for this?
Art by me: MrPancakeWolfie@DeviantArt
Maybe copy the code from bow that checks if you have an arrow in your inventory or in creative?
NVM GOT IT WORKING!
Art by me: MrPancakeWolfie@DeviantArt
Art by me: MrPancakeWolfie@DeviantArt
Thank you very much ^-^
No problem
Art by me: MrPancakeWolfie@DeviantArt
int k = itemstack.getMaxItemUseDuration() - entityplayer.func_35205_Y();
It says that it is undefined. Anyone know a fix for this?
http://www.minecraftforum.net/topic/1237692-125-lordofcatss-mods-defenders-of-steve-and-more/page__fromsearch__1
http://www.minecraftforum.net/topic/1237692-125-lordofcatss-mods-defenders-of-steve-and-more/page__fromsearch__1
Did anything change in the most recent versions of Minecraft?
The entity being shot:
The Entity renderer:
The mod main file:
It's driving me nuts, i've gone over half a dozen tutorials to see where the error is and i simply can't find it.