mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 03:53:12 +01:00
Sandpaper tag improvements
- Use already created sandpaper tag - Use previous recipe's namespace instead of Create's when converting sandpaper recipes to deployer recipes
This commit is contained in:
parent
9f558cf419
commit
b81fc66145
3 changed files with 9 additions and 10 deletions
|
@ -233,8 +233,8 @@ public class AllItems {
|
||||||
|
|
||||||
public static final ItemEntry<SandPaperItem> RED_SAND_PAPER = REGISTRATE.item("red_sand_paper", SandPaperItem::new)
|
public static final ItemEntry<SandPaperItem> RED_SAND_PAPER = REGISTRATE.item("red_sand_paper", SandPaperItem::new)
|
||||||
.transform(CreateRegistrate.customRenderedItem(() -> SandPaperModel::new))
|
.transform(CreateRegistrate.customRenderedItem(() -> SandPaperModel::new))
|
||||||
.onRegister(s -> TooltipHelper.referTo(s, SAND_PAPER))
|
|
||||||
.tag(AllTags.AllItemTags.SANDPAPER.tag)
|
.tag(AllTags.AllItemTags.SANDPAPER.tag)
|
||||||
|
.onRegister(s -> TooltipHelper.referTo(s, SAND_PAPER))
|
||||||
.register();
|
.register();
|
||||||
|
|
||||||
public static final ItemEntry<WrenchItem> WRENCH = REGISTRATE.item("wrench", WrenchItem::new)
|
public static final ItemEntry<WrenchItem> WRENCH = REGISTRATE.item("wrench", WrenchItem::new)
|
||||||
|
|
|
@ -79,13 +79,13 @@ public class AllTags {
|
||||||
SEATS(MOD),
|
SEATS(MOD),
|
||||||
VALVE_HANDLES(MOD),
|
VALVE_HANDLES(MOD),
|
||||||
UPRIGHT_ON_BELT(MOD),
|
UPRIGHT_ON_BELT(MOD),
|
||||||
|
SANDPAPER(MOD),
|
||||||
CREATE_INGOTS(MOD),
|
CREATE_INGOTS(MOD),
|
||||||
BEACON_PAYMENT(FORGE),
|
BEACON_PAYMENT(FORGE),
|
||||||
INGOTS(FORGE),
|
INGOTS(FORGE),
|
||||||
NUGGETS(FORGE),
|
NUGGETS(FORGE),
|
||||||
PLATES(FORGE),
|
PLATES(FORGE),
|
||||||
COBBLESTONE(FORGE),
|
COBBLESTONE(FORGE)
|
||||||
SANDPAPER(MOD)
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,8 @@ import java.util.function.Supplier;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.simibubi.create.AllBlocks;
|
import com.simibubi.create.AllBlocks;
|
||||||
import com.simibubi.create.AllItems;
|
|
||||||
import com.simibubi.create.AllRecipeTypes;
|
import com.simibubi.create.AllRecipeTypes;
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.AllTags.AllItemTags;
|
||||||
import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory;
|
import com.simibubi.create.compat.jei.category.sequencedAssembly.SequencedAssemblySubCategory;
|
||||||
import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe;
|
import com.simibubi.create.content.contraptions.itemAssembly.IAssemblyRecipe;
|
||||||
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
||||||
|
@ -19,8 +18,8 @@ import com.simibubi.create.foundation.utility.Lang;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.tags.ItemTags;
|
|
||||||
import net.minecraft.util.IItemProvider;
|
import net.minecraft.util.IItemProvider;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
import net.minecraft.util.text.StringTextComponent;
|
import net.minecraft.util.text.StringTextComponent;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
import net.minecraft.util.text.TranslationTextComponent;
|
||||||
|
@ -67,10 +66,10 @@ public class DeployerApplicationRecipe extends ProcessingRecipe<RecipeWrapper> i
|
||||||
|
|
||||||
public static List<DeployerApplicationRecipe> convert(List<IRecipe<?>> sandpaperRecipes) {
|
public static List<DeployerApplicationRecipe> convert(List<IRecipe<?>> sandpaperRecipes) {
|
||||||
return sandpaperRecipes.stream()
|
return sandpaperRecipes.stream()
|
||||||
.map(r -> new ProcessingRecipeBuilder<>(DeployerApplicationRecipe::new, Create.asResource(r.getId()
|
.map(r -> new ProcessingRecipeBuilder<>(DeployerApplicationRecipe::new, new ResourceLocation(r.getId().getNamespace(), r.getId()
|
||||||
.getPath() + "_using_deployer")).require(r.getIngredients()
|
.getPath() + "_using_deployer")).require(r.getIngredients()
|
||||||
.get(0))
|
.get(0))
|
||||||
.require(ItemTags.createOptional(Create.asResource("sandpaper")))
|
.require(AllItemTags.SANDPAPER.tag)
|
||||||
.output(r.getResultItem())
|
.output(r.getResultItem())
|
||||||
.build())
|
.build())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
@ -80,7 +79,7 @@ public class DeployerApplicationRecipe extends ProcessingRecipe<RecipeWrapper> i
|
||||||
public void addAssemblyIngredients(List<Ingredient> list) {
|
public void addAssemblyIngredients(List<Ingredient> list) {
|
||||||
list.add(ingredients.get(1));
|
list.add(ingredients.get(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public ITextComponent getDescriptionForAssembly() {
|
public ITextComponent getDescriptionForAssembly() {
|
||||||
|
@ -96,7 +95,7 @@ public class DeployerApplicationRecipe extends ProcessingRecipe<RecipeWrapper> i
|
||||||
public void addRequiredMachines(Set<IItemProvider> list) {
|
public void addRequiredMachines(Set<IItemProvider> list) {
|
||||||
list.add(AllBlocks.DEPLOYER.get());
|
list.add(AllBlocks.DEPLOYER.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Supplier<Supplier<SequencedAssemblySubCategory>> getJEISubCategory() {
|
public Supplier<Supplier<SequencedAssemblySubCategory>> getJEISubCategory() {
|
||||||
return () -> SequencedAssemblySubCategory.AssemblyDeploying::new;
|
return () -> SequencedAssemblySubCategory.AssemblyDeploying::new;
|
||||||
|
|
Loading…
Reference in a new issue