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;
}
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);
}
Aggregations