mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 12:36:40 +00:00
schem list is still broken
clickEvent and hoverEvent don't seem to work, I'm probably doing something wrong
This commit is contained in:
@ -76,7 +76,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) throws WorldEditException {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -87,7 +87,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public boolean setBiome(int x, int y, int z, BiomeType biome) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -98,7 +98,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BiomeType getBiome(BlockVector2 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -109,7 +109,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BiomeType getBiomeType(int x, int z) {
|
||||
if (!contains(x, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -120,7 +120,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BaseBlock getFullBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
}
|
||||
@ -131,7 +131,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public BlockState getBlock(BlockVector3 position) {
|
||||
if (!contains(position)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return BlockTypes.AIR.getDefaultState();
|
||||
}
|
||||
@ -142,7 +142,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getBlockLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -153,7 +153,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getBrightness(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -164,7 +164,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -175,7 +175,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getOpacity(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -186,7 +186,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public int getSkyLight(int x, int y, int z) {
|
||||
if (!contains(x, y, z)) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -198,7 +198,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
||||
public Entity createEntity(Location location, BaseEntity entity) {
|
||||
if (!contains(location.getBlockX(), location.getBlockY(), location.getBlockZ())) {
|
||||
if (!limit.MAX_FAILS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.OUTSIDE_REGION);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.OUTSIDE_REGION);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class HeightBoundExtent extends FaweRegionExtent implements IBatchProcess
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
if (trimY(set, min, max) | trimNBT(set, this::contains)) {
|
||||
return set;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.boydti.fawe.object.extent;
|
||||
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.util.MemUtil;
|
||||
@ -26,7 +27,7 @@ public class MemoryCheckingExtent extends PassthroughExtent {
|
||||
BBC.WORLDEDIT_OOM_ADMIN.send(this.player);
|
||||
}
|
||||
}
|
||||
WEManager.IMP.cancelEdit(this, FaweException.LOW_MEMORY);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.LOW_MEMORY);
|
||||
}
|
||||
return super.getExtent();
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.IChunkSet;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.regions.RegionIntersection;
|
||||
|
||||
@ -50,6 +49,16 @@ public class MultiRegionExtent extends FaweRegionExtent {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processGet(int chunkX, int chunkZ) {
|
||||
for (Region region : regions) {
|
||||
if (region.containsChunk(chunkX, chunkZ)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(int x, int z) {
|
||||
if (region.contains(x, z)) {
|
||||
@ -74,7 +83,7 @@ public class MultiRegionExtent extends FaweRegionExtent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
return intersection.processBatch(chunk, get, set);
|
||||
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
return intersection.processSet(chunk, get, set);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.boydti.fawe.object.extent;
|
||||
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.beta.IChunk;
|
||||
import com.boydti.fawe.beta.IChunkGet;
|
||||
import com.boydti.fawe.beta.IChunkSet;
|
||||
@ -52,7 +53,7 @@ public class NullExtent extends FaweRegionExtent {
|
||||
}
|
||||
|
||||
public NullExtent() {
|
||||
this(new com.sk89q.worldedit.extent.NullExtent(), FaweException.MANUAL);
|
||||
this(new com.sk89q.worldedit.extent.NullExtent(), FaweCache.MANUAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -326,7 +327,12 @@ public class NullExtent extends FaweRegionExtent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processGet(int chunkX, int chunkZ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.boydti.fawe.object.extent;
|
||||
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.util.WEManager;
|
||||
@ -37,7 +38,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
return null;
|
||||
}
|
||||
if (!limit.MAX_ENTITIES()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.MAX_ENTITIES);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_ENTITIES);
|
||||
return null;
|
||||
}
|
||||
return super.createEntity(location, entity);
|
||||
@ -46,7 +47,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public BlockState getBlock(int x, int y, int z) {
|
||||
if (!limit.MAX_CHECKS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.MAX_CHECKS);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHECKS);
|
||||
return BlockTypes.AIR.getDefaultState();
|
||||
} else {
|
||||
return extent.getBlock(x, y, z);
|
||||
@ -56,7 +57,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public BaseBlock getFullBlock(BlockVector3 pos) {
|
||||
if (!limit.MAX_CHECKS()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.MAX_CHECKS);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHECKS);
|
||||
return BlockTypes.AIR.getDefaultState().toBaseBlock();
|
||||
} else {
|
||||
return extent.getFullBlock(pos);
|
||||
@ -78,18 +79,18 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
boolean hasNbt = block instanceof BaseBlock && block.hasNbtData();
|
||||
if (hasNbt) {
|
||||
if (!limit.MAX_BLOCKSTATES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweException.MAX_TILES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_TILES);
|
||||
return false;
|
||||
} else {
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweException.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_CHANGES);
|
||||
return false;
|
||||
}
|
||||
return extent.setBlock(x, y, z, block);
|
||||
}
|
||||
}
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEdit(this, FaweException.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEdit(this, FaweCache.MAX_CHANGES);
|
||||
return false;
|
||||
} else {
|
||||
return extent.setBlock(x, y, z, block);
|
||||
@ -99,7 +100,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
|
||||
@Override
|
||||
public boolean setBiome(BlockVector2 position, BiomeType biome) {
|
||||
if (!limit.MAX_CHANGES()) {
|
||||
WEManager.IMP.cancelEditSafe(this, FaweException.MAX_CHANGES);
|
||||
WEManager.IMP.cancelEditSafe(this, FaweCache.MAX_CHANGES);
|
||||
return false;
|
||||
}
|
||||
return super.setBiome(position, biome);
|
||||
|
@ -6,7 +6,7 @@ import com.boydti.fawe.beta.IChunkSet;
|
||||
import com.boydti.fawe.object.FaweLimit;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import java.util.Arrays;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
@ -40,7 +40,12 @@ public class SingleRegionExtent extends FaweRegionExtent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkSet processBatch(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
return region.processBatch(chunk, get, set);
|
||||
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
return region.processSet(chunk, get, set);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processGet(int chunkX, int chunkZ) {
|
||||
return region.containsChunk(chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user