Created
January 29, 2017 20:59
-
-
Save Keridos/fcc2e365a9607ed059caeecf632b630b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package omtteam.omlib.util; | |
import net.minecraftforge.common.property.IUnlistedProperty; | |
/** | |
* Created by Keridos on 29/01/17. | |
* This Class | |
*/ | |
public class UnlistedPropertyOMT<T> implements IUnlistedProperty<T> { | |
private final String name; | |
private final Class<T> clazz; | |
public UnlistedPropertyOMT(String name, Class<T> clazz) { | |
this.name = name; | |
this.clazz = clazz; | |
} | |
public String getName() { | |
return this.name; | |
} | |
public boolean isValid(T value) { | |
return value == null || this.clazz.isInstance(value); | |
} | |
public Class<T> getType() {return this.clazz; } | |
public String valueToString(T value) { | |
return value.toString(); | |
} | |
} |
This file contains hidden or 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
package omtteam.omlib.render; | |
import net.minecraft.block.state.IBlockState; | |
/** | |
* Created by Keridos on 29/01/17. | |
* This Class | |
*/ | |
public class RenderBlockState { | |
private IBlockState renderState; | |
public RenderBlockState(IBlockState state){ | |
renderState = state; | |
} | |
public IBlockState getRenderState() { | |
return renderState; | |
} | |
public void setRenderState(IBlockState renderState) { | |
this.renderState = renderState; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment