13
0
geforkt von Mirrors/Paper

Moved all specific minecart entities to sub-package.

This change is breaking for the new API for 1.5, including the interfaces for
the three new Minecart types and the name of the previously TNT_MINECART
material.

This change also deprecates the two previous specific minecart types located
in the org.bukkit.entity package. This deprecation is not a breaking change
and will still be internally supported.

Each minecart type has new javadoc to be slightly more descriptive. Included
with this are specific references to the interface for each respective
EntityType entry. Another package-info.java file has been included as well.

All specific minecart types extend minecart, each with a more descriptive
name. The naming will also follow the old convention. In addition, the
minecart with no specific designation is now more closely referred to as a
rideable minecart.

By: Wesley Wolfe <weswolf@aol.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2013-03-15 22:19:58 -05:00
Ursprung 403022a50e
Commit 6e7076fd64
14 geänderte Dateien mit 107 neuen und 33 gelöschten Zeilen

Datei anzeigen

@ -378,7 +378,7 @@ public enum Material {
REDSTONE_COMPARATOR(404),
NETHER_BRICK_ITEM(405),
QUARTZ(406),
TNT_MINECART(407, 1),
EXPLOSIVE_MINECART(407, 1),
HOPPER_MINECART(408, 1),
GOLD_RECORD(2256, 1),
GREEN_RECORD(2257, 1),

Datei anzeigen

@ -3,6 +3,12 @@ package org.bukkit.entity;
import java.util.HashMap;
import java.util.Map;
import org.bukkit.entity.minecart.HopperMinecart;
import org.bukkit.entity.minecart.SpawnerMinecart;
import org.bukkit.entity.minecart.RideableMinecart;
import org.bukkit.entity.minecart.ExplosiveMinecart;
import org.bukkit.entity.minecart.PoweredMinecart;
import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.inventory.ItemStack;
import org.bukkit.Location;
import org.bukkit.World;
@ -74,14 +80,29 @@ public enum EntityType {
*/
BOAT("Boat", Boat.class, 41),
/**
* A minecart entities can ride
* @see RideableMinecart
*/
MINECART("MinecartRideable", RideableMinecart.class, 42),
/**
* @see StorageMinecart
*/
MINECART("MinecartRideable", Minecart.class, 42),
MINECART_CHEST("MinecartChest", StorageMinecart.class, 43),
/**
* @see PoweredMinecart
*/
MINECART_FURNACE("MinecartFurnace", PoweredMinecart.class, 44),
MINECART_TNT("MinecartTNT", MinecartTNT.class, 45),
MINECART_HOPPER("MinecartHopper", MinecartHopper.class, 46),
MINECART_MOB_SPAWNER("MinecartMobSpawner", MinecartMobSpawner.class, 47),
/**
* @see ExplosiveMinecart
*/
MINECART_TNT("MinecartTNT", ExplosiveMinecart.class, 45),
/**
* @see HopperMinecart
*/
MINECART_HOPPER("MinecartHopper", HopperMinecart.class, 46),
/**
* @see SpawnerMinecart
*/
MINECART_MOB_SPAWNER("MinecartMobSpawner", SpawnerMinecart.class, 47),
CREEPER("Creeper", Creeper.class, 50),
SKELETON("Skeleton", Skeleton.class, 51),
SPIDER("Spider", Spider.class, 52),

Datei anzeigen

@ -1,7 +0,0 @@
package org.bukkit.entity;
/**
* Represents a Minecart with a Hopper inside it
*/
public interface MinecartHopper extends Minecart {
}

Datei anzeigen

@ -1,7 +0,0 @@
package org.bukkit.entity;
/**
* Represents a Minecart with a Mob Spawner inside it.
*/
public interface MinecartMobSpawner extends Minecart {
}

Datei anzeigen

@ -1,7 +0,0 @@
package org.bukkit.entity;
/**
* Represents a Minecart with TNT inside it.
*/
public interface MinecartTNT extends Minecart {
}

Datei anzeigen

@ -1,6 +1,9 @@
package org.bukkit.entity;
/**
* Represents a powered minecart.
* @deprecated This class has been moved into a sub package; {@link
* org.bukkit.entity.minecart.PoweredMinecart} should be used instead.
* @see org.bukkit.entity.minecart.PoweredMinecart
*/
public interface PoweredMinecart extends Minecart {}
@Deprecated
public interface PoweredMinecart extends org.bukkit.entity.minecart.PoweredMinecart {}

Datei anzeigen

@ -1,8 +1,9 @@
package org.bukkit.entity;
import org.bukkit.inventory.InventoryHolder;
/**
* Represents a storage minecart.
* @deprecated This class has been moved into a sub package; {@link
* org.bukkit.entity.minecart.StorageMinecart} should be used instead.
* @see org.bukkit.entity.minecart.StorageMinecart
*/
public interface StorageMinecart extends Minecart, InventoryHolder {}
@Deprecated
public interface StorageMinecart extends org.bukkit.entity.minecart.StorageMinecart {}

Datei anzeigen

@ -0,0 +1,9 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
/**
* Represents a Minecart with TNT inside it that can explode when triggered.
*/
public interface ExplosiveMinecart extends Minecart {
}

Datei anzeigen

@ -0,0 +1,9 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
/**
* Represents a Minecart with a Hopper inside it
*/
public interface HopperMinecart extends Minecart {
}

Datei anzeigen

@ -0,0 +1,10 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
/**
* Represents a powered minecart. A powered minecart moves on its own when a
* player deposits {@link org.bukkit.Material#COAL fuel}.
*/
public interface PoweredMinecart extends Minecart {
}

Datei anzeigen

@ -0,0 +1,14 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
/**
* Represents a minecart that can have certain {@link
* org.bukkit.entity.Entity entities} as passengers. Normal passengers
* include all {@link org.bukkit.entity.LivingEntity living entities} with
* the exception of {@link org.bukkit.entity.IronGolem iron golems}.
* Non-player entities that meet normal passenger criteria automatically
* mount these minecarts when close enough.
*/
public interface RideableMinecart extends Minecart {
}

Datei anzeigen

@ -0,0 +1,10 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
/**
* Represents a Minecart with an {@link org.bukkit.block.CreatureSpawner
* entity spawner} inside it.
*/
public interface SpawnerMinecart extends Minecart {
}

Datei anzeigen

@ -0,0 +1,12 @@
package org.bukkit.entity.minecart;
import org.bukkit.entity.Minecart;
import org.bukkit.inventory.InventoryHolder;
/**
* Represents a minecart with a chest. These types of {@link Minecart
* minecarts} have their own inventory that can be accessed using methods
* from the {@link InventoryHolder} interface.
*/
public interface StorageMinecart extends Minecart, InventoryHolder {
}

Datei anzeigen

@ -0,0 +1,6 @@
/**
* Interfaces for various {@link org.bukkit.entity.Minecart} types.
* <p>
*/
package org.bukkit.entity.minecart;