Add banner pattern crafting recipes
This commit is contained in:
parent
dd57456e60
commit
daef439632
12 changed files with 230 additions and 29 deletions
|
@ -74,7 +74,7 @@ Due to sheer amount of changes, some may be undocumented. We hope you enjoy this
|
||||||
* Now uses screwdriver to change sound
|
* Now uses screwdriver to change sound
|
||||||
* Sound names now translated
|
* Sound names now translated
|
||||||
* Added a questionable sound option
|
* Added a questionable sound option
|
||||||
* At least 1 new advancement
|
* At least 2 new advancements
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
* Stone-cutting recipe for slabs now gives 2 blocks
|
* Stone-cutting recipe for slabs now gives 2 blocks
|
||||||
* Fixed typos in Russian translation
|
* Fixed typos in Russian translation
|
||||||
|
|
6
TODO.md
6
TODO.md
|
@ -10,9 +10,6 @@
|
||||||
* Add rubbish, rocks
|
* Add rubbish, rocks
|
||||||
* Figure out electronic devices - function
|
* Figure out electronic devices - function
|
||||||
|
|
||||||
=== ACHIEVEMENTS ===
|
|
||||||
* Chicken kiev - kill a chicken with aspect of fire sickle
|
|
||||||
|
|
||||||
=== VERSION SPECIFIC ===
|
=== VERSION SPECIFIC ===
|
||||||
## 0.3
|
## 0.3
|
||||||
Goals left - QOL
|
Goals left - QOL
|
||||||
|
@ -20,13 +17,10 @@ Goals left - QOL
|
||||||
* Better feedback - particles, noises ~+-
|
* Better feedback - particles, noises ~+-
|
||||||
|
|
||||||
## 0.4
|
## 0.4
|
||||||
* Add crafting recipes for banner patterns; re-make grain?
|
|
||||||
* Concrete with bars 2 axis rotation
|
|
||||||
* TV rework #3 (new colours, second static, ...?)
|
* TV rework #3 (new colours, second static, ...?)
|
||||||
* More landmines, land mine base item, create integration for it
|
* More landmines, land mine base item, create integration for it
|
||||||
* Rework cigarette (code and some functionality)
|
* Rework cigarette (code and some functionality)
|
||||||
* Missing warning stripes?
|
* Missing warning stripes?
|
||||||
* Fix banner registration not having items, add crafting recipes
|
|
||||||
|
|
||||||
## Pre ~~flight~~ update checklist
|
## Pre ~~flight~~ update checklist
|
||||||
* Update ru_ru and ru_rpr translations
|
* Update ru_ru and ru_rpr translations
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"criteria": {
|
||||||
|
"has_paper": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:grain_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "new_soviet:grain_pattern"
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:recipe_unlocked"
|
||||||
|
},
|
||||||
|
"has_wheat": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:grain_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_paper",
|
||||||
|
"has_wheat",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"new_soviet:grain_pattern"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sends_telemetry_event": false
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"criteria": {
|
||||||
|
"has_paper": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:sickle_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_sickle": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:sickle_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "new_soviet:sickle_pattern"
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:recipe_unlocked"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_paper",
|
||||||
|
"has_sickle",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"new_soviet:sickle_pattern"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sends_telemetry_event": false
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:recipes/root",
|
||||||
|
"criteria": {
|
||||||
|
"has_paper": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:star_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_red_dye": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:star_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_sickle": {
|
||||||
|
"conditions": {
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"items": [
|
||||||
|
"new_soviet:star_pattern"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:inventory_changed"
|
||||||
|
},
|
||||||
|
"has_the_recipe": {
|
||||||
|
"conditions": {
|
||||||
|
"recipe": "new_soviet:star_pattern"
|
||||||
|
},
|
||||||
|
"trigger": "minecraft:recipe_unlocked"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requirements": [
|
||||||
|
[
|
||||||
|
"has_paper",
|
||||||
|
"has_sickle",
|
||||||
|
"has_red_dye",
|
||||||
|
"has_the_recipe"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"new_soviet:star_pattern"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sends_telemetry_event": false
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"category": "misc",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:paper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:wheat"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "new_soviet:grain_pattern"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"category": "misc",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:paper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "new_soviet:sickle"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "new_soviet:sickle_pattern"
|
||||||
|
}
|
||||||
|
}
|
18
src/main/generated/data/new_soviet/recipes/star_pattern.json
Normal file
18
src/main/generated/data/new_soviet/recipes/star_pattern.json
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"category": "misc",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:paper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "new_soviet:sickle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "minecraft:red_dye"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "new_soviet:star_pattern"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
package su.a71.new_soviet.blocks.lamps;
|
|
||||||
|
|
||||||
import su.a71.new_soviet.util.Shapes;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class DevTableLampBlock extends GoldenTableLampBlock {
|
|
||||||
|
|
||||||
public DevTableLampBlock(Settings settings) {
|
|
||||||
super(settings);
|
|
||||||
SHAPE = new Shapes.HorizontalShapeLegacy(List.of(
|
|
||||||
List.of(5.0, 0.0, 5.0, 11.0, 2.0, 11.0),
|
|
||||||
List.of(7.0, 2.0, 7.0, 9.0, 4.0, 9.0),
|
|
||||||
List.of(6.0, 4.0, 6.0, 10.0, 5.0, 10.0),
|
|
||||||
List.of(3.0, 9.0, 3.0, 13.0, 13.0, 7.0)));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -913,5 +913,19 @@ public class RecipeGenerator extends FabricRecipeProvider {
|
||||||
.criterion(hasItem(Items.IRON_INGOT), conditionsFromItem(Items.IRON_INGOT))
|
.criterion(hasItem(Items.IRON_INGOT), conditionsFromItem(Items.IRON_INGOT))
|
||||||
.criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK))
|
.criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK))
|
||||||
.offerTo(exporter);
|
.offerTo(exporter);
|
||||||
|
|
||||||
|
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, NSE_Items.SICKLE_PATTERN).input(Items.PAPER).input(NSE_Items.SICKLE)
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(Items.PAPER), FabricRecipeProvider.conditionsFromItem(NSE_Items.SICKLE_PATTERN))
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(NSE_Items.SICKLE), FabricRecipeProvider.conditionsFromItem(NSE_Items.SICKLE_PATTERN))
|
||||||
|
.offerTo(exporter);
|
||||||
|
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, NSE_Items.STAR_PATTERN).input(Items.PAPER).input(NSE_Items.SICKLE).input(Items.RED_DYE)
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(Items.PAPER), FabricRecipeProvider.conditionsFromItem(NSE_Items.STAR_PATTERN))
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(NSE_Items.SICKLE), FabricRecipeProvider.conditionsFromItem(NSE_Items.STAR_PATTERN))
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(Items.RED_DYE), FabricRecipeProvider.conditionsFromItem(NSE_Items.STAR_PATTERN))
|
||||||
|
.offerTo(exporter);
|
||||||
|
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, NSE_Items.GRAIN_PATTERN).input(Items.PAPER).input(Items.WHEAT)
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(Items.PAPER), FabricRecipeProvider.conditionsFromItem(NSE_Items.GRAIN_PATTERN))
|
||||||
|
.criterion(FabricRecipeProvider.hasItem(Items.WHEAT), FabricRecipeProvider.conditionsFromItem(NSE_Items.GRAIN_PATTERN))
|
||||||
|
.offerTo(exporter);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -63,16 +63,17 @@ public class NSE_BaseRegistration {
|
||||||
return TagKey.of(RegistryKeys.ITEM, new Identifier(NewSoviet.MOD_ID, name));
|
return TagKey.of(RegistryKeys.ITEM, new Identifier(NewSoviet.MOD_ID, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerPattern(String name, Rarity rarity, ItemGroup tab) {
|
public static BannerPatternItem registerPattern(String name, Rarity rarity, ItemGroup tab) {
|
||||||
BannerPattern patternThing = new BannerPattern(name);
|
BannerPattern patternThing = new BannerPattern(name);
|
||||||
final TagKey<BannerPattern> bannerTag = TagKey.of(RegistryKeys.BANNER_PATTERN, new Identifier(NewSoviet.MOD_ID, name));
|
final TagKey<BannerPattern> bannerTag = TagKey.of(RegistryKeys.BANNER_PATTERN, new Identifier(NewSoviet.MOD_ID, name));
|
||||||
BannerPatternItem patternItem = new BannerPatternItem(bannerTag, new Item.Settings().rarity(rarity));
|
BannerPatternItem patternItem = new BannerPatternItem(bannerTag, new Item.Settings().rarity(rarity));
|
||||||
Registry.register(Registries.ITEM, new Identifier(NewSoviet.MOD_ID, name), patternItem);
|
Registry.register(Registries.ITEM, new Identifier(NewSoviet.MOD_ID, name), patternItem);
|
||||||
Registry.register(Registries.BANNER_PATTERN, new Identifier(NewSoviet.MOD_ID, name), patternThing);
|
Registry.register(Registries.BANNER_PATTERN, new Identifier(NewSoviet.MOD_ID, name), patternThing);
|
||||||
|
|
||||||
if (tab == null) return; // Sanity check for hidden items
|
if (tab == null) return patternItem; // Sanity check for hidden items
|
||||||
Optional<RegistryKey<ItemGroup>> key = Registries.ITEM_GROUP.getKey(tab);
|
Optional<RegistryKey<ItemGroup>> key = Registries.ITEM_GROUP.getKey(tab);
|
||||||
key.ifPresent(itemGroupRegistryKey -> ItemGroupEvents.modifyEntriesEvent(itemGroupRegistryKey).register(content -> content.add(patternItem)));
|
key.ifPresent(itemGroupRegistryKey -> ItemGroupEvents.modifyEntriesEvent(itemGroupRegistryKey).register(content -> content.add(patternItem)));
|
||||||
|
return patternItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init() {}
|
public static void init() {}
|
||||||
|
|
|
@ -39,6 +39,10 @@ public class NSE_Items extends NSE_BaseRegistration {
|
||||||
|
|
||||||
public static final MusicDiscItem MUSIC_DISC_USSR_ANTHEM = new MusicDiscItem(1, NSE_Sounds.MUSIC_USSR_ANTHEM, new Item.Settings().maxCount(1), 206);
|
public static final MusicDiscItem MUSIC_DISC_USSR_ANTHEM = new MusicDiscItem(1, NSE_Sounds.MUSIC_USSR_ANTHEM, new Item.Settings().maxCount(1), 206);
|
||||||
|
|
||||||
|
public static BannerPatternItem SICKLE_PATTERN;
|
||||||
|
public static BannerPatternItem STAR_PATTERN;
|
||||||
|
public static BannerPatternItem GRAIN_PATTERN;
|
||||||
|
|
||||||
private static final ItemGroup NSE_ITEMS_TAB = FabricItemGroup.builder()
|
private static final ItemGroup NSE_ITEMS_TAB = FabricItemGroup.builder()
|
||||||
.icon(() -> new ItemStack(SICKLE))
|
.icon(() -> new ItemStack(SICKLE))
|
||||||
.displayName(Text.translatable("itemGroup.new_soviet.items"))
|
.displayName(Text.translatable("itemGroup.new_soviet.items"))
|
||||||
|
@ -58,9 +62,9 @@ public class NSE_Items extends NSE_BaseRegistration {
|
||||||
registerItem("antenna", () -> ANTENNA, NSE_ITEMS_TAB);
|
registerItem("antenna", () -> ANTENNA, NSE_ITEMS_TAB);
|
||||||
registerItem("cigarette", ()-> CIGARETTE, NSE_ITEMS_TAB);
|
registerItem("cigarette", ()-> CIGARETTE, NSE_ITEMS_TAB);
|
||||||
registerItem("cigarette_butt", ()-> CIGARETTE_BUTT, NSE_ITEMS_TAB);
|
registerItem("cigarette_butt", ()-> CIGARETTE_BUTT, NSE_ITEMS_TAB);
|
||||||
registerPattern("sickle_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
SICKLE_PATTERN = registerPattern("sickle_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
||||||
registerPattern("star_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
STAR_PATTERN = registerPattern("star_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
||||||
registerPattern("grain_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
GRAIN_PATTERN = registerPattern("grain_pattern", Rarity.UNCOMMON, NSE_ITEMS_TAB);
|
||||||
|
|
||||||
registerItem("music_disc_ussr_anthem", () -> MUSIC_DISC_USSR_ANTHEM, NSE_ITEMS_TAB);
|
registerItem("music_disc_ussr_anthem", () -> MUSIC_DISC_USSR_ANTHEM, NSE_ITEMS_TAB);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue