Home > Store

Sams Teach Yourself Mod Development for Minecraft in 24 Hours

Register your product to gain access to bonus material or receive a coupon.

Sams Teach Yourself Mod Development for Minecraft in 24 Hours

Book

  • Sorry, this book is no longer in print.
Not for Sale

eBook (Watermarked)

  • Your Price: $22.39
  • List Price: $27.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Description

  • Copyright 2015
  • Edition: 1st
  • Book
  • ISBN-10: 0-672-33719-3
  • ISBN-13: 978-0-672-33719-2

In Full Color!
In just 24 sessions of one hour or less, Sams Teach Yourself Minecraft® Mod Development in 24 Hours will help you transform Minecraft® into anything you can imagine--and share your vision with millions of players worldwide! You’ll learn all the mod development skills you need as you walk through a complete step-by-step project, complete with a mob, new tools, new armor, food, ores, and much more. Every lesson builds on what you’ve already learned, giving you a rock-solid foundation for building any mod and creating any world!

Step-by-step instructions carefully walk you through the most common Minecraft® mod development tasks.
Quizzes and exercises at the end of each chapter help you test your knowledge.
Notes present interesting information related to the discussion.
Tips offer advice or show you easier ways to perform tasks.
Cautions alert you to possible problems and give you advice on how to avoid them.

Learn how to...

  • Set up the environment where you’ll write your mod
  • Create the basics for your mod with the Forge API
  • Establish a framework that makes it easier to build complex mods
  • Work with recipes and other small modifications
  • Create multiple recipes, items, blocks, and entities at once
  • Cook up food items that heal your players
  • Make custom pickaxes, shovels, and completely original tools
  • Use Tile Entities to create complex and unique mods
  • Create interesting custom armor for players
  • Generate entire worlds, including ores and plants
  • Design and generate new structures with MCEdit
  • Understand Entities and create Entity Models with Techne
  • Code mobs with a custom Entity Model
  • Manufacture Throwables
  • Edit Minecraft® functionality without breaking other mods
  • Structure, package, and release your mod
  • Master Java programming techniques you can use far beyond Minecraft®
This book was not created by and is not endorsed by Notch Development AB Corporation/Mojang Synergies AB Corporation.

Downloads

Downloads

Schematic Converter (285 KB .zip)

Sample Content

Online Sample Chapter

Minecraft Mod Development: Making Your First Item

Sample Pages

Download the sample pages (includes Chapter 4 and Index)

Table of Contents

Introduction¿¿¿1
Who Should Read This Book¿¿¿1
How This Book Is Organized¿¿¿2
Conventions Used¿¿¿4
Downloading the Code and Resources¿¿¿5

Part I: Introduction
HOUR 1: Setting Up the Minecraft® Development Environment¿¿¿7

Understanding How Minecraft® Is Written and What You Will Do with It¿¿¿7
Learning About Forge¿¿¿8
Setting Up the JDK¿¿¿9
Setting Up Eclipse¿¿¿16
Setting Up Forge¿¿¿16
Summary¿¿¿19
Q&A¿¿¿19
Workshop¿¿¿20
Exercises¿¿¿20
HOUR 2: Creating the Basics for Forge¿¿¿21
Understanding the Java in the ExampleMod¿¿¿21
Creating Your Own Package¿¿¿27
Creating Your Own Class File¿¿¿31
Creating the Mod File¿¿¿34
Summary¿¿¿35
Q&A¿¿¿35
Workshop¿¿¿36
Exercises¿¿¿36
HOUR 3: Working with Recipes and Other Small Modifications¿¿¿39
Learning About Recipes in Minecraft®¿¿¿39
Crafting a Recipe¿¿¿40
Creating a Shapeless Recipe¿¿¿44
Creating a Smelting Recipe¿¿¿¿45
Using Special ItemStacks¿¿¿46
Changing the Mob Spawn in a Dungeon¿¿¿48
Changing Chest Items¿¿¿49
Examining the Results in the Mod File¿¿¿49
Summary¿¿¿51
Q&A¿¿¿51
Workshop¿¿¿51
Exercises¿¿¿52

Part II: Items
HOUR 4: Making Your First Item¿¿¿53

Understanding What an Item Is¿¿¿53
Creating a Basic Item¿¿¿54
Summary¿¿¿65
Q&A¿¿¿65
Workshop¿¿¿65
Exercises¿¿¿66
HOUR 5: Creating Multiple Items in a Smart Way¿¿¿67
Adding Multiple Items Using the Same File¿¿¿67
Adding Metadata to Items¿¿¿72
Summary¿¿¿81
Q&A¿¿¿81
Workshop¿¿¿81
Exercises¿¿¿82
HOUR 6: Cooking Up a Food Item¿¿¿83
Understanding Food in Minecraft®¿¿¿83
Creating a Food Item¿¿¿84
Adding a Potion Effect¿¿¿89
Summary¿¿¿91
Q&A¿¿¿91
Workshop¿¿¿92
Exercises¿¿¿92
HOUR 7: Making Your Own Tools¿¿¿95
Creating a ToolMaterial¿¿¿95
Creating a Pickaxe¿¿¿96
Creating Special Tools for Harvesting Different Blocks¿¿¿103
Summary¿¿¿108
Q&A¿¿¿108
Workshop¿¿¿108
Exercises¿¿¿109
HOUR 8: Creating Armor¿¿¿111
Creating Your ArmorMaterial¿¿¿111
Creating the Armor¿¿¿112
Customizing Armor¿¿¿119
Summary¿¿¿119
Q&A¿¿¿120
Workshop¿¿¿120
Exercises¿¿¿121

Part III: Blocks
HOUR 9: Making Your First Block¿¿¿123

