Split example into client and common files
This commit is contained in:
		
							parent
							
								
									1ea96d029e
								
							
						
					
					
						commit
						3fc4e98a35
					
				@ -2,7 +2,7 @@ package net.fabricmc.example;
 | 
			
		||||
 | 
			
		||||
import net.fabricmc.api.ModInitializer;
 | 
			
		||||
 | 
			
		||||
public class ExampleMod implements ModInitializer, ClientModInitializer {
 | 
			
		||||
public class ExampleMod implements ModInitializer {
 | 
			
		||||
	@Override
 | 
			
		||||
	public void onInitialize() {
 | 
			
		||||
		// This code runs as soon as Minecraft is in a mod-load-ready state.
 | 
			
		||||
@ -11,13 +11,4 @@ public class ExampleMod implements ModInitializer, ClientModInitializer {
 | 
			
		||||
 | 
			
		||||
		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!");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,14 @@
 | 
			
		||||
package net.fabricmc.example.client;
 | 
			
		||||
 | 
			
		||||
import net.fabricmc.api.ClientModInitializer;
 | 
			
		||||
 | 
			
		||||
public class ExampleClientMod implements ClientModInitializer {
 | 
			
		||||
	@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!");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@ -22,7 +22,7 @@
 | 
			
		||||
      "net.fabricmc.example.ExampleMod"
 | 
			
		||||
    ],
 | 
			
		||||
    "client": [
 | 
			
		||||
      "net.fabricmc.example.ExampleMod"
 | 
			
		||||
      "net.fabricmc.example.client.ExampleClientMod"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "mixins": [
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user