Skip to content

Commit

Permalink
Music disc update and fixed mod compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
N1nn1 committed Jul 14, 2024
1 parent 4777467 commit afbf862
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/main/java/com/ninni/spawn/mixin/AbstractFishMixin.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.ninni.spawn.mixin;

import com.ninni.spawn.entity.common.FlopConditionable;
import com.ninni.spawn.registry.SpawnTags;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.control.SmoothSwimmingLookControl;
import net.minecraft.world.entity.ai.control.SmoothSwimmingMoveControl;
import net.minecraft.world.entity.animal.AbstractFish;
import net.minecraft.world.entity.animal.Bucketable;
import net.minecraft.world.entity.animal.WaterAnimal;
import net.minecraft.world.entity.animal.*;
import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -22,8 +21,11 @@ private AbstractFishMixin(EntityType<? extends WaterAnimal> entityType, Level wo

@Inject(method = "<init>", at = @At("TAIL"))
private void S$init(EntityType<? extends AbstractFish> entityType, Level level, CallbackInfo ci) {
this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02f, 0.1f, true);
this.lookControl = new SmoothSwimmingLookControl(this, 10);
AbstractFish that = AbstractFish.class.cast(this);
if ((that instanceof Cod) || (that instanceof Salmon) || (that instanceof TropicalFish)) {
this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02f, 0.1f, true);
this.lookControl = new SmoothSwimmingLookControl(this, 10);
}
}

@Inject(method = "aiStep", at = @At("HEAD"), cancellable = true)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/ninni/spawn/registry/SpawnItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class SpawnItems {
public static final Item SPADE_POTTERY_SHERD = register("spade_pottery_sherd", new Item(new Item.Properties()));

public static final Item ALGAL_SAND = register("algal_sand", new BlockItem(SpawnBlocks.ALGAL_SAND, new FabricItemSettings()));
public static final Item MUSIC_DISC_BLINK = register("music_disc_blink", new RecordItem(8, SpawnSoundEvents.MUSIC_DISC_BLINK, new Item.Properties().stacksTo(1).rarity(Rarity.RARE), 133));
public static final Item MUSIC_DISC_BLINK = register("music_disc_blink", new RecordItem(8, SpawnSoundEvents.MUSIC_DISC_BLINK, new Item.Properties().stacksTo(1).rarity(Rarity.RARE), 150));

// clam
public static final Item SHELL_FRAGMENTS = register("shell_fragments", new Item(new FabricItemSettings()));
Expand Down
Binary file not shown.

0 comments on commit afbf862

Please sign in to comment.