These aren't actually recipes, so...

This commit is contained in:
Leo40Git
2021-08-13 12:00:20 +03:00
parent 0c1aaa98b2
commit aba773f07a
5 changed files with 14 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ public final class AxeItemHooks {
}
/**
* Adds a new stripping (interact with axe) recipe to the game.<p>
* Adds a new stripping (interact with axe) interaction to the game.<p>
*
* Note that both the input block and the result block <em>must</em> have the
* {@link net.minecraft.world.level.block.state.properties.BlockStateProperties#AXIS AXIS} property,
@@ -24,7 +24,7 @@ public final class AxeItemHooks {
* @throws IllegalArgumentException if the input or result blocks do not have the
* {@link net.minecraft.world.level.block.state.properties.BlockStateProperties#AXIS AXIS} property.
*/
public static void addStrippingRecipe(Block input, Block result) {
public static void addStrippable(Block input, Block result) {
if (!input.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))
throw new IllegalArgumentException("Input block is missing required 'AXIS' property!");
if (!result.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))

View File

@@ -15,7 +15,7 @@ public final class HoeItemHooks {
}
/**
* Adds a new tilling (interact with hoe) recipe to the game.<p>
* Adds a new tilling (interact with hoe) interaction to the game.<p>
*
* Tilling uses a predicate/consumer pair system:
* <ul>
@@ -29,7 +29,7 @@ public final class HoeItemHooks {
* @param predicate context predicate
* @param action action to run
*/
public static void addTillingRecipe(Block input, Predicate<UseOnContext> predicate, Consumer<UseOnContext> action) {
public static void addTillable(Block input, Predicate<UseOnContext> predicate, Consumer<UseOnContext> action) {
if (HoeItem.TILLABLES instanceof ImmutableMap) {
HoeItem.TILLABLES = new HashMap<>(HoeItem.TILLABLES);
}

View File

@@ -12,7 +12,7 @@ public final class ShovelItemHooks {
}
/**
* Adds a new flattening (interact with shovel) recipe to the game.<p>
* Adds a new flattening (interact with shovel) interaction to the game.<p>
*
* <b>Notes:</b>
* <ul>
@@ -24,7 +24,7 @@ public final class ShovelItemHooks {
* @param input input block
* @param result result block state
*/
public static void addFlatteningRecipe(Block input, BlockState result) {
public static void addFlattenable(Block input, BlockState result) {
if (ShovelItem.FLATTENABLES instanceof ImmutableMap) {
ShovelItem.FLATTENABLES = new HashMap<>(ShovelItem.FLATTENABLES);
}

View File

@@ -29,7 +29,7 @@ import dev.architectury.test.events.DebugEvents;
import dev.architectury.test.gamerule.TestGameRules;
import dev.architectury.test.networking.TestModNet;
import dev.architectury.test.particle.TestParticles;
import dev.architectury.test.recipe.TestRecipes;
import dev.architectury.test.item.TestBlockInteractions;
import dev.architectury.test.registry.TestRegistries;
import dev.architectury.test.registry.client.TestKeybinds;
import dev.architectury.test.tags.TestTags;
@@ -53,7 +53,7 @@ public class TestMod {
TestTrades.init();
TestParticles.initialize();
TestModNet.initialize();
TestRecipes.init();
TestBlockInteractions.init();
if (Platform.getEnvironment() == Env.CLIENT) {
initializeClient();
}

View File

@@ -1,4 +1,4 @@
package dev.architectury.test.recipe;
package dev.architectury.test.item;
import dev.architectury.hooks.item.tool.AxeItemHooks;
import dev.architectury.hooks.item.tool.HoeItemHooks;
@@ -9,14 +9,14 @@ import net.minecraft.network.chat.TextComponent;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.Blocks;
public final class TestRecipes {
private TestRecipes() {
public final class TestBlockInteractions {
private TestBlockInteractions() {
}
public static void init() {
AxeItemHooks.addStrippingRecipe(Blocks.QUARTZ_PILLAR, Blocks.OAK_LOG);
ShovelItemHooks.addFlatteningRecipe(Blocks.IRON_ORE, Blocks.DIAMOND_BLOCK.defaultBlockState());
HoeItemHooks.addTillingRecipe(Blocks.COAL_BLOCK, ctx -> {
AxeItemHooks.addStrippable(Blocks.QUARTZ_PILLAR, Blocks.OAK_LOG);
ShovelItemHooks.addFlattenable(Blocks.IRON_ORE, Blocks.DIAMOND_BLOCK.defaultBlockState());
HoeItemHooks.addTillable(Blocks.COAL_BLOCK, ctx -> {
if (!ctx.getLevel().isNight()) {
if (!ctx.getLevel().isClientSide) {
Player player = ctx.getPlayer();