-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathReadMeFirst.txt
127 lines (105 loc) · 6.39 KB
/
ReadMeFirst.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Further errors:
9 Register block in init
10 error parsing blockstates file (incorrect json)
11 Wrong parent model in your block model.json file
12 Missing 'block' in parent model in your block model.json file
13 missing tag (eg textures) in block model json
14 missing tag (eg parent) in block model json
15 error parsing model file (incorrect json)
16 required texture not defined
17 Texture filenames incorrect in block model.json file
18 Texture domain incorrect in block model.json
19 Texture domain forgotten in block model.json
20 malformed texture
----------------
Items
51 Not properly register with Mesher
52 Variants: not adding variants to ModelBakery
53 Register item in init,
54 Register mesher in preinit
55 MRL for mesher forgot domain
56 MRL for mesher domain wrong
57 MRL for mesher forgot inventory
58 MRL for mesher misspelled / item model file doesn't exist
59 Mesher metadata wrong
60 Item model parent tag missing
61 Item model parent model doesn't exist
62 Item model parent model domain wrong
63 Item model parent model domain forgotten
64 Non-variants: item model filename doesn't match
MinecraftByExample
==================
The purpose of MinecraftByExample is to give simple working examples of the important concepts in Minecraft and Forge.
If you're anything like me, a good code example is worth several screens' worth of waffling explanation, and can very
quickly explain the key concepts. I also find it much easier to adapt and debug something that already works, than to have to
synthesise something from scratch and spend hours trying to discover the missing bit of information I didn't know about.
I've tried to keep the code simple and obvious and to resist the urge to be clever. The examples might not be the most
efficient or succinct implementation, I've deliberately left the optimisation to you.
Each example is split up to be totally independent of all the others. The only parts of the code which are common
to more than one example are the MinecraftByExample, CommonProxy, ClientOnlyProxy, and DedicatedServer classes.
If you want more information and explanatory text about the concepts, the following links might be useful
Guide to how Minecraft works- http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html
Forge Modding articles- http://www.wuppy29.com/minecraft/modding-tutorials/forge-modding-1-8
Forge Tutorials listing- http://www.minecraftforge.net/forum/index.php/board,120.0.html
List of examples
Blocks
MBE01 - a simple cube
MBE02 - a block with a more complicated shape
MBE03 - a block (coloured signpost) with multiple variants- four colours, can be placed facing in four directions
MBE04 - a camouflage ("secret door") block which copies the appearance of adjacent blocks - uses ISmartBlockModel
MBE05 - a 3D web which joins to neighbours in all six directions - uses ISmartBlockModel and ICustomModelLoader
MBE08 - how to add a creative tab for organising your custom blocks / items
Items
MBE10 - a simple item
MBE11 - an item with multiple variants - rendered using multiple models and multiple layers
MBE12 - an item that stores extra information in NBT, also illustrates the "in use" animation similar to drawing a bow
MBE13 - customise Mining behaviour of Blocks and Items - several test classes that show how mining works
MBE14 - an interactive helper tool to adjust the ItemCameraTransforms for your custom item
MBE15 - a chessboard item with 1 - 64 pieces; uses ISmartItemModel
TileEntities
MBE20 - using a tile entity to store information about a block - also shows examples of using NBT storage
MBE21 - using the TileEntitySpecialRenderer to render unusual shapes or animations
Containers (Inventory blocks)
MBE30 - a simple container for storing items in the world - similar to a Chest
MBE31 - a functional container such as a Furnace or Crafting Table
Recipes (Crafting and Furnaces)
MBE35 - some typical example crafting recipes and furnace (smelting) recipes
HeadsUpDisplay - overlays
MBE40 - simple customisations of the heads up display (hotbar, health meter)
Network
MBE60 - send network messages between client and server
Configuration GUI
MBE70 - configuration file linked to the "mod options" button GUI on the mods list screen
How to use this example project-
A) You can browse directly in GitHub, or alternatively download it as a zip and browse it locally.
B) If you want to install it and compile it, the basic steps for beginners are:
1) Download the project as a zip. Unzip it to an appropriate folder on your computer, such as My Documents. (Or, if you know
how to fork a project on GitHub and import it into a local git repository, you can do that instead).
2) From the command line, run gradlew setupDecompWorkspace to install Forge and configure the project. This will take
quite some time, maybe 20 minutes or more.
3) From the command line, run gradlew idea if you are using IntelliJ IDEA, or gradlew eclipse if you are using Eclipse.
4) If using IntelliJ:
a) Open the project (open the MinecraftByExample.ipr file).
b) It will ask you whether you want to import the "unlinked gradle project". This is optional. If you choose no,
later on (when you publish your mod) you will need to package it up using the command line gradlew build, if you
choose yes you can run the gradle build task from inside IntelliJ. For most users, there's no other difference.
c) If you imported the gradle project, you should run the gradle task 'getIntellijRuns' afterwards to get the Run and Debug
configurations.
d) Note! If you are copying the code to your own project, don't forget to add this line to the end of your build.gradle
file, otherwise your assets won't work (see http://www.minecraftforge.net/forum/index.php/topic,21354.0.html):
sourceSets { main { output.resourcesDir = output.classesDir } }
5) If using Eclipse:
a) Open the project
b) Right click on the project, select "Run As" > "Run Configurations..."
c) Set the main class to "GradleStart"
6) You should be able to start Minecraft now (using the Run or Debug configuration) and the mod will be loaded.
For some extra help if this doesn't make sense to you
http://www.minecraftforge.net/forum/index.php?topic=21354.msg108332#msg108332
Some extra help for installation of forge:
https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be
With thank to these helpful folks:
Brandon3035,
twrightsman (greekphysique)
Nephroid,
Herbix, and
Shadowfacts