mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-01 21:17:45 -05:00
Update for 1.21.5-pre2
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
package dev.architectury.test.debug.client;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import dev.architectury.event.events.client.ClientGuiEvent;
|
||||
import dev.architectury.test.debug.ConsoleMessageSink;
|
||||
import net.fabricmc.api.EnvType;
|
||||
@@ -65,8 +64,6 @@ public class ClientOverlayMessageSink extends ConsoleMessageSink {
|
||||
var messageIterator = messages.iterator();
|
||||
var y = 1;
|
||||
|
||||
RenderSystem.enableBlend();
|
||||
|
||||
while (messageIterator.hasNext()) {
|
||||
var message = messageIterator.next();
|
||||
var timeExisted = (int) (currentMills - message.created);
|
||||
@@ -85,7 +82,6 @@ public class ClientOverlayMessageSink extends ConsoleMessageSink {
|
||||
}
|
||||
}
|
||||
|
||||
RenderSystem.disableBlend();
|
||||
graphics.pose().popPose();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public final class TestBlockInteractions {
|
||||
AxeItemHooks.addStrippable(Blocks.QUARTZ_PILLAR, Blocks.OAK_LOG);
|
||||
ShovelItemHooks.addFlattenable(Blocks.IRON_ORE, Blocks.DIAMOND_BLOCK.defaultBlockState());
|
||||
HoeItemHooks.addTillable(Blocks.COAL_BLOCK, ctx -> {
|
||||
return ctx.getLevel().isNight();
|
||||
return ctx.getLevel().isDarkOutside();
|
||||
}, ctx -> {
|
||||
BlockPos pos = ctx.getClickedPos();
|
||||
if (!ctx.getLevel().isClientSide) {
|
||||
|
||||
@@ -33,7 +33,6 @@ import dev.architectury.registry.registries.RegistrySupplier;
|
||||
import dev.architectury.test.TestMod;
|
||||
import dev.architectury.test.entity.TestEntity;
|
||||
import dev.architectury.test.recipes.TestRecipeSerializer;
|
||||
import dev.architectury.test.registry.objects.EquippableTickingItem;
|
||||
import dev.architectury.test.registry.objects.ItemWithTooltip;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Registry;
|
||||
@@ -114,8 +113,6 @@ public class TestRegistries {
|
||||
|
||||
public static final RegistrySupplier<Item> TEST_ITEM = ITEMS.register("test_item", () ->
|
||||
new Item(new Item.Properties().arch$tab(TestRegistries.TEST_TAB).setId(id(Registries.ITEM, "test_item"))));
|
||||
public static final RegistrySupplier<Item> TEST_EQUIPPABLE = ITEMS.register("test_eqippable", () ->
|
||||
new EquippableTickingItem(new Item.Properties().arch$tab(TestRegistries.TEST_TAB).setId(id(Registries.ITEM, "test_eqippable"))));
|
||||
public static final RegistrySupplier<Item> TEST_EDIBLE = ITEMS.register("test_edible", () -> {
|
||||
return new Item(new Item.Properties()
|
||||
.food(new FoodProperties.Builder().nutrition(8).saturationModifier(0.8F).build(),
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* This file is part of architectury.
|
||||
* Copyright (C) 2020, 2021, 2022 architectury
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package dev.architectury.test.registry.objects;
|
||||
|
||||
import dev.architectury.extensions.ItemExtension;
|
||||
import dev.architectury.test.TestMod;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EquippableTickingItem extends Item implements ItemExtension {
|
||||
public EquippableTickingItem(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickArmor(ItemStack stack, Player player) {
|
||||
TestMod.SINK.accept("Ticking " + Component.translatable(stack.getItem().getDescriptionId()).getString());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public EquipmentSlot getCustomEquipmentSlot(ItemStack stack) {
|
||||
return EquipmentSlot.HEAD;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ import java.util.Optional;
|
||||
|
||||
public class TestTrades {
|
||||
public static void init() {
|
||||
for (var villagerProfession : BuiltInRegistries.VILLAGER_PROFESSION) {
|
||||
for (var villagerProfession : BuiltInRegistries.VILLAGER_PROFESSION.registryKeySet()) {
|
||||
TradeRegistry.registerVillagerTrade(villagerProfession, 1, TestTrades.createTrades());
|
||||
}
|
||||
TradeRegistry.registerTradeForWanderingTrader(false, TestTrades.createTrades());
|
||||
|
||||
Reference in New Issue
Block a user