Understanding What a Block Is¿¿¿123
Creating a Basic Block¿¿¿124
Adding a Block Texture¿¿¿129
Summary¿¿¿132
Q&A¿¿¿132
Workshop¿¿¿133
Exercises¿¿¿134
HOUR 10: Creating Multiple Blocks in a Smart Way¿¿¿135
Adding Metadata to Blocks¿¿¿135
Adding Block Textures¿¿¿139
Summary¿¿¿143
Q&A¿¿¿144
Workshop¿¿¿144
Exercises¿¿¿144
HOUR 11: Making Your Blocks Unique¿¿¿145
Adding Sided Textures¿¿¿145
Making Half Blocks¿¿¿148
Creating a Plant¿¿¿152
Summary¿¿¿171
Q&A¿¿¿171
Workshop¿¿¿172
Exercises¿¿¿172
HOUR 12: Creating a Tile Entity¿¿¿175
Understanding What a Tile Entity Is¿¿¿175
Creating a Tile Entity Block¿¿¿176
Creating a Tile Entity¿¿¿180
Server Synchronization¿¿¿183
Summary¿¿¿193
Q&A¿¿¿193
Workshop¿¿¿193
Exercises¿¿¿194

Part IV: World Generation
HOUR 13: Generating Ores¿¿¿195

Using Forge and an EventHandler¿¿¿195
Creating a SamEventHandler¿¿¿195
Using OreDictionary¿¿¿202
Summary¿¿¿204
Q&A¿¿¿204
Workshop¿¿¿205
Exercises¿¿¿205
HOUR 14: Generating Plants¿¿¿207
Creating a Custom WorldGen Class¿¿¿207
Adding Code to SamEventHandler¿¿¿215
Summary¿¿¿220
Q&A¿¿¿220
Workshop¿¿¿220
Exercises¿¿¿221
HOUR 15: Using MCEdit¿¿¿223
Why Use MCEdit¿¿¿223
Getting MCEdit¿¿¿¿223
Using MCEdit¿¿¿225
Summary¿¿¿230
Q&A¿¿¿230
Workshop¿¿¿230
Exercises¿¿¿230
HOUR 16: Generating Your Structure¿¿¿231
Installing the Schematic Converter¿¿¿231
Using the Schematic Converter¿¿¿232
Adding Mobs to Your Structure¿¿¿240
Summary¿¿¿243
Q&A¿¿¿243
Workshop¿¿¿244
Exercises¿¿¿244

Part V: Entities
HOUR 17: Learning About Entities¿¿¿245

Understanding What an Entity Is¿¿¿245
Creating Proxies¿¿¿246
Creating a Basic Entity¿¿¿248
Summary¿¿¿251
Q&A¿¿¿251
Workshop¿¿¿251
Exercises¿¿¿251
HOUR 18: Creating an Entity Model Using Techne¿¿¿253
What Are Models?¿¿¿253
Downloading and Installing Techne¿¿¿254
Using Techne¿¿¿255
Summary¿¿¿263
Q&A¿¿¿263
Workshop¿¿¿263
Exercises¿¿¿264
HOUR 19: Coding a Mob¿¿¿265
Rendering the Mob¿¿¿265
Making the Mob Spawn¿¿¿272
Making EntitySamMob a Mob¿¿¿275
Summary¿¿¿281
Q&A¿¿¿281
Workshop¿¿¿282
Exercises¿¿¿282
HOUR 20: Creating a Throwable¿¿¿283
Registering a Throwable Entity¿¿¿283
Creating the Entity Class¿¿¿284
Using the Entity¿¿¿287
Rendering the Entity¿¿¿290
Summary¿¿¿293
Q&A¿¿¿293
Workshop¿¿¿294
Exercises¿¿¿294

Part VI: Final Pointers
HOUR 21: Editing Vanilla Minecraft®¿¿¿297

How to Change Minecraft® Indirectly¿¿¿297
Other Events¿¿¿303
Giving Your Armor Egg-Throwing Abilities¿¿¿303
Summary¿¿¿308
Q&A¿¿¿308
Workshop¿¿¿309
Exercises¿¿¿309
HOUR 22: Structuring Your Mod¿¿¿311
Why It Is Important to Structure Your Mod¿¿¿311
How to Structure Your Mod¿¿¿311
Summary¿¿¿322
Q&A¿¿¿322
Workshop¿¿¿322
Exercises¿¿¿323
HOUR 23: Releasing Your Mod¿¿¿325
Exporting Your Mod with Forge¿¿¿325
Making Your Mod Public¿¿¿328
Summary¿¿¿329
Q&A¿¿¿330
Workshop¿¿¿331
Exercises¿¿¿331
HOUR 24: What's Next¿¿¿333
Using IRC¿¿¿333
Using Open Source Mods¿¿¿336
Learning Java¿¿¿338
Summary¿¿¿339
Q&A¿¿¿339
Workshop¿¿¿339
Exercises¿¿¿339
APPENDIX A: Additional Code Fragments¿¿¿341
Configs¿¿¿341
Rotating Blocks¿¿¿342
Custom Block Rendering¿¿¿343
Custom Tree Generation¿¿¿350
Automatic Update Checking¿¿¿353
Custom Creative Tabs¿¿¿356
Custom TNT¿¿¿357
Changing Mob Behavior¿¿¿363
Clothes¿¿¿364
Armor Effects¿¿¿365
Creating a Custom Dimension¿¿¿367
Custom Biomes¿¿¿383
Custom AI¿¿¿384
Spawning Particles¿¿¿390
Playing Sounds¿¿¿391
Using a Model for an Item¿¿¿391
Index¿¿¿395

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020