summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Palettes
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2020-08-12 10:54:36 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-19 21:45:27 +0200
commit7d0813ce8c1be14bc1b9b706644bd4aa797244ee (patch)
tree6d026a11be6db2da3d60b94b4f4a442460253e1d /src/Protocol/Palettes
parentAdd enhanced Gold generation in Mesa-Type Biomes (#4821) (diff)
downloadcuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.gz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.bz2
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.lz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.xz
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.tar.zst
cuberite-7d0813ce8c1be14bc1b9b706644bd4aa797244ee.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Palettes/Palette_1_13.cpp66
-rw-r--r--src/Protocol/Palettes/Palette_1_13.h2
-rw-r--r--src/Protocol/Palettes/Palette_1_13_1.cpp72
-rw-r--r--src/Protocol/Palettes/Palette_1_13_1.h2
-rw-r--r--src/Protocol/Palettes/Palette_1_14.cpp83
-rw-r--r--src/Protocol/Palettes/Palette_1_14.h2
6 files changed, 218 insertions, 9 deletions
diff --git a/src/Protocol/Palettes/Palette_1_13.cpp b/src/Protocol/Palettes/Palette_1_13.cpp
index d04bc3180..7950ee72e 100644
--- a/src/Protocol/Palettes/Palette_1_13.cpp
+++ b/src/Protocol/Palettes/Palette_1_13.cpp
@@ -5,7 +5,7 @@
namespace Palette_1_13
{
- UInt32 FromBlock(short ID)
+ UInt32 FromBlock(const short ID)
{
using namespace Block;
@@ -7067,7 +7067,7 @@ namespace Palette_1_13
}
}
- UInt32 FromItem(Item ID)
+ UInt32 FromItem(const Item ID)
{
switch (ID)
{
@@ -7860,7 +7860,67 @@ namespace Palette_1_13
}
}
- Item ToItem(UInt32 ID)
+ UInt32 From(const Statistic ID)
+ {
+ switch (ID)
+ {
+ case Statistic::AnimalsBred: return 25;
+ case Statistic::AviateOneCm: return 17;
+ case Statistic::BoatOneCm: return 14;
+ case Statistic::CleanArmor: return 33;
+ case Statistic::CleanBanner: return 34;
+ case Statistic::ClimbOneCm: return 10;
+ case Statistic::CrouchOneCm: return 6;
+ case Statistic::DamageDealt: return 21;
+ case Statistic::DamageTaken: return 22;
+ case Statistic::Deaths: return 23;
+ case Statistic::Drop: return 20;
+ case Statistic::EatCakeSlice: return 30;
+ case Statistic::EnchantItem: return 45;
+ case Statistic::FallOneCm: return 9;
+ case Statistic::FillCauldron: return 31;
+ case Statistic::FishCaught: return 27;
+ case Statistic::FlyOneCm: return 11;
+ case Statistic::HorseOneCm: return 16;
+ case Statistic::InspectDispenser: return 39;
+ case Statistic::InspectDropper: return 37;
+ case Statistic::InspectHopper: return 38;
+ case Statistic::InteractWithBeacon: return 36;
+ case Statistic::InteractWithBrewingstand: return 35;
+ case Statistic::InteractWithCraftingTable: return 48;
+ case Statistic::InteractWithFurnace: return 47;
+ case Statistic::Jump: return 19;
+ case Statistic::LeaveGame: return 0;
+ case Statistic::MinecartOneCm: return 13;
+ case Statistic::MobKills: return 24;
+ case Statistic::OpenChest: return 49;
+ case Statistic::OpenEnderchest: return 44;
+ case Statistic::OpenShulkerBox: return 51;
+ case Statistic::PigOneCm: return 15;
+ case Statistic::PlayerKills: return 26;
+ case Statistic::PlayNoteblock: return 40;
+ case Statistic::PlayOneMinute: return 1;
+ case Statistic::PlayRecord: return 46;
+ case Statistic::PotFlower: return 42;
+ case Statistic::SleepInBed: return 50;
+ case Statistic::SneakTime: return 4;
+ case Statistic::SprintOneCm: return 7;
+ case Statistic::SwimOneCm: return 8;
+ case Statistic::TalkedToVillager: return 28;
+ case Statistic::TimeSinceDeath: return 2;
+ case Statistic::TimeSinceRest: return 3;
+ case Statistic::TradedWithVillager: return 29;
+ case Statistic::TriggerTrappedChest: return 43;
+ case Statistic::TuneNoteblock: return 41;
+ case Statistic::UseCauldron: return 32;
+ case Statistic::WalkOneCm: return 5;
+ case Statistic::WalkOnWaterOneCm: return 18;
+ case Statistic::WalkUnderWaterOneCm: return 12;
+ default: return -1;
+ }
+ }
+
+ Item ToItem(const UInt32 ID)
{
switch (ID)
{
diff --git a/src/Protocol/Palettes/Palette_1_13.h b/src/Protocol/Palettes/Palette_1_13.h
index eade92688..3f72e0277 100644
--- a/src/Protocol/Palettes/Palette_1_13.h
+++ b/src/Protocol/Palettes/Palette_1_13.h
@@ -1,10 +1,12 @@
#pragma once
#include "../../Registries/Items.h"
+#include "../../Registries/Statistics.h"
namespace Palette_1_13
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
+ UInt32 From(Statistic ID);
Item ToItem(UInt32 ID);
}
diff --git a/src/Protocol/Palettes/Palette_1_13_1.cpp b/src/Protocol/Palettes/Palette_1_13_1.cpp
index f8cddcaed..25f02e47b 100644
--- a/src/Protocol/Palettes/Palette_1_13_1.cpp
+++ b/src/Protocol/Palettes/Palette_1_13_1.cpp
@@ -5,7 +5,7 @@
namespace Palette_1_13_1
{
- UInt32 FromBlock(short ID)
+ UInt32 FromBlock(const short ID)
{
using namespace Block;
@@ -7072,7 +7072,7 @@ namespace Palette_1_13_1
}
}
- UInt32 FromItem(Item ID)
+ UInt32 FromItem(const Item ID)
{
switch (ID)
{
@@ -7870,7 +7870,73 @@ namespace Palette_1_13_1
}
}
- Item ToItem(UInt32 ID)
+ UInt32 From(const Statistic ID)
+ {
+ switch (ID)
+ {
+ case Statistic::AnimalsBred: return 30;
+ case Statistic::AviateOneCm: return 17;
+ case Statistic::BoatOneCm: return 14;
+ case Statistic::CleanArmor: return 38;
+ case Statistic::CleanBanner: return 39;
+ case Statistic::CleanShulkerBox: return 40;
+ case Statistic::ClimbOneCm: return 10;
+ case Statistic::CrouchOneCm: return 6;
+ case Statistic::DamageAbsorbed: return 26;
+ case Statistic::DamageBlockedByShield: return 25;
+ case Statistic::DamageDealt: return 21;
+ case Statistic::DamageDealtAbsorbed: return 22;
+ case Statistic::DamageDealtResisted: return 23;
+ case Statistic::DamageResisted: return 27;
+ case Statistic::DamageTaken: return 24;
+ case Statistic::Deaths: return 28;
+ case Statistic::Drop: return 20;
+ case Statistic::EatCakeSlice: return 35;
+ case Statistic::EnchantItem: return 51;
+ case Statistic::FallOneCm: return 9;
+ case Statistic::FillCauldron: return 36;
+ case Statistic::FishCaught: return 32;
+ case Statistic::FlyOneCm: return 11;
+ case Statistic::HorseOneCm: return 16;
+ case Statistic::InspectDispenser: return 45;
+ case Statistic::InspectDropper: return 43;
+ case Statistic::InspectHopper: return 44;
+ case Statistic::InteractWithBeacon: return 42;
+ case Statistic::InteractWithBrewingstand: return 41;
+ case Statistic::InteractWithCraftingTable: return 54;
+ case Statistic::InteractWithFurnace: return 53;
+ case Statistic::Jump: return 19;
+ case Statistic::LeaveGame: return 0;
+ case Statistic::MinecartOneCm: return 13;
+ case Statistic::MobKills: return 29;
+ case Statistic::OpenChest: return 55;
+ case Statistic::OpenEnderchest: return 50;
+ case Statistic::OpenShulkerBox: return 57;
+ case Statistic::PigOneCm: return 15;
+ case Statistic::PlayerKills: return 31;
+ case Statistic::PlayNoteblock: return 46;
+ case Statistic::PlayOneMinute: return 1;
+ case Statistic::PlayRecord: return 52;
+ case Statistic::PotFlower: return 48;
+ case Statistic::SleepInBed: return 56;
+ case Statistic::SneakTime: return 4;
+ case Statistic::SprintOneCm: return 7;
+ case Statistic::SwimOneCm: return 8;
+ case Statistic::TalkedToVillager: return 33;
+ case Statistic::TimeSinceDeath: return 2;
+ case Statistic::TimeSinceRest: return 3;
+ case Statistic::TradedWithVillager: return 34;
+ case Statistic::TriggerTrappedChest: return 49;
+ case Statistic::TuneNoteblock: return 47;
+ case Statistic::UseCauldron: return 37;
+ case Statistic::WalkOneCm: return 5;
+ case Statistic::WalkOnWaterOneCm: return 18;
+ case Statistic::WalkUnderWaterOneCm: return 12;
+ default: return -1;
+ }
+ }
+
+ Item ToItem(const UInt32 ID)
{
switch (ID)
{
diff --git a/src/Protocol/Palettes/Palette_1_13_1.h b/src/Protocol/Palettes/Palette_1_13_1.h
index a973b0f5d..2e01fef49 100644
--- a/src/Protocol/Palettes/Palette_1_13_1.h
+++ b/src/Protocol/Palettes/Palette_1_13_1.h
@@ -1,10 +1,12 @@
#pragma once
#include "../../Registries/Items.h"
+#include "../../Registries/Statistics.h"
namespace Palette_1_13_1
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
+ UInt32 From(Statistic ID);
Item ToItem(UInt32 ID);
}
diff --git a/src/Protocol/Palettes/Palette_1_14.cpp b/src/Protocol/Palettes/Palette_1_14.cpp
index d03ae7982..e98234ff2 100644
--- a/src/Protocol/Palettes/Palette_1_14.cpp
+++ b/src/Protocol/Palettes/Palette_1_14.cpp
@@ -5,7 +5,7 @@
namespace Palette_1_14
{
- UInt32 FromBlock(short ID)
+ UInt32 FromBlock(const short ID)
{
using namespace Block;
@@ -8620,7 +8620,7 @@ namespace Palette_1_14
}
}
- UInt32 FromItem(Item ID)
+ UInt32 FromItem(const Item ID)
{
switch (ID)
{
@@ -9505,7 +9505,84 @@ namespace Palette_1_14
}
}
- Item ToItem(UInt32 ID)
+ UInt32 From(const Statistic ID)
+ {
+ switch (ID)
+ {
+ case Statistic::AnimalsBred: return 30;
+ case Statistic::AviateOneCm: return 17;
+ case Statistic::BellRing: return 66;
+ case Statistic::BoatOneCm: return 14;
+ case Statistic::CleanArmor: return 38;
+ case Statistic::CleanBanner: return 39;
+ case Statistic::CleanShulkerBox: return 40;
+ case Statistic::ClimbOneCm: return 10;
+ case Statistic::CrouchOneCm: return 6;
+ case Statistic::DamageAbsorbed: return 26;
+ case Statistic::DamageBlockedByShield: return 25;
+ case Statistic::DamageDealt: return 21;
+ case Statistic::DamageDealtAbsorbed: return 22;
+ case Statistic::DamageDealtResisted: return 23;
+ case Statistic::DamageResisted: return 27;
+ case Statistic::DamageTaken: return 24;
+ case Statistic::Deaths: return 28;
+ case Statistic::Drop: return 20;
+ case Statistic::EatCakeSlice: return 35;
+ case Statistic::EnchantItem: return 51;
+ case Statistic::FallOneCm: return 9;
+ case Statistic::FillCauldron: return 36;
+ case Statistic::FishCaught: return 32;
+ case Statistic::FlyOneCm: return 11;
+ case Statistic::HorseOneCm: return 16;
+ case Statistic::InspectDispenser: return 45;
+ case Statistic::InspectDropper: return 43;
+ case Statistic::InspectHopper: return 44;
+ case Statistic::InteractWithBeacon: return 42;
+ case Statistic::InteractWithBlastFurnace: return 59;
+ case Statistic::InteractWithBrewingstand: return 41;
+ case Statistic::InteractWithCampfire: return 62;
+ case Statistic::InteractWithCartographyTable: return 63;
+ case Statistic::InteractWithCraftingTable: return 54;
+ case Statistic::InteractWithFurnace: return 53;
+ case Statistic::InteractWithLectern: return 61;
+ case Statistic::InteractWithLoom: return 64;
+ case Statistic::InteractWithSmoker: return 60;
+ case Statistic::InteractWithStonecutter: return 65;
+ case Statistic::Jump: return 19;
+ case Statistic::LeaveGame: return 0;
+ case Statistic::MinecartOneCm: return 13;
+ case Statistic::MobKills: return 29;
+ case Statistic::OpenBarrel: return 58;
+ case Statistic::OpenChest: return 55;
+ case Statistic::OpenEnderchest: return 50;
+ case Statistic::OpenShulkerBox: return 57;
+ case Statistic::PigOneCm: return 15;
+ case Statistic::PlayerKills: return 31;
+ case Statistic::PlayNoteblock: return 46;
+ case Statistic::PlayOneMinute: return 1;
+ case Statistic::PlayRecord: return 52;
+ case Statistic::PotFlower: return 48;
+ case Statistic::RaidTrigger: return 67;
+ case Statistic::RaidWin: return 68;
+ case Statistic::SleepInBed: return 56;
+ case Statistic::SneakTime: return 4;
+ case Statistic::SprintOneCm: return 7;
+ case Statistic::SwimOneCm: return 18;
+ case Statistic::TalkedToVillager: return 33;
+ case Statistic::TimeSinceDeath: return 2;
+ case Statistic::TimeSinceRest: return 3;
+ case Statistic::TradedWithVillager: return 34;
+ case Statistic::TriggerTrappedChest: return 49;
+ case Statistic::TuneNoteblock: return 47;
+ case Statistic::UseCauldron: return 37;
+ case Statistic::WalkOneCm: return 5;
+ case Statistic::WalkOnWaterOneCm: return 8;
+ case Statistic::WalkUnderWaterOneCm: return 12;
+ default: return -1;
+ }
+ }
+
+ Item ToItem(const UInt32 ID)
{
switch (ID)
{
diff --git a/src/Protocol/Palettes/Palette_1_14.h b/src/Protocol/Palettes/Palette_1_14.h
index 852dce6bd..1bb5ffa85 100644
--- a/src/Protocol/Palettes/Palette_1_14.h
+++ b/src/Protocol/Palettes/Palette_1_14.h
@@ -1,10 +1,12 @@
#pragma once
#include "../../Registries/Items.h"
+#include "../../Registries/Statistics.h"
namespace Palette_1_14
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
+ UInt32 From(Statistic ID);
Item ToItem(UInt32 ID);
}