blob: 5529e111bb15bd56ab8fe590595d616bd7a8fb9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
package gregtech.api.interfaces.fluid;
import gregtech.api.enums.FluidState;
import gregtech.api.enums.Materials;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
@SuppressWarnings("unused") // API might legitimately expose unused methods within this local project's scope
public interface IGT_Fluid {
/**
* Adds this {@link IGT_Fluid} to the {@link FluidRegistry} and internally-implemented registrations
*
* @return {@link IGT_Fluid} self for call chaining
*/
IGT_Fluid addFluid();
/**
* Registers the containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid}
*
* @param fullContainer The full fluid container
* @param emptyContainer The empty fluid container
* @param containerSize The size of the container
* @return The {@link IGT_Fluid} for chaining
*
* @throws IllegalStateException on attempt to register containers for an unregistered fluid
*/
IGT_Fluid registerContainers(
final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize);
/**
* Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid}
*
* @param fullContainer The full container to associate with this {@link IGT_Fluid}
* @param emptyContainer The empty container associate with this {@link IGT_Fluid}
* @return {@link IGT_Fluid} self for call chaining
*
* @throws IllegalStateException on attempt to register containers for an unregistered fluid
*/
IGT_Fluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer);
/**
* Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid}
*
* @param fullContainer The full container to associate with this {@link IGT_Fluid}
* @param emptyContainer The empty container associate with this {@link IGT_Fluid}
* @return {@link IGT_Fluid} self for call chaining
*
* @throws IllegalStateException on attempt to register containers for an unregistered fluid
*/
IGT_Fluid registerPContainers(final ItemStack fullContainer, final ItemStack emptyContainer);
/**
* Updates the {@link Materials}'s fluids from this {@link IGT_Fluid}'s state
*
* @param material the {@link Materials} to configure based on this {@link IGT_Fluid} and {@link FluidState}
* @return The {@link IGT_Fluid} for chaining
*
* @throws IllegalStateException on unknown {@link FluidState}
* @throws IllegalStateException on attempt to register containers for an unregistered fluid
*/
IGT_Fluid configureMaterials(final Materials material);
/**
* @return this {@link IGT_Fluid} cast to {@link Fluid}
*/
Fluid asFluid();
/**
* @return the {@link ResourceLocation} of the still fluid texture
*/
ResourceLocation getStillIconResourceLocation();
/**
* @return the {@link ResourceLocation} of the flowing fluid texture
*/
ResourceLocation getFlowingIconResourceLocation();
}
|