summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--Doxyfile2
-rw-r--r--LICENSE4
-rw-r--r--Server/BACKERS11
-rw-r--r--Server/webadmin/files/background.gifbin57 -> 0 bytes
-rw-r--r--Server/webadmin/files/loading.gifbin7364 -> 0 bytes
-rw-r--r--Server/webadmin/files/logo.pngbin3315 -> 0 bytes
-rw-r--r--Server/webadmin/files/mc-logo.pngbin66137 -> 0 bytes
-rw-r--r--Server/webadmin/template.html140
-rw-r--r--src/Blocks/BlockSapling.h13
-rw-r--r--src/Mobs/PassiveMonster.cpp36
-rw-r--r--src/Mobs/PathFinder.h2
-rw-r--r--src/Root.cpp2
-rw-r--r--src/World.cpp2
14 files changed, 55 insertions, 158 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 761dcbe6f..a0ff1a980 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -12,6 +12,7 @@ HaoTNN
Howaner
jan64
jasperarmstrong
+kevinr (Kevin Riggle)
keyboard
Lapayo
linnemannr (Reid Linnemann)
diff --git a/Doxyfile b/Doxyfile
index 1b1606243..1b958f2e0 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer
# a quick idea about the purpose of the project. Keep the description short.
-PROJECT_BRIEF = "C++ Minecraft Server"
+PROJECT_BRIEF = "A custom Minecraft compatible game server written in C++"
# With the PROJECT_LOGO tag one can specify an logo or icon that is
# included in the documentation. The maximum height of the logo should not
diff --git a/LICENSE b/LICENSE
index 1ded9b926..048be9885 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
-Cuberite: A performant C++ Minecraft Server
+Cuberite: A custom Minecraft compatible game server written in C++
www: https://github.com/cuberite/cuberite
-Copyright 2011-2015 Cuberite Team
+Copyright 2011-2016 Cuberite Team
------
diff --git a/Server/BACKERS b/Server/BACKERS
new file mode 100644
index 000000000..f2a1cfa8c
--- /dev/null
+++ b/Server/BACKERS
@@ -0,0 +1,11 @@
+Thanks to the following people for supporting the Cuberite project with a donation:
+
+ - Anonymous
+ - chrobione
+ - DrMasik
+ - PureTryOut
+ - SphinxC0re
+ - VaiN474
+
+If you enjoy Cuberite, feel free to donate to the project on Bountysource:
+https://salt.bountysource.com/teams/cuberite
diff --git a/Server/webadmin/files/background.gif b/Server/webadmin/files/background.gif
deleted file mode 100644
index cab9bed56..000000000
--- a/Server/webadmin/files/background.gif
+++ /dev/null
Binary files differ
diff --git a/Server/webadmin/files/loading.gif b/Server/webadmin/files/loading.gif
deleted file mode 100644
index b8d06f669..000000000
--- a/Server/webadmin/files/loading.gif
+++ /dev/null
Binary files differ
diff --git a/Server/webadmin/files/logo.png b/Server/webadmin/files/logo.png
deleted file mode 100644
index 50733e824..000000000
--- a/Server/webadmin/files/logo.png
+++ /dev/null
Binary files differ
diff --git a/Server/webadmin/files/mc-logo.png b/Server/webadmin/files/mc-logo.png
deleted file mode 100644
index 9a77a490f..000000000
--- a/Server/webadmin/files/mc-logo.png
+++ /dev/null
Binary files differ
diff --git a/Server/webadmin/template.html b/Server/webadmin/template.html
deleted file mode 100644
index 305c566cd..000000000
--- a/Server/webadmin/template.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>{TITLE} | {PLUGIN_NAME}</title>
- <style type="text/css">
- body {
- line-height: 1;
- background: #B8B8B8;
- }
-
- #maincontent {
- padding: 0px 25px 10px 25px;
- }
-
- #wrapper {
- min-width: 850px;
- width: 75%;
- margin: 10px auto;
- background-color: white;
- border: 4px #888888 solid;
- border-radius: 10px;
- font-family: Calibri, Trebuchet MS;
- }
-
- header {
- text-align:center;
- padding: 10px; 0px;
- }
-
- span {
- text-align: right;
- float: right;
- border-left: 2px #C8C8C8 solid;
- border-bottom: 2px #C8C8C8 solid;
- padding: 2px 10px;
- }
-
- footer {
- font-family: helvetica;
- font-size: 10px;
- text-align: center;
- border-top: 1px #000 dotted;
- padding: 1px 0px 1px 0px;
- }
-
- table {
- border-collapse: collapse;
- border-spacing: 10;
- }
-
- table {
- border-top: 1px solid #ddd;
- width: 700px;
- }
-
- table tr th {
- text-align: left;
- background: #f6f6f6;
- padding: 0px 20px;
- height: 25px;
- line-height: 25px;
- border: 1px solid #ddd;
- border-radius: 3px;
- }
-
- table tr td {
- background: #f6f6f6;
- padding: 0px 20px;
- height: 29px;
- line-height: 29px;
- border: 1px solid #ddd;
- border-radius: 3px;
- }
-
- #main table tr.odd td {
- background: #fbfbfb;
- }
-
- table tr:hover td {
- background: #fdfcf6;
- }
-
- table .action {
- text-align: right;
- padding: 0 20px 0 10px;
- }
-
- table tr .action a {
- color: #9b9b9b;
- }
-
- #cssmenu{ height:10px; display:table; padding:0; margin: 0 auto; border:1px #707070 solid; border-radius:5px; }
- #cssmenu > ul {list-style:inside none; padding:0; margin:0;}
- #cssmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;}
- #cssmenu > ul > li > a{ outline:none; display:block; position:relative; color:#E8E8E8; padding:10px 10px; font:bold 13px/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); }
- #cssmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;}
- /* #cssmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid #FFFFFF; top:-1px; bottom:-1px; right:-2px; z-index:99; } */
- #cssmenu ul li.has-sub:hover > a:after{top:0; bottom:0;}
- #cssmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #707070; }
- #cssmenu > ul > li.has-sub:hover > a:before{top:19px;}
- #cssmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#707070; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; }
- #cssmenu ul li.has-sub:hover > ul, #cssmenu ul li.has-sub:hover > div{display:block;}
- #cssmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;}
- #cssmenu ul li > ul, #cssmenu ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; }
- #cssmenu ul li > ul{width:200px;}
- #cssmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;}
- #cssmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); }
- #cssmenu, #cssmenu > ul > li > ul > li a:hover{ background:#C8C8C8;}
- #cssmenu > ul > li > a { border-right:1px solid #707070; color:#FFFFFF; }
- #cssmenu > ul > li > a:after { border-color:#707070; }
- #cssmenu > ul > li > a:hover { background:#B8B8B8; }
- </style>
- <meta name="msapplication-tooltip" content="Cuberite WebAdmin"/>
- <meta name="msapplication-navbutton-color" content="#B8B8B8" />
- <link rel="shortcut icon" href="http://cuberite.org/favicon.ico" />
- </head>
- <body>
- <div id="wrapper">
- <span>
- <b>Login: {USERNAME}</b>
- </span>
- <br />
- <header>
- <img alt="" src="files/logo.png" />
- </header>
- <nav id="cssmenu">
- <ul>
- {MENU}
- </ul>
- </nav>
- <div id="maincontent">
- {CONTENT}
- </div>
- <footer>
- <p>Cuberite is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.</p>
- <p>Web Design by <a href="https://github.com/WebFreak001"@WebFreak001</a></p>
- </footer>
- </div>
- </body>
-</html>
diff --git a/src/Blocks/BlockSapling.h b/src/Blocks/BlockSapling.h
index 1770cc4aa..ea10d5c20 100644
--- a/src/Blocks/BlockSapling.h
+++ b/src/Blocks/BlockSapling.h
@@ -92,7 +92,18 @@ public:
}
break;
}
- // Dark Oaks only grow in a 2x2 area
+ // Acacias don't need horizontal clearance
+ case E_META_SAPLING_ACACIA:
+ {
+ if (!IsLargeTree(a_Chunk, a_RelX, a_RelY, a_RelZ, a_Meta))
+ {
+ return false;
+ }
+ CheckHeight = 7;
+ LargeTree = true;
+ break;
+ }
+ // Dark Oaks don't need horizontal clearance
case E_META_SAPLING_DARK_OAK:
{
if (!IsLargeTree(a_Chunk, a_RelX, a_RelY, a_RelZ, a_Meta))
diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp
index 30b46500d..53288a54c 100644
--- a/src/Mobs/PassiveMonster.cpp
+++ b/src/Mobs/PassiveMonster.cpp
@@ -157,19 +157,33 @@ void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
virtual bool Item(cEntity * a_Entity) override
{
- // if we're the same species as someone around and they don't have a partner, start mating with them
- if ((a_Entity->GetEntityType() == m_Me->GetEntityType()) && (a_Entity != m_Me))
+ // If the entity is not a monster, don't breed with it
+ // Also, do not self-breed
+ if ((a_Entity->GetEntityType() != etMonster) || (a_Entity == m_Me))
{
- cPassiveMonster * Me = static_cast<cPassiveMonster*>(m_Me);
- cPassiveMonster * Partner = static_cast<cPassiveMonster*>(a_Entity);
- if (Partner->IsInLove() && (Partner->GetPartner() == nullptr))
- {
- Partner->EngageLoveMode(Me);
- Me->EngageLoveMode(Partner);
- return true;
- }
+ return false;
}
- return false;
+
+ cPassiveMonster * Me = static_cast<cPassiveMonster*>(m_Me);
+ cPassiveMonster * PotentialPartner = static_cast<cPassiveMonster*>(a_Entity);
+
+ // If the potential partner is not of the same species, don't breed with it
+ if (PotentialPartner->GetMobType() != Me->GetMobType())
+ {
+ return false;
+ }
+
+ // If the potential partner is not in love
+ // Or they already have a mate, do not breed with them
+ if ((!PotentialPartner->IsInLove()) || (PotentialPartner->GetPartner() != nullptr))
+ {
+ return false;
+ }
+
+ // All conditions met, let's breed!
+ PotentialPartner->EngageLoveMode(Me);
+ Me->EngageLoveMode(PotentialPartner);
+ return true;
}
} Callback(this);
diff --git a/src/Mobs/PathFinder.h b/src/Mobs/PathFinder.h
index 1bdc13a32..213530b11 100644
--- a/src/Mobs/PathFinder.h
+++ b/src/Mobs/PathFinder.h
@@ -14,7 +14,7 @@ class cPathFinder
public:
/** Creates a cPathFinder instance. Each mob should have one cPathFinder throughout its lifetime.
@param a_MobWidth The mob width.
- @param a_MobWidth The mob height.
+ @param a_MobHeight The mob height.
*/
cPathFinder(double a_MobWidth, double a_MobHeight);
diff --git a/src/Root.cpp b/src/Root.cpp
index aa532f88c..737d350ff 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -358,7 +358,7 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIn
// Fix servers that have default world configs created prior to #2815. See #2810.
// This can probably be removed several years after 2016
// We start by inspecting the world linkage and determining if it's the default one
- if (DefaultWorldName == "world")
+ if ((DefaultWorldName == "world") && (Worlds.size() == 1))
{
auto DefaultWorldIniFile= cpp14::make_unique<cIniFile>();
if (DefaultWorldIniFile->ReadFile("world/world.ini"))
diff --git a/src/World.cpp b/src/World.cpp
index 5b6a215d8..127621069 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -3583,7 +3583,7 @@ void cWorld::TabCompleteUserName(const AString & a_Text, AStringVector & a_Resul
PlayerName = (*itr)->GetCustomName();
}
- AString::size_type Found = PlayerName.find(LastWord); // Try to find last word in playername
+ AString::size_type Found = StrToLower(PlayerName).find(StrToLower(LastWord)); // Try to find last word in playername
if (Found == AString::npos)
{
continue; // No match