Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4683874
Not usable but fabric is bitchy
capozi-devv May 17, 2025
eb5ad18
demise alpha 1.20.1 port
capozi-devv May 17, 2025
443496a
Skull is now properly skulling
capozi-devv Jul 17, 2025
5178ac1
Delete build directory bc it uploaded for sum reason
capozi-devv Jul 17, 2025
9641ce8
fixed dupe glitch
capozi-devv Nov 1, 2025
9c7f72d
fix crahs
capozi-devv Nov 3, 2025
7a245bf
you were an isle unto thyself
capozi-devv Nov 20, 2025
1e7f020
fixing duping
capozi-devv Dec 9, 2025
96caf5d
desc updates
capozi-devv Dec 10, 2025
5fb5de6
Update EntityTypeRegistry.java
capozi-devv Dec 10, 2025
31f3729
fixing jittery animation
capozi-devv Jan 11, 2026
3dce930
forgor to register things
capozi-devv Jan 11, 2026
4e93855
new rendering options
capozi-devv Jan 16, 2026
56043df
trying to cook and burning the food
capozi-devv Jan 16, 2026
a48b199
sync
capozi-devv Jan 17, 2026
2cab8c9
sync changes
capozi-devv Jan 23, 2026
0348b6e
Update PlayerRemainsEntity.java
capozi-devv Jan 25, 2026
4a73502
Update gradle.properties
capozi-devv Feb 1, 2026
8916b71
Update fabric.mod.json
capozi-devv Feb 9, 2026
ae42fcc
Update PlayerEntityMixin.java
capozi-devv Feb 14, 2026
cc1767e
Update fabric.mod.json
capozi-devv Apr 18, 2026
797f5be
build,gradle
capozi-devv Apr 18, 2026
f78c934
Update PlayerRemainsEntity.java
capozi-devv Apr 19, 2026
a17a554
Update gradle.properties
capozi-devv Apr 19, 2026
f4c8fb2
hopefull fixing for the last time
capozi-devv Jun 1, 2026
ac2e31a
Update PlayerRemainsEntity.java
capozi-devv Jun 6, 2026
e8df0a3
dotzip dependency
capozi-devv Jun 6, 2026
4537745
Update gradle.properties
capozi-devv Jun 6, 2026
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gradle
build
resources
run
.idea
33 changes: 15 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ base {
}

