forked from FabricMC/fabric-loom
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccb215d
commit f606772
Showing
5 changed files
with
666 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Forge Mod Loader | ||
* Copyright (c) 2012-2013 cpw. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Lesser Public License v2.1 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* cpw - implementation | ||
*/ | ||
|
||
package net.minecraftforge.fml.relauncher; | ||
|
||
public enum Side { | ||
|
||
/** | ||
* The client side. Specifically, an environment where rendering capability exists. | ||
* Usually in the game client. | ||
*/ | ||
CLIENT, | ||
/** | ||
* The server side. Specifically, an environment where NO rendering capability exists. | ||
* Usually on the dedicated server. | ||
*/ | ||
SERVER; | ||
|
||
/** | ||
* @return If this is the server environment | ||
*/ | ||
public boolean isServer() | ||
{ | ||
return !isClient(); | ||
} | ||
|
||
/** | ||
* @return if this is the Client environment | ||
*/ | ||
public boolean isClient() | ||
{ | ||
return this == CLIENT; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/net/minecraftforge/fml/relauncher/SideOnly.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Forge Mod Loader | ||
* Copyright (c) 2012-2013 cpw. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Lesser Public License v2.1 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* cpw - implementation | ||
*/ | ||
|
||
package net.minecraftforge.fml.relauncher; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
|
||
/** | ||
* | ||
* Stolen from FML for use with merging the jars. | ||
* | ||
* @author cpw | ||
* | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) | ||
public @interface SideOnly | ||
{ | ||
public Side value(); | ||
} |
Oops, something went wrong.