Compare commits
5 commits
v2.0.0-rc.
...
main
Author | SHA1 | Date | |
---|---|---|---|
TheClashFruit | db2d06817b | ||
TheClashFruit | 88783230ea | ||
TheClashFruit | 04b0ba8ae0 | ||
TheClashFruit | 5068e3ed19 | ||
TheClashFruit | 42da315531 |
|
@ -20,7 +20,6 @@ jobs:
|
||||||
java-version: |
|
java-version: |
|
||||||
17
|
17
|
||||||
21
|
21
|
||||||
cache: 'gradle'
|
|
||||||
- name: Make Gradle Executable
|
- name: Make Gradle Executable
|
||||||
run: chmod +x ./gradlew
|
run: chmod +x ./gradlew
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
|
|
|
@ -58,8 +58,9 @@ Development is mostly straight forward.
|
||||||
|
|
||||||
1. Clone the repository from your fork.
|
1. Clone the repository from your fork.
|
||||||
2. Open the project.
|
2. Open the project.
|
||||||
3. Run `gradle genSources` to generate the sources.
|
3. You can start developing!
|
||||||
4. You can start developing!
|
|
||||||
|
<!-- 3. Run `gradle genSources` to generate the sources. -->
|
||||||
|
|
||||||
### Git Commit Messages
|
### Git Commit Messages
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
The mod has been revived from the dead!
|
The mod has been revived from the dead!
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
|
||||||
* 1.21 Support
|
* 1.21 Support
|
||||||
* !! Enchantment books are missing from the tools tab.
|
* !! Enchantment books are missing from the tools tab.
|
||||||
|
|
||||||
|
|
3
changelogs/2.0.0.md
Normal file
3
changelogs/2.0.0.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
### Fixes
|
||||||
|
* Added the tuff blocks
|
||||||
|
* Enchantment books are back in the tools tab.
|
|
@ -3,5 +3,5 @@ org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
mod.name=Cluttered Creative
|
mod.name=Cluttered Creative
|
||||||
mod.id=cc
|
mod.id=cc
|
||||||
mod.version=2.0.0-rc.1
|
mod.version=2.0.0
|
||||||
mod.group=me.theclashfruit
|
mod.group=me.theclashfruit
|
|
@ -5,7 +5,7 @@ plugins {
|
||||||
preprocess {
|
preprocess {
|
||||||
val fabric_1_21 = createNode("1.21-fabric", 1210, "yarn")
|
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_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_4 = createNode("1.20.4-fabric", 1204, "yarn")
|
||||||
val fabric_1_20_3 = createNode("1.20.3-fabric", 1203, "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")
|
val fabric_1_20_2 = createNode("1.20.2-fabric", 1202, "yarn")
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
package me.theclashfruit.cc.mixin;
|
package me.theclashfruit.cc.mixin;
|
||||||
|
|
||||||
import net.minecraft.block.Blocks;
|
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.EnchantmentLevelEntry;
|
||||||
import net.minecraft.enchantment.Enchantments;
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.item.*;
|
import net.minecraft.item.*;
|
||||||
import net.minecraft.potion.Potions;
|
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.Registry;
|
||||||
import net.minecraft.registry.RegistryKey;
|
import net.minecraft.registry.RegistryKey;
|
||||||
import net.minecraft.registry.RegistryKeys;
|
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.InstrumentTags;
|
||||||
import net.minecraft.registry.tag.ItemTags;
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
import net.minecraft.registry.tag.TagKey;
|
import net.minecraft.registry.tag.TagKey;
|
||||||
|
@ -18,6 +26,7 @@ import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
|
|
||||||
//#if MC >= 1.20.6
|
//#if MC >= 1.20.6
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.component.type.ItemEnchantmentsComponent;
|
||||||
import net.minecraft.component.type.PotionContentsComponent;
|
import net.minecraft.component.type.PotionContentsComponent;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.enchantment.EnchantmentTarget;
|
//$$ import net.minecraft.enchantment.EnchantmentTarget;
|
||||||
|
@ -26,6 +35,7 @@ import net.minecraft.component.type.PotionContentsComponent;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
import static me.theclashfruit.cc.ClutteredCreative.LOGGER;
|
import static me.theclashfruit.cc.ClutteredCreative.LOGGER;
|
||||||
import static net.minecraft.item.ItemGroups.*;
|
import static net.minecraft.item.ItemGroups.*;
|
||||||
|
@ -95,8 +105,6 @@ public class ItemGroupsMixin {
|
||||||
*/
|
*/
|
||||||
@Overwrite
|
@Overwrite
|
||||||
public static ItemGroup registerAndGetDefault(Registry<ItemGroup> registry) {
|
public static ItemGroup registerAndGetDefault(Registry<ItemGroup> registry) {
|
||||||
LOGGER.info("ItemGroups Working!");
|
|
||||||
|
|
||||||
final ItemGroup searchGroup = ItemGroup
|
final ItemGroup searchGroup = ItemGroup
|
||||||
.create(ItemGroup.Row.TOP, 6)
|
.create(ItemGroup.Row.TOP, 6)
|
||||||
.displayName(Text.translatable("itemGroup.search"))
|
.displayName(Text.translatable("itemGroup.search"))
|
||||||
|
@ -389,6 +397,13 @@ public class ItemGroupsMixin {
|
||||||
content.add(Items.CHISELED_DEEPSLATE);
|
content.add(Items.CHISELED_DEEPSLATE);
|
||||||
content.add(Items.REINFORCED_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.MELON);
|
||||||
|
|
||||||
content.add(Items.BRICK_STAIRS);
|
content.add(Items.BRICK_STAIRS);
|
||||||
|
@ -549,6 +564,12 @@ public class ItemGroupsMixin {
|
||||||
content.add(Items.DEEPSLATE_BRICK_STAIRS);
|
content.add(Items.DEEPSLATE_BRICK_STAIRS);
|
||||||
content.add(Items.DEEPSLATE_TILE_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.POLISHED_GRANITE_SLAB);
|
||||||
content.add(Items.SMOOTH_RED_SANDSTONE_SLAB);
|
content.add(Items.SMOOTH_RED_SANDSTONE_SLAB);
|
||||||
content.add(Items.MOSSY_STONE_BRICK_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_BRICK_SLAB);
|
||||||
content.add(Items.DEEPSLATE_TILE_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.DRIED_KELP_BLOCK);
|
||||||
|
|
||||||
content.add(Items.CRYING_OBSIDIAN);
|
content.add(Items.CRYING_OBSIDIAN);
|
||||||
|
@ -746,6 +773,12 @@ public class ItemGroupsMixin {
|
||||||
content.add(Items.DEEPSLATE_BRICK_WALL);
|
content.add(Items.DEEPSLATE_BRICK_WALL);
|
||||||
content.add(Items.DEEPSLATE_TILE_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.ANVIL);
|
||||||
content.add(Items.CHIPPED_ANVIL);
|
content.add(Items.CHIPPED_ANVIL);
|
||||||
content.add(Items.DAMAGED_ANVIL);
|
content.add(Items.DAMAGED_ANVIL);
|
||||||
|
@ -1524,17 +1557,26 @@ public class ItemGroupsMixin {
|
||||||
content.add(Items.SPYGLASS);
|
content.add(Items.SPYGLASS);
|
||||||
content.add(Items.SHEARS);
|
content.add(Items.SHEARS);
|
||||||
|
|
||||||
//#if MC >= 1.20.6
|
//#if MC >= 1.21
|
||||||
LOGGER.info("WHY TF 1.20.6 HAS TO FUCK SHIT UP? HOW DO I MAKE AN ENCHANTED BOOK???????????????");
|
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
|
//#else
|
||||||
//$$ content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.EFFICIENCY, 5)));
|
//$$ 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.SILK_TOUCH, 1)));
|
||||||
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.UNBREAKING, 3)));
|
//$$ 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.FORTUNE, 3)));
|
||||||
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.LUCK_OF_THE_SEA, 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.LURE, 3)));
|
||||||
//$$content.add(EnchantedBookItem.forEnchantment(new EnchantmentLevelEntry(Enchantments.MENDING, 1)));
|
//$$ 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.VANISHING_CURSE, 1)));
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
content.add(Items.LEAD);
|
content.add(Items.LEAD);
|
||||||
|
|
Loading…
Reference in a new issue