repositories {
repositories {
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
maven {
name = "Ladysnake Libs"
url = 'https://maven.ladysnake.org/releases'
}
maven {
url "https://cursemaven.com"
}
maven {
url = "https://api.modrinth.com/maven"
}
maven {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
maven {
name = "Ladysnake Libs"
url = 'https://maven.ladysnake.org/releases'
}
maven {
url "https://cursemaven.com"
}
maven {
url = "https://api.modrinth.com/maven"
}
maven {url = "https://api.modrinth.com/maven" }
}

fabricApi {
Expand All @@ -43,10 +42,8 @@ dependencies {

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}")
include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cca_version}")
include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-world:${project.cca_version}")
include modImplementation("dev.emi:trinkets:${project.trinkets_version}")
modImplementation fileTree(dir: 'libs', include: ['*.jar'])
}

processResources {
Expand Down
15 changes: 8 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.28
loader_version=0.16.14
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.16.10
loom_version=1.10-SNAPSHOT

# Mod Properties
mod_version=0.1.3-1.19.2
mod_version=0.1.9a-1.20.1
maven_group=net.capozi.demise
archives_base_name=demise

# Dependencies
fabric_version=0.77.0+1.19.2
trinkets_version=3.4.1
fabric_version=0.92.5+1.20.1
trinkets_version=3.7.2

# Cardinal Components
cca_version = 5.0.2
cca_version = 5.0.2
dotzip_version=1.2.2.1d-1.20.1
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added libs/dotzip-1.2.3.0a-1.20.1.jar
Binary file not shown.
31 changes: 31 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

projectJDK: "17" #(Applied in CI/CD pipeline)

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-jvm-community:2025.1
5 changes: 4 additions & 1 deletion src/main/java/net/capozi/demise/Demise.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package net.capozi.demise;

import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.capozi.demise.common.GameruleRegistry;
import net.capozi.demise.common.entity.EntityTypeRegistry;
import net.fabricmc.api.ModInitializer;
import net.minecraft.util.Identifier;
Expand All @@ -9,10 +12,10 @@
public class Demise implements ModInitializer {
public static final String MOD_ID = "demise";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

@Override
public void onInitialize() {
EntityTypeRegistry.register();
GameruleRegistry.register();
}
public static Identifier id(String name) {
return Identifier.of(MOD_ID, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

public class EntityTypeRegistry {
//public static final EntityModelLayer PLAYER_REMAINS_MODEL_LAYER = new EntityModelLayer(Grimoire.id("player_remains"), "main");
public static final EntityType<PlayerRemainsEntity> PLAYER_REMAINS_TYPE = Registry.register(Registries.ENTITY_TYPE,
Demise.id("player_remains"),
FabricEntityTypeBuilder.create(SpawnGroup.MISC, PlayerRemainsEntity::new).dimensions(EntityDimensions.changing(0.8f, 0.8f)).build());

public static final EntityType<PlayerRemainsEntity> PLAYER_REMAINS_TYPE = Registry.register(Registries.ENTITY_TYPE, Demise.id("player_remains"), FabricEntityTypeBuilder.create(SpawnGroup.MISC, PlayerRemainsEntity::new).dimensions(EntityDimensions.changing(0.8f, 0.8f)).build());
public static void register() {
FabricDefaultAttributeRegistry.register(PLAYER_REMAINS_TYPE, PlayerRemainsEntity.createAttributes());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,47 @@
import net.minecraft.nbt.NbtCompound;
import net.minecraft.screen.GenericContainerScreenHandler;
import net.minecraft.screen.ScreenHandler;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Arm;
import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;

public class PlayerRemainsEntity extends LivingEntity implements VehicleInventory {
private static final int MAX_SIZE = 27*2; // Maximum inventory size
public PlayerEntity playerFor;
private static final int MAX_SIZE = 27*2;
private DefaultedList<ItemStack> inventory;

public PlayerRemainsEntity(EntityType<? extends LivingEntity> entityType, World world) {
protected PlayerRemainsEntity(EntityType<? extends LivingEntity> entityType, World world) {
super(entityType, world);
this.setInvulnerable(true);
this.inventory = DefaultedList.ofSize(MAX_SIZE, ItemStack.EMPTY);
}
private PlayerRemainsEntity(EntityType<? extends LivingEntity> entityType, World world, PlayerEntity player) {
super(entityType, world);
this.setInvulnerable(true);
this.playerFor = player;
this.inventory = DefaultedList.ofSize(MAX_SIZE, ItemStack.EMPTY);
}
public static PlayerRemainsEntity create(EntityType<? extends LivingEntity> type, World world, PlayerEntity player) {
return new PlayerRemainsEntity(type, world, player);
}
public static DefaultAttributeContainer.Builder createAttributes() {
return LivingEntity.createLivingAttributes()
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0f)
.add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, 100f)
.add(EntityAttributes.GENERIC_FOLLOW_RANGE, 0f);
}

@Override
public boolean isGlowing() {
return true;
}

@Override
public void readCustomDataFromNbt(NbtCompound nbt) {
super.readCustomDataFromNbt(nbt);
Expand All @@ -49,10 +65,11 @@ public void writeCustomDataToNbt(NbtCompound nbt) {
}
@Override
public boolean damage(DamageSource source, float amount) {
if(source.getAttacker() instanceof PlayerEntity player) {
if (source.getAttacker() instanceof PlayerEntity player) {
if(player.isSneaking()) {
if(getEntityWorld().isClient) return true;
this.dropInventory();
this.clearInventory();
this.discard();
return true;
}
Expand All @@ -73,8 +90,14 @@ public ActionResult interact(PlayerEntity player, Hand hand) {
return ActionResult.PASS;
}
this.open(player);
return ActionResult.SUCCESS; // Prevent further interaction processing
return ActionResult.SUCCESS;
}

@Override
public boolean canUsePortals() {
return false;
}

@Override
protected void dropInventory() {
for (ItemStack stack : inventory) {
Expand Down Expand Up @@ -154,9 +177,7 @@ public ItemStack getEquippedStack(EquipmentSlot slot) {
return new ItemStack(Items.AIR);
}
@Override
public void equipStack(EquipmentSlot slot, ItemStack stack) {

}
public void equipStack(EquipmentSlot slot, ItemStack stack) {}
@Override
public Arm getMainArm() {
return Arm.RIGHT;
Expand All @@ -169,30 +190,15 @@ public boolean isPushable() {
public boolean isPushedByFluids() {
return false;
}
@Override
protected void initDataTracker() {
super.initDataTracker();
}
//region// No clue //
@Override
public @Nullable Identifier getLootTableId() {
return null;
}
@Override
public void setLootTableId(@Nullable Identifier lootTableId) {

}
@Override
public long getLootTableSeed() {
return 0;
}
public void setLootTableId(@Nullable Identifier lootTableId) {}
@Override
public void setLootTableSeed(long lootTableSeed) {

}
public void setLootTableSeed(long lootTableSeed) {}
@Override
public void markDirty() {

}
//endregion
public void markDirty() {}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package net.capozi.demise.common.entity;

import com.mojang.authlib.GameProfile;
import net.capozi.demise.common.GameruleRegistry;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
Expand All @@ -11,38 +13,37 @@
import net.minecraft.client.render.model.json.ModelTransformationMode;
import net.minecraft.client.render.model.json.Transformation;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtHelper;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import org.joml.Quaternionf;
import net.minecraft.util.math.RotationAxis;
import static java.lang.Math.abs;
import static java.lang.Math.sin;

@Environment(EnvType.CLIENT)
public class PlayerRemainsEntityRenderer extends LivingEntityRenderer<PlayerRemainsEntity, PlayerRemainsEntityModel<PlayerRemainsEntity>> {
public PlayerRemainsEntityRenderer(EntityRendererFactory.Context ctx) {
super(ctx, new PlayerRemainsEntityModel<>(), 0.3f);
}

ItemRenderer itemRenderer = MinecraftClient.getInstance().getItemRenderer();

@Override
public void render(PlayerRemainsEntity entity, float yaw, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumers, int light) {
ItemRenderer itemRenderer = MinecraftClient.getInstance().getItemRenderer();
ItemStack stack = new ItemStack(Items.SKELETON_SKULL);
float angle = (entity.getWorld().getTime() + tickDelta) * 2.5f;
BakedModel model = itemRenderer.getModel(stack, entity.getWorld(), null, 0);
Transformation groundTransform = model.getTransformation().ground;

matrixStack.push();
matrixStack.scale(1.5f, 1.5f, 1.5f);
matrixStack.translate(0, 0.25, 0);
matrixStack.translate(0, Math.sin((entity.getWorld().getTime() + tickDelta)*0.1f)*0.1f, 0);
matrixStack.multiply(new Quaternionf().fromAxisAngleDeg(0, 1, 0, angle));

matrixStack.translate(0, 0.2, 0);
matrixStack.translate(0, (abs(sin((float)entity.age / 15) + 1) / 7), 0);
matrixStack.multiply(RotationAxis.POSITIVE_Y.rotation((float)entity.age / 20));
itemRenderer.renderItem(stack, ModelTransformationMode.GROUND, false, matrixStack, vertexConsumers, light, 0, itemRenderer.getModel(stack, entity.getWorld(), null, 0));

matrixStack.pop();
if(entity.getCustomName() != null) {
this.renderLabelIfPresent(entity, entity.getCustomName(), matrixStack, vertexConsumers, light);
}
if(entity.getCustomName() != null) {
this.renderLabelIfPresent(entity, entity.getCustomName(), matrixStack, vertexConsumers, light);
}
}

@Override
Expand Down
Loading