GuideBook (WIP) fix
This commit is contained in:
parent
88afa6a2c9
commit
08e31b8743
8 changed files with 22 additions and 13 deletions
|
@ -57,6 +57,7 @@ def useApi(String dep) {
|
||||||
exclude group: "me.shedaniel"
|
exclude group: "me.shedaniel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dependencies.include(dep)
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
|
|
@ -6,21 +6,21 @@ import net.minecraft.client.item.TooltipContext;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.text.Style;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.text.TextColor;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.text.TranslatableText;
|
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.TypedActionResult;
|
import net.minecraft.util.TypedActionResult;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
|
import ru.betterend.util.LangUtil;
|
||||||
|
|
||||||
import vazkii.patchouli.api.PatchouliAPI;
|
import vazkii.patchouli.api.PatchouliAPI;
|
||||||
|
|
||||||
public class GuideBook extends PatternedItem {
|
public class GuideBook extends PatternedItem {
|
||||||
|
|
||||||
private static final Style TEXT_STYLE = Style.EMPTY.withColor(TextColor.fromRgb(0x7e6b9a)).withItalic(true);
|
|
||||||
public final static Identifier BOOK_ID = BetterEnd.makeID("guidebook");
|
public final static Identifier BOOK_ID = BetterEnd.makeID("guidebook");
|
||||||
|
|
||||||
public GuideBook() {
|
public GuideBook() {
|
||||||
|
@ -38,6 +38,6 @@ public class GuideBook extends PatternedItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
|
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
|
||||||
tooltip.add(new TranslatableText("book.betterend.subtitle").setStyle(TEXT_STYLE));
|
tooltip.add(LangUtil.getText("book.betterend", "subtitle").formatted(Formatting.DARK_PURPLE, Formatting.ITALIC));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,16 @@ import ru.betterend.registry.EndItems;
|
||||||
public class SmithingRecipes {
|
public class SmithingRecipes {
|
||||||
public static void register() {
|
public static void register() {
|
||||||
AnvilSmithingRecipe.Builder.create("ender_pearl_to_dust")
|
AnvilSmithingRecipe.Builder.create("ender_pearl_to_dust")
|
||||||
.setInput(Items.ENDER_PEARL, EndItems.ENDER_SHARD)
|
.setInput(Items.ENDER_PEARL)
|
||||||
.setOutput(EndItems.ENDER_DUST, 1)
|
.setOutput(EndItems.ENDER_DUST, 1)
|
||||||
.setLevel(4)
|
.setLevel(4)
|
||||||
.setDamage(5)
|
.setDamage(5)
|
||||||
.build();
|
.build();
|
||||||
|
AnvilSmithingRecipe.Builder.create("ender_shard_to_dust")
|
||||||
|
.setInput(EndItems.ENDER_SHARD)
|
||||||
|
.setOutput(EndItems.ENDER_DUST, 1)
|
||||||
|
.setLevel(2)
|
||||||
|
.setDamage(3)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,8 @@ public class EndItems {
|
||||||
|
|
||||||
// Other //
|
// Other //
|
||||||
public static final Item ETERNAL_CRYSTAL = registerItem("eternal_crystal", new EternalCrystal());
|
public static final Item ETERNAL_CRYSTAL = registerItem("eternal_crystal", new EternalCrystal());
|
||||||
public static final Item GUIDE_BOOK = registerItem(GuideBook.BOOK_ID, new GuideBook());
|
public static final Item GUIDE_BOOK = EndItems.registerItem(GuideBook.BOOK_ID, new GuideBook());
|
||||||
|
|
||||||
|
|
||||||
protected static Item registerItem(String name) {
|
protected static Item registerItem(String name) {
|
||||||
return registerItem(BetterEnd.makeID(name), new PatternedItem(makeItemSettings()));
|
return registerItem(BetterEnd.makeID(name), new PatternedItem(makeItemSettings()));
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"itemGroup.betterend.end_blocks": "Better End: Blocks",
|
"itemGroup.betterend.end_blocks": "Better End: Blocks",
|
||||||
|
|
||||||
"item.betterend.guidebook": "The End for Dummies",
|
"item.betterend.guidebook": "The End for Dummies",
|
||||||
"book.betterend.landing_text": "A short guide about surviving in the extreme conditions of The End.",
|
"book.betterend.landing": "A short guide about surviving in the extreme conditions of The End.",
|
||||||
"book.betterend.subtitle": "Survive in The End",
|
"book.betterend.subtitle": "Survive in The End",
|
||||||
|
|
||||||
"category.rei.damage.amount&dmg": "Tool damage: %s",
|
"category.rei.damage.amount&dmg": "Tool damage: %s",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"itemGroup.betterend.end_blocks": "Better End: Блоки",
|
"itemGroup.betterend.end_blocks": "Better End: Блоки",
|
||||||
|
|
||||||
"item.betterend.guidebook": "Край для чайников",
|
"item.betterend.guidebook": "Край для чайников",
|
||||||
"book.betterend.landing_text": "Краткое руководство по выживанию в экстремальных условиях Края.",
|
"book.betterend.landing": "Краткое руководство по выживанию в экстремальных условиях Края.",
|
||||||
"book.betterend.subtitle": "Выживание в Краю",
|
"book.betterend.subtitle": "Выживание в Краю",
|
||||||
|
|
||||||
"category.rei.damage.amount&dmg": "Износ инструмента: %s",
|
"category.rei.damage.amount&dmg": "Износ инструмента: %s",
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "item.betterend.guidebook",
|
"name": "item.betterend.guidebook",
|
||||||
"landing_text": "book.betterend.landing_text",
|
|
||||||
"subtitle": "book.betterend.subtitle",
|
"subtitle": "book.betterend.subtitle",
|
||||||
"creative_tab": "betterend.end_items",
|
"landing_text": "book.betterend.landing",
|
||||||
"custom_book_item": "betterend:guidebook",
|
"custom_book_item": "betterend:guidebook",
|
||||||
"model": "betterend:guide_book",
|
"book_texture": "patchouli:textures/gui/book_green.png",
|
||||||
|
"creative_tab": "betterend.end_items",
|
||||||
|
"model": "betterend:guidebook",
|
||||||
"dont_generate_book": true,
|
"dont_generate_book": true,
|
||||||
"show_progress": false,
|
"show_progress": false,
|
||||||
"version": 1
|
"version": 1
|
Loading…
Add table
Add a link
Reference in a new issue