Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/compost block #2605

Merged
merged 33 commits into from
Jul 11, 2018
Merged

Feature/compost block #2605

merged 33 commits into from
Jul 11, 2018

Conversation

Fireruner
Copy link
Contributor

Changes proposed in this pull request:

  • Added the Compost Item, an Item that behaves like BoneMeal to the plants and cannot be crafted nor used as a dye.
  • Adde the Barrel Block, a block that takes biolical items (can be set on configurations) and process them. After 2 days (average) the block will emit particles to show that it finished, and will drop 6 Compost Items when the player interacts whit it.

Review please

Fireruner and others added 24 commits March 11, 2018 03:05
Not working at the moment. Crashes on launch
Added the model for the compost block.
Fixed some problems with the model, and added the capability of changing its state with right click.
The basic functionality works, but it sometimes "forgets" that it has the items it had. Have to work on that. For now it drops 1 bone from each 64 mats (rotten flesh counts as double) in like 1-2 mins (will increase time and drop)
Little fixes here and there. Still "eating" items
Functionality of the barrel block working. Pending of testing and configuring (time needed, drop amounts, etc).
Added a model for the barrel while its working (the same barrel but with a lid on it)
Added particles to the finish state and directions for the block. Pending of final details.
Fixed a problem where the barrel orientation will change randomly in servers. Test pending
Looks like the client isn´t getting the state of the barrel quite right. It gets the orientation right, though
Trying to get the barrel updated every time the player uses it. For now you have to force the update modifying blocks arround it.
The barrel updates fine in singleplayer and works as intended. Minor adjustments pending.
Added the signature for the methods to be used as interface with the AI
Logic now gets executed on server and the barrel gets synced in server and client. Added a configuration to set, unset items that can be processed by the barrel
The BarrelBlock is done and working (pending from further testing), and the compost item was included in the items and its funcionallity done, pending from graphics.
They are both working and pending from testing.
I hope
Fixing Sonar issues
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@ldtteam ldtteam deleted a comment Jul 8, 2018
@Override
public IBlockState getStateForPlacement(
@NotNull final World world, @NotNull final BlockPos pos, @NotNull final EnumFacing facing, final float hitX, final float hitY,
final float hitZ, final int meta, @NotNull final EntityLivingBase placer, final EnumHand hand) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting is off here

this(metaIn, nameIn, nameIn, mapColorIn);
}

BarrelType(final int metaIn, final String nameIn, final String unlocalizedNameIn, final MapColor mapColorIn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

javadoc for all public methods and fields please


/**
* Class used to handle the compost item.
*/
public class ItemCompost extends AbstractItemMinecolonies
{
/**
* Max stacksize of the item.
*/
private static final int MAX_STACK_SIZE = 64;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a constant for this somewhere already.

private static final int MAX_STACK_SIZE = 64;

/**
* Compost constructor, Set max stack size to 64 like all other items.
*/
public ItemCompost()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave doc,

{
private boolean done = false;
private int items = 0;
private int timer = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jdoc for public methods and for all fields please.
Comments please in jdoc and not with // on next line

Copy link
Collaborator

@LDTTeam-Buildsystem LDTTeam-Buildsystem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analysis Complete

Statistics:
Count New Old Diff
Total 34006 0 3 -3
Errors 594 0 0 0
More Information:

Fixing the formatting and adding JavaDoc where needed
@LDTTeam-Buildsystem LDTTeam-Buildsystem dismissed a stale review July 9, 2018 00:50

A new analysis is being ran. Please wait for the results.

@ldtteam ldtteam deleted a comment from Fireruner Jul 9, 2018
@ldtteam ldtteam deleted a comment Jul 9, 2018
@Raycoms
Copy link
Contributor

Raycoms commented Jul 9, 2018

:shipit: looks good for me now!

Approved with PullApprove

marchermans
marchermans previously approved these changes Jul 10, 2018
Copy link
Contributor

@marchermans marchermans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okey all good. Just one question: Should we not add Support for OreDictionary?

All the item names and tags are defined in the same config entry. Added OreDictionary registries to the vanilla items where needed.
Wasn't checking the hole array of ids
@ldtteam ldtteam deleted a comment Jul 11, 2018
@ldtteam ldtteam deleted a comment Jul 11, 2018
@ldtteam ldtteam deleted a comment Jul 11, 2018
@Raycoms
Copy link
Contributor

Raycoms commented Jul 11, 2018

:shipit: looks good

@Raycoms Raycoms merged commit b036d1b into version/1.12 Jul 11, 2018
@Raycoms Raycoms deleted the feature/compostBlock branch July 11, 2018 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants