|
68 | 68 | import com.laytonsmith.abstraction.entities.MCLlama.MCLlamaColor; |
69 | 69 | import com.laytonsmith.abstraction.entities.MCMinecart; |
70 | 70 | import com.laytonsmith.abstraction.entities.MCMushroomCow; |
| 71 | +import com.laytonsmith.abstraction.entities.MCOminousItemSpawner; |
71 | 72 | import com.laytonsmith.abstraction.entities.MCPainting; |
72 | 73 | import com.laytonsmith.abstraction.entities.MCPanda; |
73 | 74 | import com.laytonsmith.abstraction.entities.MCParrot; |
@@ -2168,6 +2169,11 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi |
2168 | 2169 | MCMushroomCow cow = (MCMushroomCow) entity; |
2169 | 2170 | specArray.set(entity_spec.KEY_MUSHROOM_COW_TYPE, cow.getVariant().name(), t); |
2170 | 2171 | break; |
| 2172 | + case OMINOUS_ITEM_SPAWNER: |
| 2173 | + MCOminousItemSpawner spawner = (MCOminousItemSpawner) entity; |
| 2174 | + specArray.set(entity_spec.KEY_OMINOUS_SPAWNER_ITEM, ObjectGenerator.GetGenerator().item(spawner.getItem(), t), t); |
| 2175 | + specArray.set(entity_spec.KEY_OMINOUS_SPAWNER_DELAY, new CInt(spawner.getDelay(), t), t); |
| 2176 | + break; |
2171 | 2177 | case PAINTING: |
2172 | 2178 | MCPainting painting = (MCPainting) entity; |
2173 | 2179 | specArray.set(entity_spec.KEY_PAINTING_ART, new CString(painting.getArt().name(), t), t); |
@@ -2462,6 +2468,8 @@ public MSVersion since() { |
2462 | 2468 | private static final String KEY_MINECART_COMMAND_COMMAND = "command"; |
2463 | 2469 | private static final String KEY_MINECART_COMMAND_CUSTOMNAME = "customname"; |
2464 | 2470 | private static final String KEY_MUSHROOM_COW_TYPE = "type"; |
| 2471 | + private static final String KEY_OMINOUS_SPAWNER_ITEM = "item"; |
| 2472 | + private static final String KEY_OMINOUS_SPAWNER_DELAY = "delay"; |
2465 | 2473 | private static final String KEY_PAINTING_ART = "type"; |
2466 | 2474 | private static final String KEY_PANDA_MAINGENE = "maingene"; |
2467 | 2475 | private static final String KEY_PANDA_HIDDENGENE = "hiddengene"; |
@@ -3460,6 +3468,21 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi |
3460 | 3468 | } |
3461 | 3469 | } |
3462 | 3470 | break; |
| 3471 | + case OMINOUS_ITEM_SPAWNER: |
| 3472 | + MCOminousItemSpawner spawner = (MCOminousItemSpawner) entity; |
| 3473 | + for(String index : specArray.stringKeySet()) { |
| 3474 | + switch(index.toLowerCase()) { |
| 3475 | + case entity_spec.KEY_OMINOUS_SPAWNER_ITEM: |
| 3476 | + spawner.setItem(ObjectGenerator.GetGenerator().item(specArray.get(index, t), t)); |
| 3477 | + break; |
| 3478 | + case entity_spec.KEY_OMINOUS_SPAWNER_DELAY: |
| 3479 | + spawner.setDelay(ArgumentValidation.getInt(specArray.get(index, t), t)); |
| 3480 | + break; |
| 3481 | + default: |
| 3482 | + throwException(index, t); |
| 3483 | + } |
| 3484 | + } |
| 3485 | + break; |
3463 | 3486 | case PAINTING: |
3464 | 3487 | MCPainting painting = (MCPainting) entity; |
3465 | 3488 | for(String index : specArray.stringKeySet()) { |
|
0 commit comments