mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 04:26:42 +00:00
Initial attempt at binding state IDs
This commit is contained in:
committed by
Matthew Miller
parent
e69ba31d6b
commit
a3a175ab8c
@ -0,0 +1,24 @@
|
||||
package com.sk89q.worldedit.internal.block;
|
||||
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
|
||||
import java.util.OptionalInt;
|
||||
|
||||
public class BlockStateIdAcess {
|
||||
|
||||
public interface Provider {
|
||||
|
||||
OptionalInt getBlockStateId(BlockState holder);
|
||||
}
|
||||
|
||||
private static Provider blockStateStateId;
|
||||
|
||||
public static void setBlockStateStateId(Provider blockStateStateId) {
|
||||
BlockStateIdAcess.blockStateStateId = blockStateStateId;
|
||||
}
|
||||
|
||||
public static OptionalInt getBlockStateId(BlockState holder) {
|
||||
return blockStateStateId.getBlockStateId((BlockState) holder);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user