<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Cuberite Forum - Development]]></title>
		<link>https://forum.cuberite.org/</link>
		<description><![CDATA[Cuberite Forum - https://forum.cuberite.org]]></description>
		<pubDate>Mon, 25 May 2026 16:55:46 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Broken github Jenkins CI/CD]]></title>
			<link>https://forum.cuberite.org/thread-3464.html</link>
			<pubDate>Thu, 29 May 2025 09:34:03 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5645">MightyFilipns</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3464.html</guid>
			<description><![CDATA[Jenkins has been broken for a while now<br />
<a href="https://builds.cuberite.org/blue/organizations/jenkins/cuberite/activity" target="_blank" rel="noopener" class="mycode_url">https://builds.cuberite.org/blue/organiz...e/activity</a><br />
<br />
Is it ever going to be fixed?]]></description>
			<content:encoded><![CDATA[Jenkins has been broken for a while now<br />
<a href="https://builds.cuberite.org/blue/organizations/jenkins/cuberite/activity" target="_blank" rel="noopener" class="mycode_url">https://builds.cuberite.org/blue/organiz...e/activity</a><br />
<br />
Is it ever going to be fixed?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Compile for 32-bit iOS 10 (armv7)]]></title>
			<link>https://forum.cuberite.org/thread-3461.html</link>
			<pubDate>Thu, 27 Mar 2025 23:44:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5709">Bruhtava196</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3461.html</guid>
			<description><![CDATA[I have Cuberite binaries for 64-bit iOS (Working on iPhone 6 Plus and 6S) But i didn't find armv7 binaries for my iPad 4 running 32-bit iOS. I wanted to compile it myself but i have no idea on how to start. Any suggestions?]]></description>
			<content:encoded><![CDATA[I have Cuberite binaries for 64-bit iOS (Working on iPhone 6 Plus and 6S) But i didn't find armv7 binaries for my iPad 4 running 32-bit iOS. I wanted to compile it myself but i have no idea on how to start. Any suggestions?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Generating palette files]]></title>
			<link>https://forum.cuberite.org/thread-3442.html</link>
			<pubDate>Wed, 09 Oct 2024 10:36:08 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5645">MightyFilipns</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3442.html</guid>
			<description><![CDATA[Where can I find the script for generating the Palette_1_XX.cpp files and to update the BlockStates.cpp and BlockStates.h? Looking at git history <dvz_me_placeholder id="0" /> previously added them.]]></description>
			<content:encoded><![CDATA[Where can I find the script for generating the Palette_1_XX.cpp files and to update the BlockStates.cpp and BlockStates.h? Looking at git history <dvz_me_placeholder id="0" /> previously added them.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Kompletter cuberite plugin Programmier noob]]></title>
			<link>https://forum.cuberite.org/thread-3438.html</link>
			<pubDate>Mon, 24 Jun 2024 17:56:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5597">ItsADoggy</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3438.html</guid>
			<description><![CDATA[Deutsch:<br />
Heyho liebes Cuberite forum,<br />
Ich bin seit heute morgen cuberite Nutzer und mir gefällt cuberite sehr gut. Da ich allerdings seit mehreren Stunden jetzt nach einem npc plugin suchte, aber nichts fand dachte ich mir: ich hock mich jetzt hin und Programmier das ganze. Problem daran: ich verstehe nicht wie man ein plugin aufbaut geschweige denn was man zum erstellen benutzen soll. Mein Plan für das plugin ist simpel:<br />
Wenn der Spieler eine entity mit dem Namen Server1 Rechtsklickt das der Spieler dann in seinem Client den Befehl /server Server1 ausführt(Ja es soll eine bungeecord telepotation werden)<br />
Ich würde mich freuen wenn mit jemand erklären könnte wie das geht oder wenn mir jemand den Code schreiben könnte damit ich dann mit learning by doing mir das draufschaffe.<br />
<br />
Viele Grüße und Schonmal Dank im Voraus<br />
<br />
Doggy<br />
<br />
English:<br />
Hey dear Cuberite forum,<br />
<br />
I've been a cuberite user since this morning and I really like cuberite. However, since I've been looking for an NPC plugin for several hours now but haven't found anything, I thought: I'll sit down and program the whole thing. The problem is: I don't understand how to set up a plugin, let alone what to use to create it. My plan for the plugin is simple:<br />
<br />
If the player right-clicks an entity with the name Server1, the player then executes the command /server Server1 in their client (yes, it should be a bungeecord teleportation)<br />
<br />
I would be happy if someone could explain to me how this works or if someone could write me the code so that I can learn by doing.<br />
<br />
Best wishes and thanks in advance<br />
<br />
Doggy]]></description>
			<content:encoded><![CDATA[Deutsch:<br />
Heyho liebes Cuberite forum,<br />
Ich bin seit heute morgen cuberite Nutzer und mir gefällt cuberite sehr gut. Da ich allerdings seit mehreren Stunden jetzt nach einem npc plugin suchte, aber nichts fand dachte ich mir: ich hock mich jetzt hin und Programmier das ganze. Problem daran: ich verstehe nicht wie man ein plugin aufbaut geschweige denn was man zum erstellen benutzen soll. Mein Plan für das plugin ist simpel:<br />
Wenn der Spieler eine entity mit dem Namen Server1 Rechtsklickt das der Spieler dann in seinem Client den Befehl /server Server1 ausführt(Ja es soll eine bungeecord telepotation werden)<br />
Ich würde mich freuen wenn mit jemand erklären könnte wie das geht oder wenn mir jemand den Code schreiben könnte damit ich dann mit learning by doing mir das draufschaffe.<br />
<br />
Viele Grüße und Schonmal Dank im Voraus<br />
<br />
Doggy<br />
<br />
English:<br />
Hey dear Cuberite forum,<br />
<br />
I've been a cuberite user since this morning and I really like cuberite. However, since I've been looking for an NPC plugin for several hours now but haven't found anything, I thought: I'll sit down and program the whole thing. The problem is: I don't understand how to set up a plugin, let alone what to use to create it. My plan for the plugin is simple:<br />
<br />
If the player right-clicks an entity with the name Server1, the player then executes the command /server Server1 in their client (yes, it should be a bungeecord teleportation)<br />
<br />
I would be happy if someone could explain to me how this works or if someone could write me the code so that I can learn by doing.<br />
<br />
Best wishes and thanks in advance<br />
<br />
Doggy]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Dev queries - getting started with the forum]]></title>
			<link>https://forum.cuberite.org/thread-3391.html</link>
			<pubDate>Tue, 30 May 2023 19:49:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5483">MrSach</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3391.html</guid>
			<description><![CDATA[Hello all,<br />
<br />
I have recently been working on an issue on GitHub and have also been advised that the code could do with some further changes.<br />
<br />
After investigating how to reactor the code (and to what extent) I have some questions.<br />
<br />
As I am new here, what do I ask to begin with?<br />
<br />
Thanks,<br />
MrSach]]></description>
			<content:encoded><![CDATA[Hello all,<br />
<br />
I have recently been working on an issue on GitHub and have also been advised that the code could do with some further changes.<br />
<br />
After investigating how to reactor the code (and to what extent) I have some questions.<br />
<br />
As I am new here, what do I ask to begin with?<br />
<br />
Thanks,<br />
MrSach]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Block State transition]]></title>
			<link>https://forum.cuberite.org/thread-3365.html</link>
			<pubDate>Mon, 28 Jun 2021 09:27:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3365.html</guid>
			<description><![CDATA[Just wanted to give a heads-up.<br />
<br />
This is more or less working. More or less....<br />
The most important thing is to merge the other BlockState class and fixing the API.<br />
<br />
I have some questions:<br />
<br />
1) Do we want to add the new world loading in this PR? So actually loading block states from disk<br />
<br />
2) do we want to purge all bugs or yolo the merge and fix it afterwards? Game breaking bugs excluded I am talking about placing blocks, breaking stuff, ...<br />
3) At the moment world loading is as sow as generating a new one. This is because I have to iterate through every block and switch to its block state. Is this acceptable [for now]?]]></description>
			<content:encoded><![CDATA[Just wanted to give a heads-up.<br />
<br />
This is more or less working. More or less....<br />
The most important thing is to merge the other BlockState class and fixing the API.<br />
<br />
I have some questions:<br />
<br />
1) Do we want to add the new world loading in this PR? So actually loading block states from disk<br />
<br />
2) do we want to purge all bugs or yolo the merge and fix it afterwards? Game breaking bugs excluded I am talking about placing blocks, breaking stuff, ...<br />
3) At the moment world loading is as sow as generating a new one. This is because I have to iterate through every block and switch to its block state. Is this acceptable [for now]?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[How to get block at coordinates?]]></title>
			<link>https://forum.cuberite.org/thread-3349.html</link>
			<pubDate>Mon, 12 Apr 2021 10:38:21 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5311">_XxFedexX_</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3349.html</guid>
			<description><![CDATA[Basically I want to check the block below the player.<br />
If it is stairs or piston, return true;<br />
else return false.<br />
I checked in the API but didn't found anything that could do this.<br />
Thank you.<br />
<br />
Post Scriptum: sorry for bad English, i am not mother language.]]></description>
			<content:encoded><![CDATA[Basically I want to check the block below the player.<br />
If it is stairs or piston, return true;<br />
else return false.<br />
I checked in the API but didn't found anything that could do this.<br />
Thank you.<br />
<br />
Post Scriptum: sorry for bad English, i am not mother language.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[BlockState breaking the API]]></title>
			<link>https://forum.cuberite.org/thread-3344.html</link>
			<pubDate>Thu, 11 Mar 2021 11:32:48 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3344.html</guid>
			<description><![CDATA[So the BlockState PR is gonna break the API in some ways.<br />
<br />
So how are we gonna go about it?<br />
<br />
There is a function convering BlockState &lt;-&gt; BlockType, NibbleType. We can manually export all the functions manually. (I don't like this - just carrying old stuff with us)<br />
We can just dump everything (and when at it dump all the vector 3 overrides)<br />
<br />
and we have to think about how we interface with the new BlockState<br />
  - Construct from String<br />
  - Export the whole BlockState stuff to API (then autogenerate the BlockState API Docs)]]></description>
			<content:encoded><![CDATA[So the BlockState PR is gonna break the API in some ways.<br />
<br />
So how are we gonna go about it?<br />
<br />
There is a function convering BlockState &lt;-&gt; BlockType, NibbleType. We can manually export all the functions manually. (I don't like this - just carrying old stuff with us)<br />
We can just dump everything (and when at it dump all the vector 3 overrides)<br />
<br />
and we have to think about how we interface with the new BlockState<br />
  - Construct from String<br />
  - Export the whole BlockState stuff to API (then autogenerate the BlockState API Docs)]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mob AI Issue and Possible Fix]]></title>
			<link>https://forum.cuberite.org/thread-3331.html</link>
			<pubDate>Fri, 11 Dec 2020 09:13:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=4783">the1robert</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3331.html</guid>
			<description><![CDATA[First, let me say that cuberite is an amazing server.  I especially like running it on my ancient android phone, it's performance is fantastic on such a limited platform.<br />
<br />
But for as long as I have been messing around with it there is one problem that always keeps me from using it in a more serious manner, or for longer periods of time.<br />
<br />
It's the Mob AI.  It's terrible.  The biggest problem to me, the one that always crops up and annoys me every time I make a server and build a house.  Is that the Mobs can see like superman.  They see you through walls, doors, hiding in a tree, underground.  If there is a mob within it's detection range then it knows exactly where you are and it swarms you regardless.<br />
<br />
I use a minimap mod, that shows monster positions.  When underground I can move around and watch the Mobs on the surface follow me around.  It's crazy.<br />
<br />
The main reason this is a problem is that you can't sleep in a bed while there are monsters around.  Which means you can't ever sleep in a bed for the most part.  because they swarm and collect around your house.<br />
<br />
So I looked into the code and found a way to fix that one issue.  I added a check so that the Mob will only go into chase mode if it can actually see you.<br />
<br />
Now, I'm not an experienced coder in c++ and I'm sure there is a way to make it better or nicer or proper or something. But I've been testing it on my phone server for a while now and it's been working great for me.  I haven't noticed any performance implications either, and this is a really old slow phone.<br />
<br />
So I thought I would post my fix here and maybe someone who is a better coder than me can look at it and evaluate it and maybe integrate it into the source.<br />
<br />
Thanks for your time and consideration.<br />
<br />
<br />
~<br />
Robert<br />
<br />
<br />
<a href="https://pastebin.com/bf4AaMPz" target="_blank" rel="noopener" class="mycode_url">https://pastebin.com/bf4AaMPz</a><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp<br />
index a904ac2da..1bf392e1a 100644<br />
--- a/src/Mobs/AggressiveMonster.cpp<br />
+++ b/src/Mobs/AggressiveMonster.cpp<br />
@@ -38,13 +38,23 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk &amp;<br />
<br />
void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk &amp; a_Chunk)<br />
{<br />
+<br />
if (!a_Player-&gt;CanMobsTarget())<br />
{<br />
return;<br />
}<br />
<br />
- Super::EventSeePlayer(a_Player, a_Chunk);<br />
- m_EMState = CHASING;<br />
+ Vector3d MyHeadPosition1 = GetPosition() + Vector3d(0, GetHeight(), 0);<br />
+ Vector3d TargetPosition1 = a_Player-&gt;GetPosition() + Vector3d(0, a_Player-&gt;GetHeight(), 0);<br />
+ if (cLineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition1, TargetPosition1, cLineBlockTracer::losAirWaterLava))<br />
+ {<br />
+ //LOGINFO("Mob Saw Player!");<br />
+ Super::EventSeePlayer(a_Player, a_Chunk);<br />
+ m_EMState = CHASING;<br />
+ } else{<br />
+ return;<br />
+ }<br />
+<br />
}</code></div></div><br />
<br />
<img src="https://forum.cuberite.org/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
&nbsp;&nbsp;<a href="attachment.php?aid=803" target="_blank" title="">AgressiveMonster.cpp.diff.txt</a> (Size: 926 bytes / Downloads: 542)
]]></description>
			<content:encoded><![CDATA[First, let me say that cuberite is an amazing server.  I especially like running it on my ancient android phone, it's performance is fantastic on such a limited platform.<br />
<br />
But for as long as I have been messing around with it there is one problem that always keeps me from using it in a more serious manner, or for longer periods of time.<br />
<br />
It's the Mob AI.  It's terrible.  The biggest problem to me, the one that always crops up and annoys me every time I make a server and build a house.  Is that the Mobs can see like superman.  They see you through walls, doors, hiding in a tree, underground.  If there is a mob within it's detection range then it knows exactly where you are and it swarms you regardless.<br />
<br />
I use a minimap mod, that shows monster positions.  When underground I can move around and watch the Mobs on the surface follow me around.  It's crazy.<br />
<br />
The main reason this is a problem is that you can't sleep in a bed while there are monsters around.  Which means you can't ever sleep in a bed for the most part.  because they swarm and collect around your house.<br />
<br />
So I looked into the code and found a way to fix that one issue.  I added a check so that the Mob will only go into chase mode if it can actually see you.<br />
<br />
Now, I'm not an experienced coder in c++ and I'm sure there is a way to make it better or nicer or proper or something. But I've been testing it on my phone server for a while now and it's been working great for me.  I haven't noticed any performance implications either, and this is a really old slow phone.<br />
<br />
So I thought I would post my fix here and maybe someone who is a better coder than me can look at it and evaluate it and maybe integrate it into the source.<br />
<br />
Thanks for your time and consideration.<br />
<br />
<br />
~<br />
Robert<br />
<br />
<br />
<a href="https://pastebin.com/bf4AaMPz" target="_blank" rel="noopener" class="mycode_url">https://pastebin.com/bf4AaMPz</a><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp<br />
index a904ac2da..1bf392e1a 100644<br />
--- a/src/Mobs/AggressiveMonster.cpp<br />
+++ b/src/Mobs/AggressiveMonster.cpp<br />
@@ -38,13 +38,23 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk &amp;<br />
<br />
void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk &amp; a_Chunk)<br />
{<br />
+<br />
if (!a_Player-&gt;CanMobsTarget())<br />
{<br />
return;<br />
}<br />
<br />
- Super::EventSeePlayer(a_Player, a_Chunk);<br />
- m_EMState = CHASING;<br />
+ Vector3d MyHeadPosition1 = GetPosition() + Vector3d(0, GetHeight(), 0);<br />
+ Vector3d TargetPosition1 = a_Player-&gt;GetPosition() + Vector3d(0, a_Player-&gt;GetHeight(), 0);<br />
+ if (cLineBlockTracer::LineOfSightTrace(*GetWorld(), MyHeadPosition1, TargetPosition1, cLineBlockTracer::losAirWaterLava))<br />
+ {<br />
+ //LOGINFO("Mob Saw Player!");<br />
+ Super::EventSeePlayer(a_Player, a_Chunk);<br />
+ m_EMState = CHASING;<br />
+ } else{<br />
+ return;<br />
+ }<br />
+<br />
}</code></div></div><br />
<br />
<img src="https://forum.cuberite.org/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
&nbsp;&nbsp;<a href="attachment.php?aid=803" target="_blank" title="">AgressiveMonster.cpp.diff.txt</a> (Size: 926 bytes / Downloads: 542)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[short term storage of entitites]]></title>
			<link>https://forum.cuberite.org/thread-3325.html</link>
			<pubDate>Thu, 01 Oct 2020 12:56:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3325.html</guid>
			<description><![CDATA[So i have a few features that require some short term storage for entities.<br />
<br />
TigerW suggested to store this in NBT. There was the idea to recycle the functions in NBTChunkSerializer and WSSAnvil.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">BUT</span><br />
<br />
The functions to decode NBT data are protected members of cWSSAnvil. We'd need a way to access functions.<br />
<br />
I'd suggest making the decode functions from cWSSAnvil static.<br />
<br />
What are your thoughts?]]></description>
			<content:encoded><![CDATA[So i have a few features that require some short term storage for entities.<br />
<br />
TigerW suggested to store this in NBT. There was the idea to recycle the functions in NBTChunkSerializer and WSSAnvil.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">BUT</span><br />
<br />
The functions to decode NBT data are protected members of cWSSAnvil. We'd need a way to access functions.<br />
<br />
I'd suggest making the decode functions from cWSSAnvil static.<br />
<br />
What are your thoughts?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Monster in differen versions]]></title>
			<link>https://forum.cuberite.org/thread-3322.html</link>
			<pubDate>Fri, 25 Sep 2020 22:12:09 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3322.html</guid>
			<description><![CDATA[So i did some poking in the monster code...<br />
<br />
THERE IS A BIG PROBLEM WHEN SUPPORTING DIFFERENT VERSIONS WITH AGGRESIVE MONSTER!<br />
<br />
Let's say there is a player connecting with 1.8 and goes into the end (high hypothetical) and the server generated a shulker enemy. And there he/she goes without any indication where the damage/effect came from...<br />
<br />
The problem is that this player will be attacked from the entities propalby invisible. So we have to check for any entity and each possible interaction if the players client does support that interaction. (e.g. taking damage)<br />
<br />
There are some entities wich do more or less the same. Like the 1.10 aditions to zombies and skeletons. So that could be covered by a workaround.<br />
<br />
At the moment all entities implemented are supported in all versions. So this is safe.<br />
<br />
What are your thoughts?]]></description>
			<content:encoded><![CDATA[So i did some poking in the monster code...<br />
<br />
THERE IS A BIG PROBLEM WHEN SUPPORTING DIFFERENT VERSIONS WITH AGGRESIVE MONSTER!<br />
<br />
Let's say there is a player connecting with 1.8 and goes into the end (high hypothetical) and the server generated a shulker enemy. And there he/she goes without any indication where the damage/effect came from...<br />
<br />
The problem is that this player will be attacked from the entities propalby invisible. So we have to check for any entity and each possible interaction if the players client does support that interaction. (e.g. taking damage)<br />
<br />
There are some entities wich do more or less the same. Like the 1.10 aditions to zombies and skeletons. So that could be covered by a workaround.<br />
<br />
At the moment all entities implemented are supported in all versions. So this is safe.<br />
<br />
What are your thoughts?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Villages and changes in 1.14]]></title>
			<link>https://forum.cuberite.org/thread-3320.html</link>
			<pubDate>Mon, 21 Sep 2020 15:56:37 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3320.html</guid>
			<description><![CDATA[Villages and Villagers were changed massively in 1.14.<br />
<br />
Do you think it's worth taking care of the "old" behaviour like zombie sieges? Or skipping directly to the new behaviour?]]></description>
			<content:encoded><![CDATA[Villages and Villagers were changed massively in 1.14.<br />
<br />
Do you think it's worth taking care of the "old" behaviour like zombie sieges? Or skipping directly to the new behaviour?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Oject keeping track if so called features]]></title>
			<link>https://forum.cuberite.org/thread-3319.html</link>
			<pubDate>Sat, 19 Sep 2020 15:34:45 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=5193">12xx12</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3319.html</guid>
			<description><![CDATA[Vanilla minecraft does keep track where it placed which structure (so called features).<br />
<br />
I think this would make sense to add this too to cuberite. Features that need this:<br />
<br />
- Limit mob spawning to locations (villagers, ...)<br />
- eye of ender of fly route<br />
<br />
Functions I would add to the object:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>enum class eFeatures<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;// List of all vanilla features...<br />
};<br />
<br />
bool IsFeatureAt(Vector3i, eFeature);<br />
Vector3i GetNearestFeature(Vector3i, eFeature);<br />
std::vector&lt;Vector3i&gt; GetAllFeatures(eFeatures);</code></div></div>]]></description>
			<content:encoded><![CDATA[Vanilla minecraft does keep track where it placed which structure (so called features).<br />
<br />
I think this would make sense to add this too to cuberite. Features that need this:<br />
<br />
- Limit mob spawning to locations (villagers, ...)<br />
- eye of ender of fly route<br />
<br />
Functions I would add to the object:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>enum class eFeatures<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;// List of all vanilla features...<br />
};<br />
<br />
bool IsFeatureAt(Vector3i, eFeature);<br />
Vector3i GetNearestFeature(Vector3i, eFeature);<br />
std::vector&lt;Vector3i&gt; GetAllFeatures(eFeatures);</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[1.13 migration, aims & objectives]]></title>
			<link>https://forum.cuberite.org/thread-3313.html</link>
			<pubDate>Sun, 13 Sep 2020 18:54:28 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=1440">tigerw</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3313.html</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Present architecture</span> (BLOCKTYPE, NIBBLETYPE)<br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;Chunk.SetBlock(Pos, E_BLOCK_PISTON, 0x10);&#10;&#10;auto BlockType = Chunk.GetBlock(Pos);&#10;if (BlockType == E_BLOCK_PISTON)&#10;{&#10;  auto IsSticky = Chunk.GetMeta(Pos) &amp; 0x08;&#10;}&#10;</pre>
<br />
(If we're lucky we might have an E_META_XXX mask.)<br />
<br />
Fast, but not type safe. There may be any number of metadata changes between MC 1.x and 1.y which silently broke our bitwise ops which we just don't know about. Doesn't support &gt;256 block types.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Next steps</span><br />
<br />
Need something that's fast and type safe. If Mojang changes some property in 1.17 say, the person who's updating to the new blocks needs to see a compilation failure for every use of a property that was changed or no longer exists, as well for <span style="font-style: italic;" class="mycode_i">not</span> setting a property that was added.<br />
<br />
<div style="text-align: center;" class="mycode_align">⁂</div>
<br />
<span style="font-weight: bold;" class="mycode_b">Building on the recently added BlockState/BlockTypeRegistry/...</span><br />
<br />
These classes maintain a dynamic string mapping, akin to the Vanilla { "minecraft:block_name" : { "property1" : "value1" }}.<br />
<br />
This isn't the best format for Vanilla blocks:<ul class="mycode_list"><li>The set of Vanilla blocks are fixed per version. There is no need to parse all definitions from a file on every startup when the compiler can do the work.<br />
</li>
<li>Mojang have changed block names, properties before. For example, Silverfish Egg, Monster Block, Infested Block. Using strings gives no indication that anything is amiss until something goes awry at runtime.<br />
</li>
<li>Especially since so many of our users are on low powered devices, we need to be careful to avoid too many dynamic string allocations. Anecdote, but 1.16 runs at 1FPS on a flat world for 20 seconds after joining singleplayer. Pre-flattening 1.12.2 runs at 40. I'm unsure if allocations are to blame, but Pi Zero users should still have good performance after this migration.<br />
</li>
</ul>
However, this is an excellent format for custom blocks.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Plan going forward</span><br />
<br />
A new Block struct (similar to cItem) for Vanilla. BlockState &amp; BlockTypeRegistry for plugins.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Block structure storage format</span><br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;struct Block&#10;{&#10;  // Gets the type of this block&#10;  BlockType Type() const;&#10;&#10;  // Comparison operators&#10;  // ...&#10;&#10;  unsigned short ID;&#10;};&#10;</pre>
<br />
16 bit short, in a typed Block structure. Consumes no more than BLOCKTYPE + NIBBLETYPE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Vanilla block handling</span><br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;Chunk.SetBlock(&#10;  Pos,&#10;&#10;  // Call the autogenerated Piston(...) function in the autogenerated Blocks namespace&#10;  // Creates a Block struct representing a Piston with the given properties set&#10;  // Can also do Blocks::Piston() to create a default Piston, using the default Mojang defined in their registry.json&#10;  Blocks::Piston(eBlockFace::BLOCK_FACE_XM, /* sticky */ true, /* extended */ false)&#10;);&#10;&#10;auto Block = Chunk.GetBlock(Pos);&#10;if (Block == BlockType::Piston)  // Invokes comparison operator between Block and BlockType, converts a Block to its type automatically&#10;{&#10;  // Call the autogenerated "Sticky" accessor in the Blocks::Piston autogenerated namespace&#10;  // The accessor looks at Block (i.e. its ID) and returns if it's sticky.&#10;  auto IsSticky = Blocks::Piston::Sticky(Block);&#10;}&#10;</pre>
<br />
Lua script generated namespaces that can create a Block and query the properties of one. Baked in at compile time.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Custom blocks, extensibility, plugins</span><br />
<br />
This isn't yet done, but could look something like this:<br />
<br />
Use a global dynamic registry, xoft's BlockState/BlockTypeRegistry classes. Plugins can register blocks with a set of string properties, attach their custom BlockHandler, and set BlockInfo properties (IsSolid, IsSnowable, etc.).<br />
<br />
For each combination of properties, the plugin receives a Block struct (so, basically an ID that comes after the Vanilla ones). Now this custom block can be used like any vanilla block, passed to SetBlock, returned from GetBlock. When native code needs information about this custom ID, it queries the global dynamic registry.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Protocol</span><br />
<br />
Since the set of vanilla blocks are fixed, mapping Block (ID) to protocol ID is a switch statement. Custom blocks probably need some negotiation with the client, the plugin can be responsible for returning the right protocol ID.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Serialisation</span><br />
<br />
Storage to Anvil needs mapping to and from namespaced strings, "minecraft:xx" et al. A bijective mapping in WorldStorage\NamespaceSerializer.cpp (BlockType &lt;-&gt; std::string) as exists for Statistics should do the trick. Again, unknown IDs are delegated to the global registry.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Chunk storage</span><br />
<br />
Just a normal palette storing our 16 bit shorts. No special handling for custom blocks since this is just storage. Ideally in 1.16's Chunk Data format, so sending chunks need minimal processing.]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Present architecture</span> (BLOCKTYPE, NIBBLETYPE)<br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;Chunk.SetBlock(Pos, E_BLOCK_PISTON, 0x10);&#10;&#10;auto BlockType = Chunk.GetBlock(Pos);&#10;if (BlockType == E_BLOCK_PISTON)&#10;{&#10;  auto IsSticky = Chunk.GetMeta(Pos) &amp; 0x08;&#10;}&#10;</pre>
<br />
(If we're lucky we might have an E_META_XXX mask.)<br />
<br />
Fast, but not type safe. There may be any number of metadata changes between MC 1.x and 1.y which silently broke our bitwise ops which we just don't know about. Doesn't support &gt;256 block types.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Next steps</span><br />
<br />
Need something that's fast and type safe. If Mojang changes some property in 1.17 say, the person who's updating to the new blocks needs to see a compilation failure for every use of a property that was changed or no longer exists, as well for <span style="font-style: italic;" class="mycode_i">not</span> setting a property that was added.<br />
<br />
<div style="text-align: center;" class="mycode_align">⁂</div>
<br />
<span style="font-weight: bold;" class="mycode_b">Building on the recently added BlockState/BlockTypeRegistry/...</span><br />
<br />
These classes maintain a dynamic string mapping, akin to the Vanilla { "minecraft:block_name" : { "property1" : "value1" }}.<br />
<br />
This isn't the best format for Vanilla blocks:<ul class="mycode_list"><li>The set of Vanilla blocks are fixed per version. There is no need to parse all definitions from a file on every startup when the compiler can do the work.<br />
</li>
<li>Mojang have changed block names, properties before. For example, Silverfish Egg, Monster Block, Infested Block. Using strings gives no indication that anything is amiss until something goes awry at runtime.<br />
</li>
<li>Especially since so many of our users are on low powered devices, we need to be careful to avoid too many dynamic string allocations. Anecdote, but 1.16 runs at 1FPS on a flat world for 20 seconds after joining singleplayer. Pre-flattening 1.12.2 runs at 40. I'm unsure if allocations are to blame, but Pi Zero users should still have good performance after this migration.<br />
</li>
</ul>
However, this is an excellent format for custom blocks.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Plan going forward</span><br />
<br />
A new Block struct (similar to cItem) for Vanilla. BlockState &amp; BlockTypeRegistry for plugins.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Block structure storage format</span><br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;struct Block&#10;{&#10;  // Gets the type of this block&#10;  BlockType Type() const;&#10;&#10;  // Comparison operators&#10;  // ...&#10;&#10;  unsigned short ID;&#10;};&#10;</pre>
<br />
16 bit short, in a typed Block structure. Consumes no more than BLOCKTYPE + NIBBLETYPE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Vanilla block handling</span><br />
<br />
<script type="text/javascript" src="https://forum.cuberite.org/inc/plugins/syntax/scripts/shBrush_cpp.js"></script><pre class="brush: cpp;">&#10;Chunk.SetBlock(&#10;  Pos,&#10;&#10;  // Call the autogenerated Piston(...) function in the autogenerated Blocks namespace&#10;  // Creates a Block struct representing a Piston with the given properties set&#10;  // Can also do Blocks::Piston() to create a default Piston, using the default Mojang defined in their registry.json&#10;  Blocks::Piston(eBlockFace::BLOCK_FACE_XM, /* sticky */ true, /* extended */ false)&#10;);&#10;&#10;auto Block = Chunk.GetBlock(Pos);&#10;if (Block == BlockType::Piston)  // Invokes comparison operator between Block and BlockType, converts a Block to its type automatically&#10;{&#10;  // Call the autogenerated "Sticky" accessor in the Blocks::Piston autogenerated namespace&#10;  // The accessor looks at Block (i.e. its ID) and returns if it's sticky.&#10;  auto IsSticky = Blocks::Piston::Sticky(Block);&#10;}&#10;</pre>
<br />
Lua script generated namespaces that can create a Block and query the properties of one. Baked in at compile time.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Custom blocks, extensibility, plugins</span><br />
<br />
This isn't yet done, but could look something like this:<br />
<br />
Use a global dynamic registry, xoft's BlockState/BlockTypeRegistry classes. Plugins can register blocks with a set of string properties, attach their custom BlockHandler, and set BlockInfo properties (IsSolid, IsSnowable, etc.).<br />
<br />
For each combination of properties, the plugin receives a Block struct (so, basically an ID that comes after the Vanilla ones). Now this custom block can be used like any vanilla block, passed to SetBlock, returned from GetBlock. When native code needs information about this custom ID, it queries the global dynamic registry.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Protocol</span><br />
<br />
Since the set of vanilla blocks are fixed, mapping Block (ID) to protocol ID is a switch statement. Custom blocks probably need some negotiation with the client, the plugin can be responsible for returning the right protocol ID.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Serialisation</span><br />
<br />
Storage to Anvil needs mapping to and from namespaced strings, "minecraft:xx" et al. A bijective mapping in WorldStorage\NamespaceSerializer.cpp (BlockType &lt;-&gt; std::string) as exists for Statistics should do the trick. Again, unknown IDs are delegated to the global registry.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Chunk storage</span><br />
<br />
Just a normal palette storing our 16 bit shorts. No special handling for custom blocks since this is just storage. Ideally in 1.16's Chunk Data format, so sending chunks need minimal processing.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Discussion incident removal blockpalettes]]></title>
			<link>https://forum.cuberite.org/thread-3312.html</link>
			<pubDate>Thu, 10 Sep 2020 10:50:52 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.cuberite.org/member.php?action=profile&uid=692">NiLSPACE</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.cuberite.org/thread-3312.html</guid>
			<description><![CDATA[Continuation discussion <a href="https://github.com/cuberite/cuberite/commit/3dae696b414d9141b3faa6872f3723332b7b6395" target="_blank" rel="noopener" class="mycode_url">https://github.com/cuberite/cuberite/com...332b7b6395</a>]]></description>
			<content:encoded><![CDATA[Continuation discussion <a href="https://github.com/cuberite/cuberite/commit/3dae696b414d9141b3faa6872f3723332b7b6395" target="_blank" rel="noopener" class="mycode_url">https://github.com/cuberite/cuberite/com...332b7b6395</a>]]></content:encoded>
		</item>
	</channel>
</rss>