Apply some lost changes to RC

This commit is contained in:
modmuss50 2021-05-29 13:35:01 +01:00
parent ec5ce65a3d
commit 8591baf420
3 changed files with 3 additions and 3 deletions

View file

@ -109,7 +109,7 @@ public class RebornCore implements ModInitializer {
RebornCoreTags.WATER_EXPLOSION_ITEM.toString(); RebornCoreTags.WATER_EXPLOSION_ITEM.toString();
/* register UnloadHandler */ /* register UnloadHandler */
ServerBlockEntityEvents.BLOCK_ENTITY_LOAD.register((blockEntity, world) -> { ServerBlockEntityEvents.BLOCK_ENTITY_UNLOAD.register((blockEntity, world) -> {
if (blockEntity instanceof UnloadHandler) ((UnloadHandler) blockEntity).onUnload(); if (blockEntity instanceof UnloadHandler) ((UnloadHandler) blockEntity).onUnload();
}); });

View file

@ -50,7 +50,7 @@ public class RebornCoreClient implements ClientModInitializer {
ItemTooltipCallback.EVENT.register(new StackToolTipHandler()); ItemTooltipCallback.EVENT.register(new StackToolTipHandler());
/* register UnloadHandler */ /* register UnloadHandler */
ClientBlockEntityEvents.BLOCK_ENTITY_LOAD.register((blockEntity, world) -> { ClientBlockEntityEvents.BLOCK_ENTITY_UNLOAD.register((blockEntity, world) -> {
if (blockEntity instanceof UnloadHandler) ((UnloadHandler) blockEntity).onUnload(); if (blockEntity instanceof UnloadHandler) ((UnloadHandler) blockEntity).onUnload();
}); });
} }

View file

@ -71,7 +71,7 @@ public class StackToolTipHandler implements ItemTooltipCallback {
tooltipLines.add(1, line1); tooltipLines.add(1, line1);
if (Screen.hasShiftDown()) { if (Screen.hasShiftDown()) {
int percentage = percentage(Energy.of(itemStack).getMaxStored(), Energy.of(itemStack).getEnergy()); int percentage = percentage(Energy.of(itemStack).getEnergy(), Energy.of(itemStack).getMaxStored());
MutableText line2 = StringUtils.getPercentageText(percentage); MutableText line2 = StringUtils.getPercentageText(percentage);
line2.append(" "); line2.append(" ");
line2.formatted(Formatting.GRAY); line2.formatted(Formatting.GRAY);