mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 04:25:38 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -6,59 +6,59 @@ import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityProjectile;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ItemKunai extends ItemNpcWeaponInterface{
|
||||
public class ItemKunai extends ItemNpcWeaponInterface {
|
||||
|
||||
public ItemKunai(int par1, ToolMaterial tool) {
|
||||
super(par1, tool);
|
||||
}
|
||||
|
||||
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World worldObj, EntityPlayer player, int par4)
|
||||
{
|
||||
if(worldObj.isRemote){
|
||||
player.swingItem();
|
||||
return;
|
||||
}
|
||||
EntityProjectile projectile = new EntityProjectile(worldObj, player, par1ItemStack, false);
|
||||
projectile.damage = func_150931_i();
|
||||
projectile.destroyedOnEntityHit = false;
|
||||
projectile.canBePickedUp = !player.capabilities.isCreativeMode;
|
||||
projectile.setIs3D(true);
|
||||
projectile.setStickInWall(true);
|
||||
projectile.setHasGravity(true);
|
||||
projectile.setSpeed(12);
|
||||
projectile.shoot(1);
|
||||
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
par1ItemStack.damageItem(1, player);
|
||||
if(par1ItemStack.stackSize == 0)
|
||||
return;
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = null;
|
||||
//item.dropItem = par1ItemStack;
|
||||
}
|
||||
|
||||
worldObj.playSoundAtEntity(player, "customnpcs:misc.swosh", 1.0F,1);
|
||||
|
||||
worldObj.spawnEntityInWorld(projectile);
|
||||
public ItemKunai(int par1, ToolMaterial tool) {
|
||||
super(par1, tool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
|
||||
|
||||
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World worldObj, EntityPlayer player, int par4) {
|
||||
if (worldObj.isRemote) {
|
||||
player.swingItem();
|
||||
return;
|
||||
}
|
||||
EntityProjectile projectile = new EntityProjectile(worldObj, player, par1ItemStack, false);
|
||||
projectile.damage = func_150931_i();
|
||||
projectile.destroyedOnEntityHit = false;
|
||||
projectile.canBePickedUp = !player.capabilities.isCreativeMode;
|
||||
projectile.setIs3D(true);
|
||||
projectile.setStickInWall(true);
|
||||
projectile.setHasGravity(true);
|
||||
projectile.setSpeed(12);
|
||||
projectile.shoot(1);
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
par1ItemStack.damageItem(1, player);
|
||||
if (par1ItemStack.stackSize == 0)
|
||||
return;
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = null;
|
||||
//item.dropItem = par1ItemStack;
|
||||
}
|
||||
|
||||
worldObj.playSoundAtEntity(player, "customnpcs:misc.swosh", 1.0F, 1);
|
||||
|
||||
worldObj.spawnEntityInWorld(projectile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
|
||||
return par1ItemStack;
|
||||
}
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack)
|
||||
{
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
|
||||
return 72000;
|
||||
}
|
||||
@Override
|
||||
public void renderSpecial(){
|
||||
|
||||
@Override
|
||||
public void renderSpecial() {
|
||||
GL11.glScalef(0.4f, 0.4f, 0.4f);
|
||||
GL11.glTranslatef(-0.4F, 0.5f, 0.1f);
|
||||
}
|
||||
@Override
|
||||
public boolean shouldRotateAroundWhenRendering(){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRotateAroundWhenRendering() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user