summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Entities/EntityEffect.cpp124
-rw-r--r--src/Entities/EntityEffect.h18
-rw-r--r--src/Entities/ProjectileEntity.cpp2
-rw-r--r--src/Entities/SplashPotionEntity.cpp13
-rw-r--r--src/Entities/SplashPotionEntity.h4
-rw-r--r--src/Generating/CompoGen.cpp17
-rw-r--r--src/Generating/FinishGen.cpp49
-rw-r--r--src/Generating/Prefabs/NetherFortPrefabs.cpp789
-rw-r--r--src/Inventory.cpp12
-rw-r--r--src/ItemGrid.cpp6
-rw-r--r--src/Items/ItemPotion.h138
-rw-r--r--src/UI/SlotArea.cpp17
-rw-r--r--src/UI/SlotArea.h2
-rw-r--r--src/WorldStorage/WSSAnvil.cpp2
14 files changed, 997 insertions, 196 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index 6c4b13a58..fdcbe822e 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -7,6 +7,130 @@
+
+int cEntityEffect::GetPotionColor(short a_ItemDamage)
+{
+ // Lowest six bits
+ return (a_ItemDamage & 0x3f);
+}
+
+
+
+
+
+cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage)
+{
+ // Lowest four bits
+ // Potion effect bits are different from entity effect values
+ // For reference: http://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
+ switch (a_ItemDamage & 0x0f)
+ {
+ case 0x01: return cEntityEffect::effRegeneration;
+ case 0x02: return cEntityEffect::effSpeed;
+ case 0x03: return cEntityEffect::effFireResistance;
+ case 0x04: return cEntityEffect::effPoison;
+ case 0x05: return cEntityEffect::effInstantHealth;
+ case 0x06: return cEntityEffect::effNightVision;
+ case 0x08: return cEntityEffect::effWeakness;
+ case 0x09: return cEntityEffect::effStrength;
+ case 0x0a: return cEntityEffect::effSlowness;
+ case 0x0c: return cEntityEffect::effInstantDamage;
+ case 0x0d: return cEntityEffect::effWaterBreathing;
+ case 0x0e: return cEntityEffect::effInvisibility;
+
+ // No effect potions
+ case 0x00:
+ case 0x07:
+ case 0x0b: // Will be potion of leaping in 1.8
+ case 0x0f:
+ {
+ break;
+ }
+ }
+ return cEntityEffect::effNoEffect;
+}
+
+
+
+
+
+short cEntityEffect::GetPotionEffectIntensity(short a_ItemDamage)
+{
+ // Level II potion if the fifth lowest bit is set
+ return ((a_ItemDamage & 0x20) != 0) ? 1 : 0;
+}
+
+
+
+
+
+int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
+{
+ // Base duration in ticks
+ int base = 0;
+ double TierCoeff = 1, ExtCoeff = 1, SplashCoeff = 1;
+
+ switch (GetPotionEffectType(a_ItemDamage))
+ {
+ case cEntityEffect::effRegeneration:
+ case cEntityEffect::effPoison:
+ {
+ base = 900;
+ break;
+ }
+
+ case cEntityEffect::effSpeed:
+ case cEntityEffect::effFireResistance:
+ case cEntityEffect::effNightVision:
+ case cEntityEffect::effStrength:
+ case cEntityEffect::effWaterBreathing:
+ case cEntityEffect::effInvisibility:
+ {
+ base = 3600;
+ break;
+ }
+
+ case cEntityEffect::effWeakness:
+ case cEntityEffect::effSlowness:
+ {
+ base = 1800;
+ break;
+ }
+ }
+
+ // If potion is level II, half the duration. If not, stays the same
+ TierCoeff = (GetPotionEffectIntensity(a_ItemDamage) > 0) ? 0.5 : 1;
+
+ // If potion is extended, multiply duration by 8/3. If not, stays the same
+ // Extended potion if sixth lowest bit is set
+ ExtCoeff = (a_ItemDamage & 0x40) ? (8.0 / 3.0) : 1;
+
+ // If potion is splash potion, multiply duration by 3/4. If not, stays the same
+ SplashCoeff = IsPotionDrinkable(a_ItemDamage) ? 1 : 0.75;
+
+ // Ref.:
+ // http://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
+ // http://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
+ // http://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
+
+ return (int)(base * TierCoeff * ExtCoeff * SplashCoeff);
+}
+
+
+
+
+
+bool cEntityEffect::IsPotionDrinkable(short a_ItemDamage)
+{
+ // Drinkable potion if 13th lowest bit is set
+ // Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
+ return ((a_ItemDamage & 0x2000) != 0);
+}
+
+
+
+
+
cEntityEffect::cEntityEffect():
m_Ticks(0),
m_Duration(0),
diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h
index 396a9bbe0..f9c1e4eb2 100644
--- a/src/Entities/EntityEffect.h
+++ b/src/Entities/EntityEffect.h
@@ -36,6 +36,24 @@ public:
effSaturation = 23,
} ;
+ /** Returns the potion color (used by the client for visuals), based on the potion's damage value */
+ static int GetPotionColor(short a_ItemDamage);
+
+
+ /** Translates the potion's damage value into the entity effect that the potion gives */
+ static cEntityEffect::eType GetPotionEffectType(short a_ItemDamage);
+
+
+ /** Retrieves the intensity level from the potion's damage value. Returns 0 for level I potions, 1 for level II potions. */
+ static short GetPotionEffectIntensity(short a_ItemDamage);
+
+
+ /** Returns the effect duration, in ticks, based on the potion's damage value */
+ static int GetPotionEffectDuration(short a_ItemDamage);
+
+ /** Returns true if the potion with the given damage is drinkable */
+ static bool IsPotionDrinkable(short a_ItemDamage);
+
// tolua_end
/** Creates an empty entity effect */
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index b5e81bc0c..43023ec28 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -22,6 +22,7 @@
#include "FireworkEntity.h"
#include "GhastFireballEntity.h"
#include "WitherSkullEntity.h"
+#include "SplashPotionEntity.h"
#include "Player.h"
@@ -263,6 +264,7 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
case pkGhastFireball: return new cGhastFireballEntity (a_Creator, a_X, a_Y, a_Z, Speed);
case pkFireCharge: return new cFireChargeEntity (a_Creator, a_X, a_Y, a_Z, Speed);
case pkExpBottle: return new cExpBottleEntity (a_Creator, a_X, a_Y, a_Z, Speed);
+ case pkSplashPotion: return new cSplashPotionEntity (a_Creator, a_X, a_Y, a_Z, Speed, *a_Item);
case pkWitherSkull: return new cWitherSkullEntity (a_Creator, a_X, a_Y, a_Z, Speed);
case pkFirework:
{
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp
index 6d874e957..fd1a0179b 100644
--- a/src/Entities/SplashPotionEntity.cpp
+++ b/src/Entities/SplashPotionEntity.cpp
@@ -72,17 +72,18 @@ cSplashPotionEntity::cSplashPotionEntity(
cEntity * a_Creator,
double a_X, double a_Y, double a_Z,
const Vector3d & a_Speed,
- cEntityEffect::eType a_EntityEffectType,
- cEntityEffect a_EntityEffect,
- int a_PotionColor
+ const cItem & a_Item
) :
super(pkSplashPotion, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
- m_EntityEffectType(a_EntityEffectType),
- m_EntityEffect(a_EntityEffect),
- m_PotionColor(a_PotionColor),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
+ m_EntityEffectType = cEntityEffect::GetPotionEffectType(a_Item.m_ItemDamage);
+ m_EntityEffect = cEntityEffect(
+ cEntityEffect::GetPotionEffectDuration(a_Item.m_ItemDamage),
+ cEntityEffect::GetPotionEffectIntensity(a_Item.m_ItemDamage)
+ );
+ m_PotionColor = cEntityEffect::GetPotionColor(a_Item.m_ItemDamage);
}
diff --git a/src/Entities/SplashPotionEntity.h b/src/Entities/SplashPotionEntity.h
index dd14ea82f..4afc5f204 100644
--- a/src/Entities/SplashPotionEntity.h
+++ b/src/Entities/SplashPotionEntity.h
@@ -29,9 +29,7 @@ public:
cEntity * a_Creator,
double a_X, double a_Y, double a_Z,
const Vector3d & a_Speed,
- cEntityEffect::eType a_EntityEffectType,
- cEntityEffect a_EntityEffect,
- int a_PotionColor
+ const cItem & a_Item
);
cEntityEffect::eType GetEntityEffectType(void) const { return m_EntityEffectType; }
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp
index faf2ac243..912d74248 100644
--- a/src/Generating/CompoGen.cpp
+++ b/src/Generating/CompoGen.cpp
@@ -628,7 +628,22 @@ void cCompoGenNether::ComposeTerrain(cChunkDesc & a_ChunkDesc)
for (int z = 0; z < 16; z++) for (int x = 0; x < 16; x++)
{
a_ChunkDesc.SetBlockType(x, 0, z, E_BLOCK_BEDROCK);
- a_ChunkDesc.SetBlockType(x, a_ChunkDesc.GetHeight(x, z), z, E_BLOCK_BEDROCK);
+
+ int Height = a_ChunkDesc.GetHeight(x, z);
+ a_ChunkDesc.SetBlockType(x, Height, z, E_BLOCK_BEDROCK);
+
+ NOISE_DATATYPE CeilingDisguise = (m_Noise1.CubicNoise2D((float)(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x) / 10, (float)(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) / 10));
+ if (CeilingDisguise < 0)
+ {
+ CeilingDisguise = -CeilingDisguise;
+ }
+
+ int CeilingDisguiseHeight = Height - 2 - CeilingDisguise * 3;
+
+ for (int y = Height - 1; y > CeilingDisguiseHeight; y--)
+ {
+ a_ChunkDesc.SetBlockType(x, y, z, E_BLOCK_NETHERRACK);
+ }
}
}
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 4c40270e8..9f0c8f3fa 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -91,26 +91,57 @@ void cFinishGenNetherClumpFoliage::TryPlaceClump(cChunkDesc & a_ChunkDesc, int a
{
bool IsFireBlock = a_Block == E_BLOCK_FIRE;
- for (int x = a_RelX - 4; x < a_RelX + 4; x++)
+ int MinX = a_RelX - 4;
+ if (MinX < 0) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MinX = 0;
+ }
+
+ int MaxX = a_RelX + 4;
+ if (MaxX > cChunkDef::Width) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MaxX = cChunkDef::Width;
+ }
+
+ int MinZ = a_RelZ - 4;
+ if (MinZ < 0) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MinZ = 0;
+ }
+
+ int MaxZ = a_RelZ + 4;
+ if (MaxZ > cChunkDef::Width) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MaxZ = cChunkDef::Width;
+ }
+
+ int MinY = a_RelY - 2;
+ if (MinY < 0) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MinY = 0;
+ }
+
+ int MaxY = a_RelY + 2;
+ if (MaxY > cChunkDef::Height) // Check if the coordinate is outside the chunk. If it it then adjust it.
+ {
+ MaxY = cChunkDef::Height;
+ }
+
+ for (int x = MinX; x < MaxX; x++)
{
int xx = a_ChunkDesc.GetChunkX() * cChunkDef::Width + x;
- for (int z = a_RelZ - 4; z < a_RelZ + 4; z++)
+ for (int z = MinZ; z < MaxZ; z++)
{
int zz = a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z;
- for (int y = a_RelY - 2; y < a_RelY + 2; y++)
+ for (int y = MinY; y < MaxY; y++)
{
- if ((y < 1) || (y > cChunkDef::Height))
- {
- continue;
- }
-
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) // Don't replace non air blocks.
{
continue;
}
BLOCKTYPE BlockBelow = a_ChunkDesc.GetBlockType(x, y - 1, z);
- if (!cBlockInfo::IsSolid(BlockBelow)) // Only place on solid blocks
+ if (!cBlockInfo::FullyOccupiesVoxel(BlockBelow)) // Only place on solid blocks
{
continue;
}
diff --git a/src/Generating/Prefabs/NetherFortPrefabs.cpp b/src/Generating/Prefabs/NetherFortPrefabs.cpp
index ee3a8899b..a3e3da158 100644
--- a/src/Generating/Prefabs/NetherFortPrefabs.cpp
+++ b/src/Generating/Prefabs/NetherFortPrefabs.cpp
@@ -1411,6 +1411,383 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
////////////////////////////////////////////////////////////////////////////////
+ // BridgeDoubleStairs:
+ // The data has been exported from the gallery Nether, area index 115, ID 810, created by STR_Warrior
+ {
+ // Size:
+ 15, 16, 16, // SizeX = 15, SizeY = 16, SizeZ = 16
+
+ // Hitbox (relative to bounding box):
+ 0, 0, 0, // MinX, MinY, MinZ
+ 14, 15, 15, // MaxX, MaxY, MaxZ
+
+ // Block definitions:
+ ".: 0: 0\n" /* air */
+ "a:112: 0\n" /* netherbrick */
+ "b:114: 7\n" /* netherbrickstairs */
+ "c:114: 6\n" /* netherbrickstairs */
+ "d:114: 4\n" /* netherbrickstairs */
+ "e:114: 5\n" /* netherbrickstairs */
+ "f:114: 2\n" /* netherbrickstairs */
+ "g:114: 3\n" /* netherbrickstairs */
+ "h:114: 1\n" /* netherbrickstairs */
+ "i: 44:14\n" /* step */
+ "m: 19: 0\n" /* sponge */,
+
+ // Block data:
+ // Level 0
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmaaam"
+ /* 1 */ "aammmmmmmmmaaaa"
+ /* 2 */ "aammmmmmmmmmmma"
+ /* 3 */ "aammmmmmmmmmmma"
+ /* 4 */ "mmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmm"
+ /* 12 */ "aammmmmmmmmmmma"
+ /* 13 */ "aammmmmmmmmmmma"
+ /* 14 */ "aammmmmmmmmaaaa"
+ /* 15 */ "mmmmmmmmmmmaaam"
+
+ // Level 1
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmaaam"
+ /* 1 */ "aammmmmmmmmaaaa"
+ /* 2 */ "aammmmmmmmmmmma"
+ /* 3 */ "aammmmmmmmmmmma"
+ /* 4 */ "mmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmm"
+ /* 12 */ "aammmmmmmmmmmma"
+ /* 13 */ "aammmmmmmmmmmma"
+ /* 14 */ "aammmmmmmmmaaaa"
+ /* 15 */ "mmmmmmmmmmmaaam"
+
+ // Level 2
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmaaam"
+ /* 1 */ "aammmmmmmmmaaaa"
+ /* 2 */ "aammmmmmmmmmmma"
+ /* 3 */ "aammmmmmmmmmmma"
+ /* 4 */ "mmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmm"
+ /* 12 */ "aammmmmmmmmmmma"
+ /* 13 */ "aammmmmmmmmmmma"
+ /* 14 */ "aammmmmmmmmaaaa"
+ /* 15 */ "mmmmmmmmmmmaaam"
+
+ // Level 3
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmaaam"
+ /* 1 */ "aammmmmmmmmaaaa"
+ /* 2 */ "aammmmmmmmmbbba"
+ /* 3 */ "aammmmmmmmmmmma"
+ /* 4 */ "mmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmm"
+ /* 12 */ "aammmmmmmmmmmma"
+ /* 13 */ "aammmmmmmmmccca"
+ /* 14 */ "aammmmmmmmmaaaa"
+ /* 15 */ "mmmmmmmmmmmaaam"
+
+ // Level 4
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmaaam"
+ /* 1 */ "aammmmmmmmmaaaa"
+ /* 2 */ "aammmmmmmmmaaaa"
+ /* 3 */ "aammmmmmmmmbbba"
+ /* 4 */ "mmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmm"
+ /* 12 */ "aammmmmmmmmccca"
+ /* 13 */ "aammmmmmmmmaaaa"
+ /* 14 */ "aammmmmmmmmaaaa"
+ /* 15 */ "mmmmmmmmmmmaaam"
+
+ // Level 5
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmdaaae"
+ /* 1 */ "aammmmmmmmdaaaa"
+ /* 2 */ "aammmmmmmmdaaaa"
+ /* 3 */ "aammmmmmmmdaaaa"
+ /* 4 */ "mmmmmmmmmmdaaae"
+ /* 5 */ "mmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmdaaae"
+ /* 12 */ "aammmmmmmmdaaaa"
+ /* 13 */ "aammmmmmmmdaaaa"
+ /* 14 */ "aammmmmmmmdaaaa"
+ /* 15 */ "mmmmmmmmmmdaaae"
+
+ // Level 6
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmaaaaa"
+ /* 1 */ "aammmmmmmmaaaaa"
+ /* 2 */ "aammmmmmmmaaaaa"
+ /* 3 */ "aammmmmmmmaaaaa"
+ /* 4 */ "mmmmmmmmmmaaaaa"
+ /* 5 */ "mmmmmmmmmmdaaae"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmdaaae"
+ /* 11 */ "mmmmmmmmmmaaaaa"
+ /* 12 */ "aammmmmmmmaaaaa"
+ /* 13 */ "aammmmmmmmaaaaa"
+ /* 14 */ "aammmmmmmmaaaaa"
+ /* 15 */ "mmmmmmmmmmaaaaa"
+
+ // Level 7
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmma...a"
+ /* 1 */ "aammmmmmmma...a"
+ /* 2 */ "aammmmmmmma...a"
+ /* 3 */ "aammmmmmmma...a"
+ /* 4 */ "mmmmmmmmmmafffa"
+ /* 5 */ "mmmmmmmmmaaaaaa"
+ /* 6 */ "mmmmmmmmmaaaaae"
+ /* 7 */ "mmmmmmmmmaaaaae"
+ /* 8 */ "mmmmmmmmmaaaaae"
+ /* 9 */ "mmmmmmmmmaaaaae"
+ /* 10 */ "mmmmmmmmmaaaaaa"
+ /* 11 */ "mmmmmmmmmmaggga"
+ /* 12 */ "aammmmmmmma...a"
+ /* 13 */ "aammmmmmmma...a"
+ /* 14 */ "aammmmmmmma...a"
+ /* 15 */ "mmmmmmmmmma...a"
+
+ // Level 8
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmm...m"
+ /* 1 */ "aammmmmmmma...a"
+ /* 2 */ "aammmmmmmma...a"
+ /* 3 */ "aammmmmmmma...a"
+ /* 4 */ "mmmmmmmmmma...a"
+ /* 5 */ "mmmmmmmmmaafffa"
+ /* 6 */ "mmmmmmmmaaaaaaa"
+ /* 7 */ "mmmmmmmmaaaaaaa"
+ /* 8 */ "mmmmmmmmaaaaaaa"
+ /* 9 */ "mmmmmmmmaaaaaaa"
+ /* 10 */ "mmmmmmmmmaaggga"
+ /* 11 */ "mmmmmmmmmma...a"
+ /* 12 */ "aammmmmmmma...a"
+ /* 13 */ "aammmmmmmma...a"
+ /* 14 */ "aammmmmmmma...a"
+ /* 15 */ "mmmmmmmmmmm...m"
+
+ // Level 9
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmm...m"
+ /* 1 */ "aaemmmmmmma...a"
+ /* 2 */ "aaemmmmmmma...a"
+ /* 3 */ "aaemmmmmmma...a"
+ /* 4 */ "mmmmmmmmmma...a"
+ /* 5 */ "mmmmmmmmmaa...a"
+ /* 6 */ "mmmmaaaaah....a"
+ /* 7 */ "mmmmaaaaah....a"
+ /* 8 */ "mmmmaaaaah....a"
+ /* 9 */ "mmmmaaaaah....a"
+ /* 10 */ "mmmmmmmmmaa...a"
+ /* 11 */ "mmmmmmmmmma...a"
+ /* 12 */ "aaemmmmmmma...a"
+ /* 13 */ "aaemmmmmmma...a"
+ /* 14 */ "aaemmmmmmma...a"
+ /* 15 */ "mmmmmmmmmmm...m"
+
+ // Level 10
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmmmmm"
+ /* 1 */ "aaaeimmmmmammma"
+ /* 2 */ "aaaeimmmmmammma"
+ /* 3 */ "aaaeimmmmma...a"
+ /* 4 */ "mmmmmmmmmmm...m"
+ /* 5 */ "mmmmaaaaaam...m"
+ /* 6 */ "mmmmaaaah.....m"
+ /* 7 */ "mmmmaaaah.....m"
+ /* 8 */ "mmmmaaaah.....m"
+ /* 9 */ "mmmmaaaah.....m"
+ /* 10 */ "mmmmaaaaaam...m"
+ /* 11 */ "mmmmmmmmmmm...m"
+ /* 12 */ "aaaeimmmmma...a"
+ /* 13 */ "aaaeimmmmmammma"
+ /* 14 */ "aaaeimmmmmammma"
+ /* 15 */ "mmmmmmmmmmmmmmm"
+
+ // Level 11
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "ccccccccccccccc"
+ /* 1 */ "aaaaaaaaaaaaaaa"
+ /* 2 */ "aaaaaaaaaaaaaaa"
+ /* 3 */ "aaaaaaaaaaaaaaa"
+ /* 4 */ "bbbbaaaaabbbbbb"
+ /* 5 */ "mmmmagggamm...m"
+ /* 6 */ "mmmma.........m"
+ /* 7 */ "mmmma.........m"
+ /* 8 */ "mmmma.........m"
+ /* 9 */ "mmmma.........m"
+ /* 10 */ "mmmmafffamm...m"
+ /* 11 */ "ccccaaaahcccccc"
+ /* 12 */ "aaaaaaaaaaaaaaa"
+ /* 13 */ "aaaaaaaaaaaaaaa"
+ /* 14 */ "aaaaaaaaaaaaaaa"
+ /* 15 */ "bbbbbbbbbbbbbbb"
+
+ // Level 12
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "aaaaaaaaaaaaaaa"
+ /* 1 */ "aaaaaaaaaaaaaaa"
+ /* 2 */ "aaaaaaaaaaaaaaa"
+ /* 3 */ "aaaaaaaaaaaaaaa"
+ /* 4 */ "aaaaagggaaaaaaa"
+ /* 5 */ "mmmma...ammmmmm"
+ /* 6 */ "mmmma.........m"
+ /* 7 */ "mmmmm.........m"
+ /* 8 */ "mmmmm.........m"
+ /* 9 */ "mmmma.........m"
+ /* 10 */ "mmmma...ammmmmm"
+ /* 11 */ "aaaaafffaaaaaaa"
+ /* 12 */ "aaaaaaaaaaaaaaa"
+ /* 13 */ "aaaaaaaaaaaaaaa"
+ /* 14 */ "aaaaaaaaaaaaaaa"
+ /* 15 */ "aaaaaaaaaaaaaaa"
+
+ // Level 13
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "aaaaaaaaaaaaaaa"
+ /* 1 */ "..............."
+ /* 2 */ "..............."
+ /* 3 */ "..............."
+ /* 4 */ "aaaaa...aaaaaaa"
+ /* 5 */ "mmmma...ammmmmm"
+ /* 6 */ "mmmmm.....mmmmm"
+ /* 7 */ "mmmmm.....mmmmm"
+ /* 8 */ "mmmmm.....mmmmm"
+ /* 9 */ "mmmmm.....mmmmm"
+ /* 10 */ "mmmma...ammmmmm"
+ /* 11 */ "aaaaa...aaaaaaa"
+ /* 12 */ "..............."
+ /* 13 */ "..............."
+ /* 14 */ "..............."
+ /* 15 */ "aaaaaaaaaaaaaaa"
+
+ // Level 14
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmmmmm"
+ /* 1 */ "..............."
+ /* 2 */ "..............."
+ /* 3 */ "..............."
+ /* 4 */ "mmmmm...mmmmmmm"
+ /* 5 */ "mmmmm...mmmmmmm"
+ /* 6 */ "mmmmm...mmmmmmm"
+ /* 7 */ "mmmmm...mmmmmmm"
+ /* 8 */ "mmmmm...mmmmmmm"
+ /* 9 */ "mmmmm...mmmmmmm"
+ /* 10 */ "mmmmm...mmmmmmm"
+ /* 11 */ "mmmmm...mmmmmmm"
+ /* 12 */ "..............."
+ /* 13 */ "..............."
+ /* 14 */ "..............."
+ /* 15 */ "mmmmmmmmmmmmmmm"
+
+ // Level 15
+ /* z\x* 11111 */
+ /* * 012345678901234 */
+ /* 0 */ "mmmmmmmmmmmmmmm"
+ /* 1 */ "..............."
+ /* 2 */ "..............."
+ /* 3 */ "..............."
+ /* 4 */ "mmmmm...mmmmmmm"
+ /* 5 */ "mmmmm...mmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmm...mmmmmmm"
+ /* 11 */ "mmmmm...mmmmmmm"
+ /* 12 */ "..............."
+ /* 13 */ "..............."
+ /* 14 */ "..............."
+ /* 15 */ "mmmmmmmmmmmmmmm",
+
+ // Connectors:
+ "0: 0, 13, 13: 4\n" /* Type 0, direction X- */
+ "0: 14, 13, 13: 5\n" /* Type 0, direction X+ */
+ "0: 0, 13, 2: 4\n" /* Type 0, direction X- */
+ "0: 14, 13, 2: 5\n" /* Type 0, direction X+ */
+ "0: 12, 7, 15: 3\n" /* Type 0, direction Z+ */
+ "0: 12, 7, 0: 2\n" /* Type 0, direction Z- */,
+
+ // AllowedRotations:
+ 7, /* 1, 2, 3 CCW rotation allowed */
+
+ // Merge strategy:
+ cBlockArea::msSpongePrint,
+
+ // ShouldExtendFloor:
+ true,
+
+ // DefaultWeight:
+ 20,
+
+ // DepthWeight:
+ "",
+
+ // AddWeightIfSame:
+ 0,
+
+ // MoveToGround:
+ false,
+ }, // BridgeDoubleStairs
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
// BridgeFunnelDown:
// The data has been exported from the gallery Nether, area index 0, ID 2, created by Aloe_vera
{
@@ -2606,12 +2983,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "aaaaaaaaaaa"
/* 3 */ "aaaaaaaaaaa"
/* 4 */ "aaaaaaaaaaa"
- /* 5 */ "aaaaa......"
- /* 6 */ "aaaaa......"
- /* 7 */ "aaaaa......"
- /* 8 */ "aaaaa......"
- /* 9 */ "aaaaa......"
- /* 10 */ "aaaaa......"
+ /* 5 */ "aaaaammmmmm"
+ /* 6 */ "aaaaammmmmm"
+ /* 7 */ "aaaaammmmmm"
+ /* 8 */ "aaaaammmmmm"
+ /* 9 */ "aaaaammmmmm"
+ /* 10 */ "aaaaammmmmm"
// Level 1
/* z\x* 1 */
@@ -2621,12 +2998,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "a.........."
/* 3 */ "a.........."
/* 4 */ "a...aaaaaaa"
- /* 5 */ "a...a......"
- /* 6 */ "a...a......"
- /* 7 */ "a...a......"
- /* 8 */ "a...a......"
- /* 9 */ "a...a......"
- /* 10 */ "a...a......"
+ /* 5 */ "a...ammmmmm"
+ /* 6 */ "a...ammmmmm"
+ /* 7 */ "a...ammmmmm"
+ /* 8 */ "a...ammmmmm"
+ /* 9 */ "a...ammmmmm"
+ /* 10 */ "a...ammmmmm"
// Level 2
/* z\x* 1 */
@@ -2636,12 +3013,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "a.........."
/* 3 */ "b.........."
/* 4 */ "a...abababa"
- /* 5 */ "b...b......"
- /* 6 */ "a...a......"
- /* 7 */ "b...b......"
- /* 8 */ "a...a......"
- /* 9 */ "b...b......"
- /* 10 */ "a...a......"
+ /* 5 */ "b...bmmmmmm"
+ /* 6 */ "a...ammmmmm"
+ /* 7 */ "b...bmmmmmm"
+ /* 8 */ "a...ammmmmm"
+ /* 9 */ "b...bmmmmmm"
+ /* 10 */ "a...ammmmmm"
// Level 3
/* z\x* 1 */
@@ -2651,12 +3028,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "a.........."
/* 3 */ "b.........."
/* 4 */ "a...abababa"
- /* 5 */ "b...b......"
- /* 6 */ "a...a......"
- /* 7 */ "b...b......"
- /* 8 */ "a...a......"
- /* 9 */ "b...b......"
- /* 10 */ "a...a......"
+ /* 5 */ "b...bmmmmmm"
+ /* 6 */ "a...ammmmmm"
+ /* 7 */ "b...bmmmmmm"
+ /* 8 */ "a...ammmmmm"
+ /* 9 */ "b...bmmmmmm"
+ /* 10 */ "a...ammmmmm"
// Level 4
/* z\x* 1 */
@@ -2666,12 +3043,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "a.........."
/* 3 */ "b.........."
/* 4 */ "a...abababa"
- /* 5 */ "b...b......"
- /* 6 */ "a...a......"
- /* 7 */ "b...b......"
- /* 8 */ "a...a......"
- /* 9 */ "b...b......"
- /* 10 */ "a...a......"
+ /* 5 */ "b...bmmmmmm"
+ /* 6 */ "a...ammmmmm"
+ /* 7 */ "b...bmmmmmm"
+ /* 8 */ "a...ammmmmm"
+ /* 9 */ "b...bmmmmmm"
+ /* 10 */ "a...ammmmmm"
// Level 5
/* z\x* 1 */
@@ -2681,12 +3058,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 2 */ "daaaaaaaaaa"
/* 3 */ "daaaaaaaaaa"
/* 4 */ "daaaeeeeeee"
- /* 5 */ "daaaf......"
- /* 6 */ "daaaf......"
- /* 7 */ "daaaf......"
- /* 8 */ "daaaf......"
- /* 9 */ "daaaf......"
- /* 10 */ "daaaf......",
+ /* 5 */ "daaafmmmmmm"
+ /* 6 */ "daaafmmmmmm"
+ /* 7 */ "daaafmmmmmm"
+ /* 8 */ "daaafmmmmmm"
+ /* 9 */ "daaafmmmmmm"
+ /* 10 */ "daaafmmmmmm",
// Connectors:
"1: 2, 1, 10: 3\n" /* Type 1, direction Z+ */
@@ -4097,7 +4474,12 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
/* 14 */ "abbaabbaabbaabba",
// Connectors:
- "",
+ "1: 0, 6, 7: 4\n" /* Type 1, direction X- */
+ "-1: 0, 6, 7: 4\n" /* Type -1, direction X- */
+ "1: 9, 1, 0: 2\n" /* Type 1, direction Z- */
+ "-1: 9, 1, 0: 2\n" /* Type -1, direction Z- */
+ "1: 9, 1, 14: 3\n" /* Type 1, direction Z+ */
+ "-1: 9, 1, 14: 3\n" /* Type -1, direction Z+ */,
// AllowedRotations:
7, /* 1, 2, 3 CCW rotation allowed */
@@ -4315,6 +4697,339 @@ const cPrefab::sDef g_NetherFortPrefabs[] =
////////////////////////////////////////////////////////////////////////////////
+ // SlabbedBridgeStairs:
+ // The data has been exported from the gallery Nether, area index 116, ID 811, created by Aloe_vera
+ {
+ // Size:
+ 16, 14, 16, // SizeX = 16, SizeY = 14, SizeZ = 16
+
+ // Hitbox (relative to bounding box):
+ 0, 0, 0, // MinX, MinY, MinZ
+ 15, 13, 15, // MaxX, MaxY, MaxZ
+
+ // Block definitions:
+ ".: 0: 0\n" /* air */
+ "a:112: 0\n" /* netherbrick */
+ "b:114: 5\n" /* netherbrickstairs */
+ "c:114: 4\n" /* netherbrickstairs */
+ "d: 44:14\n" /* step */
+ "e:114: 6\n" /* netherbrickstairs */
+ "f:114: 7\n" /* netherbrickstairs */
+ "g: 44: 6\n" /* step */
+ "m: 19: 0\n" /* sponge */,
+
+ // Block data:
+ // Level 0
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmmmmm"
+ /* 1 */ "aammmmmmmmmmmmaa"
+ /* 2 */ "aammmmmmmmmmmmaa"
+ /* 3 */ "aammmmmmmmmmmmaa"
+ /* 4 */ "mmmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 1
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmmmmm"
+ /* 1 */ "aabmmmmmmmmmmcaa"
+ /* 2 */ "aabmmmmmmmmmmcaa"
+ /* 3 */ "aabmmmmmmmmmmcaa"
+ /* 4 */ "mmmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 2
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmmmmm"
+ /* 1 */ "aaabdmmmmmmdcaaa"
+ /* 2 */ "aaabdmmmmmmdcaaa"
+ /* 3 */ "aaabdmmmmmmdcaaa"
+ /* 4 */ "mmmmmmmmmmmmmmmm"
+ /* 5 */ "mmmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 3
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "eeeeeeeeeeeeeeee"
+ /* 1 */ "aaaaaaaaaaaaaaaa"
+ /* 2 */ "aaaaaaaaaaaaaaaa"
+ /* 3 */ "aaaaaaaaaaaaaaaa"
+ /* 4 */ "ffffffffffffffff"
+ /* 5 */ "mmmmmmmmmmmmmmmm"
+ /* 6 */ "mmmmmmmmmmmmmmmm"
+ /* 7 */ "mmmmmmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 4
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "aaaaaaaaaaaaaaaa"
+ /* 1 */ "aaaaaaaaaaaaaaaa"
+ /* 2 */ "aaaaaaaaaaaaaaaa"
+ /* 3 */ "aaaaaaaaaaaaaaaa"
+ /* 4 */ "aaaaaaaaaaaaaaaa"
+ /* 5 */ "faaabmmmmmmmmmmm"
+ /* 6 */ "caaabmmmmmmmmmmm"
+ /* 7 */ "caaabmmmmmmmmmmm"
+ /* 8 */ "mmmmmmmmmmmmmmmm"
+ /* 9 */ "mmmmmmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 5
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "aaaaaaaaaaaaaaaa"
+ /* 1 */ "................"
+ /* 2 */ "................"
+ /* 3 */ "................"
+ /* 4 */ "a...aaaaaaaaaaaa"
+ /* 5 */ "agggammmmmmmmmmm"
+ /* 6 */ "aaaaammmmmmmmmmm"
+ /* 7 */ "aaaaammmmmmmmmmm"
+ /* 8 */ "caaabmmmmmmmmmmm"
+ /* 9 */ "caaabmmmmmmmmmmm"
+ /* 10 */ "mmmmmmmmmmmmmmmm"
+ /* 11 */ "mmmmmmmmmmmmmmmm"
+ /* 12 */ "maaammmmmmmmmmmm"
+ /* 13 */ "maaammmmmmmmmmmm"
+ /* 14 */ "maaammmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 6
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmaaam"
+ /* 1 */ "................"
+ /* 2 */ "................"
+ /* 3 */ "................"
+ /* 4 */ "m...mmmmmmmmaaam"
+ /* 5 */ "a...ammmmmmmmmmm"
+ /* 6 */ "a...ammmmmmmmmmm"
+ /* 7 */ "agggammmmmmmmmmm"
+ /* 8 */ "aaaaammmmmmmmmmm"
+ /* 9 */ "aaaaammmmmmmmmmm"
+ /* 10 */ "caaabmmmmmmmmmmm"
+ /* 11 */ "caaabmmmmmmmmmmm"
+ /* 12 */ "maaabmmmmmmmmmmm"
+ /* 13 */ "maaabmmmmmmmmmmm"
+ /* 14 */ "maaafmmmmmmmaaam"
+ /* 15 */ "mmmmmmmmmmmmaaam"
+
+ // Level 7
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmaaam"
+ /* 1 */ "................"
+ /* 2 */ "................"
+ /* 3 */ "................"
+ /* 4 */ "m...mmmmmmmmaaam"
+ /* 5 */ "m...mmmmmmmmmmmm"
+ /* 6 */ "m...mmmmmmmmmmmm"
+ /* 7 */ "a...ammmmmmmmmmm"
+ /* 8 */ "a...ammmmmmmmmmm"
+ /* 9 */ "agggammmmmmmmmmm"
+ /* 10 */ "aaaaammmmmmmmmmm"
+ /* 11 */ "aaaaaeemmmmmmmmm"
+ /* 12 */ "caaaaaammmmmmmmm"
+ /* 13 */ "caaaaaammmmmmmmm"
+ /* 14 */ "caaaaaammmmmaaam"
+ /* 15 */ "fffffffmmmmmaaam"
+
+ // Level 8
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmmaaam"
+ /* 1 */ "mmmmmmmmmmmmmmmm"
+ /* 2 */ "mmmmmmmmmmmmmmmm"
+ /* 3 */ "mmmmmmmmmmmmmmmm"
+ /* 4 */ "m...mmmmmmmmaaam"
+ /* 5 */ "m...mmmmmmmmmmmm"
+ /* 6 */ "m...mmmmmmmmmmmm"
+ /* 7 */ "m...mmmmmmmmmmmm"
+ /* 8 */ "m...mmmmmmmmmmmm"
+ /* 9 */ "a...ammmmmmmmmmm"
+ /* 10 */ "a...ammmmmmmmmmm"
+ /* 11 */ "a...aaaeemmmmmmm"
+ /* 12 */ "a....gaaammmmmmm"
+ /* 13 */ "a....gaaammmmmmm"
+ /* 14 */ "a....gaaammmaaam"
+ /* 15 */ "aaaaaaaffmmmaaam"
+
+ // Level 9
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmcaaab"
+ /* 1 */ "mmmmmmmmmmmcaaab"
+ /* 2 */ "mmmmmmmmmmmcaaab"
+ /* 3 */ "mmmmmmmmmmmcaaab"
+ /* 4 */ "mmmmmmmmmmmcaaab"
+ /* 5 */ "mmmmmmmmmmmcaaab"
+ /* 6 */ "m...mmmmmmmcaaab"
+ /* 7 */ "m...mmmmmmmcaaab"
+ /* 8 */ "m...mmmmmmmcaaab"
+ /* 9 */ "m...mmmmmmmcaaab"
+ /* 10 */ "m...mmmmmmmcaaab"
+ /* 11 */ "m...maaaaeecaaab"
+ /* 12 */ "m......gaaaaaaab"
+ /* 13 */ "m......gaaaaaaab"
+ /* 14 */ "m......gaaaaaaab"
+ /* 15 */ "mmmmmaaaafffaaab"
+
+ // Level 10
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmaaaaa"
+ /* 1 */ "mmmmmmmmmmmaaaaa"
+ /* 2 */ "mmmmmmmmmmmaaaaa"
+ /* 3 */ "mmmmmmmmmmmaaaaa"
+ /* 4 */ "mmmmmmmmmmmaaaaa"
+ /* 5 */ "mmmmmmmmmmmaaaaa"
+ /* 6 */ "mmmmmmmmmmmaaaaa"
+ /* 7 */ "mmmmmmmmmmmaaaaa"
+ /* 8 */ "m...mmmmmmmaaaaa"
+ /* 9 */ "m...mmmmmmmaaaaa"
+ /* 10 */ "m...mmmmmmmaaaaa"
+ /* 11 */ "m...mmmaaaaaaaaa"
+ /* 12 */ "m........gaaaaaa"
+ /* 13 */ "m........gaaaaaa"
+ /* 14 */ "m........gaaaaaa"
+ /* 15 */ "mmmmmmmaaaaaaaaa"
+
+ // Level 11
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmma...a"
+ /* 1 */ "mmmmmmmmmmma...a"
+ /* 2 */ "mmmmmmmmmmma...a"
+ /* 3 */ "mmmmmmmmmmma...a"
+ /* 4 */ "mmmmmmmmmmma...a"
+ /* 5 */ "mmmmmmmmmmma...a"
+ /* 6 */ "mmmmmmmmmmma...a"
+ /* 7 */ "mmmmmmmmmmma...a"
+ /* 8 */ "mmmmmmmmmmma...a"
+ /* 9 */ "mmmmmmmmmmma...a"
+ /* 10 */ "mmmmmmmmmmma...a"
+ /* 11 */ "mmmmmmmmmaaa...a"
+ /* 12 */ "mmmm...........a"
+ /* 13 */ "mmmm...........a"
+ /* 14 */ "mmmm...........a"
+ /* 15 */ "mmmmmmmmmaaa...a"
+
+ // Level 12
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmm...m"
+ /* 1 */ "mmmmmmmmmmmm...m"
+ /* 2 */ "mmmmmmmmmmmm...m"
+ /* 3 */ "mmmmmmmmmmmm...m"
+ /* 4 */ "mmmmmmmmmmmm...m"
+ /* 5 */ "mmmmmmmmmmmm...m"
+ /* 6 */ "mmmmmmmmmmmm...m"
+ /* 7 */ "mmmmmmmmmmmm...m"
+ /* 8 */ "mmmmmmmmmmmm...m"
+ /* 9 */ "mmmmmmmmmmmm...m"
+ /* 10 */ "mmmmmmmmmmmm...m"
+ /* 11 */ "mmmmmmmmmmmm...m"
+ /* 12 */ "mmmmmm.........m"
+ /* 13 */ "mmmmmm.........m"
+ /* 14 */ "mmmmmm.........m"
+ /* 15 */ "mmmmmmmmmmmm...m"
+
+ // Level 13
+ /* z\x* 111111 */
+ /* * 0123456789012345 */
+ /* 0 */ "mmmmmmmmmmmm...m"
+ /* 1 */ "mmmmmmmmmmmm...m"
+ /* 2 */ "mmmmmmmmmmmm...m"
+ /* 3 */ "mmmmmmmmmmmm...m"
+ /* 4 */ "mmmmmmmmmmmm...m"
+ /* 5 */ "mmmmmmmmmmmm...m"
+ /* 6 */ "mmmmmmmmmmmm...m"
+ /* 7 */ "mmmmmmmmmmmm...m"
+ /* 8 */ "mmmmmmmmmmmm...m"
+ /* 9 */ "mmmmmmmmmmmm...m"
+ /* 10 */ "mmmmmmmmmmmm...m"
+ /* 11 */ "mmmmmmmmmmmm...m"
+ /* 12 */ "mmmmmmmm.......m"
+ /* 13 */ "mmmmmmmm.......m"
+ /* 14 */ "mmmmmmmm.......m"
+ /* 15 */ "mmmmmmmmmmmm...m",
+
+ // Connectors:
+ "0: 13, 11, 0: 2\n" /* Type 0, direction Z- */
+ "0: 13, 11, 15: 3\n" /* Type 0, direction Z+ */
+ "0: 0, 5, 2: 4\n" /* Type 0, direction X- */
+ "0: 15, 5, 2: 5\n" /* Type 0, direction X+ */,
+
+ // AllowedRotations:
+ 7, /* 1, 2, 3 CCW rotation allowed */
+
+ // Merge strategy:
+ cBlockArea::msSpongePrint,
+
+ // ShouldExtendFloor:
+ true,
+
+ // DefaultWeight:
+ 20,
+
+ // DepthWeight:
+ "",
+
+ // AddWeightIfSame:
+ 0,
+
+ // MoveToGround:
+ false,
+ }, // SlabbedBridgeStairs
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
// StairsToOpen1:
// The data has been exported from the gallery Nether, area index 27, ID 277, created by Aloe_vera
{
diff --git a/src/Inventory.cpp b/src/Inventory.cpp
index a34d51993..8da3dea5f 100644
--- a/src/Inventory.cpp
+++ b/src/Inventory.cpp
@@ -102,13 +102,17 @@ int cInventory::AddItem(const cItem & a_Item, bool a_AllowNewStacks, bool a_tryT
{
cItem ToAdd(a_Item);
int res = 0;
+
+ // When the item is a armor, try to set it directly to the armor slot.
if (ItemCategory::IsArmor(a_Item.m_ItemType))
{
- res = m_ArmorSlots.AddItem(ToAdd, a_AllowNewStacks);
- ToAdd.m_ItemCount -= res;
- if (ToAdd.m_ItemCount == 0)
+ for (size_t i = 0; i < (size_t)m_ArmorSlots.GetNumSlots(); i++)
{
- return res;
+ if (m_ArmorSlots.GetSlot(i).IsEmpty() && cSlotAreaArmor::CanPlaceArmorInSlot(i, a_Item))
+ {
+ m_ArmorSlots.SetSlot(i, a_Item);
+ return a_Item.m_ItemCount;
+ }
}
}
diff --git a/src/ItemGrid.cpp b/src/ItemGrid.cpp
index 38829cbf8..2344dc0a5 100644
--- a/src/ItemGrid.cpp
+++ b/src/ItemGrid.cpp
@@ -269,7 +269,7 @@ int cItemGrid::AddItemToSlot(const cItem & a_ItemStack, int a_Slot, int a_Num, i
int cItemGrid::AddItem(cItem & a_ItemStack, bool a_AllowNewStacks, int a_PrioritarySlot)
{
int NumLeft = a_ItemStack.m_ItemCount;
- int MaxStack = ItemHandler(a_ItemStack.m_ItemType)->GetMaxStackSize();
+ int MaxStack = a_ItemStack.GetMaxStackSize();
// Try prioritarySlot first:
if (
@@ -284,7 +284,7 @@ int cItemGrid::AddItem(cItem & a_ItemStack, bool a_AllowNewStacks, int a_Priorit
}
// Scan existing stacks:
- for (int i = m_NumSlots - 1; i >= 0; i--)
+ for (int i = 0; i < m_NumSlots; i++)
{
if (m_Slots[i].IsEqual(a_ItemStack))
{
@@ -302,7 +302,7 @@ int cItemGrid::AddItem(cItem & a_ItemStack, bool a_AllowNewStacks, int a_Priorit
return (a_ItemStack.m_ItemCount - NumLeft);
}
- for (int i = m_NumSlots - 1; i >= 0; i--)
+ for (int i = 0; i < m_NumSlots; i++)
{
if (m_Slots[i].IsEmpty())
{
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index f16d89b39..24614cd8a 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -17,126 +17,12 @@ public:
}
- /** Returns the potion color (used by the client for visuals), based on the potion's damage value */
- static int GetPotionColor(short a_ItemDamage)
- {
- // Lowest six bits
- return (a_ItemDamage & 0x3f);
- }
-
-
- /** Translates the potion's damage value into the entity effect that the potion gives */
- static cEntityEffect::eType GetEntityEffectType(short a_ItemDamage)
- {
- // Lowest four bits
- // Potion effect bits are different from entity effect values
- // For reference: http://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
- switch (a_ItemDamage & 0x0f)
- {
- case 0x01: return cEntityEffect::effRegeneration;
- case 0x02: return cEntityEffect::effSpeed;
- case 0x03: return cEntityEffect::effFireResistance;
- case 0x04: return cEntityEffect::effPoison;
- case 0x05: return cEntityEffect::effInstantHealth;
- case 0x06: return cEntityEffect::effNightVision;
- case 0x08: return cEntityEffect::effWeakness;
- case 0x09: return cEntityEffect::effStrength;
- case 0x0a: return cEntityEffect::effSlowness;
- case 0x0c: return cEntityEffect::effInstantDamage;
- case 0x0d: return cEntityEffect::effWaterBreathing;
- case 0x0e: return cEntityEffect::effInvisibility;
-
- // No effect potions
- case 0x00:
- case 0x07:
- case 0x0b: // Will be potion of leaping in 1.8
- case 0x0f:
- {
- break;
- }
- }
- return cEntityEffect::effNoEffect;
- }
-
-
- /** Retrieves the intensity level from the potion's damage value.
- Returns 0 for level I potions, 1 for level II potions. */
- static short GetEntityEffectIntensity(short a_ItemDamage)
- {
- // Level II potion if the fifth lowest bit is set
- return ((a_ItemDamage & 0x20) != 0) ? 1 : 0;
- }
-
-
- /** Returns the effect duration, in ticks, based on the potion's damage value */
- static int GetEntityEffectDuration(short a_ItemDamage)
- {
- // Base duration in ticks
- int base = 0;
- double TierCoeff = 1, ExtCoeff = 1, SplashCoeff = 1;
-
- switch (GetEntityEffectType(a_ItemDamage))
- {
- case cEntityEffect::effRegeneration:
- case cEntityEffect::effPoison:
- {
- base = 900;
- break;
- }
-
- case cEntityEffect::effSpeed:
- case cEntityEffect::effFireResistance:
- case cEntityEffect::effNightVision:
- case cEntityEffect::effStrength:
- case cEntityEffect::effWaterBreathing:
- case cEntityEffect::effInvisibility:
- {
- base = 3600;
- break;
- }
-
- case cEntityEffect::effWeakness:
- case cEntityEffect::effSlowness:
- {
- base = 1800;
- break;
- }
- }
-
- // If potion is level II, half the duration. If not, stays the same
- TierCoeff = (GetEntityEffectIntensity(a_ItemDamage) > 0) ? 0.5 : 1;
-
- // If potion is extended, multiply duration by 8/3. If not, stays the same
- // Extended potion if sixth lowest bit is set
- ExtCoeff = (a_ItemDamage & 0x40) ? (8.0 / 3.0) : 1;
-
- // If potion is splash potion, multiply duration by 3/4. If not, stays the same
- SplashCoeff = IsPotionDrinkable(a_ItemDamage) ? 1 : 0.75;
-
- // Ref.:
- // http://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
- // http://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
- // http://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
-
- return (int)(base * TierCoeff * ExtCoeff * SplashCoeff);
- }
-
-
- /** Returns true if the potion with the given damage is drinkable */
- static bool IsPotionDrinkable(short a_ItemDamage)
- {
- // Drinkable potion if 13th lowest bit is set
- // Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
- return ((a_ItemDamage & 0x2000) != 0);
- }
-
-
// cItemHandler overrides:
virtual bool IsDrinkable(short a_ItemDamage) override
{
// Drinkable potion if 13th lowest bit is set
// Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
- return IsPotionDrinkable(a_ItemDamage);
+ return cEntityEffect::IsPotionDrinkable(a_ItemDamage);
}
@@ -145,7 +31,7 @@ public:
short PotionDamage = a_Item.m_ItemDamage;
// Do not throw non-splash potions:
- if (IsPotionDrinkable(PotionDamage))
+ if (cEntityEffect::IsPotionDrinkable(PotionDamage))
{
return false;
}
@@ -153,20 +39,10 @@ public:
Vector3d Pos = a_Player->GetThrowStartPos();
Vector3d Speed = a_Player->GetLookVector() * 7;
- cSplashPotionEntity * Projectile = new cSplashPotionEntity(
- a_Player, Pos.x, Pos.y, Pos.z, Speed,
- GetEntityEffectType(PotionDamage), cEntityEffect(GetEntityEffectDuration(PotionDamage),
- GetEntityEffectIntensity(PotionDamage)), GetPotionColor(PotionDamage)
- );
- if (Projectile == NULL)
+ if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, cProjectileEntity::pkSplashPotion, a_Player, &a_Player->GetEquippedItem(), &Speed) < 0)
{
return false;
}
- if (!Projectile->Initialize(*a_World))
- {
- delete Projectile;
- return false;
- }
if (!a_Player->IsGameModeCreative())
{
@@ -182,12 +58,16 @@ public:
short PotionDamage = a_Item->m_ItemDamage;
// Do not drink undrinkable potions:
- if (!IsDrinkable(a_Item->m_ItemDamage))
+ if (!cEntityEffect::IsPotionDrinkable(a_Item->m_ItemDamage))
{
return false;
}
- a_Player->AddEntityEffect(GetEntityEffectType(PotionDamage), GetEntityEffectDuration(PotionDamage), GetEntityEffectIntensity(PotionDamage));
+ a_Player->AddEntityEffect(
+ cEntityEffect::GetPotionEffectType(PotionDamage),
+ cEntityEffect::GetPotionEffectDuration(PotionDamage),
+ cEntityEffect::GetPotionEffectIntensity(PotionDamage)
+ );
a_Player->GetInventory().RemoveOneEquippedItem();
a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
return true;
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 21b6ed0c8..b5f84c24c 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1866,6 +1866,19 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C
{
ASSERT((a_SlotNum >= 0) && (a_SlotNum < GetNumSlots()));
+ // When the player is in creative mode, the client sends the new item as a_ClickedItem, not the current item in the slot.
+ if (a_Player.IsGameModeCreative() && (m_ParentWindow.GetWindowType() == cWindow::wtInventory))
+ {
+ if ((a_ClickAction == caDropKey) || (a_ClickAction == caCtrlDropKey))
+ {
+ DropClicked(a_Player, a_SlotNum, (a_ClickAction == caCtrlDropKey));
+ return;
+ }
+
+ SetSlot(a_SlotNum, a_Player, a_ClickedItem);
+ return;
+ }
+
bool bAsync = false;
if (GetSlot(a_SlotNum, a_Player) == NULL)
{
@@ -1913,7 +1926,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C
return;
}
- if (DraggingItem.IsEmpty() || CanPlaceInSlot(a_SlotNum, DraggingItem))
+ if (DraggingItem.IsEmpty() || CanPlaceArmorInSlot(a_SlotNum, DraggingItem))
{
// Swap contents
cItem tmp(DraggingItem);
@@ -1932,7 +1945,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C
-bool cSlotAreaArmor::CanPlaceInSlot(int a_SlotNum, const cItem & a_Item)
+bool cSlotAreaArmor::CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item)
{
switch (a_SlotNum)
{
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 7f37159b7..fa842bb81 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -161,7 +161,7 @@ public:
/** Called when a player clicks in the window. Parameters taken from the click packet. */
virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override;
- bool CanPlaceInSlot(int a_SlotNum, const cItem & a_Item);
+ static bool CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item);
} ;
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 2851647fe..023813769 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1670,7 +1670,7 @@ void cWSSAnvil::LoadArrowFromNBT(cEntityList & a_Entities, const cParsedNBT & a_
void cWSSAnvil::LoadSplashPotionFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
{
- std::auto_ptr<cSplashPotionEntity> SplashPotion(new cSplashPotionEntity(NULL, 0, 0, 0, Vector3d(0, 0, 0), cEntityEffect::effNoEffect, cEntityEffect(), 0));
+ std::auto_ptr<cSplashPotionEntity> SplashPotion(new cSplashPotionEntity(NULL, 0, 0, 0, Vector3d(0, 0, 0), cItem()));
if (!LoadProjectileBaseFromNBT(*SplashPotion.get(), a_NBT, a_TagIdx))
{
return;