Add a clientside mod example
This commit is contained in:
		
							parent
							
								
									b662ed74bf
								
							
						
					
					
						commit
						a98ab6bf99
					
				@ -2,7 +2,7 @@ package net.fabricmc.example;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import net.fabricmc.api.ModInitializer;
 | 
					import net.fabricmc.api.ModInitializer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class ExampleMod implements ModInitializer {
 | 
					public class ExampleMod implements ModInitializer, ClientModInitializer {
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void onInitialize() {
 | 
						public void onInitialize() {
 | 
				
			||||||
		// This code runs as soon as Minecraft is in a mod-load-ready state.
 | 
							// This code runs as soon as Minecraft is in a mod-load-ready state.
 | 
				
			||||||
@ -11,4 +11,13 @@ public class ExampleMod implements ModInitializer {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		System.out.println("Hello Fabric world!");
 | 
							System.out.println("Hello Fabric world!");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						@Override
 | 
				
			||||||
 | 
						public void onInitializeClient() {
 | 
				
			||||||
 | 
							// This code runs on the client side only, and should be used to set up
 | 
				
			||||||
 | 
							// client-side logic, such as render or integrated-server tweaks.
 | 
				
			||||||
 | 
							// Proceed with mild caution.
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							System.out.println("Hello client world!");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user