summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorzml2008 <zach@zachsthings.com>2012-03-11 13:12:19 -0700
committerEvilSeph <evilseph@gmail.com>2012-03-21 20:30:48 -0400
commit45d5f691b164129744155d443d39b92045eddb29 (patch)
treea604bcb14b94ef6059872e3ca69677423fd84267 /src/main/java
parentaff0ded5a7b4213133f23a10a860e1f799bb7a41 (diff)
downloadbukkit-45d5f691b164129744155d443d39b92045eddb29.tar
bukkit-45d5f691b164129744155d443d39b92045eddb29.tar.gz
bukkit-45d5f691b164129744155d443d39b92045eddb29.tar.lz
bukkit-45d5f691b164129744155d443d39b92045eddb29.tar.xz
bukkit-45d5f691b164129744155d443d39b92045eddb29.zip
[Bleeding] Added swamp trees and small jungle trees to TreeType. Addresses BUKKIT-1162
- Also added in xpansive's tweaks to BlockChangeDelegate for extra methods
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/BlockChangeDelegate.java31
-rw-r--r--src/main/java/org/bukkit/TreeType.java14
2 files changed, 42 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/BlockChangeDelegate.java b/src/main/java/org/bukkit/BlockChangeDelegate.java
index 7f4261e6..73410605 100644
--- a/src/main/java/org/bukkit/BlockChangeDelegate.java
+++ b/src/main/java/org/bukkit/BlockChangeDelegate.java
@@ -8,7 +8,8 @@ package org.bukkit;
public interface BlockChangeDelegate {
/**
- * Set a block type at the specified coordinates.
+ * Set a block type at the specified coordinates without doing all world updates and notifications.
+ * It is safe to have this call World.setTypeId, but it may be slower than World.setRawTypeId.
*
* @param x X coordinate
* @param y Y coordinate
@@ -19,7 +20,8 @@ public interface BlockChangeDelegate {
public boolean setRawTypeId(int x, int y, int z, int typeId);
/**
- * Set a block type and data at the specified coordinates.
+ * Set a block type and data at the specified coordinates without doing all world updates and notifications.
+ * It is safe to have this call World.setTypeId, but it may be slower than World.setRawTypeId.
*
* @param x X coordinate
* @param y Y coordinate
@@ -31,6 +33,31 @@ public interface BlockChangeDelegate {
public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
/**
+ * Set a block type at the specified coordinates.
+ * This method cannot call World.setRawTypeId, a full update is needed.
+ *
+ * @param x X coordinate
+ * @param y Y coordinate
+ * @param z Z coordinate
+ * @param typeId New block ID
+ * @return true if the block was set successfully
+ */
+ public boolean setTypeId(int x, int y, int z, int typeId);
+
+ /**
+ * Set a block type and data at the specified coordinates.
+ * This method cannot call World.setRawTypeId, a full update is needed.
+ *
+ * @param x X coordinate
+ * @param y Y coordinate
+ * @param z Z coordinate
+ * @param typeId New block ID
+ * @param data Block data
+ * @return true if the block was set successfully
+ */
+ public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data);
+
+ /**
* Get the block type at the location.
*
* @param x X coordinate
diff --git a/src/main/java/org/bukkit/TreeType.java b/src/main/java/org/bukkit/TreeType.java
index 0f85eaab..93a729f9 100644
--- a/src/main/java/org/bukkit/TreeType.java
+++ b/src/main/java/org/bukkit/TreeType.java
@@ -29,11 +29,23 @@ public enum TreeType {
*/
JUNGLE,
/**
+ * Smaller jungle tree; 1 block wide
+ */
+ SMALL_JUNGLE,
+ /**
+ * Small bush that grows in the jungle
+ */
+ JUNGLE_BUSH,
+ /**
* Big red mushroom; short and fat
*/
RED_MUSHROOM,
/**
* Big brown mushroom; tall and umbrella-like
*/
- BROWN_MUSHROOM
+ BROWN_MUSHROOM,
+ /**
+ * Swamp tree (regular with vines on the side)
+ */
+ SWAMP,
}