Search in sources :

Example 1 with ISickness

use of ladysnake.pathos.api.ISickness in project Gaspunk by Ladysnake.

the class GasAgents method createSicknessAgent.

public static IGasAgent createSicknessAgent(String name, Supplier<LingeringAgent> agentSupplier, Supplier<ISickness> sicknessSupplier) {
    LingeringAgent agent = name(agentSupplier.get(), name);
    ISickness sickness = sicknessSupplier.get();
    ResourceLocation id = new ResourceLocation(GasPunk.MOD_ID, name);
    sickness.setRegistryName(id);
    LINGERING_EFFECTS.put(agent, sickness);
    AGENT_MAP.put(id, agent);
    return agent;
}
Also used : ISickness(ladysnake.pathos.api.ISickness) LingeringAgent(ladysnake.gaspunk.gas.agent.LingeringAgent) ResourceLocation(net.minecraft.util.ResourceLocation)

Example 2 with ISickness

use of ladysnake.pathos.api.ISickness in project Gaspunk by Ladysnake.

the class SicknessMessage method fromBytes.

@Override
public void fromBytes(ByteBuf buf) {
    ISickness sickness = Sickness.REGISTRY.getValue(buf.readInt());
    float severity = buf.readFloat();
    int ticksSinceBeginning = buf.readInt();
    int ticksSinceLastPerform = buf.readInt();
    effect = new SicknessEffect(sickness, severity, ticksSinceBeginning, ticksSinceLastPerform);
}
Also used : ISickness(ladysnake.pathos.api.ISickness) SicknessEffect(ladysnake.pathos.api.SicknessEffect)

Aggregations

ISickness (ladysnake.pathos.api.ISickness)2 LingeringAgent (ladysnake.gaspunk.gas.agent.LingeringAgent)1 SicknessEffect (ladysnake.pathos.api.SicknessEffect)1 ResourceLocation (net.minecraft.util.ResourceLocation)1