Skip to content

Instantly share code, notes, and snippets.

@Keridos
Created January 29, 2017 20:59
Show Gist options
  • Save Keridos/fcc2e365a9607ed059caeecf632b630b to your computer and use it in GitHub Desktop.
Save Keridos/fcc2e365a9607ed059caeecf632b630b to your computer and use it in GitHub Desktop.
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();
}
}
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