-
-
Notifications
You must be signed in to change notification settings - Fork 5
Block
# Data Overview
DataType: BLOCK
File Ending: .block
Has Own Item: yes
Has TMT Model: yes / optional
Config location: ./assets/<packid>/config/blocks/<here>.block
Model location: net.fexcraft.mod.addon.<packid>.models.block.<here> OR CUSTOM
Blocks have 2 main features in FVTM. One is being decoration and the
other is being functional, that means.. Mashines in most cases.
While the "functional" part has to be implemented yet you can already
create decorational blocks, see the info bellow!
NOTE: FVTM provides a few base behaviours for decorational blocks.
It is not intended to add new base classes for any possible smallest
option, if you have an idea for a general wide use base class, you can
suggest it. But if you want a single-use class, you can aswel code such
yourself, there should be enough tutorials around. Remember: if you
followed the guide in this wiki with FVTM-PDK, your pack is also a valid mod!
You can add anything else a mod can have into your pack/mod.
A few examples are at GEP!
Here the overview of the Fields in a block json config file:
-
RegistryName
- the registryname, should bepackid:block_id
-
Addon
- the addon the block is in, e.g.fvtm:gep
-
Name
- optional name field -
Description
- can be either astring
(supports line breaks\n
) orstring array
-
Texture
- optional, one NamedResourceLocation - the vehicle's texture -
Textures
- optional array of NamedResourceLocations - the vehicle's textures -
Primary
- optional, default primary RGB color -
Secondary
- optional, default secondary RGB color -
Functional
- optional, default false, if this block is functional -
Decoration
- optional, default true, if this block is a decorational one -
MaxItemStackSize
- optional, max item stack size of this block's item -
ItemBurnTime
- optional, burn time of this block's item (in ticks) -
OreDictionary
- optional registration into the Forge OreRegistry -
Model
- the Model, check the wiki page on how to define it -
AABBs
- optional, object with AlisAlignedBB(s) listed for the block's
states, if leaving this out, the block will be a FULL BLOCK by default,
example usage:The pattern is"AABBs":{ "normal": [ 0.0, 0.0, 0.0, 1.0, 0.5625, 1.0 ], "facing=north": [ 0.0, 0.0, 0.0, 1.0, 0.75, 1.0 ] },
[ x0, y0, z0, x1, y1, z1 ]
, first the lower corner then
the upper corner. NOTE You can just set a "normal" one and it will
apply to any state, or states which are not defined. -
BlockType
- the BlockType for this block, general behaviour and such-
GENERIC_4ROT
- normal block, with 4 rotations (north/west/south/east) -
GENERIC_16ROT
- normal block, with 16 rotations (similar to signs)
-
-
Material
- optional, the Material for this block, check vanilla materials for info -
MapColor
- optional, the MapColor for this block, check vanilla mapcolor for info -
Hardness
- optional, see vanilla block hardness -
LightLevel
- optional, see vanilla light level -
Resistance
- optional, see vanilla explosion resistance -
LightOpacity
- optional, see vanilla light opacity -
HarverestToolClass
- optional, e.g.pickaxe
,axe
, see vanilla -
HarverestToolLevel
- optional, see vanilla
This datatype creates an own
Item, as such you will need to create a ItemModel JSON and supply a texture,
this is a vanilla/forge process, as such customisation and other is not matter of FVTM.
The expected path for the model will be /assets/<packid>/models/item/<blockid>.json
The usual path for the texture is /assets/<packid>/textures/items/<blockid>.png
For more info how the JSON should look, either take a look at GEP or vanilla minecraft.
This datatype OVERRIDES
(unless changed in config) the default Item Rendering, as such the
vanilla JSON model may not get displayed, but instead a 3D representation if this Block's
Model will be.
Exception are VanillaJSON model based Blocks.
Need help in something that is not in the wiki, or is not there yet? Got issues or crashes?
Or want to help expand the Wiki? We have a discord server! https://discord.gg/AkMAzaA