We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here we list the data which can only be generated from BDS:
name
blockAABB
burnOdds
burnAbility
flameOdds
burnChance
lightDampening
lightEmission
explosionResistance
friction
hardness
destroySpeed
thickness
canContainLiquid
canDropWithAnyTool
canHarvestWithHand
mapColor
How to get a block's material:
auto & material = block.getMaterial()
canBeMovingBlock
canHavePrecipitation
isAlwaysDestroyable
isLiquid
isSolid
isSolidBlocking
isSuperHot
translucency
materialType
The current method that we get a block's material type:
#include <mc/world/level/material/Material.h> #include <mc/enums/MaterialType.h> MaterialType findMaterialType(const Material & material) { for (MaterialType type : materialTypes) { if (material.isType(type)) { return type; } } return MaterialType::Any; }
armorValue
toughnessValue
attackDamage
isDamageable
id
maxDamage
maxStackSize
The current code:
void dumpBlockCorrectToolSpecial() { CompoundTag global = CompoundTag(); BlockTypeRegistry::forEachBlock([&global](const BlockLegacy& blockLegacy) { auto correctItemList = ListTag(); auto & block = blockLegacy.getDefaultState(); for (const auto &item: ItemRegistryManager::getItemRegistry().getNameToItemMap() | std::views::values) { auto itemStack = ItemStack(*item, 1, 0); if (itemStack.canDestroySpecial(block)) { correctItemList.add(StringTag(item->getFullItemName())); } } if (correctItemList.size() != 0) { global.put(blockLegacy.getTypeName(), correctItemList); } return true; }); writeNBT("data/block_correct_tool_special.nbt", global); }
Contains all block tags that each block type has. see the example file
block type
The current code that we generate this file can be found here. It is a little ugly, and we would like to find a better implementation
Contains all item tags that each item type has. see the example file It is similar to the block tag map.
item type
The current code that we generate this file can be found here. We also would like to find a better implementation
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here we list the data which can only be generated from BDS:
Data for each block state
name
: Block::getName()blockAABB
(the bounding box of a specific block state): Block::getCollisionShape()burnOdds
(also namedburnAbility
): Block::getBurnOdds()flameOdds
(also namedburnChance
): Block::getFlameOdds()lightDampening
: Block::getLight() -> Brightness::valuelightEmission
: Block::getLightEmission() -> Brightness::valueexplosionResistance
: Block::getExplosionResistance()friction
: Block::getFriction()hardness
(also nameddestroySpeed
): Block::getDestroySpeed()thickness
: Block::getThickness()canContainLiquid
: Block::getLegacyBlock() -> BlockLegacy::canContainLiquid()canDropWithAnyTool
(also namedcanHarvestWithHand
): Block::canDropWithAnyTool()mapColor
: Block::getMapColor()Block material data for each block tyoe
How to get a block's material:
auto & material = block.getMaterial()
canBeMovingBlock
: Material::getBlocksMotion()canHavePrecipitation
: Material::getBlocksPrecipitation()isAlwaysDestroyable
: Material::isAlwaysDestroyable()isLiquid
: Material::isLiquid()isSolid
: Material::isSolid()isSolidBlocking
: Material::isSolidBlocking()isSuperHot
: Material::isSuperHot()translucency
: Material::getTranslucency()materialType
: ??? We get it using Material::isType() indirectlyThe current method that we get a block's material type:
Data for each item type
armorValue
: Item::getArmorValue()toughnessValue
: Item::getToughnessValue()attackDamage
: Item::getAttackDamage()isDamageable
: Item::isDamageable()id
: Item::getId()name
: Item::getFullItemName()maxDamage
: Item::getMaxDamage()maxStackSize
: Item::getMaxStackSize()name
: Item::getFullItemName()Special correct tools for some blocks
The current code:
Block tag map
Contains all block tags that each
block type
has. see the example fileThe current code that we generate this file can be found here.
It is a little ugly, and we would like to find a better implementation
Item tag map
Contains all item tags that each
item type
has. see the example fileIt is similar to the block tag map.
The current code that we generate this file can be found here.
We also would like to find a better implementation
The text was updated successfully, but these errors were encountered: