#1913 Improved in-game documentation via tooltips for both machines & upgrades and solar panel exception fix (#1917)
* Overclocker and energy storage tooltip added * Add default constructor to fix NoSuchMethodException java.lang.NoSuchMethodException when loading world with existing solar panels * Base Upgrade tooltips (Might move to reborn core) * Migrated to tooltip callback and added most machine infos * Optimize imports of stuff previously touched * Added more informationtips and cleanup * Revert itemUpgrade formatting * Final touches * Readd easter eggs, multi-line tips and translation updates Easter egg tooltips are now restricted to only ctrl-hover
This commit is contained in:
parent
34074d7a8a
commit
3dbc7feb62
11 changed files with 229 additions and 28 deletions
|
@ -24,21 +24,21 @@
|
|||
|
||||
package techreborn.blockentity;
|
||||
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Tickable;
|
||||
import reborncore.api.IToolDrop;
|
||||
import reborncore.common.util.ChatUtils;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.blocks.BlockAlarm;
|
||||
import techreborn.init.ModSounds;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRBlockEntities;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.MessageIDs;
|
||||
|
||||
public class AlarmBlockEntity extends BlockEntity
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package techreborn.blockentity;
|
||||
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
|
@ -68,6 +69,8 @@ public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity i
|
|||
@Override
|
||||
public void addInfo(final List<Text> info, final boolean isReal, boolean hasData) {
|
||||
super.addInfo(info, isReal, hasData);
|
||||
info.add(new LiteralText("Round and round it goes"));
|
||||
if(Screen.hasControlDown()) {
|
||||
info.add(new LiteralText("Round and round it goes"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -63,6 +63,10 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
|
||||
private SolarPanels panel;
|
||||
|
||||
public SolarPanelBlockEntity() {
|
||||
super(TRBlockEntities.SOLAR_PANEL);
|
||||
}
|
||||
|
||||
public SolarPanelBlockEntity(SolarPanels panel) {
|
||||
super(TRBlockEntities.SOLAR_PANEL);
|
||||
this.panel = panel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue