mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Colored glow panels, in block form at least! Now to get them to render in item form...
This commit is contained in:
1 parent
a10c57fb92
commit
64f60150df
3 files changed
+227
-17
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package mekanism.common.multipart;
|
||||
|
||||
import mcmultipart.MCMultiPartMod;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.block.states.BlockStateFacing;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
@@ -8,8 +9,46 @@ import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
|
||||
public class GlowPanelBlockState extends ExtendedBlockState
|
||||
{
|
||||
public static GlowPanelColorProperty colorState = new GlowPanelColorProperty();
|
||||
|
||||
public GlowPanelBlockState()
|
||||
{
|
||||
super(MCMultiPartMod.multipart, new IProperty[] {BlockStateFacing.facingProperty, PartGlowPanel.colorProperty}, new IUnlistedProperty[] {});
|
||||
super(MCMultiPartMod.multipart, new IProperty[] {BlockStateFacing.facingProperty}, new IUnlistedProperty[] {colorState});
|
||||
}
|
||||
|
||||
public static class GlowPanelColorProperty implements IUnlistedProperty<GlowPanelColorProperty>
|
||||
{
|
||||
public EnumColor color;
|
||||
|
||||
public GlowPanelColorProperty() {}
|
||||
|
||||
public GlowPanelColorProperty(EnumColor c)
|
||||
{
|
||||
color = c;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "color";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(GlowPanelColorProperty value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getType()
|
||||
{
|
||||
return getClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String valueToString(GlowPanelColorProperty value)
|
||||
{
|
||||
return color.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user