mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Lay all groundwork for special flower models. Not yet tested.
This commit is contained in:
1 parent
d58f153742
commit
319bab35a0
7 files changed
+352
-9
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package vazkii.botania.api.state;
|
||||
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
|
||||
public class PropertyClass implements IUnlistedProperty<Class<? extends SubTileEntity>> {
|
||||
|
||||
private final String name;
|
||||
|
||||
public PropertyClass(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Class<? extends SubTileEntity> value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Class<? extends SubTileEntity>> getType() {
|
||||
// todo is there a safe way?
|
||||
Class clazz = Class.class;
|
||||
return clazz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String valueToString(Class<? extends SubTileEntity> value) {
|
||||
return value.getName();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user