Compare commits

...

5 commits

Author SHA1 Message Date
TheClashFruit db2d06817b
feat (ci): remove gradle cache as it's broken
All checks were successful
Build Project / build (push) Successful in 15m36s
2024-07-14 17:26:45 +02:00
TheClashFruit 88783230ea
fix: remove unused imports
Some checks failed
Build Project / build (push) Has been cancelled
2024-07-14 17:25:40 +02:00
TheClashFruit 04b0ba8ae0
fix: add the enchantment books back to the tools tab for 1.21 2024-07-14 17:23:33 +02:00
TheClashFruit 5068e3ed19
docs: remove gradle genSources instruction 2024-07-14 15:31:38 +02:00
TheClashFruit 42da315531
feat: add tuff stuff 2024-07-14 15:21:15 +02:00
7 changed files with 61 additions and 17 deletions

View file

@ -20,7 +20,6 @@ jobs:
java-version: |
17
21
cache: 'gradle'
- name: Make Gradle Executable
run: chmod +x ./gradlew
- name: Build with Gradle

View file

@ -58,8 +58,9 @@ Development is mostly straight forward.
1. Clone the repository from your fork.
2. Open the project.
3. Run `gradle genSources` to generate the sources.
4. You can start developing!
3. You can start developing!
<!-- 3. Run `gradle genSources` to generate the sources. -->
### Git Commit Messages

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.

3
changelogs/2.0.0.md Normal file
View file

@ -0,0 +1,3 @@
### Fixes
* Added the tuff blocks
* Enchantment books are back in the tools tab.

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
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,21 @@
package me.theclashfruit.cc.mixin;
import net.minecraft.block.Blocks;
import net.minecraft.client.gui.screen.ingame.EnchantmentScreen;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.EnchantmentLevelEntry;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.Entity;
import net.minecraft.item.*;
import net.minecraft.potion.Potions;
import net.minecraft.predicate.item.EnchantmentPredicate;
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;
@ -18,6 +26,7 @@ import org.spongepowered.asm.mixin.gen.Invoker;
//#if MC >= 1.20.6
import net.minecraft.util.Identifier;
import net.minecraft.component.type.ItemEnchantmentsComponent;
import net.minecraft.component.type.PotionContentsComponent;
//#else
//$$ import net.minecraft.enchantment.EnchantmentTarget;
@ -26,6 +35,7 @@ import net.minecraft.component.type.PotionContentsComponent;
import java.util.EnumSet;
import java.util.Set;
import java.util.stream.IntStream;
import static me.theclashfruit.cc.ClutteredCreative.LOGGER;
import static net.minecraft.item.ItemGroups.*;
@ -95,8 +105,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,6 +397,13 @@ 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);
@ -549,6 +564,12 @@ public class ItemGroupsMixin {
content.add(Items.DEEPSLATE_BRICK_STAIRS);
content.add(Items.DEEPSLATE_TILE_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.POLISHED_GRANITE_SLAB);
content.add(Items.SMOOTH_RED_SANDSTONE_SLAB);
content.add(Items.MOSSY_STONE_BRICK_SLAB);
@ -567,6 +588,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 +773,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,8 +1557,17 @@ 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
displayContext.lookup().getOptionalWrapper(RegistryKeys.ENCHANTMENT).ifPresent(impl -> {
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.EFFICIENCY), 5)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.SILK_TOUCH), 1)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.UNBREAKING), 3)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.FORTUNE), 3)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.LUCK_OF_THE_SEA), 3)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.LURE), 3)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.MENDING), 1)));
content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(impl.getOrThrow(Enchantments.VANISHING_CURSE), 1)));
});
//#else
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.EFFICIENCY, 5)));
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.SILK_TOUCH, 1)));