Skip to content

Commit

Permalink
Merge pull request #12 from SirRemus/1.19
Browse files Browse the repository at this point in the history
Fixes 1.19.3 version, thanks SirRemus for the changes
  • Loading branch information
mattymatty97 authored May 18, 2023
2 parents e23689b + 30e177a commit f8dc8bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Sat Feb 25 18:23:10 CET 2023
mod_version=1.9.6
mod_version=1.9.7
mod_buildnumber=2
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.19.3+build.5
loader_version=0.14.14
carpet_core_version=1.4.96+v230201
# Mod Properties
mod_version=1.9.6
mod_version=1.9.7
mod_suffix=-MC1.19.3+
maven_group=carpet-shadow-item
archives_base_name=carpet-shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.carpet_shadow.CarpetShadowSettings;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.context.LootContext;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -13,14 +14,15 @@
@Mixin(LootTable.class)
public class LootTableMixin {
@Inject(method = "processStacks", at=@At("RETURN"), cancellable = true)
private static void fix_survival_shulkers(Consumer<ItemStack> lootConsumer, CallbackInfoReturnable<Consumer<ItemStack>> cir){
private static void fix_survival_shulkers(LootContext lootContext, Consumer<ItemStack> lootConsumer, CallbackInfoReturnable<Consumer<ItemStack>> cir) {
Consumer<ItemStack> consumer = cir.getReturnValue();
Consumer<ItemStack> ret = itemStack -> {
if (CarpetShadowSettings.shadowItemMode != CarpetShadowSettings.Mode.UNLINK &&
itemStack.getCount() == itemStack.getMaxCount()) {
lootConsumer.accept(itemStack);
} else
consumer.accept(itemStack);
} else {
consumer.accept(itemStack);
}
};
cir.setReturnValue(ret);
}
Expand Down

0 comments on commit f8dc8bc

Please sign in to comment.