Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/main/java/de/dafuqs/spectrum/mixin/PassiveEntityMixin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package de.dafuqs.spectrum.mixin;

import de.dafuqs.spectrum.registries.*;
import net.minecraft.entity.*;
import net.minecraft.entity.passive.*;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.*;

@Mixin(PassiveEntity.class)
public abstract class PassiveEntityMixin {

@Shadow
public abstract boolean isBaby();

@Inject(at= @At("HEAD"), method= "setBreedingAge", cancellable = true)
private void spectrum$preventGrowUp(int age, CallbackInfo ci)
{
var entity = (LivingEntity) (Object) this;
if(this.isBaby() && entity.hasStatusEffect(SpectrumStatusEffects.SCARRED))
{
ci.cancel();
}
}

}
2 changes: 1 addition & 1 deletion src/main/resources/assets/spectrum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3749,7 +3749,7 @@
"book.spectrum.guidebook.sawblade_holly.name": "Sawblade Holly",
"book.spectrum.guidebook.sawblade_holly.page0.text": "These berries remind me of [#](bb00bb)Sweet Berries[#](). Unlike those, however, these are rather dry.\\\n\\\nCan be eaten, but have an unpleasant consistency. Better than nothing, when the going gets tough.",
"book.spectrum.guidebook.sawblade_holly.page1.text": "Harvested by shearing a Sawblade Holly Bush. Can be used as a [Potion Reagent](entry://brewing/potion_workshop_reagents@prickly_bayleaf) and in cooking.\\\n\\\n*Clearly easier to digest cooked than raw...*",
"book.spectrum.guidebook.scarred.page0.text": "Prevented me from regenerating health by natural means while also preventing me from sprinting.\\\n\\\n*A vicious cycle, should something attack me*",
"book.spectrum.guidebook.scarred.page0.text": "Prevented me from regenerating health by natural means while also preventing me from sprinting.\\\nAlso prevents baby animals from growing up.\\\n\\\n*A vicious cycle, should something attack me*",
"book.spectrum.guidebook.semi_permeable_glass.page0.text": "Those pesky monsters that appear at night have long since ceased to be a threat to me, now merely serving as a resource supplier, if anything. But that doesn't stop them from stalking and harassing me.\\\nI've spent more time keeping those pesky monsters out of my base than I care to admit.",
"book.spectrum.guidebook.semi_permeable_glass.page1.text": "Then I remembered my [Gemstone Glass recipe](entry://decoration/gemstone_glass) that I had created earlier.\\\n\\\nWith a bit of magical energy, it was no problem to make it not only transparent, but also passable for me (but not for them!).\\\n\\\nBonus: I made it look exactly like regular glass in case I want to fool my competitors.",
"book.spectrum.guidebook.semi_permeable_glass.page2.text": "Looks exactly like its mundane counterpart, but only players can pass through it. All other creatures will bounce off it like a fly off a window.",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/spectrum.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"MobEntityMixin",
"NbtPredicateMixin",
"NoteBlockMixin",
"PassiveEntityMixin",
"PiglinBrainMixin",
"PistonBlockMixin",
"PlantOnCustomFarmlandMixin",
Expand Down
Loading