Added docs and made temperature for islands be based on origin.
This commit is contained in:
parent
63ecfedf71
commit
ec006ffbb2
@ -12,14 +12,61 @@ import org.bukkit.inventory.Recipe;
|
|||||||
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
|
import ca.recrown.islandsurvivalcraft.IslandSurvivalCraft;
|
||||||
|
|
||||||
public interface VariedItem {
|
public interface VariedItem {
|
||||||
|
/**
|
||||||
|
* Should be used to perform anything that need only be called once.
|
||||||
|
* Is called only when the needInitialization method returns true.
|
||||||
|
* Is called after assigning identity.
|
||||||
|
* @param islandSurvivalCraft The IslandSurvivalCraft plugin object that contains references to various managers that may be used.
|
||||||
|
*/
|
||||||
public void initialize(IslandSurvivalCraft islandSurvivalCraft);
|
public void initialize(IslandSurvivalCraft islandSurvivalCraft);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the recipe to be registered with bukkit.
|
||||||
|
*/
|
||||||
public Recipe getRecipe();
|
public Recipe getRecipe();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The official, displayed name of the item.
|
||||||
|
*/
|
||||||
public String getName();
|
public String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return The material item this item is a variation of.
|
||||||
|
*/
|
||||||
public Material getBaseItem();
|
public Material getBaseItem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The namespaced key Bukkit will use to identify this variation of the item.
|
||||||
|
*/
|
||||||
public NamespacedKey getNamespacedKey();
|
public NamespacedKey getNamespacedKey();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assigns a persistent metadata identifier.
|
||||||
|
* This identifier should be saved to the recipe's resulting itemstack.
|
||||||
|
* @param identifier The identifier.
|
||||||
|
*/
|
||||||
public void assignIdentifier(VariationItemIdentifier identifier);
|
public void assignIdentifier(VariationItemIdentifier identifier);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should give the identifier used identify this variation of the base item from the original.
|
||||||
|
* This usually should just return the assigned identifier.
|
||||||
|
* @return The identifier metadata.
|
||||||
|
*/
|
||||||
public VariationItemIdentifier getIdentifier();
|
public VariationItemIdentifier getIdentifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If this item needs initializing.
|
||||||
|
* If returning true, the initialize method will be called before being registered as a recipe.
|
||||||
|
* @return True if the initialize method should be called.
|
||||||
|
*/
|
||||||
public boolean needInitialization();
|
public boolean needInitialization();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when this variety of the item is crafted.
|
||||||
|
* @param item the resulting itemstack.
|
||||||
|
* @param crafter the entity performing the crafting.
|
||||||
|
*/
|
||||||
public void onItemCrafted(ItemStack item, HumanEntity crafter);
|
public void onItemCrafted(ItemStack item, HumanEntity crafter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,6 +43,7 @@ public class UniqueBiomeGenerator implements BiomeGenerator {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (currentIslandInfo.value == null) {
|
if (currentIslandInfo.value == null) {
|
||||||
|
temperature = tempGenerator.getTemperature(islandOrigin.x, islandOrigin.y);
|
||||||
currentIslandInfo.value = biomeSelector.getLandBiomeInfo(temperature, islandOrigin.x, islandOrigin.y);
|
currentIslandInfo.value = biomeSelector.getLandBiomeInfo(temperature, islandOrigin.x, islandOrigin.y);
|
||||||
}
|
}
|
||||||
Flooder flooder = new Flooder(worldCoords, new CoordinateValidatable() {
|
Flooder flooder = new Flooder(worldCoords, new CoordinateValidatable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user