Skip to content

Commit

Permalink
Merge pull request #19 from ILikeFood971/1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
RubixDev authored Jun 24, 2023
2 parents ba32259 + a0371ac commit 3f39ef2
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.1-SNAPSHOT'
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'maven-publish'
id 'com.diffplug.spotless' version '6.7.2'
}
Expand Down
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ org.gradle.jvmargs = -Xmx4G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version = 1.19.4
minecraft_minimum_version = 1.19.4
yarn_mappings = 1.19.4+build.2
loader_version = 0.14.19
minecraft_version = 1.20.1
minecraft_minimum_version = 1.20.1
yarn_mappings = 1.20.1+build.5
loader_version = 0.14.21

# Mod Properties
mod_version = 1.1.2
mod_version = 1.1.3
maven_group = de.rubixdev
archives_base_name = enchantedshulkers

# Dependencies
fabric_version = 0.78.0+1.19.4
fabric_version = 0.84.0+1.20.1
# /~https://github.com/Chocohead/Fabric-ASM/tags
fabric_asm_version = 2.3
# https://mvnrepository.com/artifact/com.moandjiezana.toml/toml4j
toml4j_version = 0.7.2
# https://modrinth.com/mod/cloth-config/versions
cloth_version = 10.0.96
cloth_version = 11.0.99
# https://modrinth.com/mod/modmenu/versions
modmenu_version = 6.1.0-rc.4
modmenu_version = 7.1.0

# Release Action properties
release_curse_versions = Minecraft 1.19:1.19.4
release_modrinth_versions = 1.19.4
release_display_version = 1.19.4
release_curse_versions = Minecraft 1.20:1.20.1
release_modrinth_versions = 1.20.1
release_display_version = 1.20.1

release_extra_branch = false
release_extra_branch_name = 1.18
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ private static int getOption(CommandContext<ServerCommandSource> context, String
// unable to fail, because `option` was provided by `getOptions()`
throw new RuntimeException(e);
}
context.getSource().sendFeedback(Text.translatable("commands.enchantedshulkers.get", option, value), false);
context.getSource()
.sendFeedback(() -> Text.translatable("commands.enchantedshulkers.get", option, value), false);
return 1;
}

Expand All @@ -44,7 +45,8 @@ private static int setOption(CommandContext<ServerCommandSource> context, String
// unable to fail, because `option` was provided by `getOptions()`
throw new RuntimeException(e);
}
context.getSource().sendFeedback(Text.translatable("commands.enchantedshulkers.set", option, value), true);
context.getSource()
.sendFeedback(() -> Text.translatable("commands.enchantedshulkers.set", option, value), true);

return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public static void onPlayerTick(
ItemStack previousOffStack) {
boolean allowsRefill = (!player.isCreative() || WorldConfig.creativeRefill()) && !inventoryOpen;
boolean swappedHands = ItemStack.areEqual(previousMainStack, currentOffStack)
&& ItemStack.areNbtEqual(previousMainStack, currentOffStack)
&& ItemStack.canCombine(previousMainStack, currentOffStack)
&& ItemStack.areEqual(currentMainStack, previousOffStack)
&& ItemStack.areNbtEqual(currentMainStack, previousOffStack);
&& ItemStack.canCombine(currentMainStack, previousOffStack);
boolean wasMainEmptied = previousMainStack.getCount() > 0 && currentMainStack.isEmpty() && !swappedHands;
boolean wasOffEmptied = previousOffStack.getCount() > 0 && currentOffStack.isEmpty() && !swappedHands;
boolean shouldRefillMain = (wasMainEmptied || ItemStack.canCombine(currentMainStack, previousMainStack))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.context.LootContext;
import net.minecraft.loot.context.LootContextParameterSet;
import net.minecraft.loot.context.LootContextParameters;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtList;
Expand All @@ -21,8 +21,8 @@
public class AbstractBlockMixin {
@Inject(method = "getDroppedStacks", at = @At("RETURN"))
public void getDroppedStacks(
BlockState state, LootContext.Builder builder, CallbackInfoReturnable<List<ItemStack>> cir) {
BlockEntity blockEntity = builder.getNullable(LootContextParameters.BLOCK_ENTITY);
BlockState state, LootContextParameterSet.Builder builder, CallbackInfoReturnable<List<ItemStack>> cir) {
BlockEntity blockEntity = builder.getOptional(LootContextParameters.BLOCK_ENTITY);
List<ItemStack> drops = cir.getReturnValue();

if (!(blockEntity instanceof EnchantableBlockEntity enchantableBlockEntity)) return;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"accessWidener": "enchantedshulkers.accesswidener",

"depends": {
"fabricloader": ">=0.14.6",
"fabricloader": ">=0.14.21",
"fabric": "*",
"minecraft": ">=1.19",
"minecraft": ">=1.20.1",
"java": ">=17"
},
"suggests": {
Expand Down

0 comments on commit 3f39ef2

Please sign in to comment.