mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
@ -133,6 +133,61 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
return super.getBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlockLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return super.getBlockLight(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightness(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return super.getBrightness(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return super.getLight(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpacity(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return super.getOpacity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSkyLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return super.getSkyLight(x, y, z);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.boydti.fawe.object.extent;
|
||||
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
|
||||
public interface LightingExtent extends Extent {
|
||||
int getLight(int x, int y, int z);
|
||||
|
||||
int getSkyLight(int x, int y, int z);
|
||||
|
||||
int getBlockLight(int x, int y, int z);
|
||||
|
||||
int getOpacity(int x, int y, int z);
|
||||
|
||||
int getBrightness(int x, int y, int z);
|
||||
|
||||
public void relightChunk(int chunkX, int chunkZ);
|
||||
}
|
Reference in New Issue
Block a user