Skip to content

Commit

Permalink
Update README.md (#2)
Browse files Browse the repository at this point in the history
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
reoseah authored and Chocohead committed Jan 21, 2019
1 parent 390afb3 commit 5356d74
Showing 1 changed file with 7 additions and 38 deletions.
45 changes: 7 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br>
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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:<br>
Open *Launch Configurations*, select *yourmod*\_client, switch to *Arguments* tab, change program arguments from `...Client...` to `...Server...`:
```
--tweakClass org.dimdev.riftloader.launch.RiftLoaderServerTweaker
```

0 comments on commit 5356d74

Please sign in to comment.