-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace Malignant Flesh Blob with Primordial Flesh Blob variants
Reworks flesh blob entities and adds a separate entity for the legacy flesh blob easter egg
- Loading branch information
1 parent
2f2209b
commit 9399a51
Showing
41 changed files
with
1,246 additions
and
959 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
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
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
24 changes: 24 additions & 0 deletions
24
...a/com/github/elenterius/biomancy/client/render/entity/fleshblob/LegacyFleshBlobModel.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.elenterius.biomancy.client.render.entity.fleshblob; | ||
|
||
import com.github.elenterius.biomancy.entity.fleshblob.EaterFleshBlob; | ||
import net.minecraft.resources.ResourceLocation; | ||
import software.bernie.geckolib3.model.AnimatedGeoModel; | ||
|
||
public class LegacyFleshBlobModel<T extends EaterFleshBlob> extends AnimatedGeoModel<T> { | ||
|
||
@Override | ||
public ResourceLocation getModelResource(T fleshBlob) { | ||
return FleshBlobModel.MODEL; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getTextureResource(T fleshBlob) { | ||
return FleshBlobModel.LEGACY_TEXTURE; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getAnimationResource(T fleshBlob) { | ||
return FleshBlobModel.ANIMATION; | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
...om/github/elenterius/biomancy/client/render/entity/fleshblob/LegacyFleshBlobRenderer.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.github.elenterius.biomancy.client.render.entity.fleshblob; | ||
|
||
import com.github.elenterius.biomancy.entity.fleshblob.EaterFleshBlob; | ||
import net.minecraft.client.renderer.entity.EntityRendererProvider; | ||
|
||
public class LegacyFleshBlobRenderer<T extends EaterFleshBlob> extends AbstractFleshBlobRenderer<T> { | ||
|
||
public LegacyFleshBlobRenderer(EntityRendererProvider.Context context) { | ||
super(context, new LegacyFleshBlobModel<>()); | ||
} | ||
|
||
} |
28 changes: 0 additions & 28 deletions
28
...om/github/elenterius/biomancy/client/render/entity/fleshblob/MalignantFleshBlobModel.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...github/elenterius/biomancy/client/render/entity/fleshblob/MalignantFleshBlobRenderer.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...m/github/elenterius/biomancy/client/render/entity/fleshblob/PrimordialFleshBlobModel.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.elenterius.biomancy.client.render.entity.fleshblob; | ||
|
||
import com.github.elenterius.biomancy.BiomancyMod; | ||
import com.github.elenterius.biomancy.entity.PrimordialFleshkin; | ||
import com.github.elenterius.biomancy.entity.fleshblob.EaterFleshBlob; | ||
import com.github.elenterius.biomancy.entity.fleshblob.PrimordialHangryEaterFleshBlob; | ||
import net.minecraft.resources.ResourceLocation; | ||
import software.bernie.geckolib3.model.AnimatedGeoModel; | ||
|
||
public class PrimordialFleshBlobModel<T extends EaterFleshBlob & PrimordialFleshkin> extends AnimatedGeoModel<T> { | ||
|
||
protected static final ResourceLocation BASE_TEXTURE = BiomancyMod.createRL("textures/entity/flesh_blob/primordial_flesh_blob_neutral.png"); | ||
protected static final ResourceLocation HUNGRY_TEXTURE = BiomancyMod.createRL("textures/entity/flesh_blob/primordial_flesh_blob_hostile.png"); | ||
|
||
@Override | ||
public ResourceLocation getModelResource(T fleshBlob) { | ||
return FleshBlobModel.MODEL; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getTextureResource(T fleshBlob) { | ||
return fleshBlob instanceof PrimordialHangryEaterFleshBlob ? HUNGRY_TEXTURE : BASE_TEXTURE; | ||
} | ||
|
||
@Override | ||
public ResourceLocation getAnimationResource(T fleshBlob) { | ||
return FleshBlobModel.ANIMATION; | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...ithub/elenterius/biomancy/client/render/entity/fleshblob/PrimordialFleshBlobRenderer.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.github.elenterius.biomancy.client.render.entity.fleshblob; | ||
|
||
import com.github.elenterius.biomancy.entity.PrimordialFleshkin; | ||
import com.github.elenterius.biomancy.entity.fleshblob.EaterFleshBlob; | ||
import net.minecraft.client.renderer.entity.EntityRendererProvider; | ||
|
||
public class PrimordialFleshBlobRenderer<T extends EaterFleshBlob & PrimordialFleshkin> extends AbstractFleshBlobRenderer<T> { | ||
|
||
public PrimordialFleshBlobRenderer(EntityRendererProvider.Context context) { | ||
super(context, new PrimordialFleshBlobModel<>()); | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/github/elenterius/biomancy/entity/AdulteratedFleshkin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.github.elenterius.biomancy.entity; | ||
|
||
public interface AdulteratedFleshkin extends Fleshkin { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/github/elenterius/biomancy/entity/Fleshkin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.github.elenterius.biomancy.entity; | ||
|
||
public interface Fleshkin { | ||
} |
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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/github/elenterius/biomancy/entity/PrimordialCradleUser.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.elenterius.biomancy.entity; | ||
|
||
import com.github.elenterius.biomancy.entity.ai.goal.FindItemGoal; | ||
import com.github.elenterius.biomancy.init.ModItems; | ||
import net.minecraft.world.entity.item.ItemEntity; | ||
import net.minecraft.world.food.FoodProperties; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.Items; | ||
|
||
import java.util.Optional; | ||
import java.util.Set; | ||
import java.util.function.Predicate; | ||
|
||
public interface PrimordialCradleUser { | ||
|
||
Set<Item> SPECIAL_ITEMS_TO_HOLD = Set.of(ModItems.LIVING_FLESH.get(), ModItems.CREATOR_MIX.get(), Items.ROTTEN_FLESH, Items.SPIDER_EYE); | ||
Predicate<ItemEntity> SPECIAL_ITEM_ENTITY_FILTER = itemEntity -> { | ||
if (!FindItemGoal.ITEM_ENTITY_FILTER.test(itemEntity)) return false; | ||
|
||
ItemStack stack = itemEntity.getItem(); | ||
if (SPECIAL_ITEMS_TO_HOLD.contains(stack.getItem())) return true; | ||
return stack.isEdible() && Optional.ofNullable(stack.getFoodProperties(null)).map(FoodProperties::isMeat).orElse(false); | ||
}; | ||
|
||
ItemStack getTributeItemForCradle(); | ||
|
||
boolean hasTributeForCradle(); | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/github/elenterius/biomancy/entity/PrimordialFleshkin.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.github.elenterius.biomancy.entity; | ||
|
||
public interface PrimordialFleshkin extends Fleshkin { | ||
} |
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
src/main/java/com/github/elenterius/biomancy/entity/ai/goal/EatFoodItemGoal.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
Oops, something went wrong.