-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix component item eating happening twice * make antidotes take off % of hazard time instead of a flat amount of it * clean up how hazard effects are tracked and saved * make paracetamol fully an LV recipe * make formaldehyde an inhalation poison * make it possible to add new hazard types (for custom lang keys etc.) * spotless, datagen
- Loading branch information
Showing
14 changed files
with
251 additions
and
344 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
18 changes: 8 additions & 10 deletions
18
src/main/java/com/gregtechceu/gtceu/api/capability/IHazardEffectTracker.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 |
---|---|---|
@@ -1,34 +1,32 @@ | ||
package com.gregtechceu.gtceu.api.capability; | ||
|
||
import com.gregtechceu.gtceu.api.material.material.Material; | ||
|
||
import com.gregtechceu.gtceu.api.material.material.properties.HazardProperty; | ||
import com.gregtechceu.gtceu.api.material.material.stack.UnificationEntry; | ||
import it.unimi.dsi.fastutil.objects.Object2IntMap; | ||
|
||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
public interface IHazardEffectTracker { | ||
|
||
/** | ||
* @return a map of the hazard types to their effects. | ||
* @return a set of hazard effect to how long it's been applied for. | ||
*/ | ||
Map<HazardProperty.HazardType, Set<HazardProperty.HazardEffect>> getTypesToEffects(); | ||
Set<Material> getExtraHazards(); | ||
|
||
/** | ||
* @return a map of hazard effect to how long it's been applied for. | ||
* @return a map of material to how long its effects been applied for. | ||
*/ | ||
Object2IntMap<HazardProperty.HazardEffect> getCurrentHazardEffects(); | ||
Object2IntMap<Material> getCurrentHazards(); | ||
|
||
/** | ||
* @return the maximum air supply for the entity this is attached to. -1 for default (300). | ||
*/ | ||
// default maxAirSupply for players is 300. | ||
int getMaxAirSupply(); | ||
|
||
void removeHazardItem(UnificationEntry entry); | ||
void startTick(); | ||
|
||
void addHazardItem(UnificationEntry entry); | ||
void tick(Material material); | ||
|
||
void tick(); | ||
void endTick(); | ||
} |
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
Oops, something went wrong.