Skip to content

Commit

Permalink
fixed: cook time factor was ignored for every first smelted item (tha…
Browse files Browse the repository at this point in the history
…nks to Lcannine for the report) #29
  • Loading branch information
cech12 committed Nov 8, 2023
1 parent 63cf421 commit 920380e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.20.1-2.1.1.1] - 2023-11-08
### Fixed
- cook time factor was ignored for every first smelted item (thanks to Lcannine for the report) #29

## [1.20.1-2.1.1.0] - 2023-09-24
### Added
- Added Russian translation (thanks to FishermanHMeM) #26
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ loader_version_range=[47,)

## Mod Properties
mod_id=brickfurnace
mod_version=2.1.1.0
mod_version=2.1.1.1
mod_group_id=cech12.brickfurnace
mod_name=Brick Furnace
mod_authors=Cech12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ else if (!fuel.isEmpty()) {
entity.dataAccess.set(COOK_TIME, entity.dataAccess.get(COOK_TIME) + 1); //changed because of private variable
if (entity.dataAccess.get(COOK_TIME) == entity.dataAccess.get(COOK_TIME_TOTAL)) { //changed because of private variable
entity.dataAccess.set(COOK_TIME, 0); //changed because of private variable
entity.dataAccess.set(COOK_TIME_TOTAL, entity.getTotalCookTime()); //changed because of private variable
entity.dataAccess.set(COOK_TIME_TOTAL, entity.getTotalCookTime(entity.getRecipe())); //changed because of private variable
entity.smeltItem(irecipe);
dirty = true;
}
Expand Down Expand Up @@ -144,8 +144,7 @@ private void smeltItem(@Nullable Recipe<?> recipe) {
}
}

private int getTotalCookTime() {
AbstractCookingRecipe rec = getRecipe();
private int getTotalCookTime(AbstractCookingRecipe rec) {
if (rec == null) {
return 200;
} else if (this.specificRecipeType.getClass().isInstance(rec.getType())) {
Expand Down Expand Up @@ -175,6 +174,7 @@ public AbstractCookingRecipe getRecipe() {
} else {
failedMatch = ItemStack.EMPTY;
}
dataAccess.set(COOK_TIME_TOTAL, getTotalCookTime(rec));
return curRecipe = rec;
}
}
Expand Down

0 comments on commit 920380e

Please sign in to comment.