OSDN Git Service

競合確認
[chemicraft/chemicraft.git] / common / chemicraft / compounds / CompoundDebug.java
1 package chemicraft.compounds;
2
3 import net.minecraft.entity.Entity;
4 import net.minecraft.entity.player.EntityPlayer;
5 import net.minecraft.entity.projectile.EntityLargeFireball;
6 import net.minecraft.item.ItemStack;
7 import net.minecraft.world.World;
8 import chemicraft.util.ICompoundHandler;
9
10 public class CompoundDebug implements ICompoundHandler {
11
12         @Override
13         public ItemStack onItemRightClickHandler(ItemStack par1ItemStack,
14                         World par2World, EntityPlayer par3EntityPlayer) {
15                 if (!par2World.isRemote) {
16                         double var1 = par3EntityPlayer.posX;
17                         double var2 = par3EntityPlayer.posY + 10;
18                         double var3 = par3EntityPlayer.posZ;
19                         double var4 = par3EntityPlayer.posX;
20                         double var5 = par3EntityPlayer.posY;
21                         double var6 = par3EntityPlayer.posZ;
22                         par2World.spawnEntityInWorld(new EntityLargeFireball(par2World, var1, var2, var3, var4, var5, var6));
23                 }
24                 return par1ItemStack;
25         }
26
27         @Override
28         public boolean onItemUseHandler(ItemStack par1ItemStack,
29                         EntityPlayer par2EntityPlayer, World par3World, int par4, int par5,
30                         int par6, int par7, float par8, float par9, float par10) {
31                 return false;
32         }
33
34         @Override
35         public void onUpdateHandler(ItemStack par1ItemStack, World par2World,
36                         Entity par3Entity, int par4, boolean par5) {
37
38         }
39
40         @Override
41         public int getIconIndexHandler() {
42                 return 0;
43         }
44
45 }