-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
95 additions
and
2 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
25 changes: 25 additions & 0 deletions
25
src/main/java/net/id/paradiselost/client/rendering/entity/passive/PopomEntityRenderer.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,25 @@ | ||
package net.id.paradiselost.client.rendering.entity.passive; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.id.paradiselost.ParadiseLost; | ||
import net.id.paradiselost.client.model.ParadiseLostModelLayers; | ||
import net.id.paradiselost.entities.passive.PopomEntity; | ||
import net.minecraft.client.render.entity.EntityRendererFactory; | ||
import net.minecraft.client.render.entity.PigEntityRenderer; | ||
import net.id.paradiselost.client.rendering.entity.passive.PopomEntityRenderer; | ||
import net.minecraft.entity.passive.PigEntity; | ||
import net.minecraft.util.Identifier; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class PopomEntityRenderer extends PigEntityRenderer { | ||
private static final Identifier TEXTURE = ParadiseLost.locate("textures/entity/popom/popom.png"); | ||
|
||
public PopomEntityRenderer(EntityRendererFactory.Context renderManager) { | ||
super(renderManager); | ||
} | ||
|
||
public Identifier getTexture(PigEntity entity) { | ||
return TEXTURE; | ||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
src/main/java/net/id/paradiselost/entities/passive/PopomEntity.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,51 @@ | ||
package net.id.paradiselost.entities.passive; | ||
|
||
import net.id.paradiselost.util.ParadiseLostSoundEvents; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.attribute.DefaultAttributeContainer; | ||
import net.minecraft.entity.attribute.EntityAttributes; | ||
import net.minecraft.entity.passive.PigEntity; | ||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.sound.SoundEvent; | ||
import net.minecraft.world.World; | ||
|
||
public class PopomEntity extends PigEntity { | ||
|
||
public PopomEntity(EntityType<? extends PopomEntity> entityType, World world) { | ||
super(entityType, world); | ||
} | ||
|
||
// Custom sounds for Popom | ||
@Override | ||
protected SoundEvent getAmbientSound() { | ||
return ParadiseLostSoundEvents.ENTITY_POPOM_AMBIENT; | ||
} | ||
/* @Override | ||
protected SoundEvent getHurtSound(DamageSource source) { | ||
return ParadiseLostSoundEvents.ENTITY_POPOM_HURT; | ||
}*/ | ||
|
||
@Override | ||
protected SoundEvent getDeathSound() { | ||
return ParadiseLostSoundEvents.ENTITY_POPOM_DEATH; | ||
} | ||
|
||
// Define attributes for Popom | ||
public static DefaultAttributeContainer.Builder createPopomAttributes() { | ||
return createMobAttributes() | ||
.add(EntityAttributes.GENERIC_MAX_HEALTH, 20.0D) | ||
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25D); | ||
} | ||
|
||
@Override | ||
public void writeCustomDataToNbt(NbtCompound compound) { | ||
super.writeCustomDataToNbt(compound); | ||
// Any custom data you want to save | ||
} | ||
|
||
@Override | ||
public void readCustomDataFromNbt(NbtCompound compound) { | ||
super.readCustomDataFromNbt(compound); | ||
// Any custom data you want to load | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
src/main/resources/assets/paradise_lost/models/item/popom_spawn_egg.json
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,3 @@ | ||
{ | ||
"parent": "paradise_lost:item/template_spawn_egg" | ||
} |
Binary file added
BIN
+3.55 KB
src/main/resources/assets/paradise_lost/textures/entity/popom/popom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.