Store Schematicannon options in block item as NBT

This commit is contained in:
reidbhuntley 2021-05-20 22:53:08 -04:00
parent badec3aad0
commit 305b16fea9
4 changed files with 40 additions and 17 deletions

View File

@ -409,19 +409,19 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
a6d814f94926d88764c38862cc4ece9c367e023b assets/create/lang/en_ud.json
d1838140c8383ee4537db90eb8f657d0c268fe91 assets/create/lang/en_us.json
9d6f26ca7b59d3707ce996e513358cc9b873cad1 assets/create/lang/unfinished/de_de.json
7fafb7565349aa52f4ccb829d4886a179eb547dc assets/create/lang/unfinished/es_es.json
822b912d290d40c5f02011393af44bf37684f9b4 assets/create/lang/unfinished/es_mx.json
502d761465a0de7aeb15acec4147b8ec8bee92cf assets/create/lang/unfinished/fr_fr.json
dac15c17578fb37bbdb874cee5a0a078110b7481 assets/create/lang/unfinished/it_it.json
fd270c9c8bc46d4df21aa04ecc7bf059011e4b3e assets/create/lang/unfinished/ja_jp.json
a5b002e047a2f509a8d35b9e638627f970b4810e assets/create/lang/unfinished/ko_kr.json
50f65aaba8c4fec5404ab1fc40f74b4970a55edd assets/create/lang/unfinished/nl_nl.json
ff61e567f15ded6ba127522af03860232069cdd2 assets/create/lang/unfinished/pl_pl.json
a7a28fb3896bc38e00f746e650433160f5b53c90 assets/create/lang/unfinished/pt_br.json
ffa1901b392719634403048419d29b268704bd10 assets/create/lang/unfinished/ru_ru.json
38b843c5232167876b3678328b47ec95f30cf69f assets/create/lang/unfinished/zh_cn.json
b806d1e6fe9ebee27f417a3c4d6c818124ee4cde assets/create/lang/unfinished/zh_tw.json
4fcda300efe5a2ad8695b5ae3f24a54ea109a954 assets/create/lang/unfinished/de_de.json
6a1dde57b2224d4b0287ebc705d6a75d329b5e1f assets/create/lang/unfinished/es_es.json
93ee0e30a56b405a9e766d353c36276e36a84b5c assets/create/lang/unfinished/es_mx.json
49a691320c73e09f921cd0ea97398126231e99fa assets/create/lang/unfinished/fr_fr.json
cf14b3828b6c11013f606f277d88fb63245bb2a8 assets/create/lang/unfinished/it_it.json
73c1c1489833cbcb28bb1ce90541c8c8bdf329c0 assets/create/lang/unfinished/ja_jp.json
924303b9bcf56aedbbfc46108655f71324308e12 assets/create/lang/unfinished/ko_kr.json
079aea6843e756efbfca0976983be1957863717c assets/create/lang/unfinished/nl_nl.json
b7bab15167400ee48a9728f81446e572c494fd8d assets/create/lang/unfinished/pl_pl.json
07e84cc3eee3faa1ab3d26e0c85c7f09c8573368 assets/create/lang/unfinished/pt_br.json
6ffb0cf20d712aee23a42a9ec440dd7dc92293d6 assets/create/lang/unfinished/ru_ru.json
0ae98a18e59f478da41d8c5d832737b65f6a8c8a assets/create/lang/unfinished/zh_cn.json
4c96e5a76e72368a59190b7588d389fdd2cc75e1 assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@ -1652,7 +1652,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
096382a4c025b5ffdde9c496ee9da0d5345fbe17 assets/create/sounds.json
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
83c046bd200623933545c9e4326f782fb02c87fa data/create/advancements/arm_blaze_burner.json
@ -2726,7 +2726,7 @@ cecaac07bd275bb1ae9e302f0bf44b581e74105d data/create/loot_tables/blocks/rope_pul
aa6af37356d65105efab2503ffe75f778cfe873b data/create/loot_tables/blocks/rotation_speed_controller.json
30de11bec82606fead9d6bff7bba0232e97f1039 data/create/loot_tables/blocks/sail_frame.json
069701cb804b6522c18624a0d4f3f949ff8b0281 data/create/loot_tables/blocks/schematic_table.json
c4a89145334addfd0dd1fedf7fa75ba07a7d3490 data/create/loot_tables/blocks/schematicannon.json
a2b172dc749176d4df34729007019605fc6dd150 data/create/loot_tables/blocks/schematicannon.json
af1bbbb8236b4ab05a6a8edc6db960bc758cbdf3 data/create/loot_tables/blocks/scoria.json
bb670ac5dd2fa4c743bc268cd0547926eb6cdb68 data/create/loot_tables/blocks/scoria_bricks.json
a7217ea301a282d0ef52f2d8c06dd8683398408d data/create/loot_tables/blocks/scoria_bricks_slab.json

View File

@ -28,8 +28,8 @@
"trigger": "create:bracket_apply",
"conditions": {
"accepted_entries": [
"create:cogwheel",
"create:large_cogwheel"
"create:large_cogwheel",
"create:cogwheel"
]
}
},

View File

@ -6,6 +6,19 @@
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:copy_nbt",
"source": "block_entity",
"ops": [
{
"source": "Options",
"target": "BlockEntityTag.Options",
"op": "replace"
}
]
}
],
"name": "create:schematicannon"
}
],

View File

@ -215,6 +215,16 @@ public class AllBlocks {
REGISTRATE.block("schematicannon", SchematicannonBlock::new)
.initialProperties(() -> Blocks.DISPENSER)
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
.loot((lt, block) -> {
Builder builder = LootTable.builder();
IBuilder survivesExplosion = SurvivesExplosion.builder();
lt.registerLootTable(block, builder.addLootPool(LootPool.builder()
.acceptCondition(survivesExplosion)
.rolls(ConstantRange.of(1))
.addEntry(ItemLootEntry.builder(AllBlocks.SCHEMATICANNON.get().asItem())
.acceptFunction(CopyNbt.func_215881_a(CopyNbt.Source.BLOCK_ENTITY)
.func_216056_a("Options", "BlockEntityTag.Options")))));
})
.item()
.transform(customItemModel())
.register();