mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
static blocktype initialization
instead of using hacky reflection
This commit is contained in:
@ -12,6 +12,7 @@ import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.block.BlockTypesCache;
|
||||
import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
@ -593,7 +594,7 @@ public class TextureUtil implements TextureHolder {
|
||||
if (folder.exists()) {
|
||||
// Get all the jar files
|
||||
File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar"));
|
||||
for (BlockType blockType : BlockTypes.values) {
|
||||
for (BlockType blockType : BlockTypesCache.values) {
|
||||
BlockMaterial material = blockType.getMaterial();
|
||||
if (!material.isSolid() || !material.isFullCube()) {
|
||||
continue;
|
||||
@ -635,7 +636,7 @@ public class TextureUtil implements TextureHolder {
|
||||
Type typeToken = new TypeToken<Map<String, Object>>() {
|
||||
}.getType();
|
||||
|
||||
for (BlockType blockType : BlockTypes.values) {
|
||||
for (BlockType blockType : BlockTypesCache.values) {
|
||||
if (!blockType.getMaterial().isFullCube()) {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user