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

Add missing wooden fuels sources such as wood tools and wood doors #61

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The aim of this mod is to fix (major) annoyances or backport useful features tha
- Never fall through boats anymore when getting out
- Pick block (middle mouse button click) works for blocks that are in the player's inventory, but not in their hotbar
- Pick block also works on: paintings, minecarts (all three types), wooden doors, iron doors, signs, crops, redstone repeaters, redstone wire, beds, piston heads and cake
- Add missing wooden items as fuel sources in furnace: wooden tools, wooden doors, boats, bowls, signs, and ladders
- Repair armor and tools
- Flowing lava now disappears when lava source block is removed
- Also: most fixes are toggleable!
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=b1.7.3-build.2
loader_version=0.14.24-babric.1

# Mod Properties
mod_version=2.0.0
mod_version=2.1.0
maven_group=com.github.telvarost
archives_base_name=AnnoyanceFix

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.github.telvarost.annoyancefix.events.init;

import net.mine_diver.unsafeevents.listener.EventListener;
import net.minecraft.block.BlockBase;
import net.minecraft.item.ItemBase;
import net.minecraft.item.ItemInstance;
import net.modificationstation.stationapi.api.event.recipe.RecipeRegisterEvent;
import net.modificationstation.stationapi.api.recipe.CraftingRegistry;
import net.modificationstation.stationapi.api.recipe.FuelRegistry;
import net.modificationstation.stationapi.api.util.Identifier;

public class RecipeListener {
Expand All @@ -13,6 +15,28 @@ public class RecipeListener {
public void registerRecipes(RecipeRegisterEvent event) {
Identifier type = event.recipeId;

if (type == RecipeRegisterEvent.Vanilla.SMELTING.type()) {
/** - 60 second fuel duration */
FuelRegistry.addFuelItem(ItemBase.boat , 1200);

/** - 15 second fuel duration */
FuelRegistry.addFuelItem(ItemBase.bow , 300);
FuelRegistry.addFuelItem(ItemBase.fishingRod , 300);
FuelRegistry.addFuelItem(BlockBase.LADDER.asItem(), 300);

/** - 10 second fuel duration */
FuelRegistry.addFuelItem(ItemBase.woodAxe , 200);
FuelRegistry.addFuelItem(ItemBase.woodHoe , 200);
FuelRegistry.addFuelItem(ItemBase.woodPickaxe , 200);
FuelRegistry.addFuelItem(ItemBase.woodShovel , 200);
FuelRegistry.addFuelItem(ItemBase.woodSword , 200);
FuelRegistry.addFuelItem(ItemBase.sign , 200);
FuelRegistry.addFuelItem(ItemBase.woodDoor , 200);

/** - 5 second fuel duration */
FuelRegistry.addFuelItem(ItemBase.bowl , 100);
}

if (type == RecipeRegisterEvent.Vanilla.CRAFTING_SHAPELESS.type()) {
/** - Armour Repair */
CraftingRegistry.addShapelessRecipe(new ItemInstance(ItemBase.leatherHelmet .id, 1, ItemBase.leatherHelmet .getDurability()), new ItemInstance(ItemBase.leatherHelmet .id, 1, -1), new ItemInstance(ItemBase.leatherHelmet .id, 1, -1));
Expand Down