mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Fixlighting now also calculates heightmaps
Fixes #386 and #438 seems fixed, but that might be something else that fixed?
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.extent;
|
||||
|
||||
import com.boydti.fawe.beta.implementation.lighting.HeightMapType;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.internal.util.DeprecationUtil;
|
||||
import com.sk89q.worldedit.internal.util.NonAbstractForCompatibility;
|
||||
@ -80,8 +81,7 @@ public interface InputExtent {
|
||||
* @return the biome at the location
|
||||
* @deprecated Biomes in Minecraft are 3D now, use {@link InputExtent#getBiome(BlockVector3)}
|
||||
*/
|
||||
@Deprecated
|
||||
default BiomeType getBiome(BlockVector2 position) {
|
||||
@Deprecated default BiomeType getBiome(BlockVector2 position) {
|
||||
return getBiomeType(position.getX(), 0, position.getZ());
|
||||
}
|
||||
|
||||
@ -93,26 +93,22 @@ public interface InputExtent {
|
||||
* Get the biome at the given location.
|
||||
*
|
||||
* <p>
|
||||
* If there is no biome available, then the ocean biome should be
|
||||
* returned.
|
||||
* If there is no biome available, then the ocean biome should be
|
||||
* returned.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* As implementation varies per Minecraft version, this may not exactly get
|
||||
* this positions biome. On versions prior to 1.15, this will get the entire
|
||||
* column. On later versions it will get the 4x4x4 cube's biome.
|
||||
* As implementation varies per Minecraft version, this may not exactly get
|
||||
* this positions biome. On versions prior to 1.15, this will get the entire
|
||||
* column. On later versions it will get the 4x4x4 cube's biome.
|
||||
* </p>
|
||||
*
|
||||
* @param position the (x, y, z) location to check the biome at
|
||||
* @return the biome at the location
|
||||
* @apiNote This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
|
||||
* for details
|
||||
* for details
|
||||
*/
|
||||
@NonAbstractForCompatibility(
|
||||
delegateName = "getBiome",
|
||||
delegateParams = { BlockVector2.class }
|
||||
)
|
||||
default BiomeType getBiome(BlockVector3 position) {
|
||||
@NonAbstractForCompatibility(delegateName = "getBiome", delegateParams = {BlockVector2.class}) default BiomeType getBiome(BlockVector3 position) {
|
||||
DeprecationUtil.checkDelegatingOverride(getClass());
|
||||
|
||||
return getBiome(position.toBlockVector2());
|
||||
@ -161,4 +157,8 @@ public interface InputExtent {
|
||||
default int getOpacity(int x, int y, int z) {
|
||||
return getFullBlock(x, y, z).getMaterial().getLightOpacity();
|
||||
}
|
||||
|
||||
default int[] getHeightMap(HeightMapType type) {
|
||||
return new int[256];
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.extent;
|
||||
|
||||
import com.boydti.fawe.beta.implementation.lighting.HeightMapType;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
@ -158,6 +159,9 @@ public interface OutputExtent {
|
||||
default void setSkyLight(int x, int y, int z, int value) {
|
||||
}
|
||||
|
||||
default void setHeightMap(HeightMapType type, int[] heightMap) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an {@link Operation} that should be called to tie up loose ends
|
||||
* (such as to commit changes in a buffer).
|
||||
|
Reference in New Issue
Block a user