Merge remote-tracking branch 'origin/clans-beta' into clans-beta

Conflicts:
	Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java
This commit is contained in:
Shaun Bennett 2015-11-26 03:34:33 -05:00
commit bdc08676d9
3 changed files with 19 additions and 6 deletions

View File

@ -541,6 +541,18 @@ public class UtilEnt
}
return false;
}
public static boolean isGrounded(Entity ent, Location loc)
{
AxisAlignedBB box = ((CraftEntity)ent).getHandle().getBoundingBox();
Location bottom_corner_1 = new Location(ent.getWorld(), box.a, loc.getY()-0.1, box.c);
Location bottom_corner_2 = new Location(ent.getWorld(), box.d, loc.getY()-0.1, box.f);
for(Block b : UtilBlock.getInBoundingBox(bottom_corner_1, bottom_corner_2)){
if(UtilBlock.solid(b)) return true;
}
return false;
}
public static void PlayDamageSound(LivingEntity damagee)
{

View File

@ -40,7 +40,7 @@ public class ClansRegions extends MiniPlugin
{
public final static String DEFAULT_WORLD_NAME = "world";
public final static int SPAWN_RADIUS = 3; // Radius of spawn claim area (measured in chunks)
public final static int SHOP_RADIUS = 2; // Radius of shop claim area (measured in chunks)
public final static int SHOP_RADIUS = 4; // Radius of shop claim area (measured in chunks)
public final static int FIELDS_RADIUS = 7; // Radius of fields claim area (measured in chunks)
public final static int BORDERLANDS_RADIUS = 50; // Radius of borderlands claim area (measured in chunks)
public static final int BORDER_RADIUS = 768;
@ -67,9 +67,10 @@ public class ClansRegions extends MiniPlugin
// Initialize Spawn faction and claims
claimArea("Spawn", SPAWN_RADIUS, 0, false, true, new Location[]{Spawn.getEastSpawn(), Spawn.getWestSpawn()});
claimArea("Shops", SHOP_RADIUS, 2, false, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()});
claimArea("Shops", SHOP_RADIUS, 0, true, false, new Location[]{Spawn.getNorthTownCenter(), Spawn.getSouthTownCenter()});
// Initialize Fields and Borderlands factions and claims
claimArea("Fields", FIELDS_RADIUS, 0, false, true, worldCenter);
claimArea("Borderlands", BORDERLANDS_RADIUS, 32, false, true, worldCenter);

View File

@ -30,8 +30,7 @@ public class WindBlade extends LegendaryItem
public WindBlade()
{
super("Wind Blade", "Activate flying ability to take flight for 80 ticks before landing!", Material.GREEN_RECORD); // TODO:
// Configurable?
super("Wind Blade", "Activate flying ability to take flight!", Material.Material.GREEN_RECORD);
}
@Override
@ -67,6 +66,7 @@ public class WindBlade extends LegendaryItem
{
UtilPlayer.message(wielder, F.main("Wind Blade", "Flight power damaged whilst scraping the ground! Repairs will be finish in " + F.time(UtilTime.MakeStr(burnoutRemaining)) + "."));
}
if (_messageTimer % 10 == 0)
{
wielder.playSound(wielder.getLocation(), Sound.ANVIL_USE, .5f, 1.5f);
@ -98,7 +98,7 @@ public class WindBlade extends LegendaryItem
_burnoutThreshold = UtilMath.clamp(_burnoutThreshold - .5, 0, _burnoutThreshold);
}
if (UtilEnt.isGrounded(wielder))
if (UtilEnt.isGrounded(wielder, wielder.getLocation()) || UtilEnt.isGrounded(wielder, wielder.getLocation().subtract(0, 1, 0)))
{
addPower(0.4);
}