Permalink
Browse files

Start converting construct to mixed.

Also, the first pass at introducing Enums to the object model has been
done. This is not complete yet, until everything supports mixed, but
most of the work for that should have been done now.
  • Loading branch information...
LadyCailin committed Nov 15, 2018
1 parent c05414c commit 4c738d0dd2275aaefb43694c4fd971933c530d26
Showing with 228 additions and 95 deletions.
  1. +1 −1 src/main/java/com/laytonsmith/abstraction/blocks/MCBlockFace.java
  2. +2 −2 src/main/java/com/laytonsmith/abstraction/entities/MCHorse.java
  3. +1 −1 src/main/java/com/laytonsmith/abstraction/entities/MCLlama.java
  4. +1 −1 src/main/java/com/laytonsmith/abstraction/entities/MCTropicalFish.java
  5. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCArt.java
  6. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCBarColor.java
  7. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCBarStyle.java
  8. +2 −2 src/main/java/com/laytonsmith/abstraction/enums/MCBiomeType.java
  9. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCChatColor.java
  10. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCClickType.java
  11. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCCollisionType.java
  12. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCCreeperType.java
  13. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCCriteria.java
  14. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCDifficulty.java
  15. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCDisplaySlot.java
  16. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCDragType.java
  17. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCDyeColor.java
  18. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCEffect.java
  19. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCEntityEffect.java
  20. +2 −2 src/main/java/com/laytonsmith/abstraction/enums/MCEntityType.java
  21. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCEquipmentSlot.java
  22. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCFireworkType.java
  23. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCFishingState.java
  24. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCGameMode.java
  25. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCGameRule.java
  26. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCIgniteCause.java
  27. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCInstrument.java
  28. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCInventoryAction.java
  29. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCInventoryType.java
  30. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCItemFlag.java
  31. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCMobs.java
  32. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCOcelotType.java
  33. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCOption.java
  34. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCOptionStatus.java
  35. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCParrotType.java
  36. +2 −2 src/main/java/com/laytonsmith/abstraction/enums/MCParticle.java
  37. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCPatternShape.java
  38. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCPigType.java
  39. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCPotionEffectType.java
  40. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCPotionType.java
  41. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCProfession.java
  42. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCProjectileType.java
  43. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCRabbitType.java
  44. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCRemoveCause.java
  45. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCRotation.java
  46. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCSlotType.java
  47. +2 −2 src/main/java/com/laytonsmith/abstraction/enums/MCSound.java
  48. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCSoundCategory.java
  49. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCSpawnReason.java
  50. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTeleportCause.java
  51. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTone.java
  52. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTreeSpecies.java
  53. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCTreeType.java
  54. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCWolfType.java
  55. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCWorldEnvironment.java
  56. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCWorldType.java
  57. +1 −1 src/main/java/com/laytonsmith/abstraction/enums/MCZombieType.java
  58. +17 −17 src/main/java/com/laytonsmith/core/constructs/CArray.java
  59. +2 −2 src/main/java/com/laytonsmith/core/constructs/CClassType.java
  60. +12 −0 src/main/java/com/laytonsmith/core/constructs/NativeTypeList.java
  61. +1 −1 src/main/java/com/laytonsmith/core/functions/ArrayHandling.java
  62. +5 −4 src/main/java/com/laytonsmith/core/functions/BasicLogic.java
  63. +1 −1 src/main/java/com/laytonsmith/core/functions/Math.java
  64. +7 −3 src/main/java/com/laytonsmith/core/functions/Reflection.java
  65. +1 −1 src/main/java/com/laytonsmith/core/functions/StringHandling.java
  66. +4 −4 src/main/java/com/laytonsmith/core/natives/interfaces/ArrayAccess.java
  67. +116 −0 src/main/java/com/laytonsmith/core/natives/interfaces/MEnumType.java
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("BlockFace")
@MEnum("com.commandhelper.BlockFace")
public enum MCBlockFace {
NORTH(0, 0, -1),
EAST(1, 0, 0),
@@ -6,12 +6,12 @@
public interface MCHorse extends MCTameable, MCVehicle, MCInventoryHolder {
@MEnum("HorseColor")
@MEnum("com.commandhelper.HorseColor")
enum MCHorseColor {
BLACK, BROWN, CHESTNUT, CREAMY, DARK_BROWN, GRAY, WHITE
}
@MEnum("HorsePattern")
@MEnum("com.commandhelper.HorsePattern")
enum MCHorsePattern {
NONE, SOCKS, WHITEFIELD, WHITE_DOTS, BLACK_DOTS
}
@@ -4,7 +4,7 @@
public interface MCLlama extends MCChestedHorse {
@MEnum("LlamaColor")
@MEnum("com.commandhelper.LlamaColor")
enum MCLlamaColor {
CREAMY, WHITE, BROWN, GRAY
}
@@ -13,7 +13,7 @@
MCTropicalFish.MCPattern getPattern();
void setPattern(MCTropicalFish.MCPattern pattern);
@MEnum("TropicalFishPattern")
@MEnum("com.commandhelper.TropicalFishPattern")
enum MCPattern {
KOB,
SUNSTREAK,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("Art")
@MEnum("com.commandhelper.Art")
public enum MCArt {
KEBAB,
AZTEC,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("BarColor")
@MEnum("com.commandhelper.BarColor")
public enum MCBarColor {
PINK,
BLUE,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("BarStyle")
@MEnum("com.commandhelper.BarStyle")
public enum MCBarStyle {
SOLID,
SEGMENTED_6,
@@ -12,7 +12,7 @@
import java.util.Map;
import java.util.Set;
@MDynamicEnum("BiomeType")
@MDynamicEnum("com.commandhelper.BiomeType")
public abstract class MCBiomeType<Concrete> extends DynamicEnum<MCBiomeType.MCVanillaBiomeType, Concrete> {
protected static final Map<String, MCBiomeType> MAP = new HashMap<>();
@@ -70,7 +70,7 @@ public String concreteName() {
return MAP.values();
}
@MEnum("VanillaBiomeType")
@MEnum("com.commandhelper.VanillaBiomeType")
public enum MCVanillaBiomeType {
OCEAN,
PLAINS,
@@ -7,7 +7,7 @@
/**
* All supported color values for chat
*/
@MEnum("ChatColor")
@MEnum("com.commandhelper.ChatColor")
public enum MCChatColor {
/**
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("ClickType")
@MEnum("com.commandhelper.ClickType")
public enum MCClickType {
/**
* The left (or primary) mouse button.
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("CollisionType")
@MEnum("com.commandhelper.CollisionType")
public enum MCCollisionType {
BLOCK,
ENTITY
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("CreeperType")
@MEnum("com.commandhelper.CreeperType")
public enum MCCreeperType {
POWERED
}
@@ -6,7 +6,7 @@
* Criteria names which trigger an objective to be modified by actions in-game
*
*/
@MEnum("Criteria")
@MEnum("com.commandhelper.Criteria")
public enum MCCriteria {
DEATHCOUNT("deathCount"),
HEALTH("health"),
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("Difficulty")
@MEnum("com.commandhelper.Difficulty")
public enum MCDifficulty {
PEACEFUL(0),
EASY(1),
@@ -6,7 +6,7 @@
* Scoreboard displayslots
*
*/
@MEnum("DisplaySlot")
@MEnum("com.commandhelper.DisplaySlot")
public enum MCDisplaySlot {
BELOW_NAME,
PLAYER_LIST,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("DragType")
@MEnum("com.commandhelper.DragType")
public enum MCDragType {
SINGLE,
EVEN
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("DyeColor")
@MEnum("com.commandhelper.DyeColor")
public enum MCDyeColor {
WHITE,
ORANGE,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("Effect")
@MEnum("com.commandhelper.Effect")
public enum MCEffect {
/**
* VISUAL
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("EntityEffect")
@MEnum("com.commandhelper.EntityEffect")
public enum MCEntityEffect {
ARROW_PARTICLES,
RABBIT_JUMP,
@@ -13,7 +13,7 @@
import java.util.Map;
import java.util.Set;
@MDynamicEnum("EntityType")
@MDynamicEnum("com.commandhelper.EntityType")
public abstract class MCEntityType<Concrete> extends DynamicEnum<MCEntityType.MCVanillaEntityType, Concrete> {
// To be filled by the implementer
@@ -100,7 +100,7 @@ public boolean isSpawnable() {
return MAP.values();
}
@MEnum("VanillaEntityType")
@MEnum("com.commandhelper.VanillaEntityType")
public enum MCVanillaEntityType {
AREA_EFFECT_CLOUD(true),
ARMOR_STAND(true),
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("EquipmentSlot")
@MEnum("com.commandhelper.EquipmentSlot")
public enum MCEquipmentSlot {
WEAPON,
OFF_HAND,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("FireworkType")
@MEnum("com.commandhelper.FireworkType")
public enum MCFireworkType {
BALL,
BALL_LARGE,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("FishingState")
@MEnum("com.commandhelper.FishingState")
public enum MCFishingState {
CAUGHT_ENTITY,
CAUGHT_FISH,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("GameMode")
@MEnum("com.commandhelper.GameMode")
public enum MCGameMode {
SURVIVAL,
CREATIVE,
@@ -3,7 +3,7 @@
import com.laytonsmith.annotations.MEnum;
import com.laytonsmith.core.constructs.Construct.ConstructType;
@MEnum("GameRule")
@MEnum("com.commandhelper.GameRule")
public enum MCGameRule {
ANNOUNCEADVANCEMENTS("announceAdvancements"),
COMMANDBLOCKOUTPUT("commandBlockOutput"),
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("IgniteCause")
@MEnum("com.commandhelper.IgniteCause")
public enum MCIgniteCause {
LAVA,
FLINT_AND_STEEL,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("Instrument")
@MEnum("com.commandhelper.Instrument")
public enum MCInstrument {
PIANO,
BASS_DRUM,
@@ -5,7 +5,7 @@
/**
* An estimation of what the result will be
*/
@MEnum("InventoryAction")
@MEnum("com.commandhelper.InventoryAction")
public enum MCInventoryAction {
/**
* Nothing will happen from the click. There may be cases where nothing will happen and this is value is not
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("InventoryType")
@MEnum("com.commandhelper.InventoryType")
public enum MCInventoryType {
BREWING,
CHEST,
@@ -5,7 +5,7 @@
/**
* A MCItemFlag can hide some Attributes from MCItemStacks, through MCItemMeta.
*/
@MEnum("ItemFlag")
@MEnum("com.commandhelper.ItemFlag")
public enum MCItemFlag {
/**
* Setting to show/hide enchants
@@ -6,7 +6,7 @@
* Not all of these directly map to entity types.
* These should be considered aliases for the spawn_mob() function and all living entity types.
*/
@MEnum("Mobs")
@MEnum("com.commandhelper.Mobs")
public enum MCMobs {
BAT,
BLAZE,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("OcelotType")
@MEnum("com.commandhelper.OcelotType")
public enum MCOcelotType {
BLACK_CAT,
RED_CAT,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("Option")
@MEnum("com.commandhelper.Option")
public enum MCOption {
COLLISION_RULE,
DEATH_MESSAGE_VISIBILITY,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("OptionStatus")
@MEnum("com.commandhelper.OptionStatus")
public enum MCOptionStatus {
ALWAYS,
FOR_OTHER_TEAMS,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("ParrotType")
@MEnum("com.commandhelper.ParrotType")
public enum MCParrotType {
RED,
BLUE,
@@ -12,7 +12,7 @@
import java.util.Map;
import java.util.Set;
@MDynamicEnum("Particle")
@MDynamicEnum("com.commandhelper.Particle")
public abstract class MCParticle<Concrete> extends DynamicEnum<MCParticle.MCVanillaParticle, Concrete> {
protected static final Map<String, MCParticle> MAP = new HashMap<>();
@@ -70,7 +70,7 @@ public String concreteName() {
return MAP.values();
}
@MEnum("VanillaParticle")
@MEnum("com.commandhelper.VanillaParticle")
public enum MCVanillaParticle {
EXPLOSION_NORMAL,
EXPLOSION_LARGE,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("PatternShape")
@MEnum("com.commandhelper.PatternShape")
public enum MCPatternShape {
BASE,
BORDER,
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("PigType")
@MEnum("com.commandhelper.PigType")
public enum MCPigType {
SADDLED
}
@@ -12,7 +12,7 @@
import java.util.Set;
import java.util.TreeSet;
@MDynamicEnum("PotionEffectType")
@MDynamicEnum("com.commandhelper.PotionEffectType")
public abstract class MCPotionEffectType<Concrete> extends DynamicEnum<MCPotionEffectType.MCVanillaPotionEffectType, Concrete> {
protected static final Map<String, MCPotionEffectType> MAP = new HashMap<>();
@@ -2,7 +2,7 @@
import com.laytonsmith.annotations.MEnum;
@MEnum("PotionType")
@MEnum("com.commandhelper.PotionType")
public enum MCPotionType {
AWKWARD,
FIRE_RESISTANCE,
Oops, something went wrong.

0 comments on commit 4c738d0

Please sign in to comment.