From 5356d744dad9abeb56ae56a63e09e91eb850c1c2 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 21 Dec 2018 22:22:30 +0300 Subject: [PATCH] Update README.md (#2) * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md --- README.md | 45 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index ee2a893..4d984f1 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,6 @@ This is a minimal Rift project. The only use of it is to be copied to start a ne ./gradlew build ``` -- Running Server under Eclipse:
- Open *Launch Configurations*, select *yourmod*\_client, switch to *Arguments* tab, change program arguments from `...Client...` to `...Server...`: - ``` - --tweakClass org.dimdev.riftloader.launch.RiftLoaderServerTweaker - ``` - ## Getting started Important files in MDK: @@ -52,7 +46,6 @@ From there, you'll probably want to change a few things: version '1.0' archivesBaseName = 'Example' ``` - > Generally speaking, `group` should match Java package containing all project code, which by convention should start with owner's domain name, e.g. `org.dimdev.halflogs`. - `src/main/resources/riftmod.json` ```json @@ -90,44 +83,20 @@ From there, you'll probably want to change a few things: ``` This description is shown at *Select Resource Packs* screen. If mod doesn't have any resources, you can safely delete this file. -## Snippets +## Tips - Changing `src/main/java` to `src` and `src/main/resources` to `resources`: ```gradle sourceSets { main { - java { - srcDir 'src' - } - resources { - srcDir 'resources' - } + java.srcDirs = ['src'] + resources.srcDirs = ['resources'] } } ``` -- Simple blocks and items: - ```java - class SimpleThings implements BlockAdder, ItemAdder { - public static final Block MYTHRIL_ORE; - public static final Item MYTHRIL; - - static { - Block.Properties mythrilOre = Block.Properties.create(Material.ROCK).hardnessAndResistance(5F, 15F); - MYTHRIL_ORE = new Block(mythrilOre); - - MYTHRIL = new Item(new Item.Properties().maxStackSize(16)).group(ItemGroup.SEARCH); - } - - @Override - public void registerBlocks() { - Block.register(new ResourceLocation("example:mythril_ore"), MYTHRIL_ORE); - } - - @Override - public void registerItems() { - Item.register(MYTHRIL_ORE, ItemGroup.SEARCH); - Item.register(new ResourceLocation("example:mythril"), MYTHRIL); - } - } +- Running Server under Eclipse:
+ Open *Launch Configurations*, select *yourmod*\_client, switch to *Arguments* tab, change program arguments from `...Client...` to `...Server...`: + ``` + --tweakClass org.dimdev.riftloader.launch.RiftLoaderServerTweaker ```