Skip to content

Commit

Permalink
New Written Book Texture, Dutch Translation, Fix Furnace Giving XP Early
Browse files Browse the repository at this point in the history
  • Loading branch information
hammy275 committed Oct 26, 2023
1 parent 5aef54b commit 9132d19
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class WrittenBookImmersive extends AbstractItemImmersive<WrittenBookInfo>
*/

public static final BookModel bookModel = new BookModel(Minecraft.getInstance().getEntityModels().bakeLayer(ModelLayers.BOOK));
public static final ResourceLocation writtenBookTexture = new ResourceLocation(ImmersiveMC.MOD_ID, "written_book.png");
public static final ResourceLocation writtenBookTexture = new ResourceLocation(ImmersiveMC.MOD_ID, "nahnotfox_written_book.png");

// User Controlled
public static final float scaleSize = 1f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,19 +385,26 @@ public static void handleFurnaceSwap(WorldlyContainer furnace, Player player,
Util.placeLeftovers(player, result.leftovers);
}
} else {
boolean itemTaken = false;
if (playerItem.isEmpty()) {
player.setItemInHand(hand, furnaceItem);
furnace.setItem(2, playerItem);
itemTaken = true;
} else if (Util.stacksEqualBesidesCount(furnaceItem, playerItem)) {
int beforeGrabCount = furnace.getItem(2).getCount();
Util.ItemStackMergeResult result = Util.mergeStacks(playerItem, furnaceItem, false);
player.setItemInHand(hand, result.mergedInto);
furnace.setItem(slot, result.mergedFrom);
itemTaken = furnace.getItem(2).isEmpty() || furnace.getItem(2).getCount() < beforeGrabCount;
}

// Experience and recipes reward
if (player instanceof ServerPlayer sp && furnace instanceof AbstractFurnaceBlockEntity furnaceBE) {
// Experience and recipes reward. Given only if at least one item was taken. This is the same as
// vanilla behavior.
if (itemTaken && player instanceof ServerPlayer sp && furnace instanceof AbstractFurnaceBlockEntity furnaceBE) {
furnaceBE.awardUsedRecipesAndPopExperience(sp);
}


}
furnace.setChanged();
}
Expand Down
160 changes: 160 additions & 0 deletions common/src/main/resources/assets/immersivemc/lang/nl_nl.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "immersivemc",
"version": "${version}",
"name": "ImmersiveMC",
"description": "Minimizes the need to interact with GUIs in Minecraft!\n\nWorks great both in and out of VR!\n\nRequires the MC VR API mod if you want to use this the best in VR!\n\nThanks to NahNotFox for the bundle bag model (the default)!\n\nThanks to:\n- yaosiqian for Simplified Chinese translations!\n- Yermak for the Russian translations!\n- DadoSpeedy for the German translations!\n\nThanks to the Vivecraft developers for inspiration for the backpack, and to various members of the Discord for ideas!\n\nThanks to the guide from leo3418 for the Config Screen!",
"description": "Minimizes the need to interact with GUIs in Minecraft!\n\nWorks great both in and out of VR!\n\nRequires the MC VR API mod if you want to use this the best in VR!\n\nThanks to NahNotFox for the bundle bag model (the default) and the written book texture!\n\nThanks to:\n- yaosiqian for Simplified Chinese translations!\n- Yermak for the Russian translations!\n- DadoSpeedy for the German translations!\n- stitch._.vr_ for the Dutch translations!\n\nThanks to the Vivecraft developers for inspiration for the backpack, and to various members of the Discord for ideas!\n\nThanks to the guide from leo3418 for the Config Screen!",
"authors": [
"hammy275"
],
Expand Down
3 changes: 2 additions & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ Works great both in and out of VR!
Requires the MC VR API mod if you want to use this the best in VR!
Thanks to NahNotFox for the bundle bag model (the default)!
Thanks to NahNotFox for the bundle bag model (the default) and the written book texture!
Thanks to:
- yaosiqian for Simplified Chinese translations!
- Yermak for the Russian translations!
- DadoSpeedy for the German translations!
- stitch._.vr_ for the Dutch translations!
Thanks to the Vivecraft developers for inspiration for the backpack, and to various members of the Discord for ideas!
Expand Down
2 changes: 1 addition & 1 deletion quilt/src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "immersivemc",
"version": "${version}",
"name": "ImmersiveMC",
"description": "Minimizes the need to interact with GUIs in Minecraft!\n\nWorks great both in and out of VR!\n\nRequires the MC VR API mod if you want to use this the best in VR!\n\nThanks to NahNotFox for the bundle bag model (the default)!\n\nThanks to:\n- yaosiqian for Simplified Chinese translations!\n- Yermak for the Russian translations!\n- DadoSpeedy for the German translations!\n\nThanks to the Vivecraft developers for inspiration for the backpack, and to various members of the Discord for ideas!\n\nThanks to the guide from leo3418 for the Config Screen!",
"description": "Minimizes the need to interact with GUIs in Minecraft!\n\nWorks great both in and out of VR!\n\nRequires the MC VR API mod if you want to use this the best in VR!\n\nThanks to NahNotFox for the bundle bag model (the default) and the written book texture!\n\nThanks to:\n- yaosiqian for Simplified Chinese translations!\n- Yermak for the Russian translations!\n- DadoSpeedy for the German translations!\n- stitch._.vr_ for the Dutch translations!\n\nThanks to the Vivecraft developers for inspiration for the backpack, and to various members of the Discord for ideas!\n\nThanks to the guide from leo3418 for the Config Screen!",
"authors": ["hammy275"],
"license": "GNU LGPLv3",
"icon": "immersivemc_logo.png",
Expand Down

0 comments on commit 9132d19

Please sign in to comment.