Guest User

Untitled

a guest
Jun 9th, 2020
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.86 KB | None | 0 0
  1. # This is an example mods.toml file. It contains the data relating to the loading mods.
  2. # There are several mandatory fields (#mandatory), and many more that are optional (#optional).
  3. # The overall format is standard TOML format, v0.5.0.
  4. # Note that there are a couple of TOML lists in this file.
  5. # Find more information on toml format here: https://github.com/toml-lang/toml
  6. # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
  7. modLoader="javafml" #mandatory
  8. # A version range to match for said mod loader - for regular FML @Mod it will be the forge version
  9. loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
  10. # A URL to refer people to when problems occur with this mod
  11. issueTrackerURL="http://my.issue.tracker/" #optional
  12. # A list of mods - how many allowed here is determined by the individual mod loader
  13. [[mods]] #mandatory
  14. # The modid of the mod
  15. modId="podwojnian" #mandatory
  16. # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
  17. version="1.15.2" #mandatory
  18. # A display name for the mod
  19. displayName="Customizable Discs" #mandatory
  20. # A URL to query for updates for this mod. See the JSON update specification <here>
  21. updateJSONURL="http://myurl.me/" #optional
  22. # A URL for the "homepage" for this mod, displayed in the mod UI
  23. displayURL="http://example.com/" #optional
  24. # A file name (in the root of the mod JAR) containing a logo for display
  25. logoFile="examplemod.png" #optional
  26. # A text field displayed in the mod UI
  27. credits="JYP" #optional
  28. # A text field displayed in the mod UI
  29. authors="lil meow meow" #optional
  30. # The description text for the mod (multi line!) (#mandatory)
  31. description='Suck my dick pozdrawiam cieplutko '
  32. This is a long form description of the mod. You can write whatever you want here
  33.  
  34. Have some lorem ipsum.
  35.  
  36. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  37. '''
  38. # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
  39. [[dependencies.podwojnian]] #optional
  40. # the modid of the dependency
  41. modId="forge" #mandatory
  42. # Does this dependency have to exist - if not, ordering below must be specified
  43. mandatory=true #mandatory
  44. # The version range of the dependency
  45. versionRange="[31,)" #mandatory
  46. # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
  47. ordering="NONE"
  48. # Side this dependency is applied on - BOTH, CLIENT or SERVER
  49. side="BOTH"
  50. # Here's another dependency
  51. [[dependencies.podwojnian]]
  52. modId="minecraft"
  53. mandatory=true
  54. versionRange="[1.15.2]"
  55. ordering="NONE"
  56. side="BOTH"
  57.  
  58.  
  59. buildscript {
  60. repositories {
  61. maven { url = 'https://files.minecraftforge.net/maven' }
  62. jcenter()
  63. mavenCentral()
  64. }
  65. dependencies {
  66. classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
  67. }
  68. }
  69. apply plugin: 'net.minecraftforge.gradle'
  70. // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
  71. apply plugin: 'eclipse'
  72. apply plugin: 'maven-publish'
  73.  
  74. version = '1.15.2'
  75. group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
  76. archivesBaseName = 'Customizable Discs'
  77.  
  78. sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
  79.  
  80. minecraft {
  81. // The mappings can be changed at any time, and must be in the following format.
  82. // snapshot_YYYYMMDD Snapshot are built nightly.
  83. // stable_# Stables are built at the discretion of the MCP team.
  84. // Use non-default mappings at your own risk. they may not always work.
  85. // Simply re-run your setup task after changing the mappings to update your workspace.
  86. mappings channel: 'snapshot', version: '20200514-1.15.1'
  87. // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
  88.  
  89. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
  90.  
  91. // Default run configurations.
  92. // These can be tweaked, removed, or duplicated as needed.
  93. runs {
  94. client {
  95. workingDirectory project.file('run')
  96.  
  97. // Recommended logging data for a userdev environment
  98. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  99.  
  100. // Recommended logging level for the console
  101. property 'forge.logging.console.level', 'debug'
  102.  
  103. mods {
  104. examplemod {
  105. source sourceSets.main
  106. }
  107. }
  108. }
  109.  
  110. server {
  111. workingDirectory project.file('run')
  112.  
  113. // Recommended logging data for a userdev environment
  114. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  115.  
  116. // Recommended logging level for the console
  117. property 'forge.logging.console.level', 'debug'
  118.  
  119. mods {
  120. examplemod {
  121. source sourceSets.main
  122. }
  123. }
  124. }
  125.  
  126. data {
  127. workingDirectory project.file('run')
  128.  
  129. // Recommended logging data for a userdev environment
  130. property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
  131.  
  132. // Recommended logging level for the console
  133. property 'forge.logging.console.level', 'debug'
  134.  
  135. args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
  136.  
  137. mods {
  138. examplemod {
  139. source sourceSets.main
  140. }
  141. }
  142. }
  143. }
  144. }
  145.  
  146. dependencies {
  147. // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
  148. // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
  149. // The userdev artifact is a special name and will get all sorts of transformations applied to it.
  150. minecraft 'net.minecraftforge:forge:1.15.2-31.2.5'
  151.  
  152. // You may put jars on which you depend on in ./libs or you may define them like so..
  153. // compile "some.group:artifact:version:classifier"
  154. // compile "some.group:artifact:version"
  155.  
  156. // Real examples
  157. // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
  158. // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
  159.  
  160. // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
  161. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  162.  
  163. // These dependencies get remapped to your current MCP mappings
  164. // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
  165.  
  166. // For more info...
  167. // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
  168. // http://www.gradle.org/docs/current/userguide/dependency_management.html
  169.  
  170. }
  171.  
  172. // Example for how to get properties into the manifest for reading by the runtime..
  173. jar {
  174. manifest {
  175. attributes([
  176. "Specification-Title": "examplemod",
  177. "Specification-Vendor": "examplemodsareus",
  178. "Specification-Version": "1", // We are version 1 of ourselves
  179. "Implementation-Title": project.name,
  180. "Implementation-Version": "${version}",
  181. "Implementation-Vendor" :"examplemodsareus",
  182. "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  183. ])
  184. }
  185. }
  186.  
  187. // Example configuration to allow publishing using the maven-publish task
  188. // This is the preferred method to reobfuscate your jar file
  189. jar.finalizedBy('reobfJar')
  190. // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
  191. //publish.dependsOn('reobfJar')
  192.  
  193. publishing {
  194. publications {
  195. mavenJava(MavenPublication) {
  196. artifact jar
  197. }
  198. }
  199. repositories {
  200. maven {
  201. url "file:///${project.projectDir}/mcmodsrepo"
  202. }
  203. }
  204. }
  205.  
  206. package trojan;
  207.  
  208. import org.apache.logging.log4j.LogManager;
  209. import org.apache.logging.log4j.Logger;
  210.  
  211.  
  212. import net.minecraftforge.eventbus.api.IEventBus;
  213. import net.minecraftforge.fml.common.Mod;
  214. import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
  215. import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
  216. import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
  217. import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
  218.  
  219.  
  220. @Mod(main.MOD_ID)
  221. public class main
  222. {
  223. public static main instance;
  224. public static final String MOD_ID = "podwojnian";
  225. public static final Logger LOGGER = LogManager.getLogger();
  226.  
  227. public main()
  228. {
  229. instance = this;
  230.  
  231. final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
  232.  
  233.  
  234. modEventBus.addListener(this::setup);
  235. modEventBus.addListener(this::clientSetup);
  236.  
  237.  
  238. }
  239.  
  240. private void setup(final FMLCommonSetupEvent event)
  241. {
  242.  
  243. }
  244.  
  245. private void clientSetup(final FMLClientSetupEvent event)
  246. {
  247.  
  248. }
  249.  
  250. public void onServerStarting(FMLServerStartingEvent event)
  251. {
  252. }
  253. }
Advertisement
Add Comment
Please, Sign In to add comment