Skip to Content
Minecraft Modding with Forge
book

Minecraft Modding with Forge

by Aditya Gupta, Arun Gupta
April 2015
Intermediate content levelIntermediate
200 pages
4h 17m
English
O'Reilly Media, Inc.
Content preview from Minecraft Modding with Forge

Appendix B. Eclipse Shortcuts and Correct Imports

Eclipse Shortcuts

Eclipse is a very powerful tool and includes lots of options for editing Java. These options can be accessed using different menus. However, sometimes clicking menu items for repetitive tasks can be cumbersome or boring, so Eclipse enables some helpful shortcuts that allow you to become a better modder. For example, the Import shortcut can be very useful if you have a lot of classes to import.

Table B-1 provides a handy list of shortcuts (note that there are different shortcuts depending on your platform).

Table B-1. Eclipse shortcuts
Usage Windows shortcut Mac shortcut

Save the current file

Ctrl-S

Cmd-S

Import everything

Ctrl-Shift-O

Cmd-Shift-O

Comment the selected text

Ctrl-/

Cmd-/

Uncomment the selected text

Ctrl-/

Cmd-/

Show options for code completion

Ctrl-Space

Control-Space

Quick fix for errors and warnings, depends on the cursor position

Ctrl-1

Control-1

Rename the selected element

Alt-Shift-R

Alt-Cmd-R

Format source code

Ctrl-Shift-F

Control-Shift-F

Maximize Java editor

Ctrl-M

Cmd-M

Run Minecraft

Ctrl-F11

Cmd-Fn-F11

Complete list of shortcuts

Ctrl-Shift-L

Cmd-Shift-L

Correct Imports

Different Java packages can have classes with the same name. Obviously, only a class from a particular package will serve the intended purpose for our code. So, when importing classes during mod creation, it’s important to pick the right package.

This can be easily done using Ctrl-Shift-O ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Minecraft Modding with Forge

Minecraft Modding with Forge

Aditya Gupta, Arun Gupta

Publisher Resources

ISBN: 9781491918883Errata Page