mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 06:12:19 +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,36 +6,35 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomItems;
|
||||
|
||||
public class ItemMusic extends ItemNpcInterface{
|
||||
|
||||
private boolean shouldRotate = false;
|
||||
public class ItemMusic extends ItemNpcInterface {
|
||||
|
||||
public ItemMusic() {
|
||||
setCreativeTab(CustomItems.tabMisc);
|
||||
}
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player)
|
||||
{
|
||||
if(par2World.isRemote)
|
||||
return par1ItemStack;
|
||||
|
||||
int note = par2World.rand.nextInt(24);
|
||||
float var7 = (float)Math.pow(2.0D, (double)(note - 12) / 12.0D);
|
||||
private boolean shouldRotate = false;
|
||||
|
||||
public ItemMusic() {
|
||||
setCreativeTab(CustomItems.tabMisc);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player) {
|
||||
if (par2World.isRemote)
|
||||
return par1ItemStack;
|
||||
|
||||
int note = par2World.rand.nextInt(24);
|
||||
float var7 = (float) Math.pow(2.0D, (double) (note - 12) / 12.0D);
|
||||
|
||||
String var8 = "harp";
|
||||
|
||||
par2World.playSoundEffect(player.posX, player.posY, player.posZ, "note." + var8, 3.0F, var7);
|
||||
par2World.spawnParticle("note", player.posY, player.posY + 1.2D, player.posY, (double)note / 24.0D, 0.0D, 0.0D);
|
||||
|
||||
return par1ItemStack;
|
||||
|
||||
par2World.playSoundEffect(player.posX, player.posY, player.posZ, "note." + var8, 3.0F, var7);
|
||||
par2World.spawnParticle("note", player.posY, player.posY + 1.2D, player.posY, (double) note / 24.0D, 0.0D, 0.0D);
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public Item setRotated(){
|
||||
shouldRotate = true;
|
||||
return this;
|
||||
|
||||
public Item setRotated() {
|
||||
shouldRotate = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean shouldRotateAroundWhenRendering()
|
||||
{
|
||||
|
||||
public boolean shouldRotateAroundWhenRendering() {
|
||||
return shouldRotate;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user