Skip to content

Commit

Permalink
Fixed tooltips and removed OldGeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
mattymatty97 committed Jun 11, 2022
1 parent 4f768a5 commit 718961c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
6 changes: 3 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Sat Jun 11 15:52:09 CEST 2022
mod_version=1.9.5
mod_buildnumber=3
#Sat Jun 11 17:33:33 CEST 2022
mod_version=1.9.6
mod_buildnumber=1
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+build.2
loader_version=0.14.7
carpet_core_version=1.4.79+v220607
# Mod Properties
mod_version=1.9.5
mod_version=1.9.6
mod_suffix=-MC1.19+
maven_group=carpet-shadow-item
archives_base_name=carpet-shadow
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/carpet_shadow/CarpetShadowSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public class CarpetShadowSettings {
public static boolean shadowItemUpdateFix = false;
@Rule(desc = "Prevent Merging any Shadow Item on base inventory movements", category = {SHADOW, OPTIMIZATION, FEATURE})
public static boolean shadowItemPreventCombine = false;
@Rule(desc = "Reintroduce Pre-1.18 shadow item generation", category = {SHADOW, EXPERIMENTAL, FEATURE})
public static boolean shadowItemOldGeneration = false;

private static class IdSizeValidator extends Validator<Integer> {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


@Mixin(ItemStack.class)
public abstract class ItemStackMixin implements ShadowItem {
public class ItemStackMixin implements ShadowItem {
private String shadow_id = null;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ private void handle_shadowing(ScreenHandler instance, int slotIndex, int button,
else if (stack2 == stack3)
shadow = stack2;

if ( CarpetShadowSettings.shadowItemOldGeneration && shadow == null && error instanceof SlotException){
if(actionType!=SlotActionType.SWAP){
player.getInventory().setStack(button,stack1);
shadow = stack1;
}else{
this.setCursorStack(stack1);
shadow = stack1;
}
}

if(shadow != null){
CarpetShadow.LOGGER.warn("New Shadow Item Created");
String shadow_id = ((ShadowItem) (Object) shadow).getShadowId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public NbtCompound add_shadow_lore(ItemStack instance) {
NbtCompound display = new NbtCompound();
if (CarpetShadowSettings.shadowItemTooltip && ((ShadowItem) (Object) instance).getShadowId() != null) {
MutableText text = MutableText.of(new LiteralTextContent("shadow_id: "));
MutableText sub = MutableText.of(new LiteralTextContent(((ShadowItem) (Object) this).getShadowId()));
MutableText sub = MutableText.of(new LiteralTextContent(((ShadowItem) (Object) instance).getShadowId()));
sub.formatted(Formatting.GOLD, Formatting.BOLD);
text.append(sub);
text.formatted(Formatting.ITALIC);
Expand Down

0 comments on commit 718961c

Please sign in to comment.