mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
basic property interfaces
This commit is contained in:
parent
3386570439
commit
002c7037f1
@ -1,5 +1,11 @@
|
||||
package com.dfsek.terra.api.block.data.properties;
|
||||
|
||||
public interface Property<T> {
|
||||
import java.util.Collection;
|
||||
|
||||
public interface Property<T> {
|
||||
Class<T> getType();
|
||||
|
||||
String getName();
|
||||
|
||||
Collection<T> values();
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.dfsek.terra.api.block.data.properties.base;
|
||||
|
||||
import com.dfsek.terra.api.block.data.properties.Property;
|
||||
|
||||
public interface BooleanProperty extends Property<Boolean> {
|
||||
@Override
|
||||
default Class<Boolean> getType() {
|
||||
return Boolean.class;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.dfsek.terra.api.block.data.properties.base;
|
||||
|
||||
import com.dfsek.terra.api.block.data.properties.Property;
|
||||
|
||||
public interface EnumProperty<T extends Enum<T>> extends Property<T> {
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.dfsek.terra.api.block.data.properties.base;
|
||||
|
||||
import com.dfsek.terra.api.block.data.properties.Property;
|
||||
|
||||
public interface IntProperty extends Property<Integer> {
|
||||
@Override
|
||||
default Class<Integer> getType() {
|
||||
return Integer.class;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user