Hey everyone, you won't believe it, the timber blocks I wrote about in 2 blog posts already need even more work.
I just had finished them and was thinking about implementing a way to rotate them and place them rotated in the world when I received the message that in the upcoming Minecraft version 1.13 my code wouldn't be valid anymore and I would have to rework them anyway.
The issue is, that in 1.13 Minecraft will remove metadata from the blocks, and, therefore, blocks which are combined in several blockstates won't be valid anymore
Therefore, I rewrote our code and found also some small places which need additional work.
Part 1:
First of all, I had the block
Which automatically enables me to rotate the block on placement.
The connection calc I have shown in the last post had to be extended by the x and z-axis as well.
And, since I didn't need to implement any subblocks anymore (since that will be considered bad style in 1.13)
I was able to scrap a ton of code.
This also enabled me to fit all the registering of the over 64 blocks into 2 nice loops.
Where we go through all types of wood and all types of timbers we have.
Besides that, I had to fix the schematic sending messages after the message rework.
The schematic message hadn't been working correctly on the server thread as it was supposed to work on and it had become a clientThread message in the automatic refactoring.
Therefore, I removed the client/server side checks adapted the message name and used the player object directly to send the messages.
This is also way cleaner now than it was before.
Part 2:
In the second part, I reworked some important code where we teleport players.
We had two main issues.
- Randomly teleporting players outside of the world border in certain worlds
- Killing players when teleporting them between Dimensions.
This code has been stale for a while since we've waited for a fix on the side of Sponge, just to notice, thanks to @bloodmc that the error actually was on the side of Forge. Nevertheless, he thankfully he still provided a workaround if Sponge is installed.
The main issue was that forge requires the player to be connected to a portal block when teleporting between dimensions which can be lost after a restart.
First of all, I disabled the random teleport in other dimensions.
Since I was messing around there already I improved the random teleport code so it places player guaranteed close to a spot where there is no close colony around.
Previously we only placed them outside of a colony.
/* Check for a close by colony*/
if (BlockPosUtil.getDistance2D(colony.getCenter(), tpPos) < Configurations.gameplay.workingRangeTownHall * 2 + Configurations.gameplay.townHallPadding)
{
continue;
}
By checking twice the colony size + the padding.
Then, I went to our colony teleportation code between dimensions.
First I built in a safeguard since people might try to teleport to not existing colonies.
To avoid any crashes.
Then I copied over some vanilla code they use to teleport between dimensions.
And last but not least I was able to remove the old safeguard which didn't help us very well since it was checking for the existence of the colony too late.
Additionally, I improved our inventory code to use existing constants.
And removed code which was causing crashes for a few of our clients.
Finally, we set up a new schematics server which is accessible for all our Patreons since we needed a central place to maintain the structures our colonists build and live in.
So we also fixed a bunch of schematics on the way.
I hope you like our progress, we're currently working on some huge changes which will be great of our mod, so the general updates I'm posting are more bug related since I have no time to work on additional features.
But, I should be able to deliver some great features during the next weeks!
Until then =D
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
Great post as always. 603 files changed!
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @raycoms I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
vary nice post .. boss
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I like this. Very informative. Thanks for sharing
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
congenial & great!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Good post
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The steps are really worth looking into
Thank you for sharing every bit of it
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank's for informations...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Very important information you provide. Very useful. This digital world is a mega world, and it is impossible to know everything.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
You've got upvoted by
Utopian-1UP
!You can give up to ten 1UP's to Utopian posts every day after they are accepted by a Utopian moderator and before they are upvoted by the official @utopian-io account. Install the @steem-plus browser extension to use 1UP. By following the 1UP-trail using SteemAuto you support great Utopian authors and earn high curation rewards at the same time.
1UP is neither organized nor endorsed by Utopian.io!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Your post is very good
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit