OOPDOOTS
This commit is contained in:
parent
11bd4804f4
commit
d5ae42910f
@ -21,7 +21,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Snowball;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockBurnEvent;
|
||||
import org.bukkit.event.block.BlockFadeEvent;
|
||||
@ -216,6 +215,9 @@ public class HungerGames extends SoloGame
|
||||
{
|
||||
_spawn = UtilWorld.averageLocation(this.GetTeamList().get(0).GetSpawns());
|
||||
|
||||
for (Location loc : this.GetTeamList().get(0).GetSpawns())
|
||||
loc.setYaw(UtilAlg.GetYaw(UtilAlg.getTrajectory(loc, _spawn)));
|
||||
|
||||
CreateChestCraftEnchant();
|
||||
|
||||
_supplyLocations = WorldData.GetDataLocs("WHITE");
|
||||
@ -336,8 +338,7 @@ public class HungerGames extends SoloGame
|
||||
for (int i = 0; i < count; i++)
|
||||
chest.getBlockInventory().setItem(UtilMath.r(27), GetChestItem(_supplyChests.contains(event.getClickedBlock())));
|
||||
|
||||
if (_supplyChests.remove(event.getClickedBlock()))
|
||||
_openedChest.remove(event.getClickedBlock().getLocation());
|
||||
_supplyChests.remove(event.getClickedBlock());
|
||||
}
|
||||
|
||||
private ItemStack GetChestItem(boolean superChest)
|
||||
@ -350,15 +351,15 @@ public class HungerGames extends SoloGame
|
||||
for (int i = 0; i < 2; i++) _baseChestLoot.add(new ItemStack(Material.IRON_LEGGINGS));
|
||||
for (int i = 0; i < 2; i++) _baseChestLoot.add(new ItemStack(Material.IRON_BOOTS));
|
||||
|
||||
for (int i = 0; i < 12; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_HELMET));
|
||||
for (int i = 0; i < 12; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_CHESTPLATE));
|
||||
for (int i = 0; i < 12; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_LEGGINGS));
|
||||
for (int i = 0; i < 12; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_BOOTS));
|
||||
for (int i = 0; i < 16; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_HELMET));
|
||||
for (int i = 0; i < 16; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_CHESTPLATE));
|
||||
for (int i = 0; i < 16; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_LEGGINGS));
|
||||
for (int i = 0; i < 16; i++) _baseChestLoot.add(new ItemStack(Material.CHAINMAIL_BOOTS));
|
||||
|
||||
for (int i = 0; i < 24; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_HELMET));
|
||||
for (int i = 0; i < 24; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_CHESTPLATE));
|
||||
for (int i = 0; i < 24; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_LEGGINGS));
|
||||
for (int i = 0; i < 24; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_BOOTS));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_HELMET));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_CHESTPLATE));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_LEGGINGS));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.GOLD_BOOTS));
|
||||
|
||||
for (int i = 0; i < 96; i++) _baseChestLoot.add(new ItemStack(Material.LEATHER_HELMET));
|
||||
for (int i = 0; i < 96; i++) _baseChestLoot.add(new ItemStack(Material.LEATHER_CHESTPLATE));
|
||||
@ -383,14 +384,14 @@ public class HungerGames extends SoloGame
|
||||
for (int i = 0; i < 64; i++) _baseChestLoot.add(new ItemStack(Material.WEB, 2));
|
||||
|
||||
//Food
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.MUSHROOM_SOUP));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.COOKED_CHICKEN));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.RAW_BEEF));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.GRILLED_PORK));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.BREAD));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.PUMPKIN_PIE));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.COOKIE));
|
||||
for (int i = 0; i < 32; i++) _baseChestLoot.add(new ItemStack(Material.ROTTEN_FLESH));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.MUSHROOM_SOUP));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.COOKED_CHICKEN));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.RAW_BEEF));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.GRILLED_PORK));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.BREAD));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.PUMPKIN_PIE));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.COOKIE));
|
||||
for (int i = 0; i < 48; i++) _baseChestLoot.add(new ItemStack(Material.ROTTEN_FLESH));
|
||||
|
||||
for (int i = 0; i < 128; i++) _baseChestLoot.add(new ItemStack(Material.WHEAT, 2));
|
||||
|
||||
@ -581,20 +582,17 @@ public class HungerGames extends SoloGame
|
||||
@EventHandler
|
||||
public void RedTimer(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
if (event.getType() != UpdateType.MIN_01)
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (true)
|
||||
return;
|
||||
|
||||
System.out.println(" ");
|
||||
System.out.println("Game Time: " + UtilTime.MakeStr(System.currentTimeMillis() - this.GetStateTime()));
|
||||
System.out.println("Creep Size: " + _redLocations.size());
|
||||
System.out.println("Creep Time: " + UtilTime.convertString(totalTime, 4, TimeUnit.SECONDS));
|
||||
|
||||
System.out.println(" ");
|
||||
|
||||
totalTime = 0;
|
||||
}
|
||||
@ -980,7 +978,7 @@ public class HungerGames extends SoloGame
|
||||
FireworkEffect effect = FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BURST).trail(false).build();
|
||||
UtilFirework.playFirework(_supplyEffect, effect);
|
||||
|
||||
_supplyEffect.setY(_supplyEffect.getY()-1);
|
||||
_supplyEffect.setY(_supplyEffect.getY()-2);
|
||||
|
||||
if (UtilMath.offset(_supplyEffect, _supplyCurrent) < 2)
|
||||
{
|
||||
@ -991,6 +989,7 @@ public class HungerGames extends SoloGame
|
||||
_supplyCurrent.getBlock().setType(Material.GLASS);
|
||||
_supplyCurrent.getBlock().getRelative(BlockFace.UP).setType(Material.CHEST);
|
||||
_supplyChests.add(_supplyCurrent.getBlock().getRelative(BlockFace.UP));
|
||||
_openedChest.remove(_supplyCurrent);
|
||||
|
||||
//Reset
|
||||
_supplyEffect = null;
|
||||
@ -1091,7 +1090,13 @@ public class HungerGames extends SoloGame
|
||||
|
||||
@EventHandler
|
||||
public void BlockPlace(BlockPlaceEvent event)
|
||||
{
|
||||
{
|
||||
if (IsRed(event.getBlockAgainst()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getItemInHand().getType() == Material.PISTON_BASE)
|
||||
{
|
||||
_placedBlocks.add(event.getBlock().getLocation());
|
||||
|
@ -19,7 +19,7 @@ public class KitBeastmaster extends Kit
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Your wolves growl when someone is nearby!"
|
||||
"Woof woof woof!!"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
|
@ -5,7 +5,6 @@ import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftFallingSand;
|
||||
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftTNTPrimed;
|
||||
import org.bukkit.entity.Arrow;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -18,7 +17,6 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
@ -96,12 +94,9 @@ public class PerkTNTArrow extends Perk
|
||||
UtilPlayer.message(player, F.main("Game", "You fired " + F.skill(GetName()) + "."));
|
||||
|
||||
//TNT
|
||||
TNTPrimed tnt = player.getWorld().spawn(player.getEyeLocation().add(0, 2, 0), TNTPrimed.class);
|
||||
TNTPrimed tnt = player.getWorld().spawn(player.getLocation(), TNTPrimed.class);
|
||||
((CraftTNTPrimed)tnt).getHandle().spectating = true;
|
||||
UtilAction.velocity(tnt, player.getLocation().getDirection(), event.getProjectile().getVelocity().length(), false, 0, 0.1, 10, false);
|
||||
|
||||
event.getProjectile().remove();
|
||||
|
||||
event.getProjectile().setPassenger(tnt);
|
||||
_tntMap.put(tnt, player);
|
||||
}
|
||||
}
|
||||
|
@ -99,11 +99,9 @@ public class PerkWolfPet extends Perk
|
||||
wolf.setCollarColor(DyeColor.GREEN);
|
||||
wolf.playEffect(EntityEffect.WOLF_HEARTS);
|
||||
|
||||
wolf.setMaxHealth(30);
|
||||
wolf.setMaxHealth(24);
|
||||
wolf.setHealth(wolf.getMaxHealth());
|
||||
|
||||
|
||||
|
||||
if (_baby)
|
||||
wolf.setBaby();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user