svetliy написал(а):Не хочет работать
public class VGItemBulletSG extends VGItemAmmo {
public int BSG;
public VGItemBulletSG() {
super((ItemStack)null);
this.setMaxDamage(BSG);
this.setMaxStackSize(20);
this.setCreativeTab(VGEngine.instance().weapons_tab);
}
public void shet(EntityPlayerMP player){
int num1 = 0;
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
if (player.inventory.mainInventory != null) {
if (player.inventory.getStackInSlot(i).getItem() == VGItems.bullet_30_30) {
num1 += player.inventory.getStackInSlot(i).stackSize;
if (num1 >= 8) {
BSG = 8;
}
} else if (num1 >= 7) {
BSG = 7;
} else if (num1 >= 6) {
BSG = 6;
} else if (num1 >= 5) {
BSG = 5;
} else if (num1 >= 4) {
BSG = 4;
} else if (num1 >= 3) {
BSG = 3;
} else if (num1 >= 2) {
BSG = 2;
} else if (num1 >= 1) {
BSG = 1;
}
break;
}
}
}
}
hohserg написал(а):Сделай свою шкалу дамага предмета
svetliy написал(а):Не хочет работать
public class VGItemBulletSG extends VGItemAmmo {
public int BSG;
public VGItemBulletSG() {
super((ItemStack)null);
this.setMaxDamage(BSG);
this.setMaxStackSize(20);
this.setCreativeTab(VGEngine.instance().weapons_tab);
}
public void shet(EntityPlayerMP player){
int num1 = 0;
for (int i = 0; i < player.inventory.mainInventory.length; i++) {
if (player.inventory.mainInventory != null) {
if (player.inventory.getStackInSlot(i).getItem() == VGItems.bullet_30_30) {
num1 += player.inventory.getStackInSlot(i).stackSize;
if (num1 >= 8) {
BSG = 8;
}
} else if (num1 >= 7) {
BSG = 7;
} else if (num1 >= 6) {
BSG = 6;
} else if (num1 >= 5) {
BSG = 5;
} else if (num1 >= 4) {
BSG = 4;
} else if (num1 >= 3) {
BSG = 3;
} else if (num1 >= 2) {
BSG = 2;
} else if (num1 >= 1) {
BSG = 1;
}
break;
}
}
}
}
"IItemRenderer" - поищиsvetliy написал(а):Не подскажешь как её сделать?
В данном случае, это говноMaxik001 написал(а):а чё ?