12345678910111213141516171819202122232425262728293031323334353637 |
- cloth_code_map = map.new();
- map.add(cloth_code_map, "dark_gray", 4673362);
- map.add(cloth_code_map, "cyan", 1481884);
- map.add(cloth_code_map, "red", 11546150);
- map.add(cloth_code_map, "blue", 3949738);
- map.add(cloth_code_map, "orange", 16351261);
- map.add(cloth_code_map, "green", 6192150);
- map.add(cloth_code_map, "gray", 10329495);
- map.add(cloth_code_map, "white", 16383998);
- map.add(cloth_code_map, "pink", 15961002);
- map.add(cloth_code_map, "purple", 8991416);
- map.add(cloth_code_map, "yellow", 16701501);
- map.add(cloth_code_map, "lime", 8439583);
- player = read.player("marvinius");
- loc = entity.getLocation(player);
- ent = entity.spawn("zombie", loc, "{IsBaby:0}");
- living.removeAi(ent);
- entity.setName(ent, "");
- entity.setSilent(ent, true);
- amongus.forceEquip(ent, "blue");
- function amongus.forceEquip(entity, color) {
- color_code = map.get($cloth_code_map, color);
- item = read.item(concat("{id:\"minecraft:leather_helmet\",Count:1b,tag:{Damage:0,display:{color:", color_code, "}}}"));
- item.hide(item, "attributes");
- entity.setEquip(entity, "head", item);
- item = read.item(concat("{id:\"minecraft:leather_chestplate\",Count:1b,tag:{Damage:0,display:{color:", color_code, "}}}"));
- item.hide(item, "attributes");
- entity.setEquip(entity, "chest", item);
- item = read.item(concat("{id:\"minecraft:leather_leggings\",Count:1b,tag:{Damage:0,display:{color:", color_code, "}}}"));
- item.hide(item, "attributes");
- entity.setEquip(entity, "legs", item);
- item = read.item(concat("{id:\"minecraft:leather_boots\",Count:1b,tag:{Damage:0,display:{color:", color_code, "}}}"));
- item.hide(item, "attributes");
- entity.setEquip(entity, "feet", item);
- }
|