feat: add tuff stuff

This commit is contained in:
TheClashFruit 2024-07-14 15:21:15 +02:00
parent 989adfcc19
commit 42da315531
Signed by: TheClashFruit
GPG key ID: 09BB24C34C2F3204
5 changed files with 50 additions and 14 deletions

View file

@ -1,7 +1,6 @@
The mod has been revived from the dead!
### New
* 1.21 Support
* !! Enchantment books are missing from the tools tab.

4
changelogs/2.0.0-rc.2.md Normal file
View file

@ -0,0 +1,4 @@
### New
* Added Tuff Blocks for 1.21+
### Fixes

View file

@ -3,5 +3,5 @@ org.gradle.jvmargs=-Xmx2G
mod.name=Cluttered Creative
mod.id=cc
mod.version=2.0.0-rc.1
mod.version=2.0.0-rc.2
mod.group=me.theclashfruit

View file

@ -5,7 +5,7 @@ plugins {
preprocess {
val fabric_1_21 = createNode("1.21-fabric", 1210, "yarn")
val fabric_1_20_6 = createNode("1.20.6-fabric", 1206, "yarn")
val fabric_1_20_5 = createNode("1.20.5-fabric", 1205, "yarn")
val fabric_1_20_5 = createNode("1.20.5-fabric", 1205, "yarn") // broken due to upstream issues
val fabric_1_20_4 = createNode("1.20.4-fabric", 1204, "yarn")
val fabric_1_20_3 = createNode("1.20.3-fabric", 1203, "yarn")
val fabric_1_20_2 = createNode("1.20.2-fabric", 1202, "yarn")

View file

@ -1,13 +1,18 @@
package me.theclashfruit.cc.mixin;
import net.minecraft.block.Blocks;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.EnchantmentLevelEntry;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.item.*;
import net.minecraft.potion.Potions;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.registry.tag.InstrumentTags;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.registry.tag.TagKey;
@ -95,8 +100,6 @@ public class ItemGroupsMixin {
*/
@Overwrite
public static ItemGroup registerAndGetDefault(Registry<ItemGroup> registry) {
LOGGER.info("ItemGroups Working!");
final ItemGroup searchGroup = ItemGroup
.create(ItemGroup.Row.TOP, 6)
.displayName(Text.translatable("itemGroup.search"))
@ -389,12 +392,25 @@ public class ItemGroupsMixin {
content.add(Items.CHISELED_DEEPSLATE);
content.add(Items.REINFORCED_DEEPSLATE);
//#if MC >= 1.21
content.add(Items.CHISELED_TUFF);
content.add(Items.POLISHED_TUFF);
content.add(Items.TUFF_BRICKS);
content.add(Items.CHISELED_TUFF_BRICKS);
//#endif
content.add(Items.MELON);
content.add(Items.BRICK_STAIRS);
content.add(Items.STONE_BRICK_STAIRS);
content.add(Items.MUD_BRICK_STAIRS);
//#if MC >= 1.21
content.add(Items.TUFF_BRICK_STAIRS);
content.add(Items.POLISHED_TUFF_STAIRS);
content.add(Items.TUFF_STAIRS);
//#endif
content.add(Items.MYCELIUM);
content.add(Items.NETHER_BRICKS);
content.add(Items.CRACKED_NETHER_BRICKS);
@ -567,6 +583,12 @@ public class ItemGroupsMixin {
content.add(Items.DEEPSLATE_BRICK_SLAB);
content.add(Items.DEEPSLATE_TILE_SLAB);
//#if MC >= 1.21
content.add(Items.TUFF_SLAB);
content.add(Items.POLISHED_TUFF_SLAB);
content.add(Items.TUFF_BRICK_SLAB);
//#endif
content.add(Items.DRIED_KELP_BLOCK);
content.add(Items.CRYING_OBSIDIAN);
@ -746,6 +768,12 @@ public class ItemGroupsMixin {
content.add(Items.DEEPSLATE_BRICK_WALL);
content.add(Items.DEEPSLATE_TILE_WALL);
//#if MC >= 1.21
content.add(Items.TUFF_WALL);
content.add(Items.POLISHED_TUFF_WALL);
content.add(Items.TUFF_BRICK_WALL);
//#endif
content.add(Items.ANVIL);
content.add(Items.CHIPPED_ANVIL);
content.add(Items.DAMAGED_ANVIL);
@ -1524,17 +1552,22 @@ public class ItemGroupsMixin {
content.add(Items.SPYGLASS);
content.add(Items.SHEARS);
//#if MC >= 1.20.6
LOGGER.info("WHY TF 1.20.6 HAS TO FUCK SHIT UP? HOW DO I MAKE AN ENCHANTED BOOK???????????????");
//#if MC >= 1.21
LOGGER.info("WHY TF 1.21 HAS TO FUCK SHIT UP? HOW DO I MAKE AN ENCHANTED BOOK???????????????");
displayContext.lookup().getOptionalWrapper(RegistryKeys.ENCHANTMENT).ifPresent((impl) -> {
LOGGER.info(impl.getRegistryKey().getValue().getPath());
});
//#else
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.EFFICIENCY, 5)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.SILK_TOUCH, 1)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.UNBREAKING, 3)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.FORTUNE, 3)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.LUCK_OF_THE_SEA, 3)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.LURE, 3)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.MENDING, 1)));
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.VANISHING_CURSE, 1)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.SILK_TOUCH, 1)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.UNBREAKING, 3)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.FORTUNE, 3)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.LUCK_OF_THE_SEA, 3)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.LURE, 3)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.MENDING, 1)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.VANISHING_CURSE, 1)));
//#endif
content.add(Items.LEAD);