Skip to content

Commit

Permalink
* add support for Fins And Trails mod
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Feb 9, 2021
1 parent 70369c3 commit f3067a5
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=2.5.6
mod_version=2.5.7
minecraft_version=1.16.2+

forge_version=1.16.2-33.0.21
Expand Down
56 changes: 56 additions & 0 deletions src/main/java/cech12/ceramicbucket/compat/FinsAndTrailsCompat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package cech12.ceramicbucket.compat;

import cech12.ceramicbucket.api.data.ObtainableEntityType;
import net.minecraft.fluid.Fluids;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraftforge.registries.ForgeRegistries;

import java.util.ArrayList;
import java.util.List;

public class FinsAndTrailsCompat extends ModCompat.Mod implements ModCompat.EntityTypeObtainingMod {

private final List<ObtainableEntityType> obtainableEntityTypes = new ArrayList<>();

public FinsAndTrailsCompat() {
super("fins");
this.addFish("banded_redback_shrimp");
this.addFish("blu_wee");
this.addFish("flatback_sucker");
this.addFish("golden_river_ray");
this.addFish("high_finned_blue");
this.addFish("night_light_squid");
this.addFish("ornate_bugfish");
this.addFish("pea_wee");

ObtainableEntityType.Builder builder = new ObtainableEntityType.Builder(new ResourceLocation(this.name, "penglil"), Fluids.EMPTY);
ResourceLocation fillSound = ForgeRegistries.SOUND_EVENTS.getKey(SoundEvents.ITEM_BUCKET_FILL);
if (fillSound != null) builder.setFillSound(fillSound);
ResourceLocation emptySound = new ResourceLocation(this.name, "fins.penglil.ambient");
SoundEvent sound = ForgeRegistries.SOUND_EVENTS.getValue(emptySound);
if (sound != null) builder.setEmptySound(emptySound);
this.obtainableEntityTypes.add(builder.build());

this.addFish("phantom_nudibranch");
this.addFish("red_bull_crab");
this.addFish("spindly_gem_crab");
this.addFish("swamp_mucker");
this.addFish("teal_arrowfish");
this.addFish("vibra_wee");
this.addFish("wee_wee");
this.addFish("white_bull_crab");
}

private void addFish(String fish) {
this.obtainableEntityTypes.add(new ObtainableEntityType.Builder(new ResourceLocation(this.name, fish), Fluids.WATER).addFluidTag(FluidTags.WATER).build());
}

@Override
public List<ObtainableEntityType> getObtainableEntityTypes() {
return this.obtainableEntityTypes;
}

}
1 change: 1 addition & 0 deletions src/main/java/cech12/ceramicbucket/compat/ModCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class ModCompat {
new AxolotlCompat(),
new CombustiveFishingCompat(),
new EnvironmentalCompat(),
new FinsAndTrailsCompat(),
new MilkAllTheMobs(),
new QuarkCompat(),
new TheUndergardenCompat(),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f3067a5

Please sign in to comment.