Revert "Lighting and Database changes"

This reverts commit 39dfc244
This commit is contained in:
MattBDev
2020-02-18 18:06:19 -05:00
parent e0bb1ce853
commit 8e97b3b4b1
22 changed files with 285 additions and 93 deletions

View File

@ -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) {

View File

@ -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);
}