Lots of compile fixes

This commit is contained in:
Sebastian Hartte
2020-06-04 03:02:48 +02:00
parent 6eb2a9504a
commit 237463dd94
241 changed files with 3438 additions and 3474 deletions
@@ -53,7 +53,7 @@ public interface IMovableHandler
* <pre>
* {
* &#064;code
* Chunk c = world.getChunkFromBlockCoords( x, z );
* Chunk c = world.getChunkAt( x, z );
* c.setChunkBlockTileEntity( x &amp; 0xF, y + y, z &amp; 0xF, tile );
*
* if( c.isChunkLoaded )
@@ -27,6 +27,7 @@ package appeng.api.networking.crafting;
import appeng.api.networking.security.IActionSource;
import appeng.api.networking.storage.IBaseMonitor;
import appeng.api.storage.data.IAEItemStack;
import net.minecraft.util.text.ITextComponent;
public interface ICraftingCPU extends IBaseMonitor<IAEItemStack>
@@ -53,7 +54,7 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack>
int getCoProcessors();
/**
* @return an empty string or the name of the cpu.
* @return a null or the name of the cpu.
*/
String getName();
ITextComponent getName();
}
@@ -40,6 +40,6 @@ public interface IActionHost
* @return the the gridnode that actions from this IGridHost are preformed
* by.
*/
@Nonnull
@Nonnull // FIXME fishy annotation, every caller seems to check for null
IGridNode getActionableNode();
}
+7 -18
View File
@@ -30,6 +30,8 @@ import java.util.Random;
import javax.annotation.Nonnull;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
@@ -50,6 +52,7 @@ import appeng.api.networking.IGridNode;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import appeng.api.util.AEPartLocation;
import net.minecraftforge.common.util.LazyOptional;
public interface IPart extends IBoxProvider, ICustomCableConnection
@@ -75,7 +78,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* this method to be called.
*/
@OnlyIn( Dist.CLIENT )
default void renderDynamic( double x, double y, double z, float partialTicks, int destroyStage )
default void renderDynamic(float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffers, int combinedLightIn, int combinedOverlayIn)
{
}
@@ -333,27 +336,13 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
* forwarded to parts on the appropriate
* side.
*
* @see TileEntity#hasCapability(Capability, EnumFacing)
*
* @return True if your part has the requested capability.
*/
default boolean hasCapability( Capability<?> capabilityClass )
{
return false;
}
/**
* Implement this method if your part exposes capabilitys. Any requests for capabilities on the cable bus will be
* forwarded to parts on the appropriate
* side.
*
* @see TileEntity#getCapability(Capability, EnumFacing)
* @see TileEntity#getCapability(Capability, net.minecraft.util.Direction)
*
* @return The capability or null.
*/
default <T> T getCapability( Capability<T> capabilityClass )
default <T> LazyOptional<T> getCapability(Capability<T> capabilityClass )
{
return null;
return LazyOptional.empty();
}
/**
+1 -1
View File
@@ -42,7 +42,7 @@ import net.minecraft.item.ItemStack;
* <code>
*
* {@literal @}Override
* public default EnumActionResult onItemUse(ItemStack is, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
* public default ActionResultType onItemUse(ItemStack is, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
* {
* return Api.INSTANCE.partHelper().placeBus( is, pos, side, player, hand, world );
* }