-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update translation * update icon * configure milk irremovable mechanic to use tag system * rename module * clear unused import * rename module * add potion system * rename * fix name * update develop status
- Loading branch information
Showing
40 changed files
with
437 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/java/indi/fcwyzzr/minecraft/food_talks/common/mixin/tweaks/mechanic/FoodDataMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/indi/fcwyzzr/minecraft/food_talks/common/mixin/tweaks/mechanic/ItemMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ava/indi/fcwyzzr/minecraft/food_talks/common/mixin/tweaks/mechanic/LivingEntityMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...va/indi/fcwyzzr/minecraft/food_talks/common/mixin/tweaks/mechanic/PathfinderMobMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/kotlin/indi/fcwyzzr/minecraft/f_lib/registry/FPotion.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package indi.fcwyzzr.minecraft.f_lib.registry | ||
|
||
import indi.fcwyzzr.minecraft.food_talks.toRegistryName | ||
import indi.fcwyzzr.minecraft.food_talks.toResourceLocation | ||
import net.minecraft.core.Holder | ||
import net.minecraft.core.Registry | ||
import net.minecraft.core.registries.BuiltInRegistries | ||
import net.minecraft.core.registries.Registries | ||
import net.minecraft.resources.ResourceKey | ||
import net.minecraft.resources.ResourceLocation | ||
import net.minecraft.world.effect.MobEffect | ||
import net.minecraft.world.effect.MobEffectCategory | ||
import net.minecraft.world.effect.MobEffectInstance | ||
import net.minecraft.world.item.alchemy.Potion | ||
import net.minecraft.world.item.alchemy.Potions | ||
import net.neoforged.neoforge.registries.DeferredHolder | ||
|
||
class FPotion( | ||
vararg effects: MobEffectInstance, | ||
val name: String? = null | ||
): Potion(name, *effects), FRegistry<Potion> { | ||
override val registryKey: ResourceKey<out Registry<Potion>> = BuiltInRegistries.POTION.key() | ||
|
||
override val location: ResourceLocation = name | ||
?.toRegistryName() | ||
?.toResourceLocation() | ||
?: effects[0] | ||
.effect | ||
.key!! | ||
.location() | ||
|
||
override val holder: Holder<Potion> = DeferredHolder.create( | ||
ResourceKey.create( | ||
Registries.POTION, location | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...main/kotlin/indi/fcwyzzr/minecraft/food_talks/common/event/lifecycle/MobEffectRegister.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package indi.fcwyzzr.minecraft.food_talks.common.event.lifecycle | ||
|
||
import indi.fcwyzzr.minecraft.f_lib.registry.doRegister | ||
import indi.fcwyzzr.minecraft.food_talks.FoodTalks | ||
import indi.fcwyzzr.minecraft.food_talks.common.mob_effect.beneficial.* | ||
import indi.fcwyzzr.minecraft.food_talks.common.mob_effect.harmful.* | ||
import indi.fcwyzzr.minecraft.food_talks.common.mob_effect.harmful.Vomit | ||
import indi.fcwyzzr.minecraft.food_talks.common.registries.deferred.* | ||
import net.neoforged.api.distmarker.Dist | ||
import net.neoforged.bus.api.SubscribeEvent | ||
import net.neoforged.fml.common.EventBusSubscriber | ||
import net.neoforged.neoforge.registries.RegisterEvent | ||
|
||
@Suppress("DuplicatedCode") | ||
@EventBusSubscriber( | ||
modid = FoodTalks.MOD_ID, | ||
value = [Dist.CLIENT, Dist.DEDICATED_SERVER], | ||
bus = EventBusSubscriber.Bus.MOD | ||
) | ||
object MobEffectRegister { | ||
|
||
@SubscribeEvent | ||
fun registerEffect(event: RegisterEvent){ | ||
event doRegister Anorexia | ||
event doRegister Gout | ||
event doRegister Toothache | ||
event doRegister Vomit | ||
event doRegister Overweight | ||
|
||
event doRegister PoisonResistance | ||
event doRegister DarknessInfused | ||
event doRegister GoddessGrace | ||
event doRegister GameGrace | ||
event doRegister Smelly | ||
event doRegister Happy | ||
event doRegister ProjectileImmune | ||
event doRegister Starving | ||
event doRegister JackHead | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...kotlin/indi/fcwyzzr/minecraft/food_talks/common/event/lifecycle/PrimaryElementRegister.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package indi.fcwyzzr.minecraft.food_talks.common.event.lifecycle | ||
|
||
import indi.fcwyzzr.minecraft.f_lib.registry.doRegister | ||
import indi.fcwyzzr.minecraft.food_talks.FoodTalks | ||
import indi.fcwyzzr.minecraft.food_talks.common.block.BottleBlock | ||
import indi.fcwyzzr.minecraft.food_talks.common.block.PlateBlock | ||
import indi.fcwyzzr.minecraft.food_talks.common.block.entity.BottleBlockEntity | ||
import indi.fcwyzzr.minecraft.food_talks.common.block.entity.PlateBlockEntity | ||
import indi.fcwyzzr.minecraft.food_talks.common.item.Cocktail | ||
import indi.fcwyzzr.minecraft.food_talks.common.item.Plate | ||
import indi.fcwyzzr.minecraft.food_talks.common.item.Sandwich | ||
import net.neoforged.api.distmarker.Dist | ||
import net.neoforged.bus.api.SubscribeEvent | ||
import net.neoforged.fml.common.EventBusSubscriber | ||
import net.neoforged.neoforge.registries.RegisterEvent | ||
|
||
@EventBusSubscriber( | ||
modid = FoodTalks.MOD_ID, | ||
value = [Dist.CLIENT, Dist.DEDICATED_SERVER], | ||
bus = EventBusSubscriber.Bus.MOD | ||
) | ||
object PrimaryElementRegister { | ||
@SubscribeEvent | ||
fun registerBlocks(event: RegisterEvent){ | ||
event doRegister BottleBlock | ||
event doRegister PlateBlock | ||
} | ||
|
||
@SubscribeEvent | ||
fun registerBlockEntities(event: RegisterEvent){ | ||
event doRegister BottleBlockEntity | ||
event doRegister PlateBlockEntity | ||
} | ||
|
||
@SubscribeEvent | ||
fun registerItems(event: RegisterEvent){ | ||
event doRegister Cocktail | ||
event doRegister Plate | ||
event doRegister Sandwich | ||
} | ||
} |
Oops, something went wrong.