use of de.sanandrew.mods.claysoldiers.util.soldier.upgrade.IThrowableUpgrade in project ClaySoldiersMod by SanAndreasP.
the class TileEntityClayNexus method setStackInSlot.
private void setStackInSlot(int slot, ItemStack stack) {
switch(slot) {
case SOLDIER_SLOT:
this.p_soldierSlot = stack;
this.p_tempClayTeam = ItemClayManDoll.getTeam(stack);
break;
case THROWABLE_SLOT:
ASoldierUpgrade upg = SoldierUpgrades.getUpgrade(stack);
this.p_tempThrowableCls = stack != null && upg instanceof IThrowableUpgrade ? ((IThrowableUpgrade) upg).getThrowableClass() : null;
this.p_throwableSlot = stack;
break;
case MOUNT_SLOT:
this.p_mountSlot = stack;
break;
default:
this.p_upgradeItems[slot - 3] = stack;
}
}
use of de.sanandrew.mods.claysoldiers.util.soldier.upgrade.IThrowableUpgrade in project ClaySoldiersMod by SanAndreasP.
the class RenderClayNexus method renderThrowableItem.
private static void renderThrowableItem(TileEntityClayNexus nexus, ItemStack stack, float partTicks) {
float itmAngle = nexus.prevSpinAngle + (nexus.spinAngle - nexus.prevSpinAngle) * partTicks - 45.0F;
ASoldierUpgrade upg = SoldierUpgrades.getUpgrade(stack);
IThrowableUpgrade throwableUpg = upg instanceof IThrowableUpgrade ? (IThrowableUpgrade) upg : null;
if (throwableUpg == null) {
return;
}
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.875F, 0.0F);
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(0.25F, 0.25F, 0.25F);
GL11.glRotatef(-itmAngle, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, 0.0F, 0.0F);
GL11.glColor3f(1.0F, 1.0F, 1.0F);
throwableUpg.renderNexusThrowable(nexus, partTicks);
GL11.glColor3f(1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}
Aggregations