mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +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
@ -1,7 +1,6 @@
|
|||||||
package com.simibubi.create.foundation.command;
|
package com.simibubi.create.foundation.command;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
|
||||||
|
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.command.Commands;
|
import net.minecraft.command.Commands;
|
||||||
@ -9,13 +8,10 @@ import net.minecraft.command.Commands;
|
|||||||
public class CreateCommand {
|
public class CreateCommand {
|
||||||
|
|
||||||
public CreateCommand(CommandDispatcher<CommandSource> dispatcher) {
|
public CreateCommand(CommandDispatcher<CommandSource> dispatcher) {
|
||||||
// KillTPSCommand.register(dispatcher); Commented out for release
|
dispatcher.register(Commands.literal("create")
|
||||||
addCreateCommand(dispatcher, ToggleDebugCommand.register());
|
.then(ToggleDebugCommand.register())
|
||||||
addCreateCommand(dispatcher, ClearBufferCacheCommand.register());
|
.then(ClearBufferCacheCommand.register())
|
||||||
}
|
//.then(KillTPSCommand.register()) //Commented out for release
|
||||||
|
);
|
||||||
public void addCreateCommand(CommandDispatcher<CommandSource> dispatcher,
|
|
||||||
ArgumentBuilder<CommandSource, ?> register) {
|
|
||||||
dispatcher.register(Commands.literal("create").then(register));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.simibubi.create.foundation.command;
|
package com.simibubi.create.foundation.command;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
|
||||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||||
|
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
import com.simibubi.create.foundation.utility.Lang;
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ import net.minecraft.command.Commands;
|
|||||||
|
|
||||||
public class KillTPSCommand {
|
public class KillTPSCommand {
|
||||||
|
|
||||||
public static void register(CommandDispatcher<CommandSource> dispatcher) {
|
public static ArgumentBuilder<CommandSource ,?> register() {
|
||||||
dispatcher.register(Commands.literal(Lang.translate("command.killTPSCommand"))
|
return Commands.literal("killtps")
|
||||||
.requires(cs -> cs.hasPermissionLevel(2)).executes(ctx -> {
|
.requires(cs -> cs.hasPermissionLevel(2)).executes(ctx -> {
|
||||||
// killtps no arguments
|
// killtps no arguments
|
||||||
ctx.getSource().sendFeedback(
|
ctx.getSource().sendFeedback(
|
||||||
@ -63,6 +63,6 @@ public class KillTPSCommand {
|
|||||||
Lang.createTranslationTextComponent("command.killTPSCommand.status.slowed_by.2"), false);
|
Lang.createTranslationTextComponent("command.killTPSCommand.status.slowed_by.2"), false);
|
||||||
|
|
||||||
return 1;
|
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.contraptions.components.flywheel.engine.EngineBlock;
|
||||||
import com.simibubi.create.modules.curiosities.tools.AllToolTiers;
|
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.Minecraft;
|
||||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
import net.minecraft.client.resources.I18n;
|
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";
|
return stack.getItem().getTranslationKey(stack) + ".tooltip";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +188,11 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel {
|
|||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemEnchantability() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public CustomRenderedItemModel createModel(IBakedModel original) {
|
public CustomRenderedItemModel createModel(IBakedModel original) {
|
||||||
|
@ -47,7 +47,7 @@ public class SandPaperPolishingRecipe extends ProcessingRecipe<SandPaperInv> {
|
|||||||
return matchingRecipes.get(0).getCraftingResult(new SandPaperInv(stack)).copy();
|
return matchingRecipes.get(0).getCraftingResult(new SandPaperInv(stack)).copy();
|
||||||
if (stack.isDamageable() && isPolishingEnabled()) {
|
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);
|
int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, sandPaperStack);
|
||||||
float chanceToPunish = (float) (1 / Math.pow(2, fortuneLevel + 1));
|
float chanceToPunish = (float) (1 / Math.pow(2, fortuneLevel + 1));
|
||||||
|
@ -309,6 +309,8 @@
|
|||||||
"create.action.discard": "Discard",
|
"create.action.discard": "Discard",
|
||||||
|
|
||||||
"create.keyinfo.toolmenu": "Focus Tool Menu",
|
"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.defaultTitle": "Choose an Option:",
|
||||||
"create.gui.scrollInput.scrollToModify": "Scroll to Modify",
|
"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:sand_paper.desc": "Create some Sand Paper to make things pretty.",
|
||||||
"advancement.create:polished_rose_quartz": "Pink Diamonds",
|
"advancement.create:polished_rose_quartz": "Pink Diamonds",
|
||||||
"advancement.create:polished_rose_quartz.desc": "Polish Rose Quartz until you can see through it.",
|
"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:sand_paper_secret.desc": "Use your Sand Paper to sand some Sand Paper.",
|
||||||
"advancement.create:press": "'Bonk!' ",
|
"advancement.create:press": "'Bonk!' ",
|
||||||
"advancement.create:press.desc": "Make a Mechanical Press and use it to create some Plates.",
|
"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.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.",
|
"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": "REFINED RADIANCE",
|
||||||
"item.create.refined_radiance.tooltip.summary": "A Chromatic material forged from _absorbed_ _light_.",
|
"item.create.refined_radiance.tooltip.summary": "A Chromatic material forged from _absorbed_ _light_.",
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user