├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src ├── generated │ └── resources │ │ └── data │ │ ├── forge │ │ └── tags │ │ │ ├── items │ │ │ ├── crops │ │ │ │ └── tea.json │ │ │ ├── ice_cubes.json │ │ │ ├── fences │ │ │ │ └── wooden.json │ │ │ ├── rods │ │ │ │ └── wooden.json │ │ │ └── fence_gates │ │ │ │ └── wooden.json │ │ │ └── blocks │ │ │ ├── fences │ │ │ └── wooden.json │ │ │ └── fence_gates │ │ │ └── wooden.json │ │ ├── minecraft │ │ └── tags │ │ │ ├── items │ │ │ ├── saplings.json │ │ │ └── wooden_fences.json │ │ │ └── blocks │ │ │ ├── saplings.json │ │ │ ├── wooden_fences.json │ │ │ ├── fence_gates.json │ │ │ ├── flower_pots.json │ │ │ └── mineable │ │ │ └── axe.json │ │ └── simplytea │ │ ├── worldgen │ │ ├── configured_feature │ │ │ └── tea_tree.json │ │ └── placed_feature │ │ │ └── tea_tree.json │ │ ├── tags │ │ └── items │ │ │ ├── teas.json │ │ │ └── teas │ │ │ └── exclusive.json │ │ ├── forge │ │ └── biome_modifier │ │ │ └── tea_tree.json │ │ ├── recipes │ │ ├── black_tea.json │ │ ├── cup.json │ │ ├── cup_cocoa_with_cinnamon.json │ │ ├── cup_tea_black_with_honey.json │ │ ├── cup_tea_chai_with_honey.json │ │ ├── cup_tea_green_with_honey.json │ │ ├── cup_tea_iced_with_honey.json │ │ ├── teapot.json │ │ ├── cup_tea_chorus_with_honey.json │ │ ├── cup_tea_floral_with_honey.json │ │ ├── teapot_hot_smelting.json │ │ ├── teapot_frothed_smelting.json │ │ ├── teapot_hot_campfire.json │ │ ├── teapot_frothed_campfire.json │ │ ├── tea_fence.json │ │ ├── tea_fence_gate.json │ │ ├── cup_tea_black.json │ │ ├── cup_tea_green.json │ │ ├── cup_tea_chorus.json │ │ ├── cup_tea_floral.json │ │ ├── teabag_green.json │ │ ├── teabag_black.json │ │ ├── teabag_floral.json │ │ ├── unfired_teapot.json │ │ ├── teabag_chorus.json │ │ ├── teabag.json │ │ ├── unfired_cup.json │ │ ├── cup_tea_iced.json │ │ ├── cup_cocoa.json │ │ └── cup_tea_chai.json │ │ ├── loot_tables │ │ └── blocks │ │ │ ├── tea_fence.json │ │ │ ├── tea_sapling.json │ │ │ ├── tea_fence_gate.json │ │ │ ├── potted_tea_sapling.json │ │ │ ├── tea_trunk.json │ │ │ └── tea_leaves.json │ │ └── advancements │ │ └── recipes │ │ ├── food │ │ ├── black_tea.json │ │ ├── cup_tea_iced.json │ │ ├── cup_cocoa.json │ │ ├── cup_tea_black.json │ │ ├── cup_tea_chai.json │ │ ├── cup_tea_green.json │ │ ├── cup_tea_chorus.json │ │ ├── cup_tea_floral.json │ │ ├── cup_cocoa_with_cinnamon.json │ │ ├── cup_tea_chai_with_honey.json │ │ ├── cup_tea_iced_with_honey.json │ │ ├── cup_tea_black_with_honey.json │ │ ├── cup_tea_green_with_honey.json │ │ ├── cup_tea_chorus_with_honey.json │ │ └── cup_tea_floral_with_honey.json │ │ └── misc │ │ ├── cup.json │ │ ├── tea_fence.json │ │ ├── teapot.json │ │ ├── teabag_black.json │ │ ├── teabag_green.json │ │ ├── unfired_cup.json │ │ ├── teabag_floral.json │ │ ├── tea_fence_gate.json │ │ ├── teabag_chorus.json │ │ ├── unfired_teapot.json │ │ ├── teapot_hot_campfire.json │ │ ├── teapot_hot_smelting.json │ │ ├── teapot_frothed_campfire.json │ │ ├── teapot_frothed_smelting.json │ │ └── teabag.json └── main │ ├── resources │ ├── simplytea.png │ ├── assets │ │ └── simplytea │ │ │ ├── models │ │ │ ├── item │ │ │ │ ├── tea_fence_gate.json │ │ │ │ ├── cup.json │ │ │ │ ├── teabag.json │ │ │ │ ├── teapot.json │ │ │ │ ├── ice_cube.json │ │ │ │ ├── tea_leaf.json │ │ │ │ ├── black_tea.json │ │ │ │ ├── cup_cocoa.json │ │ │ │ ├── cup_teabag.json │ │ │ │ ├── cup_water.json │ │ │ │ ├── tea_stick.json │ │ │ │ ├── teapot_milk.json │ │ │ │ ├── unfired_cup.json │ │ │ │ ├── chorus_petal.json │ │ │ │ ├── cup_tea_black.json │ │ │ │ ├── cup_tea_chai.json │ │ │ │ ├── cup_tea_green.json │ │ │ │ ├── cup_tea_iced.json │ │ │ │ ├── tea_sapling.json │ │ │ │ ├── teabag_black.json │ │ │ │ ├── teabag_chorus.json │ │ │ │ ├── teabag_floral.json │ │ │ │ ├── teabag_green.json │ │ │ │ ├── teapot_hot.json │ │ │ │ ├── teapot_water.json │ │ │ │ ├── cup_tea_chorus.json │ │ │ │ ├── cup_tea_floral.json │ │ │ │ ├── teapot_frothed.json │ │ │ │ ├── unfired_teapot.json │ │ │ │ └── tea_fence.json │ │ │ └── block │ │ │ │ ├── potted_tea_sapling.json │ │ │ │ ├── sapling.json │ │ │ │ ├── fence │ │ │ │ ├── post.json │ │ │ │ └── side.json │ │ │ │ ├── tree │ │ │ │ ├── top_clipped.json │ │ │ │ ├── bottom_clipped.json │ │ │ │ ├── middle_clipped.json │ │ │ │ ├── branch_clipped.json │ │ │ │ ├── stump.json │ │ │ │ ├── top.json │ │ │ │ ├── bottom.json │ │ │ │ ├── middle.json │ │ │ │ └── branch.json │ │ │ │ └── fence_gate │ │ │ │ ├── wall_closed.json │ │ │ │ ├── normal_closed.json │ │ │ │ ├── normal_open.json │ │ │ │ └── wall_open.json │ │ │ ├── blockstates │ │ │ ├── tea_sapling.json │ │ │ ├── potted_tea_sapling.json │ │ │ ├── tea_fence.json │ │ │ ├── tea_trunk.json │ │ │ └── tea_fence_gate.json │ │ │ ├── textures │ │ │ ├── logo.png │ │ │ ├── item │ │ │ │ ├── teabag.png │ │ │ │ ├── teapot.png │ │ │ │ ├── cup_cocoa.png │ │ │ │ ├── cup_empty.png │ │ │ │ ├── cup_water.png │ │ │ │ ├── ice_cube.png │ │ │ │ ├── tea_leaf.png │ │ │ │ ├── tea_stick.png │ │ │ │ ├── cup_teabag.png │ │ │ │ ├── cup_unfired.png │ │ │ │ ├── teapot_milk.png │ │ │ │ ├── chorus_petal.png │ │ │ │ ├── cup_tea_black.png │ │ │ │ ├── cup_tea_chai.png │ │ │ │ ├── cup_tea_chorus.png │ │ │ │ ├── cup_tea_floral.png │ │ │ │ ├── cup_tea_green.png │ │ │ │ ├── cup_tea_iced.png │ │ │ │ ├── fermented_tea.png │ │ │ │ ├── teabag_black.png │ │ │ │ ├── teabag_chorus.png │ │ │ │ ├── teabag_floral.png │ │ │ │ ├── teabag_green.png │ │ │ │ ├── teapot_boiling.png │ │ │ │ ├── teapot_frothed.png │ │ │ │ ├── teapot_unfired.png │ │ │ │ ├── teapot_water.png │ │ │ │ ├── teabag_chamomile.png │ │ │ │ └── cup_tea_chamomile.png │ │ │ ├── block │ │ │ │ ├── bark_tea.png │ │ │ │ ├── leaves_tea.png │ │ │ │ ├── tea_fence.png │ │ │ │ ├── tea_sapling.png │ │ │ │ └── tea_fence_gate.png │ │ │ └── mob_effect │ │ │ │ ├── relaxed.png │ │ │ │ ├── restful.png │ │ │ │ ├── caffeinated.png │ │ │ │ ├── enderfalling.png │ │ │ │ └── invigorated.png │ │ │ └── lang │ │ │ ├── nl_nl.json │ │ │ ├── de_de.json │ │ │ ├── zh_cn.json │ │ │ ├── pl_pl.json │ │ │ ├── ru_ru.json │ │ │ ├── ja_jp.json │ │ │ └── en_us.json │ ├── pack.mcmeta │ ├── data │ │ ├── forge │ │ │ └── loot_modifiers │ │ │ │ └── global_loot_modifiers.json │ │ └── simplytea │ │ │ ├── recipes │ │ │ ├── cup_kiln.json │ │ │ └── teapot_kiln.json │ │ │ └── loot_modifiers │ │ │ ├── chorus_petals.json │ │ │ └── ice_cubes.json │ └── META-INF │ │ ├── accesstransformer.cfg │ │ └── mods.toml │ └── java │ └── knightminer │ └── simplytea │ ├── package-info.java │ ├── core │ ├── package-info.java │ ├── config │ │ ├── package-info.java │ │ ├── Tree.java │ │ ├── CocoaDrink.java │ │ ├── Drink.java │ │ ├── Teapot.java │ │ └── TeaDrink.java │ ├── ClientEvents.java │ ├── Config.java │ ├── Util.java │ └── Events.java │ ├── data │ ├── package-info.java │ ├── gen │ │ ├── package-info.java │ │ ├── LootTableGenerator.java │ │ ├── BlockTagGenerator.java │ │ ├── ItemTagGenerator.java │ │ ├── WorldgenGenerator.java │ │ └── BlockLootTableGenerator.java │ ├── SimplyTags.java │ └── AddEntryLootModifier.java │ ├── item │ ├── package-info.java │ ├── TeaStickItem.java │ ├── HotTeapotItem.java │ ├── WoodBlockItem.java │ ├── TooltipItem.java │ ├── CocoaItem.java │ ├── TeaCupItem.java │ └── TeapotItem.java │ ├── block │ └── package-info.java │ ├── potion │ ├── package-info.java │ ├── EnderfallingEffect.java │ ├── InvigoratedEffect.java │ ├── CaffeinatedEffect.java │ ├── RelaxedEffect.java │ └── RestfulEffect.java │ ├── worldgen │ ├── package-info.java │ ├── TeaTreeGrower.java │ ├── TreeGenEnabledPlacement.java │ └── TeaTreeFeature.java │ ├── SimplyTea.java │ └── fluid │ └── FluidTeapotWrapper.java ├── README.md ├── gradle.properties ├── settings.gradle ├── .gitattributes ├── .gitignore ├── LICENSE └── gradlew.bat /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/items/crops/tea.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_leaf" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/items/ice_cubes.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:ice_cube" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/simplytea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/simplytea.png -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/blocks/fences/wooden.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/items/fences/wooden.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/items/rods/wooden.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_stick" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/items/saplings.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_sapling" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/tea_fence_gate.json: -------------------------------------------------------------------------------- 1 | { "parent": "simplytea:block/fence_gate/normal_closed" } 2 | -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/saplings.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_sapling" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/wooden_fences.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/items/wooden_fences.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Simply Tea resources", 4 | "pack_format": 15 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/blocks/fence_gates/wooden.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence_gate" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/forge/tags/items/fence_gates/wooden.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence_gate" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/fence_gates.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_fence_gate" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/flower_pots.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:potted_tea_sapling" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/worldgen/configured_feature/tea_tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:tea_tree", 3 | "config": {} 4 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/blockstates/tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": {"model": "simplytea:block/sapling"} 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_empty" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teabag.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teabag" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/logo.png -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/tags/items/teas.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:cup_tea_floral", 4 | "#simplytea:teas/exclusive" 5 | ] 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/ice_cube.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/ice_cube" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/tea_leaf.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/tea_leaf" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/black_tea.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/fermented_tea" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_cocoa.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_cocoa" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_teabag.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_teabag" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_water.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_water" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/tea_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/tea_stick" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teapot_milk.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot_milk" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/unfired_cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_unfired" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/chorus_petal.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/chorus_petal" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_black" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_chai.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_chai" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_green" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_iced.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_iced" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:block/tea_sapling" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teabag_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teabag_black" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teabag_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teabag_chorus" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teabag_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teabag_floral" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teabag_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teabag_green" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teapot_hot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot_boiling" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teapot_water.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot_water" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/blockstates/potted_tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "simplytea:block/potted_tea_sapling" } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_chorus" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/cup_tea_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/cup_tea_floral" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/teapot_frothed.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot_frothed" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/unfired_teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent":"item/generated", 3 | "textures": { 4 | "layer0":"simplytea:item/teapot_unfired" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/block/bark_tea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/block/bark_tea.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_cocoa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_cocoa.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_empty.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_water.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/ice_cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/ice_cube.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/tea_leaf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/tea_leaf.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/tea_stick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/tea_stick.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/block/leaves_tea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/block/leaves_tea.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/block/tea_fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/block/tea_fence.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_teabag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_teabag.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_unfired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_unfired.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot_milk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot_milk.png -------------------------------------------------------------------------------- /src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "entries": [ 4 | "simplytea:chorus_petals", 5 | "simplytea:ice_cubes" 6 | ] 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/block/tea_sapling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/block/tea_sapling.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/chorus_petal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/chorus_petal.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_black.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_chai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_chai.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_chorus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_chorus.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_floral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_floral.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_green.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_iced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_iced.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/fermented_tea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/fermented_tea.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag_black.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag_chorus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag_chorus.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag_floral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag_floral.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag_green.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot_boiling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot_boiling.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot_frothed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot_frothed.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot_unfired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot_unfired.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teapot_water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teapot_water.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/mob_effect/relaxed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/mob_effect/relaxed.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/mob_effect/restful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/mob_effect/restful.png -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:tea_trunk", 4 | "simplytea:tea_fence", 5 | "simplytea:tea_fence_gate" 6 | ] 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/block/tea_fence_gate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/block/tea_fence_gate.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/teabag_chamomile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/teabag_chamomile.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/item/cup_tea_chamomile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/item/cup_tea_chamomile.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/mob_effect/caffeinated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/mob_effect/caffeinated.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/mob_effect/enderfalling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/mob_effect/enderfalling.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/textures/mob_effect/invigorated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KnightMiner/SimplyTea/HEAD/src/main/resources/assets/simplytea/textures/mob_effect/invigorated.png -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/potted_tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/flower_pot_cross", 3 | "textures": { 4 | "plant": "simplytea:block/tea_sapling" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/forge/biome_modifier/tea_tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:add_features", 3 | "biomes": "#minecraft:is_forest", 4 | "features": "simplytea:tea_tree", 5 | "step": "vegetal_decoration" 6 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/tags/items/teas/exclusive.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "simplytea:cup_tea_green", 4 | "simplytea:cup_tea_black", 5 | "simplytea:cup_tea_iced", 6 | "simplytea:cup_tea_chai", 7 | "simplytea:cup_tea_chorus" 8 | ] 9 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/black_tea.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smoking", 3 | "category": "food", 4 | "cookingtime": 200, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "tag": "forge:crops/tea" 8 | }, 9 | "result": "simplytea:black_tea" 10 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smelting", 3 | "category": "misc", 4 | "cookingtime": 300, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:unfired_cup" 8 | }, 9 | "result": "simplytea:cup" 10 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.core; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.data; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.item; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_cocoa_with_cinnamon.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_cinnamon", 4 | "honey": { 5 | "item": "simplytea:tea_stick" 6 | }, 7 | "tag": "with_cinnamon", 8 | "tea": "simplytea:cup_cocoa" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_black_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_black" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_chai_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_chai" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_green_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_green" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_iced_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_iced" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smelting", 3 | "category": "misc", 4 | "cookingtime": 300, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:unfired_teapot" 8 | }, 9 | "result": "simplytea:teapot" 10 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/block/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.block; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.potion; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_chorus_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_chorus" 9 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_floral_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:shapeless_honey", 3 | "group": "simplytea:with_honey", 4 | "honey": { 5 | "item": "minecraft:honey_bottle" 6 | }, 7 | "tag": "with_honey", 8 | "tea": "simplytea:cup_tea_floral" 9 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.data.gen; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/worldgen/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.worldgen; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/cross", 4 | "textures": { 5 | "particle": "simplytea:block/tea_sapling", 6 | "cross": "simplytea:block/tea_sapling" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/package-info.java: -------------------------------------------------------------------------------- 1 | @ParametersAreNonnullByDefault 2 | @MethodsReturnNonnullByDefault 3 | package knightminer.simplytea.core.config; 4 | 5 | import net.minecraft.MethodsReturnNonnullByDefault; 6 | 7 | import javax.annotation.ParametersAreNonnullByDefault; 8 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teapot_hot_smelting.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smelting", 3 | "category": "misc", 4 | "cookingtime": 300, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:teapot_water" 8 | }, 9 | "result": "simplytea:teapot_hot" 10 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teapot_frothed_smelting.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smelting", 3 | "category": "misc", 4 | "cookingtime": 300, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:teapot_milk" 8 | }, 9 | "result": "simplytea:teapot_frothed" 10 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teapot_hot_campfire.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:campfire_cooking", 3 | "category": "food", 4 | "cookingtime": 900, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:teapot_water" 8 | }, 9 | "result": "simplytea:teapot_hot" 10 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teapot_frothed_campfire.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:campfire_cooking", 3 | "category": "food", 4 | "cookingtime": 900, 5 | "experience": 0.35, 6 | "ingredient": { 7 | "item": "simplytea:teapot_milk" 8 | }, 9 | "result": "simplytea:teapot_frothed" 10 | } -------------------------------------------------------------------------------- /src/main/resources/data/simplytea/recipes/cup_kiln.json: -------------------------------------------------------------------------------- 1 | { 2 | "conditions": [{ 3 | "type": "forge:mod_loaded", 4 | "modid": "ceramics" 5 | }], 6 | "type": "ceramics:kiln", 7 | "ingredient": { 8 | "item": "simplytea:unfired_cup" 9 | }, 10 | "result": "simplytea:cup", 11 | "experience": 0.1, 12 | "cookingtime": 100 13 | } -------------------------------------------------------------------------------- /src/main/resources/data/simplytea/recipes/teapot_kiln.json: -------------------------------------------------------------------------------- 1 | { 2 | "conditions": [{ 3 | "type": "forge:mod_loaded", 4 | "modid": "ceramics" 5 | }], 6 | "type": "ceramics:kiln", 7 | "ingredient": { 8 | "item": "simplytea:unfired_teapot" 9 | }, 10 | "result": "simplytea:teapot", 11 | "experience": 0.1, 12 | "cookingtime": 100 13 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Simply Tea](https://minecraft.curseforge.com/projects/simply-tea) 2 | 3 | A simple tea mod made for /u/Pickles256 on Reddit! Current features: 4 | 5 | * Tea trees that spawn in your world! 6 | * Teapots that you can fill with water and boil! 7 | * Five different types of tea, including green, black, dandelion, chamomile, and chai! 8 | * Hot Chocolate! 9 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | mod_version=2.7.0 2 | 3 | # Minecraft 4 | minecraft_version=1.20.1 5 | minecraft_range=[1.20.1,1.20.2) 6 | minecraft_base_version=1.20.1 7 | 8 | # Forge 9 | # mappings_version=20201028-1.16.3 10 | forge_version=47.1.3 11 | forge_range=[47.1.0,) 12 | loader_range=[47.0,) 13 | 14 | # Other mods 15 | parchment_version=2023.09.03 16 | 17 | org.gradle.jvmargs=-Xmx3G -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | maven { 5 | name = 'MinecraftForge' 6 | url = 'https://maven.minecraftforge.net/' 7 | } 8 | maven { url = 'https://maven.parchmentmc.org' } 9 | } 10 | } 11 | 12 | plugins { 13 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' 14 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/tea_fence.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "s": { 6 | "item": "simplytea:tea_stick" 7 | } 8 | }, 9 | "pattern": [ 10 | "sss", 11 | "sss" 12 | ], 13 | "result": { 14 | "count": 2, 15 | "item": "simplytea:tea_fence" 16 | }, 17 | "show_notification": true 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/tea_fence_gate.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "s": { 6 | "item": "simplytea:tea_stick" 7 | } 8 | }, 9 | "pattern": [ 10 | "sss", 11 | " s ", 12 | "sss" 13 | ], 14 | "result": { 15 | "item": "simplytea:tea_fence_gate" 16 | }, 17 | "show_notification": true 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_black" 10 | }, 11 | { 12 | "item": "simplytea:teapot_hot" 13 | } 14 | ], 15 | "result": { 16 | "item": "simplytea:cup_tea_black" 17 | } 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_green" 10 | }, 11 | { 12 | "item": "simplytea:teapot_hot" 13 | } 14 | ], 15 | "result": { 16 | "item": "simplytea:cup_tea_green" 17 | } 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_chorus" 10 | }, 11 | { 12 | "item": "simplytea:teapot_hot" 13 | } 14 | ], 15 | "result": { 16 | "item": "simplytea:cup_tea_chorus" 17 | } 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_floral" 10 | }, 11 | { 12 | "item": "simplytea:teapot_hot" 13 | } 14 | ], 15 | "result": { 16 | "item": "simplytea:cup_tea_floral" 17 | } 18 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teabag_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "group": "simplytea:teabag", 5 | "ingredients": [ 6 | { 7 | "item": "simplytea:teabag" 8 | }, 9 | { 10 | "item": "simplytea:tea_leaf" 11 | }, 12 | { 13 | "item": "simplytea:tea_leaf" 14 | } 15 | ], 16 | "result": { 17 | "item": "simplytea:teabag_green" 18 | } 19 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teabag_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "group": "simplytea:teabag", 5 | "ingredients": [ 6 | { 7 | "item": "simplytea:teabag" 8 | }, 9 | { 10 | "item": "simplytea:black_tea" 11 | }, 12 | { 13 | "item": "simplytea:black_tea" 14 | } 15 | ], 16 | "result": { 17 | "item": "simplytea:teabag_black" 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teabag_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "group": "simplytea:teabag", 5 | "ingredients": [ 6 | { 7 | "item": "simplytea:teabag" 8 | }, 9 | { 10 | "item": "minecraft:dandelion" 11 | }, 12 | { 13 | "item": "minecraft:dandelion" 14 | } 15 | ], 16 | "result": { 17 | "item": "simplytea:teabag_floral" 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/unfired_teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "B": { 6 | "item": "minecraft:bone_meal" 7 | }, 8 | "C": { 9 | "item": "minecraft:clay_ball" 10 | } 11 | }, 12 | "pattern": [ 13 | "CBC", 14 | "CC " 15 | ], 16 | "result": { 17 | "item": "simplytea:unfired_teapot" 18 | }, 19 | "show_notification": true 20 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teabag_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "group": "simplytea:teabag", 5 | "ingredients": [ 6 | { 7 | "item": "simplytea:teabag" 8 | }, 9 | { 10 | "item": "simplytea:chorus_petal" 11 | }, 12 | { 13 | "item": "simplytea:chorus_petal" 14 | } 15 | ], 16 | "result": { 17 | "item": "simplytea:teabag_chorus" 18 | } 19 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/teabag.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "P": { 6 | "item": "minecraft:paper" 7 | }, 8 | "S": { 9 | "item": "minecraft:string" 10 | } 11 | }, 12 | "pattern": [ 13 | " S", 14 | "PP ", 15 | "PP " 16 | ], 17 | "result": { 18 | "count": 4, 19 | "item": "simplytea:teabag" 20 | }, 21 | "show_notification": true 22 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/unfired_cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "B": { 6 | "item": "minecraft:bone_meal" 7 | }, 8 | "C": { 9 | "item": "minecraft:clay_ball" 10 | } 11 | }, 12 | "pattern": [ 13 | "CBC", 14 | " C " 15 | ], 16 | "result": { 17 | "count": 2, 18 | "item": "simplytea:unfired_cup" 19 | }, 20 | "show_notification": true 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_iced.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_green" 10 | }, 11 | { 12 | "item": "minecraft:apple" 13 | }, 14 | { 15 | "tag": "forge:ice_cubes" 16 | } 17 | ], 18 | "result": { 19 | "item": "simplytea:cup_tea_iced" 20 | } 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_cocoa.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "minecraft:cocoa_beans" 10 | }, 11 | { 12 | "item": "minecraft:cocoa_beans" 13 | }, 14 | { 15 | "item": "simplytea:teapot_frothed" 16 | } 17 | ], 18 | "result": { 19 | "item": "simplytea:cup_cocoa" 20 | } 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/recipes/cup_tea_chai.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "simplytea:cup" 7 | }, 8 | { 9 | "item": "simplytea:teabag_black" 10 | }, 11 | { 12 | "item": "simplytea:tea_stick" 13 | }, 14 | { 15 | "item": "simplytea:teapot_frothed" 16 | } 17 | ], 18 | "result": { 19 | "item": "simplytea:cup_tea_chai" 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/TeaStickItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import net.minecraft.world.item.ItemStack; 4 | import net.minecraft.world.item.crafting.RecipeType; 5 | import org.jetbrains.annotations.Nullable; 6 | 7 | public class TeaStickItem extends TooltipItem { 8 | 9 | public TeaStickItem(Properties props) { 10 | super(props); 11 | } 12 | 13 | @Override 14 | public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { 15 | return 100; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/tea_fence.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "simplytea:tea_fence" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "simplytea:blocks/tea_fence" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "simplytea:tea_sapling" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "simplytea:blocks/tea_sapling" 21 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/tea_fence_gate.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "simplytea:tea_fence_gate" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ], 20 | "random_sequence": "simplytea:blocks/tea_fence_gate" 21 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/HotTeapotItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import net.minecraft.world.item.ItemStack; 4 | 5 | public class HotTeapotItem extends TooltipItem { 6 | public HotTeapotItem(Properties props) { 7 | super(props); 8 | } 9 | 10 | @Override 11 | public ItemStack getCraftingRemainingItem(ItemStack stack) { 12 | stack = stack.copy(); 13 | stack.setDamageValue(stack.getDamageValue()+1); 14 | if (stack.getDamageValue() >= stack.getMaxDamage()) { 15 | return super.getCraftingRemainingItem(stack); 16 | } 17 | return stack; 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/blockstates/tea_fence.json: -------------------------------------------------------------------------------- 1 | { 2 | "multipart": [ 3 | { "apply": { "model": "simplytea:block/fence/post" }}, 4 | { "when": { "north": "true" }, 5 | "apply": { "model": "simplytea:block/fence/side" } 6 | }, 7 | { "when": { "east": "true" }, 8 | "apply": { "model": "simplytea:block/fence/side", "y": 90 } 9 | }, 10 | { "when": { "south": "true" }, 11 | "apply": { "model": "simplytea:block/fence/side", "y": 180 } 12 | }, 13 | { "when": { "west": "true" }, 14 | "apply": { "model": "simplytea:block/fence/side", "y": 270 } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/WoodBlockItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import net.minecraft.world.item.BlockItem; 4 | import net.minecraft.world.item.ItemStack; 5 | import net.minecraft.world.item.crafting.RecipeType; 6 | import net.minecraft.world.level.block.Block; 7 | import org.jetbrains.annotations.Nullable; 8 | 9 | public class WoodBlockItem extends BlockItem { 10 | public WoodBlockItem(Block block, Properties props) { 11 | super(block, props); 12 | } 13 | 14 | @Override 15 | public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { 16 | return 300; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/worldgen/TeaTreeGrower.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.worldgen; 2 | 3 | import knightminer.simplytea.core.Registration; 4 | import net.minecraft.resources.ResourceKey; 5 | import net.minecraft.util.RandomSource; 6 | import net.minecraft.world.level.block.grower.AbstractTreeGrower; 7 | import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; 8 | 9 | public class TeaTreeGrower extends AbstractTreeGrower { 10 | 11 | @Override 12 | protected ResourceKey> getConfiguredFeature(RandomSource pRandom, boolean pLargeHive) { 13 | return Registration.configured_tea_tree; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/EnderfallingEffect.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.potion; 2 | 3 | import net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation; 4 | import net.minecraft.world.entity.ai.attributes.Attributes; 5 | import net.minecraft.world.effect.MobEffect; 6 | import net.minecraft.world.effect.MobEffectCategory; 7 | 8 | public class EnderfallingEffect extends MobEffect { 9 | 10 | public EnderfallingEffect() { 11 | super(MobEffectCategory.BENEFICIAL, 0x4E2043); 12 | 13 | this.addAttributeModifier(Attributes.KNOCKBACK_RESISTANCE, "8ACB8640-6D4E-11E9-A923-1681BE663D3E", 0.25, Operation.MULTIPLY_TOTAL); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/data/simplytea/loot_modifiers/chorus_petals.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:add_loot_entry", 3 | "conditions": [ 4 | { 5 | "condition": "forge:loot_table_id", 6 | "loot_table_id": "minecraft:blocks/chorus_flower" 7 | }, 8 | { "condition": "minecraft:survives_explosion" }, 9 | { 10 | "condition": "minecraft:inverted", 11 | "term": { 12 | "condition": "minecraft:entity_properties", 13 | "predicate": {}, 14 | "entity": "this" 15 | } 16 | } 17 | ], 18 | "entry": { 19 | "type": "minecraft:item", 20 | "name": "simplytea:chorus_petal", 21 | "functions": [{ 22 | "function": "minecraft:set_count", 23 | "count": { "min": 1, "max": 3 } 24 | }] 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/SimplyTea.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea; 2 | 3 | import knightminer.simplytea.core.Config; 4 | import knightminer.simplytea.data.SimplyTags; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.ModLoadingContext; 7 | import net.minecraftforge.fml.common.Mod; 8 | import net.minecraftforge.fml.config.ModConfig; 9 | 10 | @Mod(SimplyTea.MOD_ID) 11 | public class SimplyTea { 12 | public static final String MOD_ID = "simplytea"; 13 | public static SimplyTea instance; 14 | 15 | public SimplyTea() { 16 | instance = this; 17 | 18 | ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Config.serverSpec); 19 | MinecraftForge.EVENT_BUS.register(this); 20 | SimplyTags.init(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/InvigoratedEffect.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.potion; 2 | 3 | 4 | import net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation; 5 | import net.minecraft.world.entity.ai.attributes.Attributes; 6 | import net.minecraft.world.effect.MobEffect; 7 | import net.minecraft.world.effect.MobEffectCategory; 8 | 9 | public class InvigoratedEffect extends MobEffect { 10 | public InvigoratedEffect() { 11 | super(MobEffectCategory.BENEFICIAL, 0xD79659); 12 | 13 | this.addAttributeModifier(Attributes.ATTACK_DAMAGE, "38dd13a2-b4f1-11eb-8529-0242ac130003", 1, Operation.ADDITION); 14 | this.addAttributeModifier(Attributes.ATTACK_KNOCKBACK, "401daf1e-b4f1-11eb-8529-0242ac130003", 1, Operation.ADDITION); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/CaffeinatedEffect.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.potion; 2 | 3 | import net.minecraft.world.entity.ai.attributes.AttributeModifier.Operation; 4 | import net.minecraft.world.entity.ai.attributes.Attributes; 5 | import net.minecraft.world.effect.MobEffect; 6 | import net.minecraft.world.effect.MobEffectCategory; 7 | 8 | public class CaffeinatedEffect extends MobEffect { 9 | 10 | public CaffeinatedEffect() { 11 | super(MobEffectCategory.BENEFICIAL, 0x66300E); 12 | 13 | this.addAttributeModifier(Attributes.MOVEMENT_SPEED, "7BB42B36-75AC-448D-9BE2-B318E42D6898", 0.06, Operation.MULTIPLY_TOTAL); 14 | this.addAttributeModifier(Attributes.ATTACK_SPEED, "C3B3B80D-B94D-4C67-83FC-5A893EB98230", 0.05, Operation.MULTIPLY_TOTAL); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/black_tea.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "tag": "forge:crops/tea" 9 | } 10 | ] 11 | }, 12 | "trigger": "minecraft:inventory_changed" 13 | }, 14 | "has_the_recipe": { 15 | "conditions": { 16 | "recipe": "simplytea:black_tea" 17 | }, 18 | "trigger": "minecraft:recipe_unlocked" 19 | } 20 | }, 21 | "requirements": [ 22 | [ 23 | "has_item", 24 | "has_the_recipe" 25 | ] 26 | ], 27 | "rewards": { 28 | "recipes": [ 29 | "simplytea:black_tea" 30 | ] 31 | }, 32 | "sends_telemetry_event": false 33 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_iced.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_ice": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "tag": "forge:ice_cubes" 9 | } 10 | ] 11 | }, 12 | "trigger": "minecraft:inventory_changed" 13 | }, 14 | "has_the_recipe": { 15 | "conditions": { 16 | "recipe": "simplytea:cup_tea_iced" 17 | }, 18 | "trigger": "minecraft:recipe_unlocked" 19 | } 20 | }, 21 | "requirements": [ 22 | [ 23 | "has_ice", 24 | "has_the_recipe" 25 | ] 26 | ], 27 | "rewards": { 28 | "recipes": [ 29 | "simplytea:cup_tea_iced" 30 | ] 31 | }, 32 | "sends_telemetry_event": false 33 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence/post.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "particle": "simplytea:block/tea_fence", 4 | "texture": "simplytea:block/tea_fence" 5 | }, 6 | "elements": [ 7 | { "from": [ 6, 0, 6 ], 8 | "to": [ 10, 16, 10 ], 9 | "faces": { 10 | "down": { "uv": [ 12, 12, 16, 16 ], "texture": "#texture", "cullface": "down" }, 11 | "up": { "uv": [ 8, 12, 12, 16 ], "texture": "#texture", "cullface": "up" }, 12 | "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 13 | "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 14 | "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 15 | "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } 16 | } 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/top_clipped.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/bark_tea", 6 | "bark": "simplytea:block/bark_tea" 7 | }, 8 | "elements": [ 9 | { 10 | "__comment": "Cube1", 11 | "from": [ 6.5, 0, 6.5 ], 12 | "to": [ 9.5, 8, 9.5 ], 13 | "faces": { 14 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 15 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 16 | "north": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 17 | "south": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 18 | "west": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 19 | "east": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" } 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:cup" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:unfired_cup" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/bottom_clipped.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/bark_tea", 6 | "bark": "simplytea:block/bark_tea" 7 | }, 8 | "elements": [ 9 | { 10 | "__comment": "Cube2", 11 | "from": [ 6.5, 0, 6.5 ], 12 | "to": [ 9.5, 16, 9.5 ], 13 | "faces": { 14 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 15 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 16 | "north": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 17 | "south": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 18 | "west": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 19 | "east": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" } 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/middle_clipped.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/bark_tea", 6 | "bark": "simplytea:block/bark_tea" 7 | }, 8 | "elements": [ 9 | { 10 | "__comment": "Cube1", 11 | "from": [ 6.5, 0, 6.5 ], 12 | "to": [ 9.5, 16, 9.5 ], 13 | "faces": { 14 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 15 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 16 | "north": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 17 | "south": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 18 | "west": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 19 | "east": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" } 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:cocoa_beans" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_cocoa" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_cocoa" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/tea_fence.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_stick": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:tea_stick" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:tea_fence" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_stick", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:tea_fence" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:teapot" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:unfired_teapot" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teapot" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teabag_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_leaf": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:black_tea" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:teabag_black" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_leaf", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teabag_black" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teabag_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_leaf": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:tea_leaf" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:teabag_green" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_leaf", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teabag_green" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/unfired_cup.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:clay_ball" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:unfired_cup" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:unfired_cup" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:teabag_black" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_black" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_black" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:teabag_black" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_chai" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_chai" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:teabag_green" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_green" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_green" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teabag_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_leaf": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:dandelion" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:teabag_floral" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_leaf", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teabag_floral" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:teabag_chorus" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_chorus" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_chorus" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_bag": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:teabag_floral" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_floral" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_bag", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_floral" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/tea_fence_gate.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_stick": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:tea_stick" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:tea_fence_gate" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_stick", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:tea_fence_gate" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teabag_chorus.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_leaf": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:chorus_petal" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:teabag_chorus" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_leaf", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teabag_chorus" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/unfired_teapot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:clay_ball" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:unfired_teapot" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:unfired_teapot" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #ant stuff 2 | /bin/ 3 | /download/ 4 | 5 | #Remove OS generated garbage 6 | */.DS_Store 7 | .DS_Store 8 | .DS_Store? 9 | .Spotlight-V100 10 | .Trashes 11 | Icon? 12 | ehthumbs.db 13 | Thumbs.db 14 | 15 | #gradle stuff 16 | /.gradle 17 | /build/ 18 | /libs/ 19 | /sources/ 20 | /run*/ 21 | /ui/ 22 | *.launch 23 | gradle-app.setting 24 | 25 | #IDEA files from Gradle 26 | .idea/ 27 | /*.iml 28 | /*.ipr 29 | /*.iws 30 | /out 31 | /classes/ 32 | 33 | #Vim backups 34 | *~ 35 | 36 | #manual version override 37 | version.properties 38 | 39 | #eclipse stuffs 40 | /.classpath 41 | /.project 42 | /.settings/ 43 | /eclipse/ 44 | /debug/ 45 | *.lock 46 | /.metadata/ 47 | /config/ 48 | /logs/ 49 | options.txt 50 | /saves/ 51 | /src_old 52 | /resources_old 53 | /resources/assets/tinker 54 | /resources/assets/unused 55 | /design 56 | /*.launch 57 | src/generated/resources/.cache/ 58 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teapot_hot_campfire.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:teapot_hot_campfire" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:teapot_water" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teapot_hot_campfire" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teapot_hot_smelting.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:teapot_hot_smelting" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:teapot_water" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teapot_hot_smelting" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/branch_clipped.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/bark_tea", 6 | "bark": "simplytea:block/bark_tea" 7 | }, 8 | "elements": [ 9 | { 10 | "__comment": "Cube2", 11 | "from": [ 6.5, 6.5, -6.5 ], 12 | "to": [ 9.5, 9.5, 8 ], 13 | "faces": { 14 | "down": { "uv": [ 3, 0, 0, 13.5 ], "texture": "#bark" }, 15 | "up": { "uv": [ 3, 0, 0, 13.5 ], "texture": "#bark" }, 16 | "north": { "uv": [ 7, 7, 4, 4 ], "texture": "#bark" }, 17 | "south": { "uv": [ 7, 7, 4, 4 ], "texture": "#bark" }, 18 | "west": { "uv": [ 0, 16, 3, 3.5 ], "texture": "#bark", "rotation": 90 }, 19 | "east": { "uv": [ 0, 16, 3, 3.5 ], "texture": "#bark", "rotation": 90 } 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_with_cinnamon.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "simplytea:tea_stick" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_cocoa_with_cinnamon" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_cocoa_with_cinnamon" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_chai_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_chai_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_iced_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_iced_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_iced_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_black_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_black_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_green_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_green_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_chorus_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_chorus_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_with_honey.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_item": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:honey_bottle" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_the_recipe": { 17 | "conditions": { 18 | "recipe": "simplytea:cup_tea_floral_with_honey" 19 | }, 20 | "trigger": "minecraft:recipe_unlocked" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_item", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:cup_tea_floral_with_honey" 32 | ] 33 | }, 34 | "sends_telemetry_event": true 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teapot_frothed_campfire.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:teapot_frothed_campfire" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:teapot_milk" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teapot_frothed_campfire" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teapot_frothed_smelting.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_the_recipe": { 5 | "conditions": { 6 | "recipe": "simplytea:teapot_frothed_smelting" 7 | }, 8 | "trigger": "minecraft:recipe_unlocked" 9 | }, 10 | "has_unfired": { 11 | "conditions": { 12 | "items": [ 13 | { 14 | "items": [ 15 | "simplytea:teapot_milk" 16 | ] 17 | } 18 | ] 19 | }, 20 | "trigger": "minecraft:inventory_changed" 21 | } 22 | }, 23 | "requirements": [ 24 | [ 25 | "has_unfired", 26 | "has_the_recipe" 27 | ] 28 | ], 29 | "rewards": { 30 | "recipes": [ 31 | "simplytea:teapot_frothed_smelting" 32 | ] 33 | }, 34 | "sends_telemetry_event": false 35 | } -------------------------------------------------------------------------------- /src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | # Simply Tea -- Access Transformer 2 | 3 | # Configurable drink stats 4 | protected net.minecraft.world.food.FoodProperties (IFZZZLjava/util/List;)V 5 | 6 | # Generic plant composting 7 | public net.minecraft.world.level.block.ComposterBlock m_51920_(FLnet/minecraft/world/level/ItemLike;)V # registerCompostable 8 | 9 | # Fire registration 10 | public net.minecraft.world.level.block.FireBlock m_53444_(Lnet/minecraft/world/level/block/Block;II)V # setFireInfo 11 | 12 | # Loot table generation 13 | protected net.minecraft.data.loot.BlockLoot f_124070_ # lootTables 14 | 15 | # Milk curative effects 16 | public net.minecraft.world.entity.LivingEntity m_7285_(Lnet/minecraft/world/effect/MobEffectInstance;)V # onFinishedPotionEffect 17 | public net.minecraft.server.level.ServerPlayer m_7285_(Lnet/minecraft/world/effect/MobEffectInstance;)V # onFinishedPotionEffect -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/potted_tea_sapling.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "minecraft:flower_pot" 15 | } 16 | ], 17 | "rolls": 1.0 18 | }, 19 | { 20 | "bonus_rolls": 0.0, 21 | "conditions": [ 22 | { 23 | "condition": "minecraft:survives_explosion" 24 | } 25 | ], 26 | "entries": [ 27 | { 28 | "type": "minecraft:item", 29 | "name": "simplytea:tea_sapling" 30 | } 31 | ], 32 | "rolls": 1.0 33 | } 34 | ], 35 | "random_sequence": "simplytea:blocks/potted_tea_sapling" 36 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/TooltipItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import net.minecraft.ChatFormatting; 4 | import net.minecraft.network.chat.Component; 5 | import net.minecraft.world.item.Item; 6 | import net.minecraft.world.item.ItemStack; 7 | import net.minecraft.world.item.TooltipFlag; 8 | import net.minecraft.world.level.Level; 9 | import net.minecraftforge.common.util.Lazy; 10 | 11 | import javax.annotation.Nullable; 12 | import java.util.List; 13 | 14 | public class TooltipItem extends Item { 15 | private final Lazy tooltipLine; 16 | public TooltipItem(Properties props) { 17 | super(props); 18 | tooltipLine = Lazy.of(()->Component.translatable(this.getDescriptionId() + ".tooltip").withStyle(ChatFormatting.GRAY)); 19 | } 20 | 21 | @Override 22 | public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { 23 | tooltip.add(tooltipLine.get()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/RelaxedEffect.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.potion; 2 | 3 | import net.minecraft.world.entity.LivingEntity; 4 | import net.minecraft.world.effect.MobEffect; 5 | import net.minecraft.world.effect.MobEffectCategory; 6 | 7 | /** Effectively just slow regeneration */ 8 | public class RelaxedEffect extends MobEffect { 9 | public RelaxedEffect() { 10 | super(MobEffectCategory.BENEFICIAL, 0xA0E8A7); 11 | } 12 | 13 | @Override 14 | public void applyEffectTick(LivingEntity entityLivingBaseIn, int amplifier) { 15 | if (entityLivingBaseIn.getHealth() < entityLivingBaseIn.getMaxHealth()) { 16 | entityLivingBaseIn.heal(1.0F); 17 | } 18 | } 19 | 20 | @Override 21 | public boolean isDurationEffectTick(int duration, int amplifier) { 22 | // at level 1, 1 half heart every 60 seconds 23 | // level 2, every 30 seconds 24 | // level 3, every 20 seconds 25 | int frequency = 1200 / (amplifier + 1); 26 | return frequency == 0 || duration % frequency == 1; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/mods.toml: -------------------------------------------------------------------------------- 1 | modLoader="javafml" 2 | loaderVersion="${loader_range}" 3 | issueTrackerURL="https://github.com/elucent/SimplyTea/issues" 4 | license="MIT" 5 | 6 | [[mods]] 7 | modId="simplytea" 8 | version="${version}" 9 | displayName="Simply Tea" 10 | displayURL="https://minecraft.curseforge.com/projects/simply-tea" 11 | logoFile="simplytea.png" 12 | credits="Original mod made by Elucent, who also designed most of the textures" 13 | authors="Elucent, KnightMiner" 14 | description=''' 15 | A simple tea mod made for /u/Pickles256 on Reddit! 16 | 17 | Contains: 18 | * Tea trees that spawn in your world! 19 | * Teapots that you can fill with water and boil! 20 | * Five types of tea: green, black, chai, floral, and chorus; with different effects! 21 | ''' 22 | [[dependencies.simplytea]] 23 | modId="forge" 24 | mandatory=true 25 | versionRange="${forge_range}" 26 | ordering="NONE" 27 | side="BOTH" 28 | # Here's another dependency 29 | [[dependencies.simplytea]] 30 | modId="minecraft" 31 | mandatory=true 32 | versionRange="${minecraft_range}" 33 | ordering="NONE" 34 | side="BOTH" -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/advancements/recipes/misc/teabag.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:recipes/root", 3 | "criteria": { 4 | "has_floral": { 5 | "conditions": { 6 | "items": [ 7 | { 8 | "items": [ 9 | "minecraft:dandelion" 10 | ] 11 | } 12 | ] 13 | }, 14 | "trigger": "minecraft:inventory_changed" 15 | }, 16 | "has_leaf": { 17 | "conditions": { 18 | "items": [ 19 | { 20 | "items": [ 21 | "simplytea:tea_leaf" 22 | ] 23 | } 24 | ] 25 | }, 26 | "trigger": "minecraft:inventory_changed" 27 | }, 28 | "has_the_recipe": { 29 | "conditions": { 30 | "recipe": "simplytea:teabag" 31 | }, 32 | "trigger": "minecraft:recipe_unlocked" 33 | } 34 | }, 35 | "requirements": [ 36 | [ 37 | "has_floral", 38 | "has_leaf", 39 | "has_the_recipe" 40 | ] 41 | ], 42 | "rewards": { 43 | "recipes": [ 44 | "simplytea:teabag" 45 | ] 46 | }, 47 | "sends_telemetry_event": false 48 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 KnightMiner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/potion/RestfulEffect.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.potion; 2 | 3 | import net.minecraft.world.entity.LivingEntity; 4 | import net.minecraft.world.effect.MobEffect; 5 | import net.minecraft.world.effect.MobEffectCategory; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class RestfulEffect extends MobEffect { 11 | private static final List CONFLICTING = new ArrayList<>(); 12 | 13 | public RestfulEffect() { 14 | super(MobEffectCategory.BENEFICIAL, 0xAD601A); 15 | } 16 | 17 | /** Marks an effect as preventing restfulness */ 18 | public static void addConflict(MobEffect effect) { 19 | CONFLICTING.add(effect); 20 | } 21 | 22 | /** 23 | * Removes the effects that conflict with restful 24 | * @return true If the effect was removed 25 | */ 26 | public static boolean removeConflicts(LivingEntity entity) { 27 | boolean hasConflicts = false; 28 | for (MobEffect effect : CONFLICTING) { 29 | if (entity.hasEffect(effect)) { 30 | entity.removeEffect(effect); 31 | hasConflicts = true; 32 | } 33 | } 34 | return hasConflicts; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/worldgen/TreeGenEnabledPlacement.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.worldgen; 2 | 3 | 4 | import com.mojang.serialization.Codec; 5 | import knightminer.simplytea.core.Config; 6 | import knightminer.simplytea.core.Registration; 7 | import net.minecraft.core.BlockPos; 8 | import net.minecraft.util.RandomSource; 9 | import net.minecraft.world.level.levelgen.placement.PlacementContext; 10 | import net.minecraft.world.level.levelgen.placement.PlacementFilter; 11 | import net.minecraft.world.level.levelgen.placement.PlacementModifierType; 12 | 13 | public class TreeGenEnabledPlacement extends PlacementFilter { 14 | public static final TreeGenEnabledPlacement INSTANCE = new TreeGenEnabledPlacement(); 15 | public static Codec CODEC = Codec.unit(() -> INSTANCE); 16 | 17 | private TreeGenEnabledPlacement() {} 18 | 19 | @Override 20 | protected boolean shouldPlace(PlacementContext pContext, RandomSource pRandom, BlockPos pPos) { 21 | return Config.SERVER.tree.generate(); 22 | } 23 | 24 | @Override 25 | public PlacementModifierType type() { 26 | return Registration.tree_gen_enabled; 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/SimplyTags.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import net.minecraft.core.registries.Registries; 5 | import net.minecraft.resources.ResourceLocation; 6 | import net.minecraft.tags.TagKey; 7 | import net.minecraft.world.item.Item; 8 | 9 | public class SimplyTags { 10 | /** Initializes the tags, called on init */ 11 | public static void init() { 12 | Items.init(); 13 | } 14 | 15 | public static class Items { 16 | public static final TagKey TEA_CROP = forgeTag("crops/tea"); 17 | 18 | public static final TagKey TEAS = tag("teas"); 19 | public static final TagKey EXCLUSIVE_TEAS = tag("teas/exclusive"); 20 | public static final TagKey ICE_CUBES = forgeTag("ice_cubes"); 21 | 22 | 23 | private static TagKey tag(String name) { 24 | return TagKey.create(Registries.ITEM, new ResourceLocation(SimplyTea.MOD_ID, name)); 25 | } 26 | 27 | private static TagKey forgeTag(String name) { 28 | return TagKey.create(Registries.ITEM, new ResourceLocation("forge", name)); 29 | } 30 | 31 | private static void init() {} 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/worldgen/placed_feature/tea_tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "feature": "simplytea:tea_tree", 3 | "placement": [ 4 | { 5 | "type": "simplytea:tree_gen_enabled" 6 | }, 7 | { 8 | "type": "minecraft:rarity_filter", 9 | "chance": 128 10 | }, 11 | { 12 | "type": "minecraft:in_square" 13 | }, 14 | { 15 | "type": "minecraft:heightmap", 16 | "heightmap": "WORLD_SURFACE_WG" 17 | }, 18 | { 19 | "type": "minecraft:biome" 20 | }, 21 | { 22 | "type": "minecraft:block_predicate_filter", 23 | "predicate": { 24 | "type": "minecraft:would_survive", 25 | "state": { 26 | "Name": "simplytea:tea_sapling", 27 | "Properties": { 28 | "stage": "0" 29 | } 30 | } 31 | } 32 | }, 33 | { 34 | "type": "minecraft:block_predicate_filter", 35 | "predicate": { 36 | "type": "minecraft:would_survive", 37 | "state": { 38 | "Name": "simplytea:tea_sapling", 39 | "Properties": { 40 | "stage": "0" 41 | } 42 | } 43 | } 44 | } 45 | ] 46 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/Tree.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core.config; 2 | 3 | import net.minecraftforge.common.ForgeConfigSpec; 4 | import net.minecraftforge.common.ForgeConfigSpec.BooleanValue; 5 | import net.minecraftforge.common.ForgeConfigSpec.DoubleValue; 6 | 7 | public class Tree { 8 | private BooleanValue generate; 9 | private DoubleValue regrow_chance; 10 | public Tree(ForgeConfigSpec.Builder builder) { 11 | builder.comment("Options related to tea trees").push("tree"); 12 | generate = builder.comment("If true, tea trees generate in the world") 13 | .translation("config.simplytea.tree.generation") 14 | .define("generation", true); 15 | regrow_chance = builder.comment("Chance of leaves to regrow every random tick.") 16 | .translation("config.simplytea.tree.regrow_chance") 17 | .defineInRange("regrow_chance", 0.05, 0.0, 1.0); 18 | builder.pop(); 19 | } 20 | 21 | /** True if teapots generate in the world */ 22 | public boolean generate() { 23 | return generate.get(); 24 | } 25 | 26 | /** Chance between 0 and 1 of a tree leaf to regrow every random tick */ 27 | public double regrowthChance() { 28 | return regrow_chance.get(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/LootTableGenerator.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data.gen; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import net.minecraft.data.PackOutput; 5 | import net.minecraft.data.loot.LootTableProvider; 6 | import net.minecraft.resources.ResourceLocation; 7 | import net.minecraft.world.level.storage.loot.LootTable; 8 | import net.minecraft.world.level.storage.loot.ValidationContext; 9 | import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | import java.util.Set; 14 | 15 | public class LootTableGenerator extends LootTableProvider { 16 | public LootTableGenerator(PackOutput output) { 17 | super(output, Set.of(), 18 | List.of(new SubProviderEntry(BlockLootTableGenerator::new, LootContextParamSets.BLOCK)) 19 | ); 20 | } 21 | 22 | @Override 23 | protected void validate(Map map, ValidationContext validationtracker) { 24 | map.forEach((loc, table) -> table.validate(validationtracker)); 25 | // Remove vanilla's tables, which we also loaded so we can redirect stuff to them. 26 | // This ensures the remaining generator logic doesn't write those to files. 27 | map.keySet().removeIf((loc) -> !loc.getNamespace().equals(SimplyTea.MOD_ID)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence/side.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "particle": "simplytea:block/tea_fence", 4 | "texture": "simplytea:block/tea_fence" 5 | }, 6 | "elements": [ 7 | { "__comment": "top bar", 8 | "from": [ 7, 12, 0 ], 9 | "to": [ 9, 15, 6 ], 10 | "faces": { 11 | "down": { "uv": [ 4, 9, 10, 11 ], "texture": "#texture", "rotation": 90 }, 12 | "up": { "uv": [ 4, 0, 10, 2 ], "texture": "#texture", "rotation": 90 }, 13 | "north": { "uv": [ 4, 13, 6, 16 ], "texture": "#texture", "cullface": "north" }, 14 | "west": { "uv": [ 10, 2, 16, 5 ], "texture": "#texture" }, 15 | "east": { "uv": [ 4, 2, 10, 5 ], "texture": "#texture" } 16 | } 17 | }, 18 | { "__comment": "lower bar", 19 | "from": [ 7, 6, 0 ], 20 | "to": [ 9, 9, 6 ], 21 | "faces": { 22 | "down": { "uv": [ 10, 10, 16, 12 ], "texture": "#texture", "rotation": 270 }, 23 | "up": { "uv": [ 10, 0, 16, 2 ], "texture": "#texture", "rotation": 270 }, 24 | "north": { "uv": [ 6, 13, 8, 16 ], "texture": "#texture", "cullface": "north" }, 25 | "west": { "uv": [ 10, 7, 16, 10 ], "texture": "#texture" }, 26 | "east": { "uv": [ 4, 7, 10, 10 ], "texture": "#texture" } 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/stump.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/bark_tea", 6 | "texture": "simplytea:block/bark_tea" 7 | }, 8 | "elements": [ 9 | { 10 | "__comment": "Cube1", 11 | "from": [ 6, 0, 6 ], 12 | "to": [ 10, 8, 10 ], 13 | "faces": { 14 | "down": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture" }, 15 | "up": { "uv": [ 4, 0, 8, 4 ], "texture": "#texture" }, 16 | "north": { "uv": [ 0, 0, 4, 8 ], "texture": "#texture" }, 17 | "south": { "uv": [ 0, 0, 4, 8 ], "texture": "#texture" }, 18 | "west": { "uv": [ 0, 0, 4, 8 ], "texture": "#texture" }, 19 | "east": { "uv": [ 0, 0, 4, 8 ], "texture": "#texture" } 20 | } 21 | }, 22 | { 23 | "__comment": "Cube1", 24 | "from": [ 6.5, 8, 6.5 ], 25 | "to": [ 9.5, 16, 9.5 ], 26 | "faces": { 27 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#texture" }, 28 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#texture" }, 29 | "north": { "uv": [ 0, 8, 3, 16 ], "texture": "#texture" }, 30 | "south": { "uv": [ 0, 8, 3, 16 ], "texture": "#texture" }, 31 | "west": { "uv": [ 0, 8, 3, 16 ], "texture": "#texture" }, 32 | "east": { "uv": [ 0, 8, 3, 16 ], "texture": "#texture" } 33 | } 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/blockstates/tea_trunk.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants":{ 3 | "clipped=false,type=stump": {"model": "simplytea:block/tree/stump"}, 4 | "clipped=true,type=stump": {"model": "simplytea:block/tree/stump"}, 5 | "clipped=false,type=bottom": {"model": "simplytea:block/tree/bottom"}, 6 | "clipped=true,type=bottom": {"model": "simplytea:block/tree/bottom_clipped"}, 7 | "clipped=false,type=middle": {"model": "simplytea:block/tree/middle"}, 8 | "clipped=true,type=middle": {"model": "simplytea:block/tree/middle_clipped"}, 9 | "clipped=false,type=top": {"model": "simplytea:block/tree/top"}, 10 | "clipped=true,type=top": {"model": "simplytea:block/tree/top_clipped"}, 11 | "clipped=false,type=north": {"model": "simplytea:block/tree/branch"}, 12 | "clipped=true,type=north": {"model": "simplytea:block/tree/branch_clipped"}, 13 | "clipped=false,type=east": {"model": "simplytea:block/tree/branch", "y": 90}, 14 | "clipped=true,type=east": {"model": "simplytea:block/tree/branch_clipped", "y": 90}, 15 | "clipped=false,type=south": {"model": "simplytea:block/tree/branch", "y": 180}, 16 | "clipped=true,type=south": {"model": "simplytea:block/tree/branch_clipped", "y": 180}, 17 | "clipped=false,type=west": {"model": "simplytea:block/tree/branch", "y": 270}, 18 | "clipped=true,type=west": {"model": "simplytea:block/tree/branch_clipped", "y": 270} 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/top.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/leaves_tea", 6 | "bark": "simplytea:block/bark_tea", 7 | "leaves": "simplytea:block/leaves_tea" 8 | }, 9 | "elements": [ 10 | { 11 | "__comment": "Bark", 12 | "from": [ 6.5, 0, 6.5 ], 13 | "to": [ 9.5, 8, 9.5 ], 14 | "faces": { 15 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 16 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 17 | "north": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 18 | "south": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 19 | "west": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" }, 20 | "east": { "uv": [ 0, 8, 3, 0 ], "texture": "#bark" } 21 | } 22 | }, 23 | { 24 | "__comment": "Leaves", 25 | "from": [ 2, 0.01, 2 ], 26 | "to": [ 14, 12.01, 14 ], 27 | "faces": { 28 | "down": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 29 | "up": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 30 | "north": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 31 | "south": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 32 | "west": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 33 | "east": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/bottom.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/leaves_tea", 6 | "bark": "simplytea:block/bark_tea", 7 | "leaves": "simplytea:block/leaves_tea" 8 | }, 9 | "elements": [ 10 | { 11 | "__comment": "Leaves", 12 | "from": [ 2, 4.01, 2 ], 13 | "to": [ 14, 16.01, 14 ], 14 | "faces": { 15 | "down": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 16 | "up": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 17 | "north": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 18 | "south": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 19 | "west": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 20 | "east": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 } 21 | } 22 | }, 23 | { 24 | "__comment": "Bark", 25 | "from": [ 6.5, 0, 6.5 ], 26 | "to": [ 9.5, 16, 9.5 ], 27 | "faces": { 28 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 29 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 30 | "north": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 31 | "south": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 32 | "west": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 33 | "east": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/middle.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/leaves_tea", 6 | "bark": "simplytea:block/bark_tea", 7 | "leaves": "simplytea:block/leaves_tea" 8 | }, 9 | "elements": [ 10 | { 11 | "__comment": "Bark", 12 | "from": [ 6.5, 0, 6.5 ], 13 | "to": [ 9.5, 16, 9.5 ], 14 | "faces": { 15 | "down": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 16 | "up": { "uv": [ 4, 4, 7, 7 ], "texture": "#bark" }, 17 | "north": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 18 | "south": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 19 | "west": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" }, 20 | "east": { "uv": [ 0, 16, 3, 0 ], "texture": "#bark" } 21 | } 22 | }, 23 | { 24 | "__comment": "Leaves", 25 | "from": [ 0, 0.01, 0 ], 26 | "to": [ 16, 16.01, 16 ], 27 | "faces": { 28 | "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 }, 29 | "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 }, 30 | "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 }, 31 | "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 }, 32 | "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 }, 33 | "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#leaves", "tintindex": 0 } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/tree/branch.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Designed by Elucent with Cubik Studio - https://cubik.studio", 3 | "parent":"block/block", 4 | "textures": { 5 | "particle": "simplytea:block/leaves_tea", 6 | "leaves": "simplytea:block/leaves_tea", 7 | "bark": "simplytea:block/bark_tea" 8 | }, 9 | "elements": [ 10 | { 11 | "__comment": "Leaves", 12 | "from": [ 2, 2, 0 ], 13 | "to": [ 14, 14, 12 ], 14 | "faces": { 15 | "down": { "uv": [ 2, 4, 14, 16 ], "texture": "#leaves", "tintindex": 0 }, 16 | "up": { "uv": [ 2, 0, 14, 12 ], "texture": "#leaves", "tintindex": 0 }, 17 | "north": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 18 | "south": { "uv": [ 2, 2, 14, 14 ], "texture": "#leaves", "tintindex": 0 }, 19 | "west": { "uv": [ 0, 2, 12, 14 ], "texture": "#leaves", "tintindex": 0 }, 20 | "east": { "uv": [ 4, 2, 16, 14 ], "texture": "#leaves", "tintindex": 0 } 21 | } 22 | }, 23 | { 24 | "__comment": "Bark", 25 | "from": [ 6.5, 6.5, -6.5 ], 26 | "to": [ 9.5, 9.5, 8 ], 27 | "faces": { 28 | "down": { "uv": [ 3, 0, 0, 13.5 ], "texture": "#bark" }, 29 | "up": { "uv": [ 3, 0, 0, 13.5 ], "texture": "#bark" }, 30 | "north": { "uv": [ 7, 7, 4, 4 ], "texture": "#bark" }, 31 | "south": { "uv": [ 7, 7, 4, 4 ], "texture": "#bark" }, 32 | "west": { "uv": [ 0, 16, 3, 3.5 ], "texture": "#bark", "rotation": 90 }, 33 | "east": { "uv": [ 0, 16, 3, 3.5 ], "texture": "#bark", "rotation": 90 } 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/tea_trunk.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "functions": [ 4 | { 5 | "function": "minecraft:explosion_decay" 6 | } 7 | ], 8 | "pools": [ 9 | { 10 | "bonus_rolls": 0.0, 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "simplytea:tea_stick" 15 | } 16 | ], 17 | "rolls": 1.0 18 | }, 19 | { 20 | "bonus_rolls": 0.0, 21 | "entries": [ 22 | { 23 | "type": "minecraft:item", 24 | "functions": [ 25 | { 26 | "enchantment": "minecraft:fortune", 27 | "formula": "minecraft:binomial_with_bonus_count", 28 | "function": "minecraft:apply_bonus", 29 | "parameters": { 30 | "extra": 2, 31 | "probability": 0.55 32 | } 33 | } 34 | ], 35 | "name": "simplytea:tea_stick" 36 | } 37 | ], 38 | "rolls": 1.0 39 | }, 40 | { 41 | "bonus_rolls": 0.0, 42 | "conditions": [ 43 | { 44 | "block": "simplytea:tea_trunk", 45 | "condition": "minecraft:block_state_property", 46 | "properties": { 47 | "clipped": "false" 48 | } 49 | } 50 | ], 51 | "entries": [ 52 | { 53 | "type": "minecraft:loot_table", 54 | "name": "simplytea:blocks/tea_leaves" 55 | } 56 | ], 57 | "rolls": 1.0 58 | } 59 | ], 60 | "random_sequence": "simplytea:blocks/tea_trunk" 61 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/BlockTagGenerator.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data.gen; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import knightminer.simplytea.core.Registration; 5 | import net.minecraft.core.HolderLookup; 6 | import net.minecraft.data.PackOutput; 7 | import net.minecraft.tags.BlockTags; 8 | import net.minecraftforge.common.Tags; 9 | import net.minecraftforge.common.data.BlockTagsProvider; 10 | import net.minecraftforge.common.data.ExistingFileHelper; 11 | 12 | import java.util.concurrent.CompletableFuture; 13 | 14 | public class BlockTagGenerator extends BlockTagsProvider { 15 | public BlockTagGenerator(PackOutput output, CompletableFuture lookupProvider, ExistingFileHelper existing) { 16 | super(output, lookupProvider, SimplyTea.MOD_ID, existing); 17 | } 18 | 19 | @Override 20 | public String getName() { 21 | return "Simply Tea Block Tags"; 22 | } 23 | 24 | @Override 25 | protected void addTags(HolderLookup.Provider provider) { 26 | // tea saplings 27 | this.tag(BlockTags.FLOWER_POTS).add(Registration.potted_tea_sapling); 28 | this.tag(BlockTags.SAPLINGS).add(Registration.tea_sapling); 29 | // tea fences 30 | this.tag(BlockTags.WOODEN_FENCES).add(Registration.tea_fence); 31 | this.tag(Tags.Blocks.FENCES_WOODEN).add(Registration.tea_fence); 32 | this.tag(BlockTags.FENCE_GATES).add(Registration.tea_fence_gate); 33 | this.tag(Tags.Blocks.FENCE_GATES_WOODEN).add(Registration.tea_fence_gate); 34 | 35 | this.tag(BlockTags.MINEABLE_WITH_AXE).add(Registration.tea_trunk, Registration.tea_fence, Registration.tea_fence_gate); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/ClientEvents.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import net.minecraft.client.renderer.RenderType; 5 | import net.minecraft.client.renderer.ItemBlockRenderTypes; 6 | import net.minecraft.world.level.FoliageColor; 7 | import net.minecraft.client.renderer.BiomeColors; 8 | import net.minecraftforge.api.distmarker.Dist; 9 | import net.minecraftforge.client.event.RegisterColorHandlersEvent; 10 | import net.minecraftforge.eventbus.api.SubscribeEvent; 11 | import net.minecraftforge.fml.common.Mod; 12 | import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; 13 | import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; 14 | 15 | @Mod.EventBusSubscriber(modid = SimplyTea.MOD_ID, bus = Bus.MOD, value = Dist.CLIENT) 16 | public class ClientEvents { 17 | @SubscribeEvent 18 | public static void registerBlockColors(RegisterColorHandlersEvent.Block event) { 19 | event.register((state, world, pos, index) -> { 20 | if (world == null || pos == null) { 21 | return FoliageColor.getDefaultColor(); 22 | } 23 | return BiomeColors.getAverageFoliageColor(world, pos); 24 | }, Registration.tea_trunk); 25 | } 26 | 27 | @SubscribeEvent 28 | public static void registerMisc(FMLClientSetupEvent event) { 29 | // set render types 30 | RenderType cutout_mipped = RenderType.cutoutMipped(); 31 | ItemBlockRenderTypes.setRenderLayer(Registration.tea_sapling, cutout_mipped); 32 | ItemBlockRenderTypes.setRenderLayer(Registration.potted_tea_sapling, cutout_mipped); 33 | ItemBlockRenderTypes.setRenderLayer(Registration.tea_trunk, cutout_mipped); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/CocoaDrink.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core.config; 2 | 3 | import net.minecraftforge.common.ForgeConfigSpec; 4 | 5 | public class CocoaDrink extends Drink { 6 | private final ForgeConfigSpec.EnumValue clear_effects; 7 | 8 | /** 9 | * Creates a new tea settings category for the given tea 10 | * @param builder Config builder 11 | * @param hunger Default hunger value 12 | * @param saturation Default saturation value 13 | */ 14 | public CocoaDrink(ForgeConfigSpec.Builder builder, int hunger, double saturation) { 15 | super("cocoa", builder, hunger, saturation); 16 | this.clear_effects = builder.comment("If ALL, drinking cocoa clears status effects like milk", "If NEGATIVE, clears only negative effects (default)", "If NONE, does not clear effects", "For all values, regular cocoa clears just the first effect, while cocoa with cinnamon clears all") 17 | .translation("simplytea.config.tea.clear_effects") 18 | .defineEnum("clear_effects", ClearType.NEGATIVE); 19 | builder.pop(); 20 | } 21 | 22 | /** 23 | * If true, drinking cocoa clears effects 24 | * @return true if cocoa clears effects 25 | */ 26 | public boolean clearsEffects() { 27 | return clear_effects.get() != ClearType.NONE; 28 | } 29 | 30 | /** 31 | * If true, drinking cocoa clears positive effects 32 | * @return true if cocoa clears positive effects 33 | */ 34 | public boolean clearsPositive() { 35 | return clear_effects.get() == ClearType.ALL; 36 | } 37 | 38 | /** Clear options */ 39 | public enum ClearType { 40 | ALL, 41 | NEGATIVE, 42 | NONE 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/generated/resources/data/simplytea/loot_tables/blocks/tea_leaves.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "functions": [ 4 | { 5 | "function": "minecraft:explosion_decay" 6 | } 7 | ], 8 | "pools": [ 9 | { 10 | "bonus_rolls": 0.0, 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "simplytea:tea_leaf" 15 | } 16 | ], 17 | "rolls": 1.0 18 | }, 19 | { 20 | "bonus_rolls": 0.0, 21 | "entries": [ 22 | { 23 | "type": "minecraft:item", 24 | "functions": [ 25 | { 26 | "enchantment": "minecraft:fortune", 27 | "formula": "minecraft:binomial_with_bonus_count", 28 | "function": "minecraft:apply_bonus", 29 | "parameters": { 30 | "extra": 2, 31 | "probability": 0.55 32 | } 33 | } 34 | ], 35 | "name": "simplytea:tea_leaf" 36 | } 37 | ], 38 | "rolls": 1.0 39 | }, 40 | { 41 | "bonus_rolls": 0.0, 42 | "conditions": [ 43 | { 44 | "condition": "minecraft:survives_explosion" 45 | }, 46 | { 47 | "chances": [ 48 | 0.05, 49 | 0.0625, 50 | 0.083333336, 51 | 0.1 52 | ], 53 | "condition": "minecraft:table_bonus", 54 | "enchantment": "minecraft:fortune" 55 | } 56 | ], 57 | "entries": [ 58 | { 59 | "type": "minecraft:item", 60 | "name": "simplytea:tea_sapling" 61 | } 62 | ], 63 | "rolls": 1.0 64 | } 65 | ], 66 | "random_sequence": "simplytea:blocks/tea_leaves" 67 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/Drink.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core.config; 2 | 3 | import net.minecraft.world.food.FoodProperties; 4 | import net.minecraftforge.common.ForgeConfigSpec; 5 | 6 | import java.util.Collections; 7 | 8 | /** Extension of vanilla food to allow linking stats to config */ 9 | public class Drink extends FoodProperties { 10 | private ForgeConfigSpec.IntValue hunger; 11 | private ForgeConfigSpec.DoubleValue saturation; 12 | 13 | /** 14 | * Creates a new tea settings category for the given drink. 15 | * Note this does not call pop on the builder category, the class extending this is expected to call that in the constructor 16 | * @param builder Config builder 17 | * @param name Name of the drink 18 | * @param hunger Default hunger value 19 | * @param saturation Default saturation value 20 | */ 21 | protected Drink(String name, ForgeConfigSpec.Builder builder, int hunger, double saturation) { 22 | super(0, 0f, false, true, true, Collections.emptyList()); 23 | builder.comment(String.format("Stats for %s", name)).push(name); 24 | this.hunger = builder.comment("Hunger restored when drinking this drink.") 25 | .translation("simplytea.config.tea.hunger") 26 | .defineInRange("hunger", hunger, 0, 20); 27 | this.saturation = builder.comment("Saturation restored when drinking this drink.") 28 | .translation("simplytea.config.tea.saturation") 29 | .defineInRange("saturation", saturation, 0D, 10D); 30 | } 31 | 32 | @Override 33 | public int getNutrition() { 34 | return hunger.get(); 35 | } 36 | 37 | @Override 38 | public float getSaturationModifier() { 39 | return saturation.get().floatValue(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/data/simplytea/loot_modifiers/ice_cubes.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "simplytea:add_loot_entry", 3 | "conditions": [ 4 | { 5 | "condition": "minecraft:any_of", 6 | "terms": [ 7 | { 8 | "condition": "forge:loot_table_id", 9 | "loot_table_id": "minecraft:blocks/ice" 10 | }, 11 | { 12 | "condition": "forge:loot_table_id", 13 | "loot_table_id": "minecraft:blocks/packed_ice" 14 | }, 15 | { 16 | "condition": "forge:loot_table_id", 17 | "loot_table_id": "minecraft:blocks/blue_ice" 18 | } 19 | ] 20 | }, 21 | { 22 | "condition": "forge:can_tool_perform_action", 23 | "action": "pickaxe_dig" 24 | }, 25 | { 26 | "condition": "minecraft:inverted", 27 | "term": { 28 | "condition": "minecraft:match_tool", 29 | "predicate": { 30 | "enchantments": [ 31 | { 32 | "enchantment": "minecraft:silk_touch", 33 | "levels": { 34 | "min": 1 35 | } 36 | } 37 | ] 38 | } 39 | } 40 | } 41 | ], 42 | "entry": { 43 | "type": "minecraft:item", 44 | "name": "simplytea:ice_cube", 45 | "functions": [ 46 | { 47 | "function": "minecraft:set_count", 48 | "count": { "min": 2, "max": 4, "type": "minecraft:uniform" } 49 | }, 50 | { 51 | "function": "minecraft:apply_bonus", 52 | "enchantment": "minecraft:fortune", 53 | "formula": "minecraft:uniform_bonus_count", 54 | "parameters": { 55 | "bonusMultiplier": 1 56 | } 57 | }, 58 | { 59 | "function": "minecraft:limit_count", 60 | "limit": { "min": 1, "max": 4 } 61 | } 62 | ] 63 | } 64 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/blockstates/tea_fence_gate.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=south,in_wall=false,open=false": {"model": "simplytea:block/fence_gate/normal_closed"}, 4 | "facing=west,in_wall=false,open=false": {"model": "simplytea:block/fence_gate/normal_closed", "y": 90}, 5 | "facing=north,in_wall=false,open=false": {"model": "simplytea:block/fence_gate/normal_closed", "y": 180}, 6 | "facing=east,in_wall=false,open=false": {"model": "simplytea:block/fence_gate/normal_closed", "y": 270}, 7 | 8 | "facing=south,in_wall=false,open=true": {"model": "simplytea:block/fence_gate/normal_open"}, 9 | "facing=west,in_wall=false,open=true": {"model": "simplytea:block/fence_gate/normal_open", "y": 90}, 10 | "facing=north,in_wall=false,open=true": {"model": "simplytea:block/fence_gate/normal_open", "y": 180}, 11 | "facing=east,in_wall=false,open=true": {"model": "simplytea:block/fence_gate/normal_open", "y": 270}, 12 | 13 | "facing=south,in_wall=true,open=false": {"model": "simplytea:block/fence_gate/wall_closed"}, 14 | "facing=west,in_wall=true,open=false": {"model": "simplytea:block/fence_gate/wall_closed", "y": 90}, 15 | "facing=north,in_wall=true,open=false": {"model": "simplytea:block/fence_gate/wall_closed", "y": 180}, 16 | "facing=east,in_wall=true,open=false": {"model": "simplytea:block/fence_gate/wall_closed", "y": 270}, 17 | 18 | "facing=south,in_wall=true,open=true": {"model": "simplytea:block/fence_gate/wall_open"}, 19 | "facing=west,in_wall=true,open=true": {"model": "simplytea:block/fence_gate/wall_open", "y": 90}, 20 | "facing=north,in_wall=true,open=true": {"model": "simplytea:block/fence_gate/wall_open", "y": 180}, 21 | "facing=east,in_wall=true,open=true": {"model": "simplytea:block/fence_gate/wall_open", "y": 270} 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/ItemTagGenerator.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data.gen; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import knightminer.simplytea.core.Registration; 5 | import knightminer.simplytea.data.SimplyTags; 6 | import net.minecraft.core.HolderLookup; 7 | import net.minecraft.data.PackOutput; 8 | import net.minecraft.data.tags.ItemTagsProvider; 9 | import net.minecraft.tags.BlockTags; 10 | import net.minecraft.tags.ItemTags; 11 | import net.minecraftforge.common.Tags; 12 | import net.minecraftforge.common.data.BlockTagsProvider; 13 | import net.minecraftforge.common.data.ExistingFileHelper; 14 | 15 | import java.util.concurrent.CompletableFuture; 16 | 17 | public class ItemTagGenerator extends ItemTagsProvider { 18 | public ItemTagGenerator(PackOutput output, BlockTagsProvider blockTags, CompletableFuture lookupProvider, ExistingFileHelper existing) { 19 | super(output, lookupProvider, blockTags.contentsGetter(), SimplyTea.MOD_ID, existing); 20 | } 21 | 22 | @Override 23 | public String getName() { 24 | return "Simply Tea Item Tags"; 25 | } 26 | 27 | @Override 28 | protected void addTags(HolderLookup.Provider provider) { 29 | this.tag(Tags.Items.RODS_WOODEN).add(Registration.tea_stick); 30 | this.tag(SimplyTags.Items.ICE_CUBES).add(Registration.ice_cube); 31 | this.tag(SimplyTags.Items.EXCLUSIVE_TEAS).add( 32 | Registration.cup_tea_green, Registration.cup_tea_black, 33 | Registration.cup_tea_iced, Registration.cup_tea_chai, Registration.cup_tea_chorus); 34 | this.tag(SimplyTags.Items.TEAS).add(Registration.cup_tea_floral).addTag(SimplyTags.Items.EXCLUSIVE_TEAS); 35 | 36 | this.tag(SimplyTags.Items.TEA_CROP).add(Registration.tea_leaf); 37 | 38 | // saplings 39 | copy(BlockTags.SAPLINGS, ItemTags.SAPLINGS); 40 | // fences 41 | copy(BlockTags.WOODEN_FENCES, ItemTags.WOODEN_FENCES); 42 | copy(Tags.Blocks.FENCES_WOODEN, Tags.Items.FENCES_WOODEN); 43 | copy(Tags.Blocks.FENCE_GATES_WOODEN, Tags.Items.FENCE_GATES_WOODEN); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/nl_nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "Thee boom", 5 | "block.simplytea.tea_trunk": "Theeboomstam", 6 | "block.simplytea.tea_fence": "Thee hek", 7 | "block.simplytea.tea_fence_gate": "Thee poort", 8 | 9 | "item.simplytea.tea_leaf": "Theeblad", 10 | "item.simplytea.tea_leaf.tooltip": "Prettige aroma!", 11 | "item.simplytea.black_tea": "Zwarte thee", 12 | "item.simplytea.black_tea.tooltip": "Gefermenteerde!", 13 | "item.simplytea.tea_stick": "Thee stokje", 14 | "item.simplytea.tea_stick.tooltip": "Zoet als kaneel!", 15 | "item.simplytea.chorus_petal": "Koorblaadje", 16 | "item.simplytea.chorus_petal.tooltip": "Mystieke!", 17 | 18 | "item.simplytea.cup": "Theekop", 19 | "item.simplytea.cup_water": "Glas water", 20 | "item.simplytea.cup_tea_green": "Kopje groene thee", 21 | "item.simplytea.cup_tea_black": "Kopje zwarte thee", 22 | "item.simplytea.cup_tea_floral": "Kopje paardenbloem thee", 23 | "item.simplytea.cup_tea_chai": "Kopje Chai thee", 24 | "item.simplytea.cup_tea_chamomile": "Kopje kamille thee", 25 | "item.simplytea.cup_tea_chorus": "Kopje koor thee", 26 | "item.simplytea.cup_cocoa": "Kopje warme chocolademelk", 27 | 28 | "item.simplytea.teabag": "Theezak", 29 | "item.simplytea.teabag_green": "Groene theezakje", 30 | "item.simplytea.teabag_black": "Zwarte theezakje", 31 | "item.simplytea.teabag_floral": "Paardebloem theezakje", 32 | "item.simplytea.teabag_chamomile": "Kamille theezakje", 33 | "item.simplytea.teabag_chorus": "Koor theezakje", 34 | 35 | "item.simplytea.teapot": "Theepot", 36 | "item.simplytea.teapot.tooltip": "Leeg!", 37 | "item.simplytea.teapot_water": "Theepot", 38 | "item.simplytea.teapot_water.tooltip": "Vol met water!", 39 | "item.simplytea.teapot_milk": "Theepot", 40 | "item.simplytea.teapot_milk.tooltip": "Vol met melk!!", 41 | "item.simplytea.teapot_hot": "Theepot", 42 | "item.simplytea.teapot_hot.tooltip": "Aan het koken!", 43 | "item.simplytea.teapot_frothed": "Theepot", 44 | "item.simplytea.teapot_frothed.tooltip": "Opgeschuimde melk!", 45 | 46 | "effect.simplytea.restful": "Rustgevend", 47 | "effect.simplytea.caffeinated": "Caffeinated", 48 | "effect.simplytea.enderfalling": "Enderfalling" 49 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/de_de.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "Teebaumsetzling", 5 | "block.simplytea.tea_trunk": "Teabaumstamm", 6 | "block.simplytea.tea_fence": "Teebaumzaun", 7 | "block.simplytea.tea_fence_gate": "Teebaumzauntor", 8 | 9 | "item.simplytea.tea_leaf": "Teebaumlaub", 10 | "item.simplytea.tea_leaf.tooltip": "Angenehmes Aroma!", 11 | "item.simplytea.black_tea": "Schwarzer Tee", 12 | "item.simplytea.black_tea.tooltip": "Fermentiert!", 13 | "item.simplytea.tea_stick": "Teebaum Stock", 14 | "item.simplytea.tea_stick.tooltip": "Süß wie Zimt!", 15 | "item.simplytea.chorus_petal": "Chorus Blütenblatt", 16 | "item.simplytea.chorus_petal.tooltip": "Mystisch!", 17 | 18 | "item.simplytea.cup": "Teetasse", 19 | "item.simplytea.cup_water": "Tasse Wasser", 20 | "item.simplytea.cup_tea_green": "Tasse grüner Tee", 21 | "item.simplytea.cup_tea_black": "Tasse schwarzer Tee", 22 | "item.simplytea.cup_tea_floral": "Tasse Löwenzahntee", 23 | "item.simplytea.cup_tea_chai": "Tasse Chai-Tee", 24 | "item.simplytea.cup_tea_chamomile": "Tasse Kamillentee", 25 | "item.simplytea.cup_tea_chorus": "Tasse Chorus Tee", 26 | "item.simplytea.cup_cocoa": "Tasse heiße Schokolade", 27 | 28 | "item.simplytea.teabag": "Teebeutel", 29 | "item.simplytea.teabag_green": "Beutel Grüner Tee", 30 | "item.simplytea.teabag_black": "Beutel Schwarzer Tee", 31 | "item.simplytea.teabag_floral": "Beutel Löwenzahntee", 32 | "item.simplytea.teabag_chamomile": "Beutel Kamillentee", 33 | "item.simplytea.teabag_chorus": "Beutel Chorustee", 34 | 35 | "item.simplytea.teapot": "Teekanne", 36 | "item.simplytea.teapot.tooltip": "Leer!", 37 | "item.simplytea.teapot_water": "Teekanne", 38 | "item.simplytea.teapot_water.tooltip": "Wasser!", 39 | "item.simplytea.teapot_milk": "Teekanne", 40 | "item.simplytea.teapot_milk.tooltip": "Milch!", 41 | "item.simplytea.teapot_hot": "Teekanne", 42 | "item.simplytea.teapot_hot.tooltip": "Heißes Wasser!", 43 | "item.simplytea.teapot_frothed": "Teekanne", 44 | "item.simplytea.teapot_frothed.tooltip": "Milchschaum!", 45 | 46 | "effect.simplytea.restful": "Beruihgend", 47 | "effect.simplytea.caffeinated": "Koffeinhaltig", 48 | "effect.simplytea.enderfalling": "Enderfalling" 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/Config.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core; 2 | 3 | import knightminer.simplytea.core.config.CocoaDrink; 4 | import knightminer.simplytea.core.config.TeaDrink; 5 | import knightminer.simplytea.core.config.TeaDrink.TeaEffect; 6 | import knightminer.simplytea.core.config.Teapot; 7 | import knightminer.simplytea.core.config.Tree; 8 | import net.minecraftforge.common.ForgeConfigSpec; 9 | import net.minecraftforge.common.ForgeConfigSpec.Builder; 10 | import org.apache.commons.lang3.tuple.Pair; 11 | 12 | //@Mod.EventBusSubscriber(modid=SimplyTea.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) 13 | public class Config { 14 | 15 | public static class Server { 16 | public TeaDrink black_tea, green_tea, floral_tea, chai_tea, chorus_tea, iced_tea; 17 | public CocoaDrink cocoa; 18 | public Teapot teapot; 19 | public Tree tree; 20 | public Server(Builder builder) { 21 | 22 | // drinks 23 | builder.comment("Stats for each available drink type").push("drinks"); 24 | floral_tea = new TeaDrink("floral", builder, TeaEffect.RESTFUL, 1, 0.5, 60, 2); 25 | green_tea = new TeaDrink("green", builder, TeaEffect.RELAXED, 3, 0.5, 120, 2); 26 | black_tea = new TeaDrink("black", builder, TeaEffect.CAFFEINATED, 4, 0.8, 210, 2); 27 | chai_tea = new TeaDrink("chai", builder, TeaEffect.INVIGORATED, 5, 0.6, 150, 1); 28 | chorus_tea = new TeaDrink("chorus", builder, TeaEffect.ENDERFALLING, 3, 0.9, 150, 1); 29 | iced_tea = new TeaDrink("iced", builder, TeaEffect.ABSORPTION, 3, 0.9, 90, 1); 30 | cocoa = new CocoaDrink(builder, 4, 0.6); 31 | builder.pop(); 32 | 33 | // other categories 34 | teapot = new Teapot(builder); 35 | tree = new Tree(builder); 36 | } 37 | } 38 | 39 | 40 | /* Initialize */ 41 | 42 | public static final ForgeConfigSpec serverSpec; 43 | public static final Server SERVER; 44 | static { 45 | final Pair specPair = new ForgeConfigSpec.Builder().configure(Server::new); 46 | serverSpec = specPair.getRight(); 47 | SERVER = specPair.getLeft(); 48 | } 49 | 50 | // @SubscribeEvent 51 | // public static void onFileChange(final ModConfig.Reloading event) { 52 | // // clear the effect cache so we get the new version of the config 53 | // if (event.getConfig().getType() == ModConfig.Type.SERVER) { 54 | // } 55 | // } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/zh_cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "简茶", 3 | 4 | "block.simplytea.tea_sapling": "茶树苗", 5 | "block.simplytea.tea_trunk": "茶树干", 6 | "block.simplytea.tea_fence": "茶枝栅栏", 7 | "block.simplytea.tea_fence_gate": "茶枝栅栏门", 8 | 9 | "item.simplytea.tea_leaf": "茶叶", 10 | "item.simplytea.tea_leaf.tooltip": "§8§o令人愉悦的清香§r", 11 | "item.simplytea.black_tea": "红茶", 12 | "item.simplytea.black_tea.tooltip": "§8§o「酵」§r", 13 | "item.simplytea.tea_stick": "茶枝", 14 | "item.simplytea.tea_stick.tooltip": "§8§o散发着肉桂般的香气§r", 15 | "item.simplytea.chorus_petal": "紫颂花瓣", 16 | "item.simplytea.chorus_petal.tooltip": "§8§o神秘之花§r", 17 | "item.simplytea.ice_cube": "冰块", 18 | "item.simplytea.ice_cube.tooltip": "冷", 19 | 20 | "item.simplytea.unfired_cup": "未烧制的茶杯", 21 | "item.simplytea.cup": "茶杯", 22 | "item.simplytea.cup_water": "清水", 23 | "item.simplytea.cup_tea_green": "绿茶", 24 | "item.simplytea.cup_tea_black": "红茶", 25 | "item.simplytea.cup_tea_floral": "蒲公英花茶", 26 | "item.simplytea.cup_tea_chai": "印度奶茶", 27 | "item.simplytea.cup_tea_iced": "苹果冰茶", 28 | "item.simplytea.cup_tea_chamomile": "黄春菊花茶", 29 | "item.simplytea.cup_tea_chorus": "紫颂花茶", 30 | "item.simplytea.cup_cocoa": "热可可", 31 | "item.simplytea.cup.with_honey": "加蜂蜜", 32 | "item.simplytea.cup.with_cinnamon": "加肉桂", 33 | 34 | "item.simplytea.teabag": "茶包", 35 | "item.simplytea.teabag_green": "绿茶包", 36 | "item.simplytea.teabag_black": "红茶包", 37 | "item.simplytea.teabag_floral": "蒲公英花茶包", 38 | "item.simplytea.teabag_chamomile": "黄春菊花茶包", 39 | "item.simplytea.teabag_chorus": "紫颂花茶包", 40 | 41 | "item.simplytea.unfired_teapot": "未烧制的茶壶", 42 | "item.simplytea.teapot": "茶壶", 43 | "item.simplytea.teapot.tooltip": "§8§o空§r", 44 | "item.simplytea.teapot_water": "茶壶", 45 | "item.simplytea.teapot_water.tooltip": "§8§o盛满:水§r", 46 | "item.simplytea.teapot_milk": "茶壶", 47 | "item.simplytea.teapot_milk.tooltip": "§8§o盛满:牛奶§r", 48 | "item.simplytea.teapot_hot": "茶壶", 49 | "item.simplytea.teapot_hot.tooltip": "§8§o小心烫伤!§r", 50 | "item.simplytea.teapot_frothed": "茶壶", 51 | "item.simplytea.teapot_frothed.tooltip": "§8§o表层漂浮着温热的奶泡§r", 52 | 53 | "effect.simplytea.restful": "安宁", 54 | "effect.simplytea.relaxed": "放松", 55 | "effect.simplytea.caffeinated": "精力充沛", 56 | "effect.simplytea.invigorated": "活力四射", 57 | "effect.simplytea.enderfalling": "末影护盾" 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/Util.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core; 2 | 3 | import net.minecraft.core.BlockPos; 4 | import net.minecraft.resources.ResourceLocation; 5 | import net.minecraft.server.level.ServerLevel; 6 | import net.minecraft.world.entity.Entity; 7 | import net.minecraft.world.entity.player.Player; 8 | import net.minecraft.world.item.ItemStack; 9 | import net.minecraft.world.level.block.entity.BlockEntity; 10 | import net.minecraft.world.level.block.state.BlockState; 11 | import net.minecraft.world.level.storage.loot.LootParams; 12 | import net.minecraft.world.level.storage.loot.LootTable; 13 | import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; 14 | import net.minecraft.world.level.storage.loot.parameters.LootContextParams; 15 | import net.minecraft.world.phys.Vec3; 16 | 17 | import javax.annotation.Nullable; 18 | import java.util.List; 19 | 20 | public final class Util { 21 | private Util () {} 22 | 23 | /** 24 | * Runs a given loot table resource location using block context. Compare to {@link net.minecraft.world.level.block.Block#getDrops(BlockState, ServerLevel, BlockPos, BlockEntity, Entity, ItemStack)} 25 | * @param state Current block state 26 | * @param world Server world for the block 27 | * @param pos Position of the block 28 | * @param player Player interacting wti the block 29 | * @param tool Tool being used on the block 30 | * @param location Location of loot table to use to get block drops 31 | * @return List of block drops 32 | */ 33 | public static List getBlockLoot(BlockState state, ServerLevel world, BlockPos pos, @Nullable Player player, ItemStack tool, ResourceLocation location) { 34 | LootParams.Builder builder = new LootParams.Builder(world) 35 | .withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)) 36 | .withParameter(LootContextParams.BLOCK_STATE, state) 37 | .withOptionalParameter(LootContextParams.BLOCK_ENTITY, world.getBlockEntity(pos)) 38 | .withOptionalParameter(LootContextParams.THIS_ENTITY, player) 39 | .withParameter(LootContextParams.TOOL, tool); 40 | LootParams context = builder.create(LootContextParamSets.BLOCK); 41 | LootTable table = world.getServer().getLootData().getLootTable(location); 42 | return table.getRandomItems(context); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/Teapot.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core.config; 2 | 3 | import net.minecraftforge.common.ForgeConfigSpec; 4 | import net.minecraftforge.common.ForgeConfigSpec.BooleanValue; 5 | import net.minecraftforge.common.ForgeConfigSpec.IntValue; 6 | import net.minecraftforge.fluids.FluidType; 7 | 8 | public class Teapot { 9 | private BooleanValue infinite_water; 10 | private BooleanValue fill_from_cauldron; 11 | private BooleanValue milk_cow; 12 | private IntValue teapot_capacity; 13 | public Teapot(ForgeConfigSpec.Builder builder) { 14 | builder.comment("Options related to filling the teapot").push("teapot"); 15 | infinite_water = builder.comment("If true, the teapot will not consume water source blocks when filling. It will still consume water from tank and cauldrons.") 16 | .translation("simplytea.config.teapot.infinite_water") 17 | .define("infinite_water", false); 18 | fill_from_cauldron = builder.comment("If true, the teapot can be filled with water from a cauldron") 19 | .translation("simplytea.config.teapot.fill_from_cauldron") 20 | .define("fill_from_cauldron", true); 21 | milk_cow = builder.comment("If true, cows can be milked using a teapot to fill it with milk") 22 | .translation("simplytea.config.teapot.milk_cow") 23 | .define("milk_cow", true); 24 | teapot_capacity = builder.comment("Amount of fluid consumed when filling a teapot from a tank") 25 | .translation("simplytea.config.teapot.teapot_capacity") 26 | .defineInRange("teapot_capacity", FluidType.BUCKET_VOLUME, 1, FluidType.BUCKET_VOLUME * 256); 27 | builder.pop(); 28 | } 29 | 30 | /** True if teapots can fill without removing the source */ 31 | public boolean infiniteWater() { 32 | return infinite_water.get(); 33 | } 34 | 35 | /** True if teapots can be filled from a cauldron */ 36 | public boolean fillFromCauldron() { 37 | return fill_from_cauldron.get(); 38 | } 39 | 40 | /** True if teapots can be used to milk cows */ 41 | public boolean canMilkCows() { 42 | return milk_cow.get(); 43 | } 44 | 45 | /** Amount of fluid a teapot can contain */ 46 | public int teapotCapacity() { 47 | return teapot_capacity.get(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/pl_pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "Sadzonka herbaty", 5 | "block.simplytea.tea_trunk": "Trzon herbaty", 6 | "block.simplytea.tea_fence": "Płot z herbaty", 7 | "block.simplytea.tea_fence_gate": "Furtka z herbaty", 8 | 9 | "item.simplytea.tea_leaf": "Liść herbaty", 10 | "item.simplytea.tea_leaf.tooltip": "Przyjemny zapach!", 11 | "item.simplytea.black_tea": "Czarna herbata", 12 | "item.simplytea.black_tea.tooltip": "Sfermentowana!", 13 | "item.simplytea.tea_stick": "Patyk herbaciany", 14 | "item.simplytea.tea_stick.tooltip": "Słodki jak cynamon!", 15 | "item.simplytea.chorus_petal": "Płatek refrenusu", 16 | "item.simplytea.chorus_petal.tooltip": "Mistyczny!", 17 | 18 | "item.simplytea.cup": "Szklanka herbaty", 19 | "item.simplytea.cup_water": "Szklanka wody", 20 | "item.simplytea.cup_tea_green": "Szklanka zielonej herbaty", 21 | "item.simplytea.cup_tea_black": "Szklanka czarnej herbaty", 22 | "item.simplytea.cup_tea_floral": "Szklanka herbaty z mlecza", 23 | "item.simplytea.cup_tea_chai": "Szklanka herbaty chai", 24 | "item.simplytea.cup_tea_chamomile": "Szklanka rumiankowej herbaty", 25 | "item.simplytea.cup_tea_chorus": "Szklanka refrenusowej herbaty", 26 | "item.simplytea.cup_cocoa": "Szklanka gorącej czekolady", 27 | 28 | "item.simplytea.teabag": "Torebka herbaty", 29 | "item.simplytea.teabag_green": "Torebka zielonej herbaty", 30 | "item.simplytea.teabag_black": "Torebka czarnej herbaty", 31 | "item.simplytea.teabag_floral": "Torebka herbaty z mlecza", 32 | "item.simplytea.teabag_chamomile": "Torebka rumiankowej herbaty", 33 | "item.simplytea.teabag_chorus": "Torebka refrenusowej herbaty", 34 | 35 | "item.simplytea.teapot": "Czajnik", 36 | "item.simplytea.teapot.tooltip": "Pusty", 37 | "item.simplytea.teapot_water": "Czajnik", 38 | "item.simplytea.teapot_water.tooltip": "Napełniony wodą", 39 | "item.simplytea.teapot_milk": "Czajnik", 40 | "item.simplytea.teapot_milk.tooltip": "Napełniony mlekiem", 41 | "item.simplytea.teapot_hot": "Czajnik", 42 | "item.simplytea.teapot_hot.tooltip": "Gotuje się", 43 | "item.simplytea.teapot_frothed": "Czajnik", 44 | "item.simplytea.teapot_frothed.tooltip": "Spienione mleko", 45 | 46 | "effect.simplytea.restful": "Ukojony", 47 | "effect.simplytea.caffeinated": "Pobudzony", 48 | "effect.simplytea.enderfalling": "Enderfalling" 49 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/ru_ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "Саженец чайного дерева", 5 | "block.simplytea.tea_trunk": "Ствол чайного дерева", 6 | "block.simplytea.tea_fence": "Забор из чайного дерева", 7 | "block.simplytea.tea_fence_gate": "Калитка из чайного дерева", 8 | 9 | "item.simplytea.tea_leaf": "Чайный листочек", 10 | "item.simplytea.tea_leaf.tooltip": "Такой приятный аромат!", 11 | "item.simplytea.black_tea": "Чёрный чай", 12 | "item.simplytea.black_tea.tooltip": "Ферментированный!", 13 | "item.simplytea.tea_stick": "Палка из чайного дерева", 14 | "item.simplytea.tea_stick.tooltip": "Пахнет сладко, словно корица!", 15 | "item.simplytea.chorus_petal": "Лепесток хоруса", 16 | "item.simplytea.chorus_petal.tooltip": "Мистический!", 17 | 18 | "item.simplytea.cup": "Кружка", 19 | "item.simplytea.cup_water": "Кружка воды", 20 | "item.simplytea.cup_tea_green": "Кружка зеленого чая", 21 | "item.simplytea.cup_tea_black": "Кружка чёрного чая", 22 | "item.simplytea.cup_tea_floral": "Кружка одуванчикового чая", 23 | "item.simplytea.cup_tea_chai": "Кружка чая с молоком", 24 | "item.simplytea.cup_tea_chamomile": "Кружка ромашкового чая", 25 | "item.simplytea.cup_tea_chorus": "Кружка чая из лепестков хоруса", 26 | "item.simplytea.cup_cocoa": "Кружка горячего шоколада", 27 | 28 | "item.simplytea.teabag": "Пустой чайный пакетик", 29 | "item.simplytea.teabag_green": "Пакетик зеленого чая", 30 | "item.simplytea.teabag_black": "Пакетик чёрного чая", 31 | "item.simplytea.teabag_floral": "Пакетик чая из одуванчиков", 32 | "item.simplytea.teabag_chamomile": "Пакетик ромашкового чая", 33 | "item.simplytea.teabag_chorus": "Пакетик чая из лепестков хоруса", 34 | 35 | "item.simplytea.teapot": "Чайник", 36 | "item.simplytea.teapot.tooltip": "Пуст!", 37 | "item.simplytea.teapot_water": "Чайник", 38 | "item.simplytea.teapot_water.tooltip": "Полон воды!", 39 | "item.simplytea.teapot_milk": "Чайник", 40 | "item.simplytea.teapot_milk.tooltip": "Полон молока!", 41 | "item.simplytea.teapot_hot": "Чайник", 42 | "item.simplytea.teapot_hot.tooltip": "Настолько горячий, что можно обжечься!", 43 | "item.simplytea.teapot_frothed": "Чайник", 44 | "item.simplytea.teapot_frothed.tooltip": "С кипячёным молоком!", 45 | 46 | "effect.simplytea.restful": "Расслабленность", 47 | "effect.simplytea.caffeinated": "Энергичность", 48 | "effect.simplytea.enderfalling": "Лёгкость" 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/Events.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core; 2 | 3 | import knightminer.simplytea.SimplyTea; 4 | import knightminer.simplytea.potion.RestfulEffect; 5 | import net.minecraft.core.Registry; 6 | import net.minecraft.resources.ResourceKey; 7 | import net.minecraft.world.effect.MobEffectInstance; 8 | import net.minecraft.world.entity.LivingEntity; 9 | import net.minecraft.world.entity.player.Player; 10 | import net.minecraft.world.level.levelgen.GenerationStep.Decoration; 11 | import net.minecraftforge.event.entity.EntityTeleportEvent; 12 | import net.minecraftforge.event.entity.living.LivingFallEvent; 13 | import net.minecraftforge.event.entity.player.PlayerWakeUpEvent; 14 | import net.minecraftforge.eventbus.api.SubscribeEvent; 15 | import net.minecraftforge.fml.common.Mod; 16 | 17 | @SuppressWarnings("unused") 18 | @Mod.EventBusSubscriber(modid = SimplyTea.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) 19 | public class Events { 20 | @SubscribeEvent 21 | static void playerWakeUp(PlayerWakeUpEvent event) { 22 | // update world means the client sent it, comes from the leave bed button being clicked 23 | // server would set that to false, like when we sleep full night 24 | if (event.updateLevel()) { 25 | return; 26 | } 27 | 28 | // if caffeinated, remove that with no restful benefits 29 | Player player = event.getEntity(); 30 | if (RestfulEffect.removeConflicts(player)) { 31 | player.removeEffect(Registration.restful); 32 | } else { 33 | MobEffectInstance effect = player.getEffect(Registration.restful); 34 | // if restful, heal based on the potion level and remove it 35 | if (effect != null) { 36 | player.heal((effect.getAmplifier()+1)*2); 37 | player.removeEffect(Registration.restful); 38 | } 39 | } 40 | 41 | } 42 | 43 | @SubscribeEvent 44 | static void entityFall(LivingFallEvent event) { 45 | LivingEntity entity = event.getEntity(); 46 | MobEffectInstance effect = entity.getEffect(Registration.enderfalling); 47 | if (effect != null) { 48 | // every level halves the damage of the previous, but start at 1/4 49 | event.setDamageMultiplier(event.getDamageMultiplier() * (float)Math.pow(2, -effect.getAmplifier()-3)); 50 | } 51 | } 52 | 53 | @SubscribeEvent 54 | static void throwEnderPearl(EntityTeleportEvent.EnderPearl event) { 55 | if (event.getPlayer().hasEffect(Registration.enderfalling)) { 56 | event.setAttackDamage(0); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/ja_jp.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "チャの苗木", 5 | "block.simplytea.tea_trunk": "チャの幹", 6 | "block.simplytea.tea_fence": "チャのフェンス", 7 | "block.simplytea.tea_fence_gate": "チャのフェンスゲート", 8 | 9 | "item.simplytea.tea_leaf": "茶葉", 10 | "item.simplytea.tea_leaf.tooltip": "いい香り!", 11 | "item.simplytea.black_tea": "紅茶葉", 12 | "item.simplytea.black_tea.tooltip": "発酵してる!", 13 | "item.simplytea.tea_stick": "ティースティック", 14 | "item.simplytea.tea_stick.tooltip": "シナモンみたいに甘い!", 15 | "item.simplytea.chorus_petal": "コーラスペタル", 16 | "item.simplytea.chorus_petal.tooltip": "不思議な香り!", 17 | "item.simplytea.ice_cube": "氷", 18 | "item.simplytea.ice_cube.tooltip": "冷たい!", 19 | 20 | "item.simplytea.unfired_cup": "未焼成のティーカップ", 21 | "item.simplytea.cup": "ティーカップ", 22 | "item.simplytea.cup_water": "水入りカップ", 23 | "item.simplytea.cup_tea_green": "緑茶", 24 | "item.simplytea.cup_tea_black": "紅茶", 25 | "item.simplytea.cup_tea_floral": "タンポポ茶", 26 | "item.simplytea.cup_tea_chai": "チャイ", 27 | "item.simplytea.cup_tea_iced": "アイスティー", 28 | "item.simplytea.cup_tea_chamomile": "カモミールティー", 29 | "item.simplytea.cup_tea_chorus": "コーラスティー", 30 | "item.simplytea.cup_cocoa": "ホットチョコレート", 31 | "item.simplytea.cup.with_honey": "はちみつ入り", 32 | "item.simplytea.cup.with_cinnamon": "シナモン入り", 33 | 34 | "item.simplytea.teabag": "ティーバッグ", 35 | "item.simplytea.teabag_green": "緑茶のティーバッグ", 36 | "item.simplytea.teabag_black": "紅茶のティーバッグ", 37 | "item.simplytea.teabag_floral": "タンポポ茶のティーバッグ", 38 | "item.simplytea.teabag_chamomile": "カモミールティーのティーバッグ", 39 | "item.simplytea.teabag_chorus": "コーラスティーのティーバッグ", 40 | 41 | "item.simplytea.unfired_teapot": "未焼成のティーポット", 42 | "item.simplytea.teapot": "ティーポット", 43 | "item.simplytea.teapot.tooltip": "空っぽ!", 44 | "item.simplytea.teapot_water": "水入りティーポット", 45 | "item.simplytea.teapot_water.tooltip": "満タン!", 46 | "item.simplytea.teapot_milk": "牛乳入りティーポット", 47 | "item.simplytea.teapot_milk.tooltip": "満タン!", 48 | "item.simplytea.teapot_hot": "沸いた水入りティーポット", 49 | "item.simplytea.teapot_hot.tooltip": "沸騰中!", 50 | "item.simplytea.teapot_frothed": "沸いた牛乳入りティーポット", 51 | "item.simplytea.teapot_frothed.tooltip": "沸騰中!", 52 | 53 | "effect.simplytea.restful": "休息", 54 | "effect.simplytea.relaxed": "リラックス", 55 | "effect.simplytea.caffeinated": "カフェイン添加", 56 | "effect.simplytea.invigorated": "活気", 57 | "effect.simplytea.enderfalling": "エンダーフォーリング" 58 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/CocoaItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import knightminer.simplytea.core.Config; 4 | import net.minecraft.network.chat.Component; 5 | import net.minecraft.network.chat.TextColor; 6 | import net.minecraft.world.effect.MobEffectInstance; 7 | import net.minecraft.world.entity.LivingEntity; 8 | import net.minecraft.world.item.ItemStack; 9 | import net.minecraft.world.item.Items; 10 | import net.minecraft.world.item.TooltipFlag; 11 | import net.minecraft.world.level.Level; 12 | import net.minecraftforge.common.MinecraftForge; 13 | import net.minecraftforge.event.entity.living.MobEffectEvent; 14 | 15 | import javax.annotation.Nullable; 16 | import java.util.Iterator; 17 | import java.util.List; 18 | 19 | public class CocoaItem extends TeaCupItem { 20 | public static final String CINNAMON_TAG = "with_cinnamon"; 21 | private static final Component WITH_CINNAMON = Component.translatable("item.simplytea.cup.with_cinnamon") 22 | .withStyle(style -> style.withColor(TextColor.fromRgb(0x805232))); 23 | 24 | private static final ItemStack MILK_BUCKET = new ItemStack(Items.MILK_BUCKET); 25 | 26 | public CocoaItem(Properties props) { 27 | super(props); 28 | } 29 | 30 | @Override 31 | public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity living) { 32 | if (this.isEdible()) { 33 | ItemStack result = getCraftingRemainingItem(stack); 34 | living.eat(worldIn, stack); 35 | if (!worldIn.isClientSide && Config.SERVER.cocoa.clearsEffects()) { 36 | // logic basically copied from living entity, so we can choose which effects to remove 37 | Iterator itr = living.getActiveEffectsMap().values().iterator(); 38 | boolean hasCinnamon = hasHoney(stack, CINNAMON_TAG); 39 | while (itr.hasNext()) { 40 | MobEffectInstance effect = itr.next(); 41 | if ((Config.SERVER.cocoa.clearsPositive() || !effect.getEffect().isBeneficial()) 42 | && effect.isCurativeItem(MILK_BUCKET) && !MinecraftForge.EVENT_BUS.post(new MobEffectEvent.Remove(living, effect))) { 43 | living.onEffectRemoved(effect); 44 | itr.remove(); 45 | // need honey to remove more than one negative effect 46 | if (!hasCinnamon) { 47 | break; 48 | } 49 | } 50 | } 51 | } 52 | return result; 53 | } 54 | return stack; 55 | } 56 | 57 | @Override 58 | public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { 59 | if (hasHoney(stack, CINNAMON_TAG)) { 60 | tooltip.add(WITH_CINNAMON); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.simplytea": "Simply Tea!", 3 | 4 | "block.simplytea.tea_sapling": "Tea Sapling", 5 | "block.simplytea.tea_trunk": "Tea Trunk", 6 | "block.simplytea.tea_fence": "Tea Fence", 7 | "block.simplytea.tea_fence_gate": "Tea Fence Gate", 8 | 9 | "item.simplytea.tea_leaf": "Tea Leaf", 10 | "item.simplytea.tea_leaf.tooltip": "Pleasant aroma!", 11 | "item.simplytea.black_tea": "Black Tea", 12 | "item.simplytea.black_tea.tooltip": "Fermented!", 13 | "item.simplytea.tea_stick": "Tea Stick", 14 | "item.simplytea.tea_stick.tooltip": "Sweet like cinnamon!", 15 | "item.simplytea.chorus_petal": "Chorus Petal", 16 | "item.simplytea.chorus_petal.tooltip": "Mystical!", 17 | "item.simplytea.ice_cube": "Ice Cube", 18 | "item.simplytea.ice_cube.tooltip": "Cold!", 19 | 20 | "item.simplytea.unfired_cup": "Unfired Tea Cup", 21 | "item.simplytea.cup": "Tea Cup", 22 | "item.simplytea.cup_water": "Cup of Water", 23 | "item.simplytea.cup_tea_green": "Cup of Green Tea", 24 | "item.simplytea.cup_tea_black": "Cup of Black Tea", 25 | "item.simplytea.cup_tea_floral": "Cup of Dandelion Tea", 26 | "item.simplytea.cup_tea_chai": "Cup of Chai Tea", 27 | "item.simplytea.cup_tea_iced": "Cup of Apple Iced Tea", 28 | "item.simplytea.cup_tea_chamomile": "Cup of Chamomile Tea", 29 | "item.simplytea.cup_tea_chorus": "Cup of Chorus Tea", 30 | "item.simplytea.cup_cocoa": "Cup of Hot Chocolate", 31 | "item.simplytea.cup.with_honey": "With Honey", 32 | "item.simplytea.cup.with_cinnamon": "With Cinnamon", 33 | 34 | "item.simplytea.teabag": "Tea Bag", 35 | "item.simplytea.teabag_green": "Green Tea Bag", 36 | "item.simplytea.teabag_black": "Black Tea Bag", 37 | "item.simplytea.teabag_floral": "Dandelion Tea Bag", 38 | "item.simplytea.teabag_chamomile": "Chamomile Tea Bag", 39 | "item.simplytea.teabag_chorus": "Chorus Tea Bag", 40 | 41 | "item.simplytea.unfired_teapot": "Unfired Teapot", 42 | "item.simplytea.teapot": "Teapot", 43 | "item.simplytea.teapot.tooltip": "Empty!", 44 | "item.simplytea.teapot_water": "Teapot", 45 | "item.simplytea.teapot_water.tooltip": "Full of water!", 46 | "item.simplytea.teapot_milk": "Teapot", 47 | "item.simplytea.teapot_milk.tooltip": "Full of milk!", 48 | "item.simplytea.teapot_hot": "Teapot", 49 | "item.simplytea.teapot_hot.tooltip": "Boiling!", 50 | "item.simplytea.teapot_frothed": "Teapot", 51 | "item.simplytea.teapot_frothed.tooltip": "Frothed milk!", 52 | 53 | "effect.simplytea.restful": "Restful", 54 | "effect.simplytea.relaxed": "Relaxed", 55 | "effect.simplytea.caffeinated": "Caffeinated", 56 | "effect.simplytea.invigorated": "Invigorated", 57 | "effect.simplytea.enderfalling": "Enderfalling" 58 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/TeaCupItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import knightminer.simplytea.core.config.TeaDrink; 4 | import net.minecraft.nbt.CompoundTag; 5 | import net.minecraft.network.chat.Component; 6 | import net.minecraft.network.chat.TextColor; 7 | import net.minecraft.world.effect.MobEffectInstance; 8 | import net.minecraft.world.entity.LivingEntity; 9 | import net.minecraft.world.food.FoodProperties; 10 | import net.minecraft.world.item.Item; 11 | import net.minecraft.world.item.ItemStack; 12 | import net.minecraft.world.item.TooltipFlag; 13 | import net.minecraft.world.item.UseAnim; 14 | import net.minecraft.world.level.Level; 15 | 16 | import javax.annotation.Nullable; 17 | import java.util.List; 18 | 19 | public class TeaCupItem extends Item { 20 | public static final String HONEY_TAG = "with_honey"; 21 | private static final Component WITH_HONEY = Component.translatable("item.simplytea.cup.with_honey") 22 | .withStyle(style -> style.withColor(TextColor.fromRgb(0xFF9116))); 23 | 24 | public TeaCupItem(Properties props) { 25 | super(props); 26 | } 27 | 28 | @Override 29 | public UseAnim getUseAnimation(ItemStack stack) { 30 | return stack.getItem().isEdible() ? UseAnim.DRINK : UseAnim.NONE; 31 | } 32 | 33 | @Override 34 | public boolean isBarVisible(ItemStack stack) { 35 | return stack.getDamageValue() > 0; 36 | } 37 | 38 | @Override 39 | public ItemStack getCraftingRemainingItem(ItemStack stack) { 40 | if (stack.getDamageValue() + 1 >= stack.getMaxDamage()) { 41 | return super.getCraftingRemainingItem(stack); 42 | } 43 | stack = stack.copy(); 44 | stack.setDamageValue(stack.getDamageValue()+1); 45 | return stack; 46 | } 47 | 48 | @Override 49 | public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity living) { 50 | if (this.isEdible()) { 51 | ItemStack result = stack.getCraftingRemainingItem(); 52 | boolean hasHoney = hasHoney(stack, HONEY_TAG); 53 | living.curePotionEffects(stack); /// remove conflicting teas 54 | living.eat(worldIn, stack); 55 | // we handle effects directly so it can be stack sensitive 56 | FoodProperties food = getFoodProperties(stack, living); 57 | if (food instanceof TeaDrink drink) { 58 | MobEffectInstance effectInstance = drink.getEffect(hasHoney); 59 | if (effectInstance != null) { 60 | living.addEffect(effectInstance); 61 | } 62 | } 63 | return result; 64 | } 65 | return stack; 66 | } 67 | 68 | @Override 69 | public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { 70 | if (hasHoney(stack, HONEY_TAG)) { 71 | tooltip.add(WITH_HONEY); 72 | } 73 | } 74 | 75 | /** Ads honey to the given tea */ 76 | public static ItemStack withHoney(ItemStack stack, String tag) { 77 | stack.getOrCreateTag().putBoolean(tag, true); 78 | return stack; 79 | } 80 | 81 | /** Checks if the given tea contains honey */ 82 | public static boolean hasHoney(ItemStack stack, String tag) { 83 | CompoundTag nbt = stack.getTag(); 84 | return nbt != null && nbt.getBoolean(tag); 85 | } 86 | } -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 1>&2 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 48 | echo. 1>&2 49 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 50 | echo location of your Java installation. 1>&2 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 1>&2 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 62 | echo. 1>&2 63 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 64 | echo location of your Java installation. 1>&2 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/worldgen/TeaTreeFeature.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.worldgen; 2 | 3 | import knightminer.simplytea.block.TeaTrunkBlock; 4 | import knightminer.simplytea.block.TeaTrunkBlock.TrunkType; 5 | import knightminer.simplytea.core.Registration; 6 | import net.minecraft.core.BlockPos; 7 | import net.minecraft.tags.BlockTags; 8 | import net.minecraft.util.RandomSource; 9 | import net.minecraft.world.level.LevelAccessor; 10 | import net.minecraft.world.level.WorldGenLevel; 11 | import net.minecraft.world.level.block.state.BlockState; 12 | import net.minecraft.world.level.levelgen.feature.Feature; 13 | import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; 14 | import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; 15 | 16 | import java.util.stream.IntStream; 17 | 18 | public class TeaTreeFeature extends Feature { 19 | public TeaTreeFeature() { 20 | super(NoneFeatureConfiguration.CODEC); 21 | } 22 | 23 | @Override 24 | public boolean place(FeaturePlaceContext context) { 25 | BlockPos pos = context.origin(); 26 | BlockPos down = pos.below(); 27 | WorldGenLevel world = context.level(); 28 | BlockState soil = world.getBlockState(down); 29 | RandomSource random = context.random(); 30 | if (IntStream.range(0, 4).allMatch(i -> world.isEmptyBlock(pos.above(i)))) { 31 | // TODO: move to tree? 32 | BlockState trunk = Registration.tea_trunk.defaultBlockState().setValue(TeaTrunkBlock.CLIPPED, false); 33 | // tree stump 34 | world.setBlock(pos, trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.STUMP), 3); 35 | world.setBlock(pos.above(), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.BOTTOM), 3); 36 | 37 | // tree branches 38 | // tree minimum is 4 blocks tall, but can be up to two blocks taller if space permits 39 | int height = 3; 40 | if(world.isEmptyBlock(pos.above(4))) { 41 | height += random.nextInt(world.isEmptyBlock(pos.above(5)) ? 3 : 2); 42 | } 43 | boolean north, south, west, east; 44 | BlockPos branch; 45 | for(int i = 2; i < height; i++) { 46 | north = random.nextBoolean(); 47 | south = random.nextBoolean(); 48 | west = random.nextBoolean(); 49 | east = random.nextBoolean(); 50 | branch = pos.above(i); 51 | 52 | if (north) setBlockSafe(world, branch.north(), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.SOUTH)); 53 | if (east) setBlockSafe(world, branch.east(), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.WEST)); 54 | if (south) setBlockSafe(world, branch.south(), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.NORTH)); 55 | if (west) setBlockSafe(world, branch.west(), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.EAST)); 56 | 57 | world.setBlock(branch, trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.MIDDLE), 3); 58 | } 59 | 60 | // tree top 61 | world.setBlock(pos.above(height), trunk.setValue(TeaTrunkBlock.TYPE, TrunkType.TOP), 3); 62 | 63 | return true; 64 | } 65 | return false; 66 | } 67 | 68 | /** 69 | * Sets a block only if the block is replaceable 70 | */ 71 | private static void setBlockSafe(LevelAccessor world, BlockPos pos, BlockState state) { 72 | BlockState old = world.getBlockState(pos); 73 | if(old.isAir() || old.canBeReplaced() || old.is(BlockTags.LEAVES)) { 74 | world.setBlock(pos, state, 3); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/fluid/FluidTeapotWrapper.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.fluid; 2 | 3 | import org.jetbrains.annotations.NotNull; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | import knightminer.simplytea.core.Config; 7 | import knightminer.simplytea.core.Registration; 8 | import net.minecraft.core.Direction; 9 | import net.minecraft.world.item.ItemStack; 10 | import net.minecraft.world.item.Items; 11 | import net.minecraft.world.level.material.Fluid; 12 | import net.minecraft.world.level.material.Fluids; 13 | import net.minecraftforge.common.Tags; 14 | import net.minecraftforge.common.capabilities.Capability; 15 | import net.minecraftforge.common.capabilities.ForgeCapabilities; 16 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 17 | import net.minecraftforge.common.util.LazyOptional; 18 | import net.minecraftforge.fluids.FluidStack; 19 | import net.minecraftforge.fluids.capability.IFluidHandlerItem; 20 | 21 | public class FluidTeapotWrapper implements IFluidHandlerItem, ICapabilityProvider { 22 | private final LazyOptional holder = LazyOptional.of(() -> this); 23 | 24 | @NotNull 25 | protected ItemStack container; 26 | protected FluidStack fluid = FluidStack.EMPTY; 27 | 28 | public FluidTeapotWrapper(ItemStack container) { 29 | this.container = container; 30 | } 31 | 32 | @Override 33 | public int getTanks() { 34 | return 1; 35 | } 36 | 37 | @Override 38 | public @NotNull FluidStack getFluidInTank(int tank) { 39 | return FluidStack.EMPTY; 40 | } 41 | 42 | @Override 43 | public int getTankCapacity(int tank) { 44 | return Config.SERVER.teapot.teapotCapacity(); 45 | } 46 | 47 | public static boolean isWater(Fluid fluid) { 48 | // Many modded fluids use the WATER tag to give the fluids entity interaction 49 | // Only accept Fluids.WATER and not any other fluid tagged as WATER 50 | return fluid.isSame(Fluids.WATER) || fluid.isSame(Fluids.FLOWING_WATER); 51 | } 52 | 53 | public static boolean isMilk(Fluid fluid) { 54 | // Be more flexible with MILK because if it's tagged as MILK then it should really be milk 55 | return fluid.is(Tags.Fluids.MILK) || fluid.getBucket() == Items.MILK_BUCKET; 56 | } 57 | 58 | @Override 59 | public boolean isFluidValid(int tank, @NotNull FluidStack fluid) { 60 | return isWater(fluid.getFluid()) || isMilk(fluid.getFluid()); 61 | } 62 | 63 | @Override 64 | public int fill(FluidStack resource, FluidAction action) { 65 | if (container.getCount() != 1 || !isFluidValid(0, resource) || resource.getAmount() < Config.SERVER.teapot.teapotCapacity()) { 66 | return 0; 67 | } 68 | 69 | if (action.execute()) { 70 | if (isWater(resource.getFluid())) { 71 | this.container = new ItemStack(Registration.teapot_water); 72 | } else if (isMilk(resource.getFluid())) { 73 | this.container = new ItemStack(Registration.teapot_milk); 74 | } 75 | } 76 | 77 | return Config.SERVER.teapot.teapotCapacity(); 78 | } 79 | 80 | @Override 81 | public @NotNull FluidStack drain(FluidStack resource, FluidAction action) { 82 | return FluidStack.EMPTY; 83 | } 84 | 85 | @Override 86 | public @NotNull FluidStack drain(int maxDrain, FluidAction action) { 87 | return FluidStack.EMPTY; 88 | } 89 | 90 | @Override 91 | public @NotNull ItemStack getContainer() { 92 | return container; 93 | } 94 | 95 | @Override 96 | public @NotNull LazyOptional getCapability(@NotNull Capability capability, @Nullable Direction side) { 97 | return ForgeCapabilities.FLUID_HANDLER_ITEM.orEmpty(capability, holder); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence_gate/wall_closed.json: -------------------------------------------------------------------------------- 1 | { "parent": "block/template_fence_gate", 2 | "textures": { 3 | "texture": "simplytea:block/tea_fence_gate" 4 | }, 5 | "elements": [ 6 | { 7 | "name": "Left-hand post", 8 | "from": [0, 2, 7], 9 | "to": [2, 13, 9], 10 | "faces": { 11 | "north": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 12 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 13 | "south": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 14 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture", "cullface": "west"}, 15 | "up": {"uv": [ 0, 11, 2, 13], "texture": "#texture", "cullface": "up"}, 16 | "down": {"uv": [ 0, 11, 2, 13], "texture": "#texture"} 17 | } 18 | }, 19 | { 20 | "name": "Right-hand post", 21 | "from": [14, 2, 7], 22 | "to": [16, 13, 9], 23 | "faces": { 24 | "north": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 25 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture", "cullface": "east"}, 26 | "south": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 27 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 28 | "up": {"uv": [14, 11, 16, 13], "texture": "#texture", "cullface": "up"}, 29 | "down": {"uv": [14, 14, 16, 16], "texture": "#texture"} 30 | } 31 | }, 32 | { 33 | "name": "Inner vertical posts", 34 | "from": [6, 3, 7], 35 | "to": [10, 12, 9], 36 | "faces": { 37 | "north": {"uv": [6, 1, 10, 10], "texture": "#texture"}, 38 | "east": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 39 | "south": {"uv": [6, 1, 10, 10], "texture": "#texture"}, 40 | "west": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 41 | "up": {"uv": [6, 11, 10, 13], "texture": "#texture"}, 42 | "down": {"uv": [6, 14, 10, 16], "texture": "#texture"} 43 | } 44 | }, 45 | { 46 | "name": "Lower horizontal bar of left-hand gate door", 47 | "from": [2, 3, 7], 48 | "to": [6, 6, 9], 49 | "faces": { 50 | "north": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 51 | "south": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 52 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture"}, 53 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture"} 54 | } 55 | }, 56 | { 57 | "name": "Upper horizontal bar of left-hand gate door", 58 | "from": [2, 9, 7], 59 | "to": [6, 12, 9], 60 | "faces": { 61 | "north": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 62 | "south": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 63 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture"}, 64 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture"} 65 | } 66 | }, 67 | { 68 | "name": "Lower horizontal bar of right-hand gate door", 69 | "from": [10, 3, 7], 70 | "to": [14, 6, 9], 71 | "faces": { 72 | "north": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 73 | "south": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 74 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture"}, 75 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture"} 76 | } 77 | }, 78 | { 79 | "name": "Upper horizontal bar of right-hand gate door", 80 | "from": [10, 9, 7], 81 | "to": [14, 12, 9], 82 | "faces": { 83 | "north": {"uv": [ 1, 1, 5, 4], "texture": "#texture"}, 84 | "south": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 85 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture"}, 86 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture"} 87 | } 88 | } 89 | ] 90 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence_gate/normal_closed.json: -------------------------------------------------------------------------------- 1 | { "parent": "block/template_fence_gate", 2 | "textures": { 3 | "texture": "simplytea:block/tea_fence_gate" 4 | }, 5 | "elements": [ 6 | { 7 | "name": "Left-hand post", 8 | "from": [0, 5, 7], 9 | "to": [2, 16, 9], 10 | "faces": { 11 | "north": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 12 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 13 | "south": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 14 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture", "cullface": "west"}, 15 | "up": {"uv": [ 0, 11, 2, 13], "texture": "#texture", "cullface": "up"}, 16 | "down": {"uv": [ 0, 11, 2, 13], "texture": "#texture"} 17 | } 18 | }, 19 | { 20 | "name": "Right-hand post", 21 | "from": [14, 5, 7], 22 | "to": [16, 16, 9], 23 | "faces": { 24 | "north": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 25 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture", "cullface": "east"}, 26 | "south": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 27 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 28 | "up": {"uv": [14, 11, 16, 13], "texture": "#texture", "cullface": "up"}, 29 | "down": {"uv": [14, 14, 16, 16], "texture": "#texture"} 30 | } 31 | }, 32 | { 33 | "name": "Inner vertical posts", 34 | "from": [6, 6, 7], 35 | "to": [10, 15, 9], 36 | "faces": { 37 | "north": {"uv": [6, 1, 10, 10], "texture": "#texture"}, 38 | "east": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 39 | "south": {"uv": [6, 1, 10, 10], "texture": "#texture"}, 40 | "west": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 41 | "up": {"uv": [6, 11, 10, 13], "texture": "#texture"}, 42 | "down": {"uv": [6, 14, 10, 16], "texture": "#texture"} 43 | } 44 | }, 45 | { 46 | "name": "Lower horizontal bar of left-hand gate door", 47 | "from": [2, 6, 7], 48 | "to": [6, 9, 9], 49 | "faces": { 50 | "north": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 51 | "south": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 52 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture"}, 53 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture"} 54 | } 55 | }, 56 | { 57 | "name": "Upper horizontal bar of left-hand gate door", 58 | "from": [2, 12, 7], 59 | "to": [6, 15, 9], 60 | "faces": { 61 | "north": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 62 | "south": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 63 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture"}, 64 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture"} 65 | } 66 | }, 67 | { 68 | "name": "Lower horizontal bar of right-hand gate door", 69 | "from": [10, 6, 7], 70 | "to": [14, 9, 9], 71 | "faces": { 72 | "north": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 73 | "south": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 74 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture"}, 75 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture"} 76 | } 77 | }, 78 | { 79 | "name": "Upper horizontal bar of right-hand gate door", 80 | "from": [10, 12, 7], 81 | "to": [14, 15, 9], 82 | "faces": { 83 | "north": {"uv": [ 1, 1, 5, 4], "texture": "#texture"}, 84 | "south": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 85 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture"}, 86 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture"} 87 | } 88 | } 89 | ] 90 | } -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/WorldgenGenerator.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data.gen; 2 | 3 | import knightminer.simplytea.core.Registration; 4 | import knightminer.simplytea.worldgen.TreeGenEnabledPlacement; 5 | import net.minecraft.core.BlockPos; 6 | import net.minecraft.core.HolderGetter; 7 | import net.minecraft.core.HolderLookup; 8 | import net.minecraft.core.HolderSet; 9 | import net.minecraft.core.RegistrySetBuilder; 10 | import net.minecraft.core.registries.Registries; 11 | import net.minecraft.data.PackOutput; 12 | import net.minecraft.data.worldgen.BootstapContext; 13 | import net.minecraft.data.worldgen.features.FeatureUtils; 14 | import net.minecraft.data.worldgen.placement.PlacementUtils; 15 | import net.minecraft.tags.BiomeTags; 16 | import net.minecraft.world.level.biome.Biome; 17 | import net.minecraft.world.level.levelgen.GenerationStep; 18 | import net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate; 19 | import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; 20 | import net.minecraft.world.level.levelgen.placement.BiomeFilter; 21 | import net.minecraft.world.level.levelgen.placement.BlockPredicateFilter; 22 | import net.minecraft.world.level.levelgen.placement.InSquarePlacement; 23 | import net.minecraft.world.level.levelgen.placement.PlacedFeature; 24 | import net.minecraft.world.level.levelgen.placement.RarityFilter; 25 | import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider; 26 | import net.minecraftforge.common.world.BiomeModifier; 27 | import net.minecraftforge.common.world.ForgeBiomeModifiers; 28 | import net.minecraftforge.registries.ForgeRegistries; 29 | 30 | import java.util.List; 31 | import java.util.Set; 32 | import java.util.concurrent.CompletableFuture; 33 | 34 | public class WorldgenGenerator extends DatapackBuiltinEntriesProvider { 35 | public static final RegistrySetBuilder BUILDER = new RegistrySetBuilder() 36 | .add(Registries.CONFIGURED_FEATURE, WorldgenGenerator::configuredFeatures) 37 | .add(Registries.PLACED_FEATURE, WorldgenGenerator::placedFeatures) 38 | .add(ForgeRegistries.Keys.BIOME_MODIFIERS, WorldgenGenerator::biomeModifiers); 39 | 40 | public WorldgenGenerator(PackOutput output, CompletableFuture registries, Set modIds) { 41 | super(output, registries, BUILDER, modIds); 42 | } 43 | 44 | public static void configuredFeatures(BootstapContext> context) { 45 | FeatureUtils.register(context, Registration.configured_tea_tree, Registration.tea_tree); 46 | } 47 | 48 | public static void placedFeatures(BootstapContext context) { 49 | HolderGetter> holdergetter = context.lookup(Registries.CONFIGURED_FEATURE); 50 | PlacementUtils.register(context, Registration.placed_tea_tree, holdergetter.getOrThrow(Registration.configured_tea_tree), List.of( 51 | TreeGenEnabledPlacement.INSTANCE, 52 | RarityFilter.onAverageOnceEvery(128), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome(), 53 | BlockPredicateFilter.forPredicate(BlockPredicate.wouldSurvive(Registration.tea_sapling.defaultBlockState(), BlockPos.ZERO)), 54 | PlacementUtils.filteredByBlockSurvival(Registration.tea_sapling) 55 | )); 56 | } 57 | 58 | public static void biomeModifiers(BootstapContext context) { 59 | HolderGetter biomeGetter = context.lookup(Registries.BIOME); 60 | HolderSet forest = biomeGetter.getOrThrow(BiomeTags.IS_FOREST); 61 | 62 | context.register(Registration.tea_tree_biome_modifier, new ForgeBiomeModifiers.AddFeaturesBiomeModifier( 63 | forest, 64 | HolderSet.direct(context.lookup(Registries.PLACED_FEATURE).getOrThrow(Registration.placed_tea_tree)), 65 | GenerationStep.Decoration.VEGETAL_DECORATION 66 | )); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/item/TeapotItem.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.item; 2 | 3 | import org.jetbrains.annotations.Nullable; 4 | 5 | import knightminer.simplytea.core.Config; 6 | import knightminer.simplytea.core.Registration; 7 | import knightminer.simplytea.fluid.FluidTeapotWrapper; 8 | import net.minecraft.core.BlockPos; 9 | import net.minecraft.core.Direction; 10 | import net.minecraft.nbt.CompoundTag; 11 | import net.minecraft.sounds.SoundEvent; 12 | import net.minecraft.sounds.SoundEvents; 13 | import net.minecraft.world.InteractionHand; 14 | import net.minecraft.world.InteractionResult; 15 | import net.minecraft.world.InteractionResultHolder; 16 | import net.minecraft.world.entity.LivingEntity; 17 | import net.minecraft.world.entity.animal.Cow; 18 | import net.minecraft.world.entity.player.Player; 19 | import net.minecraft.world.item.ItemStack; 20 | import net.minecraft.world.item.ItemUtils; 21 | import net.minecraft.world.level.ClipContext; 22 | import net.minecraft.world.level.Level; 23 | import net.minecraft.world.level.block.BucketPickup; 24 | import net.minecraft.world.level.block.state.BlockState; 25 | import net.minecraft.world.phys.BlockHitResult; 26 | import net.minecraft.world.phys.HitResult.Type; 27 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 28 | import net.minecraftforge.fluids.FluidActionResult; 29 | import net.minecraftforge.fluids.FluidUtil; 30 | import net.minecraftforge.fluids.capability.IFluidHandler; 31 | 32 | import java.util.Optional; 33 | 34 | public class TeapotItem extends TooltipItem { 35 | public TeapotItem(Properties props) { 36 | super(props); 37 | } 38 | 39 | @Override 40 | public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { 41 | ItemStack stack = player.getItemInHand(hand); 42 | BlockHitResult rayTrace = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); 43 | if (rayTrace.getType() != Type.BLOCK) { 44 | return InteractionResultHolder.pass(stack); 45 | } 46 | 47 | BlockPos pos = rayTrace.getBlockPos(); 48 | Direction side = rayTrace.getDirection(); 49 | BlockState state = world.getBlockState(pos); 50 | 51 | if (!world.mayInteract(player, pos) || !player.mayUseItemAt(pos.relative(side), side, stack)) { 52 | return InteractionResultHolder.fail(stack); 53 | } 54 | 55 | ItemStack filledStack = ItemStack.EMPTY; 56 | if (state.getBlock() instanceof BucketPickup bucketPickup) { 57 | // special case for infinite water 58 | if (FluidTeapotWrapper.isWater(state.getFluidState().getType()) && Config.SERVER.teapot.infiniteWater()) { 59 | filledStack = new ItemStack(Registration.teapot_water); 60 | Optional sound = bucketPickup.getPickupSound(state); 61 | if (sound.isPresent()) { 62 | player.playSound(sound.get(), 1.0f, 1.0f); 63 | } 64 | } 65 | 66 | // use teapot like a bucket to get fluid, should work in most cases 67 | if (filledStack.isEmpty()) { 68 | FluidActionResult actionResult = FluidUtil.tryPickUpFluid(stack, player, world, pos, side); 69 | if (actionResult.isSuccess()) { 70 | filledStack = actionResult.getResult(); 71 | } 72 | } 73 | } 74 | 75 | if (!filledStack.isEmpty()) { 76 | ItemStack filledResult = ItemUtils.createFilledResult(stack, player, filledStack); 77 | return InteractionResultHolder.sidedSuccess(filledResult, world.isClientSide()); 78 | } 79 | 80 | return InteractionResultHolder.fail(stack); 81 | } 82 | 83 | @Override 84 | public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity target, InteractionHand hand) { 85 | // only work if the teapot is empty and right clicking a cow 86 | if(Config.SERVER.teapot.canMilkCows() && target instanceof Cow) { 87 | // sound 88 | player.playSound(SoundEvents.COW_MILK, 1.0F, 1.0F); 89 | 90 | // fill with milk 91 | player.setItemInHand(hand, ItemUtils.createFilledResult(stack.copy(), player, new ItemStack(Registration.teapot_milk))); 92 | return InteractionResult.SUCCESS; 93 | } 94 | return InteractionResult.PASS; 95 | } 96 | 97 | @Nullable 98 | @Override 99 | public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable CompoundTag nbt) { 100 | return new FluidTeapotWrapper(stack); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence_gate/normal_open.json: -------------------------------------------------------------------------------- 1 | { "textures": { 2 | "particle": "simplytea:block/tea_fence_gate", 3 | "texture": "simplytea:block/tea_fence_gate" 4 | }, 5 | "elements": [ 6 | { "name": "Left-hand post", 7 | "from": [0, 5, 7], 8 | "to": [2, 16, 9], 9 | "faces": { 10 | "north": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 11 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 12 | "south": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 13 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture", "cullface": "west"}, 14 | "up": {"uv": [ 0, 11, 2, 13], "texture": "#texture"}, 15 | "down": {"uv": [ 0, 14, 2, 16], "texture": "#texture"} 16 | } 17 | }, 18 | { "name": "Right-hand post", 19 | "from": [14, 5, 7], 20 | "to": [16, 16, 9], 21 | "faces": { 22 | "north": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 23 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 24 | "south": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 25 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 26 | "up": {"uv": [14, 11, 16, 13], "texture": "#texture"}, 27 | "down": {"uv": [14, 14, 16, 16], "texture": "#texture"} 28 | } 29 | }, 30 | { "name": "Inner vertical post of left-hand gate door", 31 | "from": [0, 6, 13], 32 | "to": [2, 15, 15], 33 | "faces": { 34 | "north": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 35 | "east": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 36 | "south": {"uv": [7, 1, 9, 10], "texture": "#texture"}, 37 | "west": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 38 | "up": {"uv": [6, 11, 8, 13], "texture": "#texture", "rotation": 90}, 39 | "down": {"uv": [6, 14, 8, 16], "texture": "#texture", "rotation": 270} 40 | } 41 | }, 42 | { "name": "Inner vertical post of right-hand gate door", 43 | "from": [14, 6, 13], 44 | "to": [16, 15, 15], 45 | "faces": { 46 | "north": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 47 | "east": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 48 | "south": {"uv": [7, 1, 9, 10], "texture": "#texture"}, 49 | "west": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 50 | "up": {"uv": [8, 11, 10, 13], "texture": "#texture", "rotation": 270}, 51 | "down": {"uv": [8, 14, 10, 16], "texture": "#texture", "rotation": 90} 52 | } 53 | }, 54 | { "name": "Lower horizontal bar of left-hand gate door", 55 | "from": [0, 6, 9], 56 | "to": [2, 9, 13], 57 | "faces": { 58 | "east": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 59 | "west": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 60 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture", "rotation": 90}, 61 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture", "rotation": 270} 62 | } 63 | }, 64 | { "name": "Upper horizontal bar of left-hand gate door", 65 | "from": [0, 12, 9], 66 | "to": [2, 15, 13], 67 | "faces": { 68 | "east": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 69 | "west": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 70 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture", "rotation": 90}, 71 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture", "rotation": 270} 72 | } 73 | }, 74 | { "name": "Lower horizontal bar of left-hand gate door", 75 | "from": [14, 6, 9], 76 | "to": [16, 9, 13], 77 | "faces": { 78 | "east": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 79 | "west": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 80 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture", "rotation": 270}, 81 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture", "rotation": 90} 82 | } 83 | }, 84 | { "name": "Upper horizontal bar of left-hand gate door", 85 | "from": [14, 12, 9], 86 | "to": [16, 15, 13], 87 | "faces": { 88 | "east": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 89 | "west": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 90 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture", "rotation": 270}, 91 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture", "rotation": 90} 92 | } 93 | } 94 | ] 95 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/block/fence_gate/wall_open.json: -------------------------------------------------------------------------------- 1 | { "textures": { 2 | "particle": "simplytea:block/tea_fence_gate", 3 | "texture": "simplytea:block/tea_fence_gate" 4 | }, 5 | "elements": [ 6 | { "name": "Left-hand post", 7 | "from": [0, 2, 7], 8 | "to": [2, 13, 9], 9 | "faces": { 10 | "north": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 11 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 12 | "south": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 13 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture", "cullface": "west"}, 14 | "up": {"uv": [ 0, 11, 2, 13], "texture": "#texture"}, 15 | "down": {"uv": [ 0, 14, 2, 16], "texture": "#texture"} 16 | } 17 | }, 18 | { "name": "Right-hand post", 19 | "from": [14, 2, 7], 20 | "to": [16, 13, 9], 21 | "faces": { 22 | "north": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 23 | "east": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 24 | "south": {"uv": [14, 0, 16, 11], "texture": "#texture"}, 25 | "west": {"uv": [ 0, 0, 2, 11], "texture": "#texture"}, 26 | "up": {"uv": [14, 11, 16, 13], "texture": "#texture"}, 27 | "down": {"uv": [14, 14, 16, 16], "texture": "#texture"} 28 | } 29 | }, 30 | { "name": "Inner vertical post of left-hand gate door", 31 | "from": [0, 3, 13], 32 | "to": [2, 12, 15], 33 | "faces": { 34 | "north": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 35 | "east": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 36 | "south": {"uv": [7, 1, 9, 10], "texture": "#texture"}, 37 | "west": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 38 | "up": {"uv": [6, 11, 8, 13], "texture": "#texture", "rotation": 90}, 39 | "down": {"uv": [6, 14, 8, 16], "texture": "#texture", "rotation": 270} 40 | } 41 | }, 42 | { "name": "Inner vertical post of right-hand gate door", 43 | "from": [14, 3, 13], 44 | "to": [16, 12, 15], 45 | "faces": { 46 | "north": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 47 | "east": {"uv": [8, 1, 10, 10], "texture": "#texture"}, 48 | "south": {"uv": [7, 1, 9, 10], "texture": "#texture"}, 49 | "west": {"uv": [6, 1, 8, 10], "texture": "#texture"}, 50 | "up": {"uv": [8, 11, 10, 13], "texture": "#texture", "rotation": 270}, 51 | "down": {"uv": [8, 14, 10, 16], "texture": "#texture", "rotation": 90} 52 | } 53 | }, 54 | { "name": "Lower horizontal bar of left-hand gate door", 55 | "from": [0, 3, 9], 56 | "to": [2, 4, 13], 57 | "faces": { 58 | "east": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 59 | "west": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 60 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture", "rotation": 90}, 61 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture", "rotation": 270} 62 | } 63 | }, 64 | { "name": "Upper horizontal bar of left-hand gate door", 65 | "from": [0, 9, 9], 66 | "to": [2, 12, 13], 67 | "faces": { 68 | "east": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 69 | "west": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 70 | "up": {"uv": [ 2, 11, 6, 13], "texture": "#texture", "rotation": 90}, 71 | "down": {"uv": [ 2, 14, 6, 16], "texture": "#texture", "rotation": 270} 72 | } 73 | }, 74 | { "name": "Lower horizontal bar of left-hand gate door", 75 | "from": [14, 3, 9], 76 | "to": [16, 6, 13], 77 | "faces": { 78 | "east": {"uv": [10, 7, 14, 10], "texture": "#texture"}, 79 | "west": {"uv": [ 2, 7, 6, 10], "texture": "#texture"}, 80 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture", "rotation": 270}, 81 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture", "rotation": 90} 82 | } 83 | }, 84 | { "name": "Upper horizontal bar of left-hand gate door", 85 | "from": [14, 9, 9], 86 | "to": [16, 12, 13], 87 | "faces": { 88 | "east": {"uv": [10, 1, 14, 4], "texture": "#texture"}, 89 | "west": {"uv": [ 2, 1, 6, 4], "texture": "#texture"}, 90 | "up": {"uv": [10, 11, 14, 13], "texture": "#texture", "rotation": 270}, 91 | "down": {"uv": [10, 14, 14, 16], "texture": "#texture", "rotation": 90} 92 | } 93 | } 94 | ] 95 | } -------------------------------------------------------------------------------- /src/main/resources/assets/simplytea/models/item/tea_fence.json: -------------------------------------------------------------------------------- 1 | { "parent": "block/fence_inventory", 2 | "ambientocclusion": false, 3 | "textures": { 4 | "texture": "simplytea:block/tea_fence" 5 | }, 6 | "elements": [ 7 | { "__comment": "Left post", 8 | "from": [ 6, 0, 0 ], 9 | "to": [ 10, 16, 4 ], 10 | "faces": { 11 | "down": { "uv": [ 12, 12, 16, 16 ], "texture": "#texture", "cullface": "down" }, 12 | "up": { "uv": [ 8, 12, 12, 16 ], "texture": "#texture", "cullface": "up" }, 13 | "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 14 | "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 15 | "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 16 | "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } 17 | } 18 | }, 19 | { "__comment": "Right post", 20 | "from": [ 6, 0, 12 ], 21 | "to": [ 10, 16, 16 ], 22 | "faces": { 23 | "down": { "uv": [ 12, 12, 16, 16 ], "texture": "#texture", "cullface": "down" }, 24 | "up": { "uv": [ 8, 12, 12, 16 ], "texture": "#texture", "cullface": "up" }, 25 | "north": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 26 | "south": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 27 | "west": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" }, 28 | "east": { "uv": [ 0, 0, 4, 16 ], "texture": "#texture" } 29 | } 30 | }, 31 | 32 | { "__comment": "Top bar", 33 | "from": [ 7, 13, 4 ], 34 | "to": [ 9, 15, 12 ], 35 | "faces": { 36 | "down": { "uv": [ 6, 10, 14, 12 ], "texture": "#texture", "rotation": 90 }, 37 | "up": { "uv": [ 6, 0, 14, 2 ], "texture": "#texture", "rotation": 90 }, 38 | "west": { "uv": [ 6, 3, 14, 5 ], "texture": "#texture" }, 39 | "east": { "uv": [ 6, 3, 14, 5 ], "texture": "#texture" } 40 | } 41 | }, 42 | { "__comment": "Lower bar", 43 | "from": [ 7, 5, 4 ], 44 | "to": [ 9, 7, 12 ], 45 | "faces": { 46 | "down": { "uv": [ 6, 10, 14, 12 ], "texture": "#texture", "rotation": 90 }, 47 | "up": { "uv": [ 6, 0, 14, 2 ], "texture": "#texture", "rotation": 90 }, 48 | "west": { "uv": [ 6, 8, 14, 10 49 | ], "texture": "#texture" }, 50 | "east": { "uv": [ 6, 8, 14, 10 ], "texture": "#texture" } 51 | } 52 | }, 53 | { "__comment": "Top bar north", 54 | "from": [ 7, 13, -2 ], 55 | "to": [ 9, 15, 0 ], 56 | "faces": { 57 | "down": { "uv": [ 4, 10, 6, 12 ], "texture": "#texture", "rotation": 90 }, 58 | "up": { "uv": [ 4, 0, 6, 2 ], "texture": "#texture", "rotation": 90 }, 59 | "west": { "uv": [ 4, 3, 6, 5 ], "texture": "#texture" }, 60 | "east": { "uv": [ 14, 3, 16, 5 ], "texture": "#texture" }, 61 | "north": { "uv": [ 4, 14, 6, 16 ], "texture": "#texture" } 62 | } 63 | }, 64 | { "__comment": "Lower bar north", 65 | "from": [ 7, 5, -2 ], 66 | "to": [ 9, 7, 0 ], 67 | "faces": { 68 | "down": { "uv": [ 4, 10, 6, 12 ], "texture": "#texture", "rotation": 90 }, 69 | "up": { "uv": [ 4, 0, 6, 2 ], "texture": "#texture", "rotation": 90 }, 70 | "west": { "uv": [ 4, 7, 6, 9 ], "texture": "#texture" }, 71 | "east": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" }, 72 | "north": { "uv": [ 6, 14, 8, 16 ], "texture": "#texture" } 73 | } 74 | }, 75 | { "__comment": "Top bar south", 76 | "from": [ 7, 13, 16 ], 77 | "to": [ 9, 15, 18 ], 78 | "faces": { 79 | "down": { "uv": [ 14, 10, 16, 12 ], "texture": "#texture", "rotation": 90 }, 80 | "up": { "uv": [ 14, 0, 16, 2 ], "texture": "#texture", "rotation": 90 }, 81 | "west": { "uv": [ 14, 3, 16, 5 ], "texture": "#texture" }, 82 | "east": { "uv": [ 4, 3, 6, 5 ], "texture": "#texture" }, 83 | "south": { "uv": [ 4, 14, 6, 16 ], "texture": "#texture" } 84 | } 85 | }, 86 | { "__comment": "Lower bar south", 87 | "from": [ 7, 5, 16 ], 88 | "to": [ 9, 7, 18 ], 89 | "faces": { 90 | "down": { "uv": [ 14, 10, 16, 12 ], "texture": "#texture", "rotation": 90 }, 91 | "up": { "uv": [ 14, 0, 16, 2 ], "texture": "#texture", "rotation": 90 }, 92 | "west": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" }, 93 | "east": { "uv": [ 4, 7, 6, 9 ], "texture": "#texture" }, 94 | "south": { "uv": [ 6, 14, 8, 16 ], "texture": "#texture" } 95 | } 96 | } 97 | ] 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/AddEntryLootModifier.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data; 2 | 3 | import com.google.gson.JsonElement; 4 | import com.google.gson.JsonSyntaxException; 5 | import com.mojang.serialization.Codec; 6 | import com.mojang.serialization.DataResult; 7 | import com.mojang.serialization.Dynamic; 8 | import com.mojang.serialization.JsonOps; 9 | import com.mojang.serialization.codecs.RecordCodecBuilder; 10 | 11 | import it.unimi.dsi.fastutil.objects.ObjectArrayList; 12 | import net.minecraft.world.item.ItemStack; 13 | import net.minecraft.world.level.storage.loot.LootContext; 14 | import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer; 15 | import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; 16 | import net.minecraft.world.level.storage.loot.functions.LootItemFunction; 17 | import net.minecraft.world.level.storage.loot.functions.LootItemFunctions; 18 | import net.minecraftforge.common.loot.IGlobalLootModifier; 19 | import net.minecraftforge.common.loot.LootModifier; 20 | import net.minecraftforge.common.loot.LootModifierManager; 21 | 22 | import java.util.Collections; 23 | import java.util.List; 24 | import java.util.function.BiFunction; 25 | import java.util.function.Consumer; 26 | 27 | /** 28 | * Loot modifier to inject an additional loot entry into an existing table 29 | * Based on code from Mantle 30 | */ 31 | public class AddEntryLootModifier extends LootModifier { 32 | 33 | private static final Codec LOOT_POOL_ENTRY_CODEC = Codec.PASSTHROUGH.flatXmap( 34 | d -> { 35 | try { 36 | LootPoolEntryContainer entry = LootModifierManager.GSON_INSTANCE.fromJson(getJson(d), LootPoolEntryContainer.class); 37 | return DataResult.success(entry); 38 | }catch(JsonSyntaxException e) { 39 | LootModifierManager.LOGGER.warn("Unable to decode entry", e); 40 | return DataResult.error(() -> e.getMessage()); 41 | } 42 | }, 43 | entry -> { 44 | try { 45 | JsonElement element = LootModifierManager.GSON_INSTANCE.toJsonTree(entry); 46 | return DataResult.success(new Dynamic<>(JsonOps.INSTANCE, element)); 47 | }catch(JsonSyntaxException e) { 48 | LootModifierManager.LOGGER.warn("Unable to encode entry", e); 49 | return DataResult.error(() -> e.getMessage()); 50 | } 51 | }); 52 | 53 | private static final Codec LOOT_ITEM_FUNCTION_CODEC = Codec.PASSTHROUGH.flatXmap( 54 | d -> { 55 | try { 56 | LootItemFunction entry = LootModifierManager.GSON_INSTANCE.fromJson(getJson(d), LootItemFunction.class); 57 | return DataResult.success(entry); 58 | }catch(JsonSyntaxException e) { 59 | LootModifierManager.LOGGER.warn("Unable to decode function", e); 60 | return DataResult.error(() -> e.getMessage()); 61 | } 62 | }, 63 | function -> { 64 | try { 65 | JsonElement element = LootModifierManager.GSON_INSTANCE.toJsonTree(function); 66 | return DataResult.success(new Dynamic<>(JsonOps.INSTANCE, element)); 67 | }catch(JsonSyntaxException e) { 68 | LootModifierManager.LOGGER.warn("Unable to encode function", e); 69 | return DataResult.error(() -> e.getMessage()); 70 | } 71 | }); 72 | 73 | public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst).and( 74 | inst.group( 75 | LOOT_POOL_ENTRY_CODEC.fieldOf("entry").forGetter(m -> m.entry), 76 | LOOT_ITEM_FUNCTION_CODEC.listOf().optionalFieldOf("functions", Collections.emptyList()).forGetter(m -> m.functions), 77 | Codec.BOOL.fieldOf("require_empty").orElse(false).forGetter(m -> m.requireEmpty) 78 | )).apply(inst, AddEntryLootModifier::new)); 79 | 80 | private final LootPoolEntryContainer entry; 81 | private final List functions; 82 | private final BiFunction combinedFunctions; 83 | private final boolean requireEmpty; 84 | 85 | protected AddEntryLootModifier(LootItemCondition[] conditionsIn, LootPoolEntryContainer entry, List functions, boolean requireEmpty) { 86 | super(conditionsIn); 87 | this.entry = entry; 88 | this.functions = functions; 89 | this.combinedFunctions = LootItemFunctions.compose(functions.toArray(LootItemFunction[]::new)); 90 | this.requireEmpty = requireEmpty; 91 | } 92 | 93 | @Override 94 | protected ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { 95 | if(!requireEmpty || generatedLoot.isEmpty()) { 96 | Consumer consumer = LootItemFunction.decorate(this.combinedFunctions, generatedLoot::add, context); 97 | entry.expand(context, generator -> generator.createItemStack(consumer, context)); 98 | } 99 | return generatedLoot; 100 | } 101 | 102 | @Override 103 | public Codec codec() { 104 | return CODEC; 105 | } 106 | 107 | // From IGlobalLootModifier 108 | @SuppressWarnings("unchecked") 109 | private static JsonElement getJson(Dynamic dynamic) { 110 | Dynamic typed = (Dynamic) dynamic; 111 | return typed.getValue() instanceof JsonElement ? 112 | (JsonElement) typed.getValue() : 113 | typed.getOps().convertTo(JsonOps.INSTANCE, typed.getValue()); 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/data/gen/BlockLootTableGenerator.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.data.gen; 2 | 3 | import com.google.common.collect.Sets; 4 | import knightminer.simplytea.SimplyTea; 5 | import knightminer.simplytea.block.TeaTrunkBlock; 6 | import knightminer.simplytea.core.Registration; 7 | import net.minecraft.advancements.critereon.StatePropertiesPredicate; 8 | import net.minecraft.data.loot.BlockLootSubProvider; 9 | import net.minecraft.resources.ResourceLocation; 10 | import net.minecraft.world.flag.FeatureFlags; 11 | import net.minecraft.world.item.enchantment.Enchantments; 12 | import net.minecraft.world.level.block.Block; 13 | import net.minecraft.world.level.storage.loot.BuiltInLootTables; 14 | import net.minecraft.world.level.storage.loot.LootPool; 15 | import net.minecraft.world.level.storage.loot.LootTable; 16 | import net.minecraft.world.level.storage.loot.LootTable.Builder; 17 | import net.minecraft.world.level.storage.loot.entries.LootItem; 18 | import net.minecraft.world.level.storage.loot.entries.LootTableReference; 19 | import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount; 20 | import net.minecraft.world.level.storage.loot.functions.ApplyExplosionDecay; 21 | import net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition; 22 | import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition; 23 | import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; 24 | import net.minecraftforge.registries.ForgeRegistries; 25 | 26 | import javax.annotation.Nonnull; 27 | import java.util.Objects; 28 | import java.util.Set; 29 | import java.util.function.BiConsumer; 30 | import java.util.stream.Collectors; 31 | 32 | public class BlockLootTableGenerator extends BlockLootSubProvider { 33 | private final ResourceLocation LEAVES_ID = new ResourceLocation(SimplyTea.MOD_ID, "blocks/tea_leaves"); 34 | 35 | protected BlockLootTableGenerator() { 36 | super(Set.of(), FeatureFlags.REGISTRY.allFlags()); 37 | } 38 | 39 | @Nonnull 40 | @Override 41 | protected Iterable getKnownBlocks() { 42 | return ForgeRegistries.BLOCKS.getValues().stream() 43 | .filter(block -> SimplyTea.MOD_ID.equals(Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getNamespace())) 44 | .collect(Collectors.toList()); 45 | } 46 | 47 | @Override 48 | public void generate(BiConsumer consumer) { 49 | this.generate(); 50 | Set set = Sets.newHashSet(); 51 | for (Block block : getKnownBlocks()) { 52 | ResourceLocation name = block.getLootTable(); 53 | if (name != BuiltInLootTables.EMPTY && set.add(name)) { 54 | LootTable.Builder builder = this.map.remove(name); 55 | if (builder == null) { 56 | ResourceLocation blockName = ForgeRegistries.BLOCKS.getKey(block); 57 | throw new IllegalStateException(String.format("Missing loottable '%s' for '%s'", name, blockName)); 58 | } 59 | 60 | consumer.accept(name, builder); 61 | } 62 | } 63 | 64 | // special case leaves builder 65 | LootTable.Builder leavesBuilder = this.map.remove(LEAVES_ID); 66 | if (leavesBuilder == null) { 67 | ResourceLocation rl = ForgeRegistries.FEATURES.getKey(Registration.tea_tree); 68 | throw new IllegalStateException(String.format("Missing loottable '%s' for '%s'", LEAVES_ID, rl)); 69 | } 70 | consumer.accept(LEAVES_ID, leavesBuilder); 71 | 72 | if (!this.map.isEmpty()) { 73 | throw new IllegalStateException("Created block loot tables for non-blocks: " + this.map.keySet()); 74 | } 75 | } 76 | 77 | @Override 78 | protected void generate() { 79 | // basic 80 | dropSelf(Registration.tea_fence); 81 | dropSelf(Registration.tea_fence_gate); 82 | dropSelf(Registration.tea_sapling); 83 | dropPottedContents(Registration.potted_tea_sapling); 84 | // first register internal leaves loot table 85 | this.map.put( 86 | LEAVES_ID, 87 | LootTable.lootTable() 88 | .apply(ApplyExplosionDecay.explosionDecay()) 89 | .withPool(LootPool.lootPool().add(LootItem.lootTableItem(Registration.tea_leaf))) 90 | .withPool(LootPool.lootPool() 91 | .add(LootItem.lootTableItem(Registration.tea_leaf) 92 | .apply(ApplyBonusCount.addBonusBinomialDistributionCount(Enchantments.BLOCK_FORTUNE, 0.55f, 2)))) 93 | .withPool(LootPool.lootPool() 94 | .when(ExplosionCondition.survivesExplosion()) 95 | .when(BonusLevelTableCondition.bonusLevelFlatChance(Enchantments.BLOCK_FORTUNE, 0.05f, 0.0625f, 0.083333336f, 0.1f)) 96 | .add(LootItem.lootTableItem(Registration.tea_sapling)))); 97 | // then register the trunk table 98 | add(Registration.tea_trunk, block -> 99 | LootTable.lootTable() 100 | .apply(ApplyExplosionDecay.explosionDecay()) 101 | .withPool(LootPool.lootPool().add(LootItem.lootTableItem(Registration.tea_stick))) 102 | .withPool(LootPool.lootPool() 103 | .add(LootItem.lootTableItem(Registration.tea_stick) 104 | .apply(ApplyBonusCount.addBonusBinomialDistributionCount(Enchantments.BLOCK_FORTUNE, 0.55f, 2)))) 105 | .withPool(LootPool.lootPool() 106 | .when(LootItemBlockStatePropertyCondition.hasBlockStateProperties(block) 107 | .setProperties(StatePropertiesPredicate.Builder.properties() 108 | .hasProperty(TeaTrunkBlock.CLIPPED, false))) 109 | .add(LootTableReference.lootTableReference(LEAVES_ID)))); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/knightminer/simplytea/core/config/TeaDrink.java: -------------------------------------------------------------------------------- 1 | package knightminer.simplytea.core.config; 2 | 3 | import com.mojang.datafixers.util.Pair; 4 | import knightminer.simplytea.core.Registration; 5 | import knightminer.simplytea.data.SimplyTags; 6 | import net.minecraft.core.Holder; 7 | import net.minecraft.core.registries.BuiltInRegistries; 8 | import net.minecraft.world.effect.MobEffect; 9 | import net.minecraft.world.effect.MobEffectInstance; 10 | import net.minecraft.world.effect.MobEffects; 11 | import net.minecraft.world.item.Item; 12 | import net.minecraft.world.item.ItemStack; 13 | import net.minecraftforge.common.ForgeConfigSpec; 14 | 15 | import javax.annotation.Nullable; 16 | import java.util.Collections; 17 | import java.util.List; 18 | import java.util.Locale; 19 | import java.util.function.Supplier; 20 | 21 | /** Properties for a tea drink */ 22 | public class TeaDrink extends Drink { 23 | private final TeaEffect type; 24 | private final ForgeConfigSpec.IntValue configurable; 25 | private final int constant; 26 | 27 | /** 28 | * Creates a new tea settings category for the given tea 29 | * @param builder Config builder 30 | * @param name Name of the tea 31 | * @param type Tea effect type 32 | * @param hunger Default hunger value 33 | * @param saturation Default saturation value 34 | * @param time Default effect time in seconds 35 | * @param level Default effect level 36 | */ 37 | public TeaDrink(String name, ForgeConfigSpec.Builder builder, TeaEffect type, int hunger, double saturation, int time, int level) { 38 | super(name, builder, hunger, saturation); 39 | 40 | // determine last property based on type 41 | this.type = type; 42 | if (type.isLevel()) { 43 | this.configurable = builder.comment(String.format("Level of the %s effect when drinking this tea.", type), type.getDescription(), "Set to 0 to disable the effect.") 44 | .translation("simplytea.config.tea.level") 45 | .defineInRange("level", level, 0, 10); 46 | this.constant = time; 47 | } else { 48 | this.configurable = builder.comment(String.format("Time in seconds for the %s effect from drinking this tea.", type), type.getDescription(), "Set to 0 to disable the effect.") 49 | .translation("simplytea.config.tea.time") 50 | .defineInRange("time", time, 0, 600); 51 | this.constant = level; 52 | } 53 | builder.pop(); 54 | } 55 | 56 | /** Gets the effect for this drink, or null if the effect is disabled */ 57 | @Nullable 58 | public MobEffectInstance getEffect(boolean hasHoney) { 59 | int levelOffset = hasHoney ? 0 : -1; // config stores values as +1 to make it easier to understand 60 | int configurable = this.configurable.get(); 61 | if (configurable != 0) { 62 | MobEffectInstance effect; 63 | if (type.isLevel()) { 64 | effect = new MobEffectInstance(type.getEffect(), constant * 20, configurable + levelOffset); 65 | } else { 66 | effect = new MobEffectInstance(type.getEffect(), configurable * 20, constant + levelOffset); 67 | } 68 | // teas conflict with each other, add other teas as curative items 69 | List curativeEffects = effect.getCurativeItems(); 70 | curativeEffects.clear(); 71 | for (Holder tea : BuiltInRegistries.ITEM.getTagOrEmpty(SimplyTags.Items.EXCLUSIVE_TEAS)) { 72 | curativeEffects.add(new ItemStack(tea)); 73 | } 74 | 75 | return effect; 76 | } 77 | return null; 78 | } 79 | 80 | @Override 81 | public List> getEffects() { 82 | return Collections.emptyList(); 83 | } 84 | 85 | /** Tea effect types */ 86 | public enum TeaEffect { 87 | RESTFUL(true, () -> Registration.restful, "Heals one heart after sleeping per level"), 88 | RELAXED(true, () -> Registration.relaxed, "Heals 0.5 hearts every (60 / level) seconds"), 89 | CAFFEINATED(false, () -> Registration.caffeinated, "Grants +6% movement and +5% attack speed"), 90 | INVIGORATED(false, () -> Registration.invigorated, "Grants +1 attack damage and 0.5 knockback"), 91 | ENDERFALLING(false, () -> Registration.enderfalling, "Grants immunity to ender pearl damage and reduces fall damage"), 92 | ABSORPTION(true, () -> MobEffects.ABSORPTION, "Grants 2 temporary absorption hearts per level for a short time"); 93 | 94 | private final Supplier effectSupplier; 95 | private final boolean level; 96 | private final String description; 97 | 98 | /** @param level If true, level is configurable. If false time is configurable */ 99 | TeaEffect(boolean level, Supplier effectSupplier, String description) { 100 | this.effectSupplier = effectSupplier; 101 | this.level = level; 102 | this.description = description; 103 | } 104 | 105 | /** 106 | * If true, the level is configurable. If false time is configurable 107 | * @return true if level is configurable, false if time is 108 | */ 109 | public boolean isLevel() { 110 | return level; 111 | } 112 | 113 | /** Gets the description for the config */ 114 | public String getDescription() { 115 | return description; 116 | } 117 | 118 | /** Gets the effect for this drink */ 119 | public MobEffect getEffect() { 120 | return effectSupplier.get(); 121 | } 122 | 123 | @Override 124 | public String toString() { 125 | return this.name().toLowerCase(Locale.US); 126 | } 127 | } 128 | } 129 | --------------------------------------------------------------------------------