Port to 1.21 (#511)

* 1.21-pre1

* progress

* fix MixinGameRenderer

* update the access widener

* pass removal reason in the player respawn event

* Update MixinGameRenderer.java

* fix more mixins

* fix more 1.21 stuff

* Update TestRegistries.java

* remove enchantments (it's data driven)

* rename 1.20.6 files to 1.21

* update to 1.21-pre4

* lol

* fix neoforge

* Finish port to 1.21

---------

Co-authored-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
Jab125
2024-06-14 03:57:55 +10:00
committed by GitHub
parent 7f76087ffb
commit 289ed46f49
42 changed files with 162 additions and 156 deletions

View File

@@ -47,6 +47,8 @@ import net.fabricmc.api.Environment;
import net.minecraft.client.renderer.entity.CowRenderer;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.registries.VanillaRegistries;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
@@ -75,9 +77,6 @@ public class TestMod {
EnvExecutor.runInEnv(Env.CLIENT, () -> TestMod.Client::initializeClient);
CreativeTabRegistry.modifyBuiltin(BuiltInRegistries.CREATIVE_MODE_TAB.get(CreativeModeTabs.BUILDING_BLOCKS), (flags, output, canUseGameMasterBlocks) -> {
ItemStack sword = Items.DIAMOND_SWORD.getDefaultInstance();
ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(ItemEnchantments.EMPTY);
mutable.set(Enchantments.SHARPNESS, 10);
sword.set(DataComponents.ENCHANTMENTS, mutable.toImmutable());
output.acceptBefore(new ItemStack(Items.OAK_WOOD), sword);
output.acceptAfter(Blocks.STRIPPED_OAK_LOG, Items.BEDROCK);
});