Skip to content

Commit

Permalink
Fix test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotori316 committed Dec 8, 2024
1 parent 2f5fcdc commit c27c820
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions common/src/dataGen/scala/com/yogpc/qp/data/Recipe.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import com.yogpc.qp.recipe.InstallBedrockModuleRecipe
import com.yogpc.qp.{PlatformAccess, QuarryPlus}
import net.minecraft.core.HolderLookup
import net.minecraft.core.registries.{BuiltInRegistries, Registries}
import net.minecraft.data.recipes.{RecipeCategory, RecipeOutput}
import net.minecraft.data.recipes.{RecipeCategory, RecipeOutput, RecipeProvider}
import net.minecraft.resources.{ResourceKey, ResourceLocation}
import net.minecraft.world.item.crafting.Ingredient
import net.minecraft.world.item.crafting.{Ingredient, Recipe as McRecipe}
import net.minecraft.world.item.{Item, Items}

class Recipe(ingredientProvider: IngredientProvider)(using recipeOutput: RecipeOutput, registries: HolderLookup.Provider) extends RecipeProvider(registries, recipeOutput) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.yogpc.qp.PlatformAccess;
import net.minecraft.core.BlockPos;
import net.minecraft.gametest.framework.GameTestHelper;
import net.minecraft.world.item.EnchantedBookItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.EnchantmentInstance;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.GameType;
Expand Down Expand Up @@ -97,7 +97,7 @@ public static void moveFromEnchantedBook(GameTestHelper helper) {
MoverEntity mover = helper.getBlockEntity(base);

var enchantment = getEnchantment(helper, Enchantments.EFFICIENCY);
var stack = EnchantedBookItem.createForEnchantment(new EnchantmentInstance(enchantment, 1));
var stack = EnchantmentHelper.createBook(new EnchantmentInstance(enchantment, 1));
var quarry = new ItemStack(PlatformAccess.getAccess().registerObjects().quarryBlock().get());
mover.inventory.setItem(0, stack);
mover.inventory.setItem(1, quarry);
Expand Down
2 changes: 1 addition & 1 deletion fabric/game-test/server.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Minecraft server properties
#Thu Nov 07 22:23:28 JST 2024
#Sun Dec 08 13:01:57 JST 2024
accepts-transfers=false
allow-flight=true
allow-nether=true
Expand Down
4 changes: 3 additions & 1 deletion forge/game-test/server.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Minecraft server properties
#Sun Dec 08 00:31:26 JST 2024
#Sun Dec 08 13:01:59 JST 2024
accepts-transfers=false
allow-flight=true
allow-nether=true
Expand Down Expand Up @@ -36,6 +36,7 @@ motd=GameTest Server
network-compression-threshold=256
online-mode=true
op-permission-level=4
pause-when-empty-seconds=60
player-idle-timeout=0
prevent-proxy-connections=false
previews-chat=false
Expand All @@ -59,6 +60,7 @@ spawn-npcs=false
spawn-protection=16
sync-chunk-writes=true
text-filtering-config=
text-filtering-version=0
use-native-transport=true
view-distance=10
white-list=false
2 changes: 1 addition & 1 deletion neoforge/game-test/server.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Minecraft server properties
#Thu Nov 07 22:23:28 JST 2024
#Sun Dec 08 13:01:57 JST 2024
accepts-transfers=false
allow-flight=true
allow-nether=true
Expand Down

0 comments on commit c27c820

Please sign in to comment.