1
0

Add 1.13.1 to 1.15.2 mappings

This commit is contained in:
Tiger Wang 2020-07-18 22:45:04 +01:00
parent 9c6b5a3ec9
commit 1b9b587734
13 changed files with 29585 additions and 15 deletions

View File

@ -2,10 +2,16 @@ target_sources(
${CMAKE_PROJECT_NAME} PRIVATE
Palette_1_13.cpp
Palette_1_13_1.cpp
Palette_1_14.cpp
Palette_1_15.cpp
Palette_1_16.cpp
Upgrade.cpp
Palette_1_13.h
Palette_1_13_1.h
Palette_1_14.h
Palette_1_15.h
Palette_1_16.h
Upgrade.h
)

View File

@ -5,7 +5,7 @@
namespace Palette_1_13
{
Int32 FromBlock(short ID)
UInt32 FromBlock(short ID)
{
using namespace Block;
@ -7067,7 +7067,7 @@ namespace Palette_1_13
}
}
Int32 FromItem(Item ID)
UInt32 FromItem(Item ID)
{
switch (ID)
{
@ -7860,7 +7860,7 @@ namespace Palette_1_13
}
}
Item ToItem(Int32 ID)
Item ToItem(UInt32 ID)
{
switch (ID)
{

View File

@ -4,7 +4,7 @@
namespace Palette_1_13
{
Int32 FromBlock(short ID);
Int32 FromItem(Item ID);
Item ToItem(Int32 ID);
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
Item ToItem(UInt32 ID);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
#pragma once
#include "../../Registries/Items.h"
namespace Palette_1_13_1
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
Item ToItem(UInt32 ID);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
#pragma once
#include "../../Registries/Items.h"
namespace Palette_1_14
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
Item ToItem(UInt32 ID);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
#pragma once
#include "../../Registries/Items.h"
namespace Palette_1_15
{
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
Item ToItem(UInt32 ID);
}

View File

@ -5,7 +5,7 @@
namespace Palette_1_16
{
Int32 FromBlock(short ID)
UInt32 FromBlock(short ID)
{
using namespace Block;
@ -11779,7 +11779,7 @@ namespace Palette_1_16
}
}
Int32 FromItem(Item ID)
UInt32 FromItem(Item ID)
{
switch (ID)
{
@ -12762,7 +12762,7 @@ namespace Palette_1_16
}
}
Item ToItem(Int32 ID)
Item ToItem(UInt32 ID)
{
switch (ID)
{

View File

@ -4,7 +4,7 @@
namespace Palette_1_16
{
Int32 FromBlock(short ID);
Int32 FromItem(Item ID);
Item ToItem(Int32 ID);
UInt32 FromBlock(short ID);
UInt32 FromItem(Item ID);
Item ToItem(UInt32 ID);
}

View File

@ -1703,9 +1703,9 @@ namespace PaletteUpgrade
}
}
Item FromItem(short Item, short Meta)
Item FromItem(short Item, short Damage)
{
switch ((Item << 16) | Meta)
switch ((Item << 16) | Damage)
{
case (1 << 16) | 0: return Item::Stone;
case (1 << 16) | 1: return Item::Granite;

View File

@ -6,6 +6,6 @@
namespace PaletteUpgrade
{
short FromBlock(BLOCKTYPE Block, NIBBLETYPE Meta);
Item FromItem(short Item, short Meta);
Item FromItem(short Item, short Damage);
std::pair<short, short> ToItem(Item ID);
}