Skip to content

Commit

Permalink
Missed a config value
Browse files Browse the repository at this point in the history
  • Loading branch information
gigabit101 committed Nov 24, 2023
1 parent 54a9bb5 commit 2c728ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public double getScale(ItemStack stack)
{
ItemStack stack = player.getItemInHand(interactionHand);
AttributeInstance shrink = player.getAttribute(ShrinkAPI.SCALE_ATTRIBUTE);
if (shrink == null)
{
player.displayClientMessage(Component.literal("Shrink Attribute Missing???"), false);
return InteractionResultHolder.fail(stack);
}

if (player.isShiftKeyDown())
{
Expand Down Expand Up @@ -100,7 +95,7 @@ public double getScale(ItemStack stack)
}
}
else {
player.displayClientMessage(Component.literal("IT BROKEN"), false);
player.displayClientMessage(Component.translatable("shrink.message.missing"), false);
}
return super.use(level, player, interactionHand);
}
Expand Down Expand Up @@ -132,7 +127,7 @@ public AbstractContainerMenu createMenu(int id, Inventory inventory, Player play
@Override
public WrappedItemEnergyContainer getEnergyStorage(ItemStack holder)
{
return energyContainer == null ? this.energyContainer = new WrappedItemEnergyContainer(holder, new SimpleEnergyContainer(10000)) : this.energyContainer;
return energyContainer == null ? this.energyContainer = new WrappedItemEnergyContainer(holder, new SimpleEnergyContainer(Shrink.shrinkConfig.shrinkingDeviceCapacity)) : this.energyContainer;
}

@Override
Expand Down
4 changes: 3 additions & 1 deletion common/src/main/resources/assets/shrink/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@
"key.shrink.shrink": "Toggle Shrink",
"shrink.deny_shrink": "Blocked shrinking of entity due to deny tag",
"shrink.message.already_shrunk": "Unable to open while already shrunk",
"shrink.message.power": "Not enough power"
"shrink.message.power": "Not enough power",
"shrink.message.missing": "Shrink Attribute Missing"

}

0 comments on commit 2c728ee

Please sign in to comment.