mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
Remove a lot of the unchecked cast warnings around capabilities
This commit is contained in:
1 parent
66d0bca37c
commit
ed9dedd39c
47 files changed
+62
-63
No files matched your search
@@ -370,9 +370,9 @@ public class TileEntityPRC extends
|
||||
if (isCapabilityDisabled(capability, side)) {
|
||||
return null;
|
||||
} else if (capability == Capabilities.GAS_HANDLER_CAPABILITY) {
|
||||
return (T) this;
|
||||
return Capabilities.GAS_HANDLER_CAPABILITY.cast(this);
|
||||
} else if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) {
|
||||
return (T) new FluidHandlerWrapper(this, side);
|
||||
return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new FluidHandlerWrapper(this, side));
|
||||
}
|
||||
|
||||
return super.getCapability(capability, side);
|
||||
|
||||
Reference in new issue
Block a user