Guest User

ModStates.java

a guest
Oct 20th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. package com.gunn.modtest.states;
  2.  
  3. import net.minecraft.block.properties.PropertyBool;
  4. import net.minecraft.block.properties.PropertyEnum;
  5. import net.minecraft.util.IStringSerializable;
  6.  
  7. public class ModStates {
  8. public static final PropertyBool POWERED = PropertyBool.create("powered");
  9. public static final PropertyEnum<MachineTypes> MACTYPE = PropertyEnum.create("mactype", MachineTypes.class);
  10.  
  11. public static enum MachineTypes implements IStringSerializable {
  12. DEFAULT("default", 0),
  13. ARROW("arrow", 1),
  14. BOX("box", 2),
  15. CROSS("cross", 3);
  16.  
  17. private int ID;
  18. private String name;
  19.  
  20. private MachineTypes(String name, int ID){
  21. this.ID=ID;
  22. this.name=name;
  23. }
  24.  
  25. @Override
  26. public String getName(){
  27. return this.name();
  28. }
  29.  
  30. public int getID(){
  31. return ID;
  32. }
  33.  
  34. @Override
  35. public String toString(){
  36. return getName();
  37. }
  38.  
  39. }
  40.  
  41. }
Add Comment
Please, Sign In to add comment