mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-26 06:57:02 +01:00
added a tooltip to sandpaper
- sandpaper is now enchantable - sandpaper now repairs tools for 50% of the current damage
This commit is contained in:
parent
c3f781b762
commit
90316ae8ca
6 changed files with 27 additions and 15 deletions
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.foundation.command;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.command.Commands;
|
||||
|
@ -9,13 +8,10 @@ import net.minecraft.command.Commands;
|
|||
public class CreateCommand {
|
||||
|
||||
public CreateCommand(CommandDispatcher<CommandSource> dispatcher) {
|
||||
// KillTPSCommand.register(dispatcher); Commented out for release
|
||||
addCreateCommand(dispatcher, ToggleDebugCommand.register());
|
||||
addCreateCommand(dispatcher, ClearBufferCacheCommand.register());
|
||||
}
|
||||
|
||||
public void addCreateCommand(CommandDispatcher<CommandSource> dispatcher,
|
||||
ArgumentBuilder<CommandSource, ?> register) {
|
||||
dispatcher.register(Commands.literal("create").then(register));
|
||||
dispatcher.register(Commands.literal("create")
|
||||
.then(ToggleDebugCommand.register())
|
||||
.then(ClearBufferCacheCommand.register())
|
||||
//.then(KillTPSCommand.register()) //Commented out for release
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.simibubi.create.foundation.command;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
|
||||
|
@ -10,8 +10,8 @@ import net.minecraft.command.Commands;
|
|||
|
||||
public class KillTPSCommand {
|
||||
|
||||
public static void register(CommandDispatcher<CommandSource> dispatcher) {
|
||||
dispatcher.register(Commands.literal(Lang.translate("command.killTPSCommand"))
|
||||
public static ArgumentBuilder<CommandSource ,?> register() {
|
||||
return Commands.literal("killtps")
|
||||
.requires(cs -> cs.hasPermissionLevel(2)).executes(ctx -> {
|
||||
// killtps no arguments
|
||||
ctx.getSource().sendFeedback(
|
||||
|
@ -63,6 +63,6 @@ public class KillTPSCommand {
|
|||
Lang.createTranslationTextComponent("command.killTPSCommand.status.slowed_by.2"), false);
|
||||
|
||||
return 1;
|
||||
})));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.simibubi.create.modules.contraptions.base.IRotate;
|
|||
import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineBlock;
|
||||
import com.simibubi.create.modules.curiosities.tools.AllToolTiers;
|
||||
|
||||
import com.simibubi.create.modules.curiosities.tools.SandPaperItem;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
@ -177,6 +178,9 @@ public class TooltipHelper {
|
|||
}
|
||||
}
|
||||
|
||||
if (stack.getItem() instanceof SandPaperItem)
|
||||
return "tool.create.sand_paper.tooltip";
|
||||
|
||||
return stack.getItem().getTranslationKey(stack) + ".tooltip";
|
||||
}
|
||||
|
||||
|
|
|
@ -188,6 +188,11 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel {
|
|||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public CustomRenderedItemModel createModel(IBakedModel original) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class SandPaperPolishingRecipe extends ProcessingRecipe<SandPaperInv> {
|
|||
return matchingRecipes.get(0).getCraftingResult(new SandPaperInv(stack)).copy();
|
||||
if (stack.isDamageable() && isPolishingEnabled()) {
|
||||
|
||||
stack.setDamage(stack.getDamage() - (stack.getMaxDamage() - stack.getDamage()) / 2);
|
||||
stack.setDamage(stack.getDamage() / 2);
|
||||
|
||||
int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, sandPaperStack);
|
||||
float chanceToPunish = (float) (1 / Math.pow(2, fortuneLevel + 1));
|
||||
|
|
|
@ -309,6 +309,8 @@
|
|||
"create.action.discard": "Discard",
|
||||
|
||||
"create.keyinfo.toolmenu": "Focus Tool Menu",
|
||||
"create.keyinfo.scrollup": "Simulate Mousewheel Up (inworld)",
|
||||
"create.keyinfo.scrolldown": "Simulate Mousewheel Down (inworld)",
|
||||
|
||||
"create.gui.scrollInput.defaultTitle": "Choose an Option:",
|
||||
"create.gui.scrollInput.scrollToModify": "Scroll to Modify",
|
||||
|
@ -625,7 +627,7 @@
|
|||
"advancement.create:sand_paper.desc": "Create some Sand Paper to make things pretty.",
|
||||
"advancement.create:polished_rose_quartz": "Pink Diamonds",
|
||||
"advancement.create:polished_rose_quartz.desc": "Polish Rose Quartz until you can see through it.",
|
||||
"advancement.create:sand_paper_secret": "Polishception",
|
||||
"advancement.create:sand_paper_secret": "9001 Grit Sand Paper",
|
||||
"advancement.create:sand_paper_secret.desc": "Use your Sand Paper to sand some Sand Paper.",
|
||||
"advancement.create:press": "'Bonk!' ",
|
||||
"advancement.create:press.desc": "Make a Mechanical Press and use it to create some Plates.",
|
||||
|
@ -1115,6 +1117,11 @@
|
|||
"block.create.stress_gauge.tooltip.condition1": "When Rotated",
|
||||
"block.create.stress_gauge.tooltip.behaviour1": "Indicates a color corresponding to the level of stress. _Over-stressed_ _networks_ will cease to move. Stress can be relieved by adding more _rotational_ _sources_ to the network.",
|
||||
|
||||
"tool.create.sand_paper.tooltip": "SAND PAPER",
|
||||
"tool.create.sand_paper.tooltip.summary": "A rough paper that can be used to _polish_ _materials_ or sharpen your _tools_.",
|
||||
"tool.create.sand_paper.tooltip.condition1": "When Used",
|
||||
"tool.create.sand_paper.tooltip.behaviour1": "Applies polish to items held in the _offhand_ or lying on the _floor_ when _looking_ _at_ _them_",
|
||||
|
||||
"item.create.refined_radiance.tooltip": "REFINED RADIANCE",
|
||||
"item.create.refined_radiance.tooltip.summary": "A Chromatic material forged from _absorbed_ _light_.",
|
||||
|
||||
|
|
Loading…
Reference in a new issue