mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Use standard format for color hex, some minor name alteration
This commit is contained in:
parent
9e02f3c4e3
commit
6320a63ca5
@ -65,13 +65,13 @@ class Effect{
|
||||
$config = new Config(\pocketmine\PATH . "src/pocketmine/resources/effects.json", Config::JSON, []);
|
||||
|
||||
foreach($config->getAll() as $name => $data){
|
||||
$color = hexdec($data["color"]);
|
||||
$color = hexdec(substr($data["color"], 3));
|
||||
$r = ($color >> 16) & 0xff;
|
||||
$g = ($color >> 8) & 0xff;
|
||||
$b = $color & 0xff;
|
||||
self::registerEffect($name, new Effect(
|
||||
$data["id"],
|
||||
"%" . $data["name"],
|
||||
"%potion." . $data["name"],
|
||||
$r,
|
||||
$g,
|
||||
$b,
|
||||
|
@ -1,135 +1,135 @@
|
||||
{
|
||||
"speed": {
|
||||
"id": 1,
|
||||
"color": "7cafc6",
|
||||
"name": "potion.moveSpeed"
|
||||
"color": "#FF7CAFC6",
|
||||
"name": "moveSpeed"
|
||||
},
|
||||
"slowness": {
|
||||
"id": 2,
|
||||
"color": "5a6c81",
|
||||
"name": "potion.moveSlowdown",
|
||||
"color": "#FF5A6C81",
|
||||
"name": "moveSlowdown",
|
||||
"isBad": true
|
||||
},
|
||||
"haste": {
|
||||
"id": 3,
|
||||
"color": "d9c043",
|
||||
"name": "potion.digSpeed"
|
||||
"color": "#FFD9C043",
|
||||
"name": "digSpeed"
|
||||
},
|
||||
"mining_fatigue": {
|
||||
"id": 4,
|
||||
"color": "4a4217",
|
||||
"name": "potion.digSlowDown",
|
||||
"color": "#FF4A4217",
|
||||
"name": "digSlowDown",
|
||||
"isBad": true
|
||||
},
|
||||
"strength": {
|
||||
"id": 5,
|
||||
"color": "932423",
|
||||
"name": "potion.damageBoost"
|
||||
"color": "#FF932423",
|
||||
"name": "damageBoost"
|
||||
},
|
||||
"instant_health": {
|
||||
"id": 6,
|
||||
"color": "f82423",
|
||||
"name": "potion.heal",
|
||||
"color": "#FFF82423",
|
||||
"name": "heal",
|
||||
"default_duration": 1,
|
||||
"has_bubbles": false
|
||||
},
|
||||
"instant_damage": {
|
||||
"id": 7,
|
||||
"color": "430a09",
|
||||
"name": "potion.harm",
|
||||
"color": "#FF430A09",
|
||||
"name": "harm",
|
||||
"isBad": true,
|
||||
"default_duration": 1,
|
||||
"has_bubbles": false
|
||||
},
|
||||
"jump_boost": {
|
||||
"id": 8,
|
||||
"color": "22ff4c",
|
||||
"name": "potion.jump"
|
||||
"color": "#FF22FF4C",
|
||||
"name": "jump"
|
||||
},
|
||||
"nausea": {
|
||||
"id": 9,
|
||||
"color": "551d4a",
|
||||
"name": "potion.confusion",
|
||||
"color": "#FF551D4A",
|
||||
"name": "confusion",
|
||||
"isBad": true
|
||||
},
|
||||
"regeneration": {
|
||||
"id": 10,
|
||||
"color": "cd5cab",
|
||||
"name": "potion.regeneration"
|
||||
"color": "#FFCD5CAB",
|
||||
"name": "regeneration"
|
||||
},
|
||||
"resistance": {
|
||||
"id": 11,
|
||||
"color": "99453a",
|
||||
"name": "potion.resistance"
|
||||
"color": "#FF99453A",
|
||||
"name": "resistance"
|
||||
},
|
||||
"fire_resistance": {
|
||||
"id": 12,
|
||||
"color": "e49a3a",
|
||||
"name": "potion.fireResistance"
|
||||
"color": "#FFE49A3A",
|
||||
"name": "fireResistance"
|
||||
},
|
||||
"water_breathing": {
|
||||
"id": 13,
|
||||
"color": "2e5299",
|
||||
"name": "potion.waterBreathing"
|
||||
"color": "#FF2E5299",
|
||||
"name": "waterBreathing"
|
||||
},
|
||||
"invisibility": {
|
||||
"id": 14,
|
||||
"color": "7f8392",
|
||||
"name": "potion.invisibility"
|
||||
"color": "#FF7F8392",
|
||||
"name": "invisibility"
|
||||
},
|
||||
"blindness": {
|
||||
"id": 15,
|
||||
"color": "1f1f23",
|
||||
"name": "potion.blindness",
|
||||
"color": "#FF1F1F23",
|
||||
"name": "blindness",
|
||||
"isBad": true
|
||||
},
|
||||
"night_vision": {
|
||||
"id": 16,
|
||||
"color": "1f1fa1",
|
||||
"name": "potion.nightVision"
|
||||
"color": "#FF1F1FA1",
|
||||
"name": "nightVision"
|
||||
},
|
||||
"hunger": {
|
||||
"id": 17,
|
||||
"color": "587653",
|
||||
"name": "potion.hunger",
|
||||
"color": "#FF587653",
|
||||
"name": "hunger",
|
||||
"isBad": true
|
||||
},
|
||||
"weakness": {
|
||||
"id": 18,
|
||||
"color": "484d48",
|
||||
"name": "potion.weakness",
|
||||
"color": "#FF484D48",
|
||||
"name": "weakness",
|
||||
"isBad": true
|
||||
},
|
||||
"poison": {
|
||||
"id": 19,
|
||||
"color": "4e9331",
|
||||
"name": "potion.poison",
|
||||
"color": "#FF4E9331",
|
||||
"name": "poison",
|
||||
"isBad": true
|
||||
},
|
||||
"wither": {
|
||||
"id": 20,
|
||||
"color": "352a27",
|
||||
"name": "potion.wither",
|
||||
"color": "#FF352A27",
|
||||
"name": "wither",
|
||||
"isBad": true
|
||||
},
|
||||
"health_boost": {
|
||||
"id": 21,
|
||||
"color": "f87d23",
|
||||
"name": "potion.healthBoost"
|
||||
"color": "#FFF87D23",
|
||||
"name": "healthBoost"
|
||||
},
|
||||
"absorption": {
|
||||
"id": 22,
|
||||
"color": "2552a5",
|
||||
"name": "potion.absorption"
|
||||
"color": "#FF2552A5",
|
||||
"name": "absorption"
|
||||
},
|
||||
"saturation": {
|
||||
"id": 23,
|
||||
"color": "f82423",
|
||||
"name": "potion.saturation"
|
||||
"color": "#FFF82423",
|
||||
"name": "saturation"
|
||||
},
|
||||
"levitation": {
|
||||
"id": 24,
|
||||
"color": "ceffff",
|
||||
"name": "potion.levitation"
|
||||
"color": "#FFCEFFFF",
|
||||
"name": "levitation"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user