mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Completed Tesla support, using a handy new system of wrapper-abstracted item and tile capability handlers
This commit is contained in:
1 parent
53353cd050
commit
333cc7ff27
25 files changed
+597
-111
No files matched your search
@@ -1,8 +1,5 @@
|
||||
package mekanism.common.base;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.FluidTankProperties;
|
||||
@@ -44,19 +41,4 @@ public class FluidHandlerWrapper implements IFluidHandler
|
||||
{
|
||||
return wrapper.drain(side, maxDrain, doDrain);
|
||||
}
|
||||
|
||||
public static class FluidHandlerWrapperManager
|
||||
{
|
||||
public Map<EnumFacing, FluidHandlerWrapper> wrappers = new HashMap<EnumFacing, FluidHandlerWrapper>();
|
||||
|
||||
public FluidHandlerWrapper getWrapper(IFluidHandlerWrapper wrapper, EnumFacing facing)
|
||||
{
|
||||
if(wrappers.get(facing) == null)
|
||||
{
|
||||
wrappers.put(facing, new FluidHandlerWrapper(wrapper, facing));
|
||||
}
|
||||
|
||||
return wrappers.get(facing);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user