Minecolonies & Feature Backlog #1

in #utopian-io5 years ago

Hi everyone, lately I haven't really had the time to write any posts anymore, but I'm going to write a bunch during this next week. I got around 20 prs I haven't yet written about so I'll dive right in.

Better dumping:

One of the first thing which was bothering me after I finally finished my university things was that our keep item code which helps the worker if they should dump an item in their chest and helps the dman to decide if he can pick up an item doesn't separate between these two actions (Dumping in hut, and picking up)

For that reason, I separated the existing code to make it possible to distinguish both cases.

What was previously a map of the stack and the quantity to keep became the map of the stack and a tuple of the quantity and if should be kept in the inventory as well.

After doing this I had to update all the methods which add items to this.

Following that, I enhanced the code which does the check for the dman or dumping with a boolean value to check which of the two cases it is.

And would in the loop then check if it's an inventory operation and the stack should not be dumped.

Christmas special:

After that Christmas was getting slow and I knew something had to be done. As you can see in the main picture of this post, we added a Christmas hat for all our fellow citizens.

For that, to work, we added in the citizen code which would check if it is currently December and if so and the hat slot is currently empty would equip a Christmas hat.

If it's not December and the hat is the Santa hat we would unequip it to turn the feature off again after December passed.

For the Hat, I got an item model and an in-game model and texture from one of our graphic artists.

Then I only had to implement the rest.
For that reason, I created the Santa hat item.

And defined the material.
The material is very important since this is what the game is going to use to find the item in the texture files.

public static final ArmorMaterial SANTA_HAT =
      EnumHelper.addArmorMaterial("minecolonies:santa_hat", "minecolonies:santa_hat", 500, new int[] {0, 0, 0, 0}, 5, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0F);
       

In the next step, I would create the item in the Mod blocks.

Define how exactly it's going to be.
(Which is what is going to make the game know if it's a hat or shoes or pants).

And then finally register it.

After that, I had to add the custom Model (for we have a util method luckily) in the client proxy file.

This will render the item in the inventory.

Barbarian difficulty:

Finally, during our Christmas competition for patreons and devs, I noticed that if we increase the difficulty for the barbarians they are still way too weak.

For that reason, I decreased the armor base level (wait for it).

And then I had the armor depend on the difficulty level of the barbarians.

Besides that, I doubled the attack damage if the difficulty is at level 10.

Added some extra damage to the Chief.

Finally, I added that the pirates, which we added in a previous update, would spawn in their spawners in greater distances.

Or, to be exact, when they are at least 1/4 of the colony size.

Nevertheless, the method for this is actually private in Minecraft so I had to add an access transformer.

Forge (the modding library) makes this very easy and you only have to add the name of the obfuscated field (the name in the class file) to a config file and they will do the rest.

Small fixes:

Finally, I fixed some small things. I found out why the field size is not being calculated correctly
(Since it was calculated in the air the distance).

And I fixed that servers might crash if colonists can't find a location to mourn at (if the town hall isn't there atm for example).

Repository:

https://github.com/ldtteam/minecolonies

Pull Requests:

https://github.com/ldtteam/minecolonies/pull/3152/files?utf8=%E2%9C%93&diff=unified&w=1
https://github.com/ldtteam/minecolonies/pull/3153/files
https://github.com/ldtteam/minecolonies/pull/3158/files
https://github.com/ldtteam/minecolonies/pull/3168/files

Sort:  
  • Good article, looking forward to the others one.
  • So goodbye to the friendly Barbarians, I guess.
  • Christmas hat was a nice touch.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @helo! Keep up the good work!

Super, you can visit my profile!

Posted using Partiko Android

Hi @raycoms!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hi, @raycoms!

You just got a 8.67% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hey, @raycoms!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64093.86
ETH 3123.80
USDT 1.00
SBD 3.94