Skip to content

Commit

Permalink
V 1.6.1 - BETA-1.6.5
Browse files Browse the repository at this point in the history
Trying To BackPort to 1.16.5
  • Loading branch information
mattymatty97 committed Nov 11, 2021
1 parent 3130e74 commit 1943fa5
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 756 deletions.
4 changes: 2 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Thu Nov 11 01:33:21 CET 2021
#Thu Nov 11 21:11:45 CET 2021
mod_version=1.6.1
mod_buildnumber=1
mod_buildnumber=4
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.63
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.10
loader_version=0.12.4
carpet_core_version=1.4.52+v211104
carpet_core_version=1.4.44+v210714
# Mod Properties
mod_version=1.6.1
mod_suffix=-BETA
mod_suffix=-BETA-1.16.5
maven_group=carpet-shadow-item
archives_base_name=carpet-shadow
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.41.3+1.17
fabric_version=0.42.0+1.16
6 changes: 0 additions & 6 deletions src/main/java/com/carpet_shadow/CarpetShadowSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ public class CarpetShadowSettings {
public static boolean shadowItemPersistence = false;
@Rule(desc = "Shadow Items Id Length", category = {SHADOW, EXPERIMENTAL}, validate = {IdSizeValidator.class})
public static int shadowItemIdSize = 5;
@Rule(desc = "Show Shadow Items Id in Item Names", category = {SHADOW, EXPERIMENTAL})
public static boolean shadowItemTooltip = false;
@Rule(desc = "Prevent Unlinking Shadow Items on base inventory movements", category = {SHADOW, EXPERIMENTAL})
public static boolean shadowItemFragilityFixes = false;
@Rule(desc = "Prevent Merging Shadow Items instances on base inventory movements", category = {SHADOW, EXPERIMENTAL})
public static boolean shadowItemPreventCombine = false;

private static class IdSizeValidator extends Validator<Integer> {
@Override
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/com/carpet_shadow/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,4 @@ public static ItemStack getByIdOrNull(String shadow_id) {
return null;
}

public static ItemStack getByIdOrAdd(String shadow_id, ItemStack stack) {
Reference<ItemStack> reference = CarpetShadow.shadowMap.get(shadow_id);
if (reference != null && !reference.refersTo(null)) {
return reference.get();
}
CarpetShadow.shadowMap.put(shadow_id, new WeakReference<>(stack));
return stack;
}


public static void shadow_merge_check(ItemStack stack1, ItemStack stack2, CallbackInfoReturnable<Boolean> cir) {
if (CarpetShadowSettings.shadowItemFragilityFixes && cir.getReturnValue()) {
String shadow1 = ((ShadowItem) (Object) stack1).getShadowId();
String shadow2 = ((ShadowItem) (Object) stack2).getShadowId();
if (CarpetShadowSettings.shadowItemPreventCombine) {
if (shadow1 != null && shadow2 != null)
cir.setReturnValue(false);
} else {
if (shadow1 != null && shadow1.equals(shadow2))
cir.setReturnValue(false);
}
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1943fa5

Please sign in to comment.