Skip to content

Commit

Permalink
Use assemble method instead of getResultItem in tile entity (see Forg…
Browse files Browse the repository at this point in the history
…e 1.16.5-36.1.51)
  • Loading branch information
cech12 committed Jul 20, 2021
1 parent 12e461d commit 962a656
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- Multiple Reflectors can now be placed into one block to face in multiple directions.
- Attention: All Reflector blocks are facing to north after updating from an older mod version (sorry for that :/)
- Update mod to Forge 1.16.5-36.1.0
- Use assemble method instead of getResultItem in tile entity (see Forge 1.16.5-36.1.51)
- changed versioning to fit [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/)
- add some automated tests

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_id=solarcooker
mod_version=1.0.0.0
mod_version=1.0.0.1
minecraft_version=1.16.5
forge_version=36.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void playSound(SoundEvent soundIn) {

protected boolean canSmelt(@Nullable IRecipe<?> recipe) {
if (!this.items.get(INPUT).isEmpty() && recipe != null) {
ItemStack recipeOutput = recipe.getResultItem();
ItemStack recipeOutput = ((IRecipe<ISidedInventory>) recipe).assemble(this);
if (!recipeOutput.isEmpty()) {
ItemStack output = this.items.get(OUTPUT);
if (output.isEmpty()) return true;
Expand All @@ -301,7 +301,7 @@ protected boolean canSmelt(@Nullable IRecipe<?> recipe) {
private void smeltItem(@Nullable IRecipe<?> recipe) {
if (recipe != null && this.canSmelt(recipe)) {
ItemStack itemstack = this.items.get(INPUT);
ItemStack itemstack1 = recipe.getResultItem();
ItemStack itemstack1 = ((IRecipe<ISidedInventory>) recipe).assemble(this);
ItemStack itemstack2 = this.items.get(OUTPUT);
if (itemstack2.isEmpty()) {
this.items.set(1, itemstack1.copy());
Expand Down

0 comments on commit 962a656

Please sign in to comment.