Skip to content

Commit

Permalink
Fix tooltip typo, fix desk tooltip (terrarium-earth#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNijjar committed Aug 11, 2024
1 parent ad30765 commit 8fed040
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 36 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fix chest tag
- Fixed 1.21.1 crash when placing blocks with containers
- Fixed desk displaying the wrong tooltip (#112)
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Lev
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.CUSHION);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.CUSHION);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public BlockState getStateForPlacement(BlockPlaceContext ctx) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.CUSHION);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.CUSHION);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Lev
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.CUSHION);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.CUSHION);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.COUNTER, ConstantComponents.HAMMER_USE_LOOK);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.COUNTER, ConstantComponents.HAMMER_USE_LOOK);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER_USE_LOOK);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.HAMMER_USE_LOOK);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AABB getSeatSize(BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.PLACE_ON_FURNITURE);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.PLACE_ON_FURNITURE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.SHEET);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER_USE_LOOK);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.HAMMER_USE_LOOK);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static DirectionalBlockProperty getShape(Block block, Direction direction
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.BED_PILLOW, ConstantComponents.BED_SHEET);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.BED_PILLOW, ConstantComponents.BED_SHEET);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.SHEET);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.SHEET);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER_USE_LOOK);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.HAMMER_USE_LOOK);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.SHEET);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.SHEET);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public TableProperty getShape(BlockGetter level, BlockPos pos) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.SHEET);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.SHEET);
}

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.CROCKERY_COMBO);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.CROCKERY_COMBO);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public VoxelShape getShape(BlockState state, @NotNull BlockGetter level, @NotNul
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER_USE_SHAPE);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.HAMMER_USE_SHAPE);
}

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public BlockState getStateForPlacement(BlockPlaceContext ctx) {
}

@Override
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tootipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tootipComponents, ConstantComponents.HAMMER_USE_SHAPE, ConstantComponents.HAMMER_USE_LOOK_SHIFT);
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
TooltipUtils.addDescriptionComponent(tooltipComponents, ConstantComponents.HAMMER_USE_SHAPE, ConstantComponents.HAMMER_USE_LOOK_SHIFT);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ org.gradle.jvmargs=-Xmx2G

enabledPlatforms=fabric,neoforge

version=4.0.1
version=4.0.2
group=earth.terrarium.handcrafted

minecraftVersion=1.21.1
parchmentVersion=2024.07.28

modMenuVersion=11.0.0-beta.2
modMenuVersion=11.0.1

resourcefulLibVersion=3.0.0
resourcefulLibVersion=3.0.9

0 comments on commit 8fed040

Please sign in to comment.