Compare commits

..

4 commits

Author SHA1 Message Date
ea2c61c8c1 Language 2026-03-01 15:51:16 +02:00
984e0fe452 placeholder towelette texture 2026-03-01 15:42:08 +02:00
9f1718e8e7 Made sickness a bit more lenient 2026-03-01 15:32:20 +02:00
041601b649 Remove health modifier 2026-03-01 15:28:14 +02:00
6 changed files with 59 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -27,6 +28,7 @@ import org.slf4j.Logger;
import xyz.illuc.neuralgiacore.entities.OfflinePlayerEntity;
import xyz.illuc.neuralgiacore.entities.OfflinePlayerRenderer;
import xyz.illuc.neuralgiacore.peripherals.BearingPeripheral;
//import xyz.illuc.neuralgiacore.peripherals.GunPeripheral;
import xyz.illuc.neuralgiacore.registers.RegisterItems;
import xyz.illuc.neuralgiacore.registers.RegisterMedicalFluids;
@ -74,12 +76,15 @@ public class NeuralgiaCoreMod {
event.enqueueWork(this::registerPeripherals);
}
//TODO move peripheral stuff in a different file
private void registerPeripherals() {
registerBearingPeripheral("mechanical_bearing");
registerBearingPeripheral("clockwork_bearing");
registerBearingPeripheral("windmill_bearing");
registerGunPeripheral("machine_gun");
}
private void registerBearingPeripheral(String blockEntityName) {
@ -109,6 +114,30 @@ public class NeuralgiaCoreMod {
}
}
private void registerGunPeripheral(String blockEntityName) {
BlockEntityType<?> type = ForgeRegistries.BLOCK_ENTITY_TYPES.getValue(
new ResourceLocation("crusty_chunks", blockEntityName)
);
if (type != null) {
ForgeComputerCraftAPI.registerPeripheralProvider((level, pos, direction) -> {
var blockEntity = level.getBlockEntity(pos);
if (blockEntity != null && blockEntity.getType() == type) {
try {
//TODO gun peripheral
} catch (ClassCastException e) {
LOGGER.error("Failed to create peripheral at {}", pos);
return null;
}
}
return null;
});
LOGGER.debug("Registered peripheral for {}", blockEntityName);
} else {
LOGGER.warn("Could not find block entity type: crusty_chunks:{}", blockEntityName);
}
}

View file

@ -0,0 +1,15 @@
package xyz.illuc.neuralgiacore.mixin.Tfc;
import net.dries007.tfc.common.capabilities.food.TFCFoodData;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(TFCFoodData.class)
public class MixinDisableHealthModifier {
@Inject(method = "getHealthModifier", at = @At("HEAD"), cancellable = true, remap = false)
private void disableHealthModifier(CallbackInfoReturnable<Float> cir) {
cir.setReturnValue(1f);
}
}

View file

@ -106,7 +106,7 @@ public class MixinFoodData {
if (totalSicknessToAdd > 0) {
totalSicknessToAdd = Math.min(totalSicknessToAdd, 10.0f);
float finalSicknessToAdd = totalSicknessToAdd;
float finalSicknessToAdd = totalSicknessToAdd * 0.8f;
this.sourcePlayer.getCapability(PlayerHealthProvider.PLAYER_HEALTH_DATA).ifPresent(h -> {
IPlayerHealthDataAccessor accessor = (IPlayerHealthDataAccessor) h;
float currentSickness = accessor.getSickness();

View file

@ -18,6 +18,19 @@
"neuralgiacore.gui.moodle.sepsis.description3": "Critically low blood pressure and multiple organ dysfunction syndrome caused by sepsis. Death is fast approaching.",
"neuralgiacore.gui.moodle.sickness.title1": "Queasy",
"neuralgiacore.gui.moodle.sickness.description1": "Feeling discomfort. Minorly sick.",
"neuralgiacore.gui.moodle.sickness.title2": "Nauseous",
"neuralgiacore.gui.moodle.sickness.description2": "Confused, uncomfortable around the stomach. Prone to vomiting.",
"neuralgiacore.gui.moodle.sickness.title3": "Sick",
"neuralgiacore.gui.moodle.sickness.description3": "Lethargic, tired and in major discomfort. Very prone to vomiting.",
"neuralgiacore.gui.moodle.sickness.title4": "Grossly sick",
"neuralgiacore.gui.moodle.sickness.description4": "Dangerously sick. Something is VERY wrong on the inside. Weak, confused and in a world of pain.",
"medical_fluid.neuralgiacore.blood": "Blood",
"medical_fluid.neuralgiacore.blood.description": "Blood, used in blood transfusions.",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 449 B

Before After
Before After

View file

@ -15,6 +15,7 @@
"PrototypePain.MixinSepsis",
"PrototypePain.MixinSickness",
"PrototypePain.MixinSicknessOverlay",
"Tfc.MixinDisableHealthModifier",
"Tfc.MixinFoodData",
"Tfc.MixinHealthBar",
"Tfc.MixinOptimizeClimateUpdate",