Difference between revisions of "YouTube-Tutorials-18"

From McJty Modding
Jump to: navigation, search
(1.18 Step By Step)
(1.18 Step By Step)
 
Line 117: Line 117:
 
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |Episode 8: Porting to 1.18.2
 
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |Episode 8: Porting to 1.18.2
 
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |[https://www.youtube.com/watch?v=Bw1m4guXMmQ&ab_channel=JorritTyberghein YouTube Link]
 
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |[https://www.youtube.com/watch?v=Bw1m4guXMmQ&ab_channel=JorritTyberghein YouTube Link]
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |[[Tutorial 1.18 Episode 8|Episode 8]]
+
| style="border-left:solid 1px black;border-right:solid 1px black;border-top:solid 1px black;border-bottom:solid 1px black;background-color:#66dddd;" |todo
 
|}
 
|}
  
 
===Episode 1: Basic Project Setup, first mod, first blocks, datageneration===
 
 
* [https://www.youtube.com/watch?v=BGzAbutqlyY&ab_channel=JorritTyberghein Basic Project Setup, first mod, first blocks, datageneration]
 
* [[Tutorial 1.18 Episode 1|Explanation for Episode 1]]
 
 
===Episode 2: Items, container, smelting, powergenerator, capabilities, gui===
 
 
* [https://www.youtube.com/watch?v=tv6oFjC8sq8&ab_channel=JorritTyberghein Items, container, smelting, powergenerator, capabilities]
 
* [[Tutorial 1.18 Episode 2|Explanation for Episode 2]]
 
 
===Episode 3: Baked models, Block Entity Renderer===
 
 
* [https://www.youtube.com/watch?v=FOELvN6rGPQ&ab_channel=JorritTyberghein Baked Model, Block Entity Renderer]
 
* [[Tutorial 1.18 Episode 3|Explanation for Episode 3]]
 
 
===Episode 4: Parchment, Entity===
 
 
* [https://www.youtube.com/watch?v=ydM7x27L2VM&ab_channel=JorritTyberghein Parchment, Entity]
 
* [[Tutorial 1.18 Episode 4|Explanation for Episode 4]]
 
 
===Episode 5: Ore generation, Structures, AT's, Custom Dimension===
 
 
* [https://www.youtube.com/watch?v=rilsGp8dFJA&ab_channel=JorritTyberghein Oregen, Structures, Custom Dimension]
 
* [[Tutorial 1.18 Episode 5|Explanation for Episode 5]]
 
 
===Episode 6: Configs===
 
 
* [https://www.youtube.com/watch?v=e8CdEqQ4hRM&ab_channel=JorritTyberghein Configuration]
 
* [[Tutorial 1.18 Episode 6|Explanation for Episode 6]]
 
 
===Episode 7: World data, Player Capabilities, Networking, Overlay===
 
 
* [https://www.youtube.com/watch?v=prqMxqUtj-0&ab_channel=JorritTyberghein World Data, Player Capabilities, Networking, Overlay]
 
* [[Tutorial 1.18 Episode 7|Explanation for Episode 7]]
 
 
===Episode 8: Porting to 1.18.2===
 
* [https://www.youtube.com/watch?v=Bw1m4guXMmQ&ab_channel=JorritTyberghein Porting to 1.18.2]
 
* [[Tutorial 1.18 Episode 8|Explanation for Episode 8]]
 
 
=== Global Index===
 
 
Links in the tutorials grouped by concept:
 
 
* Blocks:
 
** [[Tutorial_1.18_Episode_1#First_Simple_Blocks|Episode 1: Simple Blocks (Ores)]]
 
** [[Tutorial_1.18_Episode_2#The_Powergen_Block|Episode 2: Powergen Block]]
 
** [[Tutorial_1.18_Episode_3#The_Generator_Block|Episode 3: Generator Block]]
 
* Data generation:
 
** [[Tutorial_1.18_Episode_1#Data_Generation|Episode 1: Datagen for the ores]]
 
** [[Tutorial_1.18_Episode_2#Powergen_Datageneration|Episode 2: Datagen for Powergen Block]]
 
** [[Tutorial_1.18_Episode_3#Datagen|Episode 3: Datagen for Generator Block]]
 
** [[Tutorial_1.18_Episode_4#Datagen|Episode 4: Datagen for Entity Spawn Egg]]
 
 
Todo...
 
  
 
=== Future Subjects ===
 
=== Future Subjects ===
  
* Networking
 
* Configuration
 
 
* Commands
 
* Commands
 
* Multiblocks
 
* Multiblocks
 
* Interfacing with other mods: JEI, TOP, Curios, ...
 
* Interfacing with other mods: JEI, TOP, Curios, ...
* Custom Capability
 
* World data
 
 
* Advanced Rendering
 
* Advanced Rendering
 
* Overlay Rendering
 
* Overlay Rendering
 
* Sounds
 
* Sounds
 
* Particle Systems
 
* Particle Systems

Latest revision as of 12:40, 7 March 2022

Introduction

Everything you need to know about 1.18 modding with Forge.

Documentation

Useful links

Porting

Various bits of information to help with porting

  • Making a custom rendertype with custom shader: [1]
  • How to add entity renderers and layer renderers: [2]
  • Updating a mod from 1.16.5 to 1.17 (start with this): [3]
  • A migration tool for IntelliJ to move from 1.17 to 1.18: [4]
  • List of renames and refactors in 1.18 forge: [5]

(most of these are from gigaherz)

Some notes about BlockEntity saving: 1.18 doesn't really use save() in the same way older versions used to. If you continue overriding save, it will not work. Instead, you should override saveAdditional. If you are storing BlockEntities somewhere, don't call save. Call saveWithFullMetadata(), saveWithId() or saveWithoutMetadata(), depending on your needs.

Porting step summary

Porting steps (from 1.17):

  • Clone 1.17 version of your project (or copy it using file system)
  • Change Project JDK to Java 17
  • build.gradle: Change mappings to either parchment or official
  • build.gradle: Change forge dependency to latest version
  • build.gradle: change java target to 17
  • build.gradle and gradle.properties: set JEI and TOP dependencies
  • Update to latest gradle wrapper from MDK
  • Refresh gradle
  • genIntellijRuns
  • Switch to gradle settings: IntelliJ
  • Do the FML Legacy migration: [6]
  • Many other fixes (also check [7])
   * IForgeContainerType -> IForgeMenuType
   * Forge Constaints class -> Block
   * ClientboundBlockEntityDataPacket constructor private: use create
   * RenderWorldLastEvent -> RenderLevelLastEvent
   * Capabilities have changed: The @CapabilityInject annotation is gone. Use CapabilityManager.get(...) and the RegisterCapabilitiesEvent to register it
   * getMatrixStack() -> getPoseStack()
   * ChunkGenerator/BiomeSource changes
   * Override BlockEntity.saveAdditional() instead of save()!
   * Use RenderTooltipEvent.GatherComponents instead of RenderTooltipEvent.Pre
   * Don't override BlockEntity.save()! Instead override saveAdditional()

The Porting Tutorial

Check the two part 1.16 to 1.17 porting tutorial first:

This video follows the steps described above: Porting from 1.17 to 1.18

1.18 Step By Step

These videos will now have a table of contents for easier navigation. The github for the source code from this tutorial can be found here: TutorialV3 Github

Contents Video Wiki
Episode 1: Basic Project Setup, first mod, first blocks, datageneration YouTube Link Episode 1
Episode 2: Items, container, smelting, powergenerator, capabilities, gui YouTube Link Episode 2
Episode 3: Baked models, Block Entity Renderer YouTube Link Episode 3
Episode 4: Parchment, Entity YouTube Link Episode 4
Episode 5: Ore generation, Structures, AT's, Custom Dimension YouTube Link Episode 5
Episode 6: Configs YouTube Link Episode 6
Episode 7: World data, Player Capabilities, Networking, Overlay YouTube Link Episode 7
Episode 8: Porting to 1.18.2 YouTube Link todo


Future Subjects

  • Commands
  • Multiblocks
  • Interfacing with other mods: JEI, TOP, Curios, ...
  • Advanced Rendering
  • Overlay Rendering
  • Sounds
  • Particle Systems