added munch

This commit is contained in:
Ryan
2025-01-22 19:36:39 +02:00
parent 8e2ec142b1
commit f2e2ae2bf9
31 changed files with 730 additions and 260 deletions

View File

@@ -1,4 +1,5 @@
{
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "automatic"
"java.compile.nullAnalysis.mode": "automatic",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable"
}

View File

@@ -6,3 +6,4 @@
- Added Item "Ghostly Cloth".
- Renamed java class "sun_totem" to "sunTotem" to fit convention.
- added robes
- added the munch

View File

@@ -4,6 +4,8 @@ import com.smithy.terraoriginum.blocks.cottonCropBlock;
import com.smithy.terraoriginum.blocks.crucifix;
import com.smithy.terraoriginum.items.*;
import com.smithy.terraoriginum.registry.modEnchantments;
import com.smithy.terraoriginum.registry.modPowers;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.item.ItemGroups;
@@ -27,6 +29,7 @@ public class TerraOriginum implements ModInitializer {
sunTotem.register();
ghostlyItems.register();
robesItems.register();
modPowers.register();
ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(umbrella.UMBRELLA));
ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(sunTotem.SUN_TOTEM));

View File

@@ -11,10 +11,12 @@ public class iconItems {
public static final Item MYNC_EYE = new Item(new Item.Settings().maxCount(1).rarity(Rarity.EPIC));
public static final Item SPIRIT = new Item(new Item.Settings().maxCount(1).rarity(Rarity.EPIC));
public static final Item TINY = new Item(new Item.Settings().maxCount(1).rarity(Rarity.EPIC));
public static void register() {
Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "mync_eye"), MYNC_EYE);
Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "spirit"), SPIRIT);
Registry.register(Registries.ITEM, new Identifier(TerraOriginum.MOD_ID, "tiny"), TINY);
}
}

View File

@@ -1,15 +1,21 @@
package com.smithy.terraoriginum.mixin;
import com.smithy.terraoriginum.items.umbrella;
import com.smithy.terraoriginum.power.preventBlockSlowness;
import io.github.apace100.apoli.component.PowerHolderComponent;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Entity.class)
@@ -33,6 +39,14 @@ public abstract class EntityMixin {
}
}
@Inject(method = "slowMovement", at = @At("HEAD"), cancellable = true)
private void terraoriginum$preventBlockSlowness(BlockState state, Vec3d multiplier, CallbackInfo ci) {
for (preventBlockSlowness power : PowerHolderComponent.getPowers((Entity) (Object) this, preventBlockSlowness.class)) {
if (power.isActive()) {
ci.cancel();
return;
}
}
}
}

View File

@@ -0,0 +1,24 @@
package com.smithy.terraoriginum.mixin;
import io.github.apace100.apoli.component.PowerHolderComponent;
import net.minecraft.block.PowderSnowBlock;
import net.minecraft.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import com.smithy.terraoriginum.power.canStandOnPowderSnow;
@Mixin(PowderSnowBlock.class)
public class PowderSnowBlockMixin {
@Inject(method = "canWalkOnPowderSnow", at = @At("HEAD"), cancellable = true)
private static void terraoriginum$canStandOnPowderSnow(Entity entity, CallbackInfoReturnable<Boolean> cir) {
for (canStandOnPowderSnow canStandOnPowderSnowPower : PowerHolderComponent.getPowers(entity, canStandOnPowderSnow.class)) {
if (canStandOnPowderSnowPower.isActive()) {
cir.setReturnValue(true);
return;
}
}
}
}

View File

@@ -0,0 +1,11 @@
package com.smithy.terraoriginum.power;
import io.github.apace100.apoli.power.Power;
import io.github.apace100.apoli.power.PowerType;
import net.minecraft.entity.LivingEntity;
public class canStandOnPowderSnow extends Power {
public canStandOnPowderSnow(PowerType<?> type, LivingEntity entity) {
super(type, entity);
}
}

View File

@@ -0,0 +1,11 @@
package com.smithy.terraoriginum.power;
import io.github.apace100.apoli.power.Power;
import io.github.apace100.apoli.power.PowerType;
import net.minecraft.entity.LivingEntity;
public class preventBlockSlowness extends Power {
public preventBlockSlowness(PowerType<?> type, LivingEntity entity) {
super(type, entity);
}
}

View File

@@ -0,0 +1,24 @@
package com.smithy.terraoriginum.registry;
import com.smithy.terraoriginum.TerraOriginum;
import com.smithy.terraoriginum.power.canStandOnPowderSnow;
import com.smithy.terraoriginum.power.preventBlockSlowness;
import io.github.apace100.apoli.power.factory.PowerFactory;
import io.github.apace100.apoli.registry.ApoliRegistries;
import io.github.apace100.calio.data.SerializableData;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
public class modPowers {
public static final PowerFactory<?> CAN_WALK_ON_POWDER_SNOW = new PowerFactory<>( new Identifier(TerraOriginum.MOD_ID, "can_walk_on_powder_snow"), new SerializableData(), data -> (type, entity) -> new canStandOnPowderSnow(type, entity)).allowCondition();
public static final PowerFactory<?> PREVENT_BLOCK_SLOWNESS = new PowerFactory<>(new Identifier(TerraOriginum.MOD_ID, "prevent_block_slowness"), new SerializableData(), data -> (type, entity) -> new preventBlockSlowness(type, entity)).allowCondition();
public static void register() {
Registry.register(ApoliRegistries.POWER_FACTORY, CAN_WALK_ON_POWDER_SNOW.getSerializerId(), CAN_WALK_ON_POWDER_SNOW);
Registry.register(ApoliRegistries.POWER_FACTORY, PREVENT_BLOCK_SLOWNESS.getSerializerId(), PREVENT_BLOCK_SLOWNESS);
}
}

View File

@@ -2,25 +2,19 @@
//-----Icon Items-----//
"item.terraoriginum.mync_eye": "Mync Eye",
"item.terraoriginum.spirit": "Spirit",
"item.terraoriginum.umbrella": "Umbrella",
//-----shit i cant be assed to categorise-----/
"item.terraoriginum.umbrella": "Umbrella",
"item.terraoriginum.cotton_seeds": "Cotton Seeds",
"item.terraoriginum.cotton_ball": "Cotton ball",
"item.terraoriginum.ghostly_cloth": "Ghostly Cloth",
"item.terraoriginum.sun_totem": "Sun Totem",
"death.attack.lack_of_ectoplasm": "%1$s faded away",
"death.attack.lack_of_ectoplasm.player": "%1$s faded away whilst trying to escape %2$s",
"death.attack.lack_of_sun": "%1$s fell apart",
"death.attack.lack_of_sun.player": "%1$s fell apart whilst fighting %2$s",
"death.attack.boiling": "%1$s boiled up",
"death.attack.boiling.player": "%1$s boiled up whilst trying to fight off %2$s",
"enchantment.terraoriginum.sun_protection": "Sun Protection",
//-----Immortal Human-----//
@@ -152,7 +146,6 @@
"power.terraoriginum.mync-powers/mync_echolocate.description": "Use your [Tab button] to make a sound to figure out how your surrounding area looks like. Nearby wool will stop this from working, but you can use a night vision potion to get it to work permanently.",
"power.terraoriginum.mync-powers/mync_strong.name": "Strong",
"power.terraoriginum.mync-powers/mync_strong.description": "You do more damage than regular people.",
"death.attack.terraoriginum:burn_in_sun": "%1$s sizzled up in the sun.",
"death.attack.terraoriginum:burn_in_sun.player": "%1$s sizzled up in the sun whilst trying to escape %2$s.",
@@ -185,7 +178,6 @@
"origin.terraoriginum.yulde.description": "A Yulde is a Lato with the ability to change the tides of battle, at the cost of their lives.",
"power.terraoriginum.yulde-powers/last_stand.name": "Last Stand",
"power.terraoriginum.yulde-powers/last_stand.description": "You gain strength 4 and speed 2 for 60 seconds, after which you will, without fail, die.",
"death.attack.terraoriginum:last_stand": "%1$s made their last stand.",
"death.attack.terraoriginum:last_stand.player": "%1$s made their last stand before dying to %2$s.",
@@ -247,6 +239,50 @@
"power.terraoriginum.monarchpowers/hydropetrification.name": "Hydropetrification",
"power.terraoriginum.monarchpowers/hydropetrification.description": "Your body's cells contain a high concentration of neutrinos to facilitate nuclear processes whithin itself, this causes your entire body to heavily slow down underwater",
"power.terraoriginum.monarchpowers/totem_fueled.name": "Totem Fueled",
"power.terraoriginum.monarchpowers/totem_fueled.description": "Craft a Sun Totem and hold it to get small amounts of sun energy even outside the sun"
"power.terraoriginum.monarchpowers/totem_fueled.description": "Craft a Sun Totem and hold it to get small amounts of sun energy even outside the sun",
//-----Blight-----//
"origin.terraoriginum.blight.name": "Blight",
"origin.terraoriginum.blight.description": "Blights are foul and disgusting creatures. Created in the depths of the nether, they exist for the purpose of bring rot and wither to all forms of nature.",
"power.terraoriginum.blight-powers/bane_of_agriculture.name": "Bane of Agriculture",
"power.terraoriginum.blight-powers/bane_of_agriculture.description": "Through a process not very well understood, blights can rapidly reverse the growth of all crops in about a 6 block radius around themselves",
"power.terraoriginum.blight-powers/blighted_feet.name": "Blighted Feet",
"power.terraoriginum.blight-powers/blighted_feet.description": "The Blight's cursed feet destroy life within the soil they touch, turning it to course dirt.",
"power.terraoriginum.blight-powers/nether_spawn.name": "Nether Spawn",
"power.terraoriginum.blight-powers/nether_spawn.description": "Blights were created in the nether, hence you will start there when you spawn. Curiously, they are not immune to fire like most other nether inhabitants",
"power.terraoriginum.blight-powers/foul_flesh.name": "Foul Flesh",
"power.terraoriginum.blight-powers/foul_flesh.description": "The Blight's flesh is foul and rotten, and as such no poison can effect it.",
"power.terraoriginum.blight-powers/florivory.name": "Florvory",
"power.terraoriginum.blight-powers/florivory.description": "The Blight cannot naturally regenerate, and needs to devour flowers to reconstitute it's body if damaged.",
"power.terraoriginum.blight-powers/dead_cells.name": "Dead Cells",
"power.terraoriginum.blight-powers/dead_cells.description": "A large portion of a Blight's body is comprised of dead cells, hitting them does not damage it's vital functions, essentially acting as a small amount of armour for the blight.",
//-----Munch-----//
"origin.terraoriginum.munch.name": "Munch",
"origin.terraoriginum.munch.description": "The Munch are a very small species which can ",
"power.terraoriginum.munch-powers/tiny.name": "Tiny",
"power.terraoriginum.munch-powers/tiny.description": "You are very tiny. About 4 pixels tall. Conveniently, this also makes you more difficult to hit.",
"power.terraoriginum.munch-powers/little_health.name": "Little Health",
"power.terraoriginum.munch-powers/little_health.description": "You have very little health due to your tiny size, you little munch.",
"power.terraoriginum.munch-powers/nimble.name": "Too Small to Damage",
"power.terraoriginum.munch-powers/nimble.description": "You are immune to thorns and velocity based damage. You are not slowed by blocks such as sweet berry bushes or cobwebs. You can walk on powder snow.",
"power.terraoriginum.munch-powers/better_health.name": "Better Healing",
"power.terraoriginum.munch-powers/better_health.description": "You heal twice as fast as the average joe, must be compensating for something.",
"power.terraoriginum.munch-powers/too_tiny.name": "Too Tiny",
"power.terraoriginum.munch-powers/too_tiny.description": "You are so small, most mobs don't even feel threatened by you, and as such, they don't attack you.",
"power.terraoriginum.munch-powers/short_arms.name": "Short Arms",
"power.terraoriginum.munch-powers/short_arms.description": "You are small, therefore you can't reach as far as the average joe.",
"power.terraoriginum.munch-powers/tiny_motion.name": "Sized Speed",
"power.terraoriginum.munch-powers/tiny_motion.description": "You're about as fast as you are tiny, and you can only jump up a little over half a block.",
"power.terraoriginum.munch-powers/speedy_bastard.name": "Speedy Bastard",
"power.terraoriginum.munch-powers/speedy_bastard.description": "You are a fast little munch, aren't you? Maybe not normally, but now §ocan be§r.",
"power.terraoriginum.munch-powers/climbing.name": "Wall Runner",
"power.terraoriginum.munch-powers/climbing.description": "You have evolved a swift and seamless climbing technique which allows you to glide up vertical terrains with the grace and speed of a wall runner.",
"power.terraoriginum.munch-powers/mounting.name": "Mounting",
"power.terraoriginum.munch-powers/mounting.description": "You can mount and ride other players and entities. Whether seeking a vantage point, or swift transport. Surely you didn't think I meant mounting in §othat§r way, did you?",
"power.terraoriginum.munch-powers/quiet.name": "Quiet",
"power.terraoriginum.munch-powers/quiet.description": "You're too small to make sound, sculk sensors don't even hear you.",
"power.terraoriginum.munch-powers/tiny_appetite.name": "Tiny Appetite",
"power.terraoriginum.munch-powers/tiny_appetite.description": "You don't lose hunger very quickly"
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "terraoriginum:item/tiny"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

View File

@@ -17,6 +17,7 @@
"terraoriginum:mync",
"terraoriginum:monarch",
"terraoriginum:blight",
"terraoriginum:munch",
{
"condition": {
"type": "origins:equipped_item",

View File

@@ -0,0 +1,22 @@
{
"powers": [
"terraoriginum:munch-powers/tiny",
"terraoriginum:munch-powers/short_arms",
"terraoriginum:munch-powers/tiny_motion",
"terraoriginum:munch-powers/tiny_width",
"terraoriginum:munch-powers/little_health",
"terraoriginum:munch-powers/better_health",
"terraoriginum:munch-powers/tiny_appetite",
"terraoriginum:munch-powers/too_tiny",
"terraoriginum:munch-powers/nimble",
"terraoriginum:munch-powers/quiet",
"terraoriginum:munch-powers/climbing",
"terraoriginum:munch-powers/mounting",
"terraoriginum:munch-powers/speedy_bastard"
],
"icon": {
"item": "terraoriginum:tiny"
},
"order": 999,
"impact": 3
}

View File

@@ -0,0 +1,7 @@
{
"type": "origins:modify_healing",
"modifier":{
"operation": "multiply_total",
"value": 1
}
}

View File

@@ -0,0 +1,79 @@
{
"type": "origins:multiple",
"toggle": {
"type": "origins:toggle",
"active_by_default": false,
"key": {
"key": "key.origins.primary_active"
},
"retain_state": true
},
"wall_run": {
"type": "origins:action_over_time",
"entity_action": {
"type": "origins:and",
"actions": [
{
"type":"origins:apply_effect",
"effect":{
"effect":"minecraft:levitation",
"duration":2,
"amplifier":-1,
"is_ambient":false,
"show_particles":false,
"show_icon":false
}
},
{
"type":"origins:add_velocity",
"x": 0.0,
"y": 0.0,
"z":0.05,
"space":"local",
"client": true,
"server": true,
"set":false
}
]
},
"falling_action": {
"type":"origins:clear_effect",
"effect":"minecraft:levitation"
},
"interval": 1,
"condition": {
"type": "origins:and",
"conditions": [
{
"type": "origins:power_active",
"power": "terraoriginum:munch-powers/climbing_toggle"
},
{
"type":"origins:on_block",
"inverted":true
},
{
"type": "origins:or",
"conditions": [
{
"type":"origins:block_collision",
"offset_x":0.1,
"offset_z":0.1,
"offset_y":0,
"inverted":false
},
{
"type":"origins:block_collision",
"offset_x":-0.1,
"offset_z":-0.1,
"offset_y":0,
"inverted":false
}
],
"inverted": false
}
]
}
}
}

View File

@@ -0,0 +1,8 @@
{
"type": "origins:attribute",
"modifier": {
"attribute": "minecraft:generic.max_health",
"value": -12.0,
"operation": "addition"
}
}

View File

@@ -0,0 +1,56 @@
{
"type":"origins:multiple",
"mount":{
"type":"origins:active_self",
"entity_action":{
"type":"origins:raycast",
"distance":10.00,
"block":false,
"entity":true,
"shape_type":"collider",
"fluid_handling":"none",
"bientity_condition":{
"type":"origins:target_condition",
"condition":{
"type":"origins:living"
}
},
"bientity_action":{
"type":"origins:mount"
},
"entity_distance":3.00,
"command_step":1.00,
"command_along_ray_only_on_hit":false
},
"cooldown":1,
"hud_render":{
"should_render":false
},
"key":{
"key":"key.origins.secondary_active",
"continuous":false
},
"condition":{
"type":"origins:riding",
"inverted":true
}
},
"dismount":{
"type":"origins:active_self",
"entity_action":{
"type":"origins:dismount"
},
"cooldown":1,
"hud_render":{
"should_render":false
},
"key":{
"key":"key.sneak",
"continuous":false
},
"condition":{
"type":"origins:riding",
"inverted":false
}
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "origins:multiple",
"damage_immunity": {
"type": "origins:invulnerability",
"damage_condition": {
"type": "origins:or",
"conditions": [
{
"type": "origins:name",
"name": "fall"
},
{
"type": "origins:name",
"name": "flyIntoWall"
},
{
"type": "origins:name",
"name": "cactus"
},
{
"type": "origins:name",
"name": "sweetBerryBush"
},
{
"type": "origins:name",
"name": "thorns"
}
]
}
},
"prevent_block_slowness": {
"type": "terraoriginum:prevent_block_slowness"
},
"can_walk_on_powder_snow": {
"type": "terraoriginum:can_walk_on_powder_snow"
}
}

View File

@@ -0,0 +1,7 @@
{
"type": "origins:prevent_game_event",
"events":[
"minecraft:step",
"minecraft:hit_ground"
]
}

View File

@@ -0,0 +1,8 @@
{
"type": "origins:action_over_time",
"interval": 20,
"entity_action": {
"type": "origins:execute_command",
"command": "/scale set pehkui:reach 0.5"
}
}

View File

@@ -0,0 +1,22 @@
{
"type": "origins:active_self",
"key": "key.origins.ternary_active",
"entity_action": {
"type": "origins:and",
"actions": [
{
"type": "origins:apply_effect",
"effect": {
"effect": "minecraft:speed",
"duration": 600,
"amplifier": 4
}
}
]
},
"cooldown": 2400,
"hud_render": {
"sprite_location": "origins:textures/gui/resource_bar.png",
"bar_index": "2"
}
}

View File

@@ -0,0 +1,8 @@
{
"type": "origins:action_over_time",
"interval": 20,
"entity_action": {
"type": "origins:execute_command",
"command": "/scale set pehkui:height 0.13"
}
}

View File

@@ -0,0 +1,8 @@
{
"type": "origins:modify_exhaustion",
"modifier": {
"name": "Origin modifier",
"operation": "multiply_base",
"value": -0.75
}
}

View File

@@ -0,0 +1,8 @@
{
"type": "origins:action_over_time",
"interval": 20,
"entity_action": {
"type": "origins:execute_command",
"command": "/scale set pehkui:motion 0.55"
}
}

View File

@@ -0,0 +1,9 @@
{
"type": "origins:action_over_time",
"hidden": true,
"interval": 20,
"entity_action": {
"type": "origins:execute_command",
"command": "/scale set pehkui:width 0.13"
}
}

View File

@@ -0,0 +1,21 @@
{
"type":"origins:action_over_time",
"entity_action":{
"type":"origins:and",
"actions":[
{
"type":"origins:execute_command",
"command":"team add aggropassive"
},
{
"type":"origins:execute_command",
"command":"team join aggropassive @s"
},
{
"type":"origins:execute_command",
"command":"team join aggropassive @e[type=#terraoriginum:hostiles]"
}
]
},
"interval":20
}

View File

@@ -0,0 +1,33 @@
{
"replace": false,
"values": [
"minecraft:blaze",
"minecraft:cave_spider",
"minecraft:spider",
"minecraft:piglin",
"minecraft:drowned",
"minecraft:enderman",
"minecraft:zombified_piglin",
"minecraft:creeper",
"minecraft:elder_guardian",
"minecraft:endermite",
"minecraft:ghast",
"minecraft:guardian",
"minecraft:hoglin",
"minecraft:husk",
"minecraft:magma_cube",
"minecraft:phantom",
"minecraft:piglin_brute",
"minecraft:pillager",
"minecraft:ravager",
"minecraft:skeleton",
"minecraft:slime",
"minecraft:stray",
"minecraft:vindicator",
"minecraft:witch",
"minecraft:wither_skeleton",
"minecraft:zoglin",
"minecraft:zombie",
"minecraft:zombie_villager"
]
}

View File

@@ -35,7 +35,8 @@
"fabricloader": ">=0.14.0",
"fabric": "*",
"minecraft": "1.20.1",
"pehkui": ">=3.7.8"
"pehkui": ">=3.7.8",
"apugli": "2.10.4+1.20.1-fabric"
},
"conflicts": {
}

View File

@@ -5,7 +5,9 @@
"compatibilityLevel": "JAVA_16",
"mixins": [
"PlayerConditionsMixin",
"PlayerEntityMixin"
"PlayerEntityMixin",
"EntityMixin",
"PowderSnowBlockMixin"
],
"injectors": {
"defaultRequire": 1