-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package nl.enjarai.omnihopper.util; | ||
|
||
import net.minecraft.client.item.TooltipContext; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.text.Style; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.util.Formatting; | ||
import net.minecraft.util.Identifier; | ||
import net.minecraft.util.Util; | ||
import net.minecraft.world.World; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
public interface HasTooltip { | ||
default void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context, Identifier id) { | ||
tooltip.add(Text.translatable(Util.createTranslationKey("item", modifyTooltipId(id)) + ".tooltip") | ||
.setStyle(Style.EMPTY.withColor(Formatting.DARK_GRAY))); | ||
} | ||
|
||
default Identifier modifyTooltipId(Identifier id) { | ||
return id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/resources/data/omnihopper/recipes/wooden_hopper.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": [ | ||
"w w", | ||
"wCw", | ||
" w " | ||
], | ||
"key": { | ||
"C": { | ||
"item": "minecraft:chest" | ||
}, | ||
"w": { | ||
"tag": "minecraft:planks" | ||
} | ||
}, | ||
"result": { | ||
"item": "omnihopper:wooden_hopper" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/resources/data/omnihopper/recipes/wooden_omnihopper.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"ingredients": [ | ||
{ | ||
"item": "omnihopper:wooden_hopper" | ||
}, | ||
{ | ||
"item": "minecraft:copper_ingot" | ||
} | ||
], | ||
"result": { | ||
"item": "omnihopper:wooden_omnihopper" | ||
} | ||
} |