-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get flags loading and organize some stuff
- Loading branch information
1 parent
f74cf47
commit b66c2a1
Showing
6 changed files
with
141 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.cjburkey.claimchunk.access; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
public final class CCFlags { | ||
|
||
// Generics...gotta love 'em, but feel free to hate them too. | ||
// Methods named such that they may align with record getters :} | ||
public interface IFlagData<TypeEnum extends Enum<?>> { | ||
@NotNull | ||
TypeEnum flagType(); | ||
|
||
@NotNull | ||
FlagData flagData(); | ||
} | ||
|
||
public enum BlockFlagType { | ||
BREAK, | ||
PLACE, | ||
INTERACT, | ||
EXPLODE, | ||
} | ||
|
||
public enum EntityFlagType { | ||
DAMAGE, | ||
INTERACT, | ||
EXPLODE, | ||
} | ||
|
||
public record FlagData(@Nullable List<String> include, @Nullable List<String> exclude) {} | ||
|
||
public record BlockFlagData(@NotNull BlockFlagType flagType, @NotNull FlagData flagData) | ||
implements IFlagData<BlockFlagType> {} | ||
|
||
public record EntityFlagData(@NotNull EntityFlagType flagType, @NotNull FlagData flagData) | ||
implements IFlagData<EntityFlagType> {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters