DaviDEV 14 Posted June 24, 2015 Report post Posted June 24, 2015 Estou fazendo um pl de splegg porém estou com um erro já fiz o sistema de pá soltar ovo main estou tendo problemas porque a galinha ta nascendo, olha o metodo Por favor, registre-se ou entre para visualizar isso. 0 Share this post Link to post Share on other sites More sharing options...
GranTY 132 Posted June 24, 2015 Report post Posted June 24, 2015 Por favor, registre-se ou entre para visualizar isso. achei no google testa ai. 0 Share this post Link to post Share on other sites More sharing options...
DaviDEV 14 Posted June 24, 2015 Report post Posted June 24, 2015 Por favor, registre-se ou entre para visualizar isso. achei no google testa ai. mais como faço para ele quebrar o bloco de onde o ovo chega 0 Share this post Link to post Share on other sites More sharing options...
GranTY 132 Posted June 24, 2015 Report post Posted June 24, 2015 mais como faço para ele quebrar o bloco de onde o ovo chega Por favor, registre-se ou entre para visualizar isso. achei no google tbm e-e testa ai. 0 Share this post Link to post Share on other sites More sharing options...
DaviDEV 14 Posted June 24, 2015 Report post Posted June 24, 2015 Por favor, registre-se ou entre para visualizar isso. achei no google tbm e-e testa ai. Não foi, eu uso esse cod para lançar o ovo séra que é ele: @EventHandler public void aoInteragir(PlayerInteractEvent e) { Player p =e.getPlayer(); ItemStack hand = p.getItemInHand(); if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_AIR) { if (hand.getType() == Material.WOOD_SPADE) { p.launchProjectile(Egg.class); p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 1.0F, 1.0F); } if (hand.getType() == Material.STONE_SPADE) { for (int i = 0; i<2; i+=1) { p.launchProjectile(Egg.class); } p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 1.0F, 1.0F); } } } 0 Share this post Link to post Share on other sites More sharing options...
GranTY 132 Posted June 24, 2015 Report post Posted June 24, 2015 Não foi, eu uso esse cod para lançar o ovo séra que é ele: @EventHandler public void aoInteragir(PlayerInteractEvent e) { Player p =e.getPlayer(); ItemStack hand = p.getItemInHand(); if (e.getAction() == Action.RIGHT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_AIR) { if (hand.getType() == Material.WOOD_SPADE) { p.launchProjectile(Egg.class); p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 1.0F, 1.0F); } if (hand.getType() == Material.STONE_SPADE) { for (int i = 0; i<2; i+=1) { p.launchProjectile(Egg.class); } p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 1.0F, 1.0F); } } } Sei la eu nao manjo java mais eu tento ajudar e-e agora o negocio e esperar os devs . 0 Share this post Link to post Share on other sites More sharing options...
DaviDEV 14 Posted June 24, 2015 Report post Posted June 24, 2015 Consegui galerinPra quem quiser o cod: @SuppressWarnings("deprecation") @EventHandler public void onEggHit(ProjectileHitEvent e) { Entity en = e.getEntity(); if(en instanceof Egg) { BlockIterator bi = new BlockIterator(e.getEntity().getWorld(), e.getEntity().getLocation().toVector(), e.getEntity().getVelocity().normalize(), 0.0D, 4); Block hit = null; while (bi.hasNext()) { hit = bi.next(); if (hit.getTypeId() != 0) { break; } } hit.setType(Material.AIR); en.getLocation().getBlock().setType(Material.AIR); } } } 0 Share this post Link to post Share on other sites More sharing options...
leonardosc 758 Posted June 24, 2015 Report post Posted June 24, 2015 Sua dúvida foi marcada como [Resolvido] e movido à área de dúvidas resolvidas. Atenciosamente, Gamer's Board 0 Share this post Link to post Share on other sites More sharing options...
Question
DaviDEV 14
Estou fazendo um pl de splegg porém estou com um erro
já fiz o sistema de pá soltar ovo main estou tendo problemas porque a galinha ta nascendo, olha o metodo
Por favor, registre-se ou entre para visualizar isso.Share this post
Link to post
Share on other sites
7 answers to this question
Recommended Posts