Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Update Bukkit for Minecraft 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolvereness committed Jul 1, 2013
1 parent b67b640 commit 1343ffa
Show file tree
Hide file tree
Showing 13 changed files with 225 additions and 27 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.5.2-R1.1-SNAPSHOT</version>
<version>1.6.1-R0.1-SNAPSHOT</version>
<name>Bukkit</name>
<url>http://www.bukkit.org</url>

Expand Down Expand Up @@ -45,8 +45,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
22 changes: 22 additions & 0 deletions src/main/java/org/bukkit/Material.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ public enum Material {
QUARTZ_STAIRS(156, Stairs.class),
ACTIVATOR_RAIL(157, PoweredRail.class),
DROPPER(158, Dispenser.class),
STAINED_CLAY(159),
HAY_BLOCK(170),
CARPET(171),
HARD_CLAY(172),
COAL_BLOCK(173),
// ----- Item Separator -----
IRON_SPADE(256, 1, 250),
IRON_PICKAXE(257, 1, 250),
Expand Down Expand Up @@ -382,6 +387,11 @@ public enum Material {
QUARTZ(406),
EXPLOSIVE_MINECART(407, 1),
HOPPER_MINECART(408, 1),
IRON_BARDING(417, 1),
GOLD_BARDING(418, 1),
DIAMOND_BARDING(419, 1),
LEASH(420),
NAME_TAG(421),
GOLD_RECORD(2256, 1),
GREEN_RECORD(2257, 1),
RECORD_3(2258, 1),
Expand Down Expand Up @@ -735,6 +745,10 @@ public boolean isSolid() {
case QUARTZ_BLOCK:
case QUARTZ_STAIRS:
case DROPPER:
case STAINED_CLAY:
case HAY_BLOCK:
case HARD_CLAY:
case COAL_BLOCK:
return true;
default:
return false;
Expand Down Expand Up @@ -793,6 +807,7 @@ public boolean isTransparent() {
case REDSTONE_COMPARATOR_OFF:
case REDSTONE_COMPARATOR_ON:
case ACTIVATOR_RAIL:
case CARPET:
return true;
default:
return false;
Expand Down Expand Up @@ -841,6 +856,7 @@ public boolean isFlammable() {
case JUNGLE_WOOD_STAIRS:
case TRAPPED_CHEST:
case DAYLIGHT_DETECTOR:
case CARPET:
return true;
default:
return false;
Expand Down Expand Up @@ -872,6 +888,8 @@ public boolean isBurnable() {
case SPRUCE_WOOD_STAIRS:
case BIRCH_WOOD_STAIRS:
case JUNGLE_WOOD_STAIRS:
case HAY_BLOCK:
case COAL_BLOCK:
return true;
default:
return false;
Expand Down Expand Up @@ -948,6 +966,10 @@ public boolean isOccluding() {
case QUARTZ_ORE:
case QUARTZ_BLOCK:
case DROPPER:
case STAINED_CLAY:
case HAY_BLOCK:
case HARD_CLAY:
case COAL_BLOCK:
return true;
default:
return false;
Expand Down
60 changes: 54 additions & 6 deletions src/main/java/org/bukkit/entity/Damageable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,77 @@ public interface Damageable extends Entity {
*
* @param amount Amount of damage to deal
*/
void damage(int amount);
void damage(double amount);

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
void _INVALID_damage(int amount);

/**
* Deals the given amount of damage to this entity, from a specified entity.
*
* @param amount Amount of damage to deal
* @param source Entity which to attribute this damage from
*/
void damage(int amount, Entity source);
void damage(double amount, Entity source);

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
void _INVALID_damage(int amount, Entity source);

/**
* Gets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead.
*
* @return Health represented from 0 to max
*/
int getHealth();
double getHealth();

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
int _INVALID_getHealth();

/**
* Sets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead.
*
* @param health New health represented from 0 to max
* @throws IllegalArgumentException Thrown if the health is < 0 or > {@link #getMaxHealth()}
*/
void setHealth(int health);
void setHealth(double health);

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
void _INVALID_setHealth(int health);

/**
* Gets the maximum health this entity has.
*
* @return Maximum health
*/
int getMaxHealth();
double getMaxHealth();

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
int _INVALID_getMaxHealth();

/**
* Sets the maximum health this entity can have.
Expand All @@ -50,7 +90,15 @@ public interface Damageable extends Entity {
*
* @param health amount of health to set the maximum to
*/
void setMaxHealth(int health);
void setMaxHealth(double health);

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
void _INVALID_setMaxHealth(int health);

/**
* Resets the max health to the original amount.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/bukkit/entity/EntityType.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public enum EntityType {
SNOWMAN("SnowMan", Snowman.class, 97),
OCELOT("Ozelot", Ocelot.class, 98),
IRON_GOLEM("VillagerGolem", IronGolem.class, 99),
HORSE("EntityHorse", Horse.class, 100),
VILLAGER("Villager", Villager.class, 120),
ENDER_CRYSTAL("EnderCrystal", EnderCrystal.class, 200),
// These don't have an entity ID in nms.EntityTypes.
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/bukkit/entity/Horse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.bukkit.entity;

/**
* Represents a Horse.
*/
public interface Horse extends Animals, Vehicle {}
29 changes: 23 additions & 6 deletions src/main/java/org/bukkit/entity/LivingEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Represents a living entity, such as a monster or player
*/
public interface LivingEntity extends Entity, Damageable {

/**
* Gets the height of the living entity's eyes above its Location.
*
Expand Down Expand Up @@ -170,14 +171,30 @@ public interface LivingEntity extends Entity, Damageable {
*
* @return damage taken since the last no damage ticks time period
*/
public int getLastDamage();
public double getLastDamage();

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
public int _INVALID_getLastDamage();

/**
* Sets the damage dealt within the current no damage ticks time period.
*
* @param damage amount of damage
*/
public void setLastDamage(int damage);
public void setLastDamage(double damage);

/**
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*/
@Deprecated
public void _INVALID_setLastDamage(int damage);

/**
* Returns the living entity's current no damage ticks.
Expand Down Expand Up @@ -316,7 +333,7 @@ public interface LivingEntity extends Entity, Damageable {
* <p>
* This value has no effect on players, they will always use their real
* name.
*
*
* @param name the name to set
*/
public void setCustomName(String name);
Expand All @@ -327,7 +344,7 @@ public interface LivingEntity extends Entity, Damageable {
* <p>
* This value has no effect on players, they will always use their real
* name.
*
*
* @return name of the mob or null
*/
public String getCustomName();
Expand All @@ -338,7 +355,7 @@ public interface LivingEntity extends Entity, Damageable {
* <p>
* This value has no effect on players, they will always display their
* name.
*
*
* @param flag custom name or not
*/
public void setCustomNameVisible(boolean flag);
Expand All @@ -348,7 +365,7 @@ public interface LivingEntity extends Entity, Damageable {
* <p>
* This value has no effect on players, they will always display their
* name.
*
*
* @return if the custom name is displayed
*/
public boolean isCustomNameVisible();
Expand Down
20 changes: 18 additions & 2 deletions src/main/java/org/bukkit/entity/Minecart.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,35 @@
*/
public interface Minecart extends Vehicle {

/**
* This method exists for legacy reasons to provide backwards compatibility.
* It will not exist at runtime and should not be used under any
* circumstances.
*/
@Deprecated
public void _INVALID_setDamage(int damage);

/**
* Sets a minecart's damage.
*
* @param damage over 40 to "kill" a minecart
*/
public void setDamage(int damage);
public void setDamage(double damage);

/**
* This method exists for legacy reasons to provide backwards compatibility.
* It will not exist at runtime and should not be used under any
* circumstances.
*/
@Deprecated
public int _INVALID_getDamage();

/**
* Gets a minecart's damage.
*
* @return The damage
*/
public int getDamage();
public double getDamage();

/**
* Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
public class EntityDamageByBlockEvent extends EntityDamageEvent {
private final Block damager;

@Deprecated
public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final int damage) {
this(damager, damagee, cause, (double) damage);
}

public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage);
this.damager = damager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
public class EntityDamageByEntityEvent extends EntityDamageEvent {
private final Entity damager;

@Deprecated
public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final int damage) {
this(damager, damagee, cause, (double) damage);
}

public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final double damage) {
super(damagee, cause, damage);
this.damager = damager;
}
Expand Down
Loading

0 comments on commit 1343ffa

Please sign in to comment.