YouTube-Tutorials

From McJty Modding
Jump to: navigation, search

Contents

Introduction

In this page we closely follow the YouTube tutorial but give a more textual explanation about everything. All source code for the tutorials can be found here: https://github.com/McJty/YouTubeModding14

The new tutorial is for Forge 1.15.2 and 1.16.3.

Useful Links

* GitHub: https://github.com/McJty/YouTubeModding14
* Forge: http://files.minecraftforge.net/
* Forge Forums: https://forums.minecraftforge.net/
* Official Forge Documentation: https://mcforge.readthedocs.io/en/1.15.x/
* Forge Discord: https://discord.gg/UvedJ9m
* McJty Discord: https://discord.gg/dRTtrdK
* Mappings: http://export.mcpbot.bspk.rs/
* Official Java Documentation: https://docs.oracle.com/javase/tutorial/
* Basic Java Tutorial: https://www.codecademy.com/learn/learn-java
* Online Java Course using assignments: https://java-programming.mooc.fi/



New Tutorial Series (for 1.15.2 and 1.16.3)

This new series starts where the original tutorial series ends. In this series we start from a much cleaner codebase with fewer bugs and also we start from 1.15. This series also tries to explain a lot more and helps you figure out things on your own. Don't blindly copy/paste code! Always try to understand what you're doing. In episode 11 we make the transition to 1.16.3. Except for the tutorials about the custom dimension the rest of the tutorials is mostly unchanged between 1.15.2 and 1.16.3

Episode 1: Basic Principles, Getting Information, The Basic Mod and Package Structure

In this tutorial the basic principles of modding are explained. You learn how to use the build system. How to update Forge and get the basic mod going.

* Detailed info: Episode 1
* build.gradle: https://github.com/McJty/YouTubeModding14/blob/master/build.gradle
* Main mod file: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/MyTutorial.java
* mods.toml: https://github.com/McJty/YouTubeModding14/blob/master/src/main/resources/META-INF/mods.toml
* Video: https://www.youtube.com/watch?v=gbhfKgAAmMM&feature=youtu.be

Episode 2: The First Block, Capabilities, Container, Gui

Here the first block is explained. This block has properties for direction and being powered or not. It has an inventory and it can generate power. Capabilities are explained as well as the DeferredRegistry for registering Minecraft things:

* FirstBlock: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FirstBlock.java
* FirstBlockTile: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FirstBlockTile.java
* FirstBlockContainer: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FirstBlockContainer.java
* FirstBlockScreen: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FirstBlockScreen.java
* Registration: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/setup/Registration.java
* Video: https://www.youtube.com/watch?v=r2JxNEZa58A&feature=youtu.be

Episode 3: Model for the first block, Data Generation

In this episode we explain how to make the visual model for our first block. We do this using data generation. In addition we also explain how data generation can be used to generate the jsons for recipes and loot tables. Using data generation you can avoid having to write json by hand.

* DataGenerators: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/datagen/DataGenerators.java
* BlockStates: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/datagen/BlockStates.java
* Assets directory: https://github.com/McJty/YouTubeModding14/tree/master/src/main/resources/assets/mytutorial
* Video: https://www.youtube.com/watch?v=Cyu3UIzo3b4

Episode 4: Dynamic Rendering using a Tile Entity Renderer

Here we explain the difference between static rendering (static models) and more dynamic rendering associated with tile entities. The latter you can use for doing animations and similar:

* MagicBlock: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/MagicBlock.java
* MagicRenderer: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/MagicRenderer.java
* Video: https://www.youtube.com/watch?v=AlwXJ7geL0Q

Episode 5: Baked Models and Mimicing Other Blocks

In this episode I show how you can make baked models and use them to mimic other blocks:

* FancyBlock: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FancyBlock.java
* FancyBlockTile: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FancyBlockTile.java
* FancyBakedModel: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FancyBakedModel.java
* FancyModelLoader: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FancyModelLoader.java
* Video: https://www.youtube.com/watch?v=nIWmQCJ6TGs

Episode 6: A More Complex Multipart Model

In episode 6 I show how you can make a more complex multipart model that has different configurations for all six sides. I also explain how to set up the blockstate data generation for it.

* ComplexMultipartBlock: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/ComplexMultipartBlock.java
* BlockState: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/datagen/BlockStates.java
* complex_multipart.json: https://github.com/McJty/YouTubeModding14/blob/master/src/main/resources/assets/mytutorial/blockstates/complex_multipart.json
* Assets directory: https://github.com/McJty/YouTubeModding14/tree/master/src/main/resources/assets/mytutorial/models/block
* Video: https://www.youtube.com/watch?v=y5W2vUrVn1s

Episode 7: Configuration, Commands, and Networking

This episode talks about how to do configuration, server side commands using Brigadier and networking with a small custom gui that spawns a mob.

* Config: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/setup/Config.java
* Commands: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/commands
* Networking: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/network
* SpawnerScreen: https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/gui/SpawnerScreen.java
* Video: https://www.youtube.com/watch?v=L8g9e8QZHIE

Episode 8: Entity and Custom Dimension

In this episode we talk about making a simple custom entity and also a simple custom dimension. These are the basics but can give you a good idea on how to get started into more complicated entities and dimensions.

* Entities package: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/entities
* Dimension package: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/dimension
* Video: https://www.youtube.com/watch?v=w0YaGSggwlU

Episode 9: Specialized Rendering

In this episode we cover a few extra rendering related subjects. More specifically we cover how you can use some rendering events and define your own render type.

* Event handler package: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/client
* Video: https://www.youtube.com/watch?v=B1UdR5_IgX8

Episode 10: Capabilities

In this episode we show how you can define your own capability and attach it to other objects to do something useful.

* Data package: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial/data
* Video: https://www.youtube.com/watch?v=W3SS7yP4B2s&feature=youtu.be

Episode 11: Porting to 1.16.3

In this episode we port our code to 1.16.3. Most of the explanation in this tutorial is about how dimensions are defined in 1.16.3 because that has changed a lot.

* Main package: https://github.com/McJty/YouTubeModding14/tree/master/src/main/java/com/mcjty/mytutorial
* Video: https://www.youtube.com/watch?v=p1a2Z8R3ONU&ab_channel=JorritTyberghein

Original Tutorial Series (for 1.14.4 and later 1.15.2)

This series starts with 1.14 and at some point ports to 1.15. This series works step-by-step and code is written gradually. If you like that style then this may be the best series for you to follow. On the other hand it is outdated in some respects (like it starts with 1.14) and it also contains some bugs that are fixed in later episodes or in the new series. Always reference the latest GitHub for the most up-to-date code

The first 12 episodes were made for 1.14 but are still mostly up-to-date for 1.15. Starting with episode 13 the tutorial is updated to Minecraft 1.15.

Episode 1: Setting up IDEA, Basic mod class and first block

* Video: https://www.youtube.com/watch?v=DgY6kKf5rGU&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=2&t=8s
* Explanation: Episode 1

Episode 2: Loot tables, recipes, language file and first item

* Video: https://www.youtube.com/watch?v=81oS11KdO9o&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=3&t=16s
* Explanation: Episode 2

Episode 3: Block properties, Tile Entity, Item Handler

* Video: https://www.youtube.com/watch?v=5_xFVu1DTsg&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=4&t=0s
* Explanation: Episode 3

Episode 4: Our first GUI

* Video: https://www.youtube.com/watch?v=GsV_pKkE1mo&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=5&t=0s
* Explanation: Episode 4

Episode 5: Better loot table and energy production

* Video: https://www.youtube.com/watch?v=AmLi3ySyx3Y&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=6&t=1s
* Explanation: Episode 5

Episode 6: Some fixes, sending out power, configuration and front face animation

* Video: https://www.youtube.com/watch?v=Qz5gpY37KdQ&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=7&t=3s
* Explanation: Episode 6

Episode 7: Updating to latest forge and data generators

* Video: https://www.youtube.com/watch?v=YrB39leQBVk&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=8&t=891s
* Explanation: Episode 7

Episode 8: Getting started with entities

* Video: https://www.youtube.com/watch?v=BQ3Tf1C5VfY&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=9&t=327s
* Explanation: Episode 8

Episode 9: Baked Models and Model Data

* Video: https://www.youtube.com/watch?v=hYPLL1Q-JCI&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=10&t=0s
* Explanation: Episode 9

Episode 10: Commands, Networking and Gui

* Video: https://www.youtube.com/watch?v=j-lDHIdRDXc&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=11&t=0s
* Explanation: Episode 10

Episode 11: Special Edition, McJty Mods Explained

* Video: https://www.youtube.com/watch?v=SzMeZuQ2i2o&t=795s
* Explanation: Episode 11

Episode 12: Custom Dimensions

* Video: https://www.youtube.com/watch?v=1wbtyB2yJgE&list=PLmaTwVFUUXiBKYYSyrv_uPPoPZtEsCBVJ&index=13&t=0s
* Explanation: Episode 12

Episode 13: Porting to 1.15.1 and cleanup

* Video: https://www.youtube.com/watch?v=StRmPRqksTU
* Explanation: Episode 13

Episode 14: Rendering part 1

* Video: https://www.youtube.com/watch?v=gZ-8F94UT7k&feature=youtu.be
* Explanation: Episode 14

Episode 15: Rendering part 2 and BlockState data generation

* Video: https://www.youtube.com/watch?v=DGko_dFi4N8&feature=youtu.be
* Explanation: Episode 15