mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-30 21:23:00 +00:00 
			
		
		
		
	Remove superflous Nonnull/Notnull annotations
This commit is contained in:
		| @@ -18,7 +18,6 @@ import net.minecraft.commands.CommandBuildContext; | |||||||
| import net.minecraft.commands.CommandSourceStack; | import net.minecraft.commands.CommandSourceStack; | ||||||
| import net.minecraft.commands.synchronization.ArgumentTypeInfo; | import net.minecraft.commands.synchronization.ArgumentTypeInfo; | ||||||
| import net.minecraft.network.FriendlyByteBuf; | import net.minecraft.network.FriendlyByteBuf; | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| 
 | 
 | ||||||
| import java.util.*; | import java.util.*; | ||||||
| import java.util.concurrent.CompletableFuture; | import java.util.concurrent.CompletableFuture; | ||||||
| @@ -159,14 +158,14 @@ public final class ComputersArgumentType implements ArgumentType<ComputersArgume | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         @Override |         @Override | ||||||
|         public ComputersArgumentType.Template unpack(@NotNull ComputersArgumentType argumentType) { |         public ComputersArgumentType.Template unpack(ComputersArgumentType argumentType) { | ||||||
|             return new ComputersArgumentType.Template(this, argumentType.requireSome); |             return new ComputersArgumentType.Template(this, argumentType.requireSome); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public record Template(Info info, boolean requireSome) implements ArgumentTypeInfo.Template<ComputersArgumentType> { |     public record Template(Info info, boolean requireSome) implements ArgumentTypeInfo.Template<ComputersArgumentType> { | ||||||
|         @Override |         @Override | ||||||
|         public ComputersArgumentType instantiate(@NotNull CommandBuildContext context) { |         public ComputersArgumentType instantiate(CommandBuildContext context) { | ||||||
|             return requireSome ? SOME : MANY; |             return requireSome ? SOME : MANY; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -17,7 +17,6 @@ import net.minecraft.commands.synchronization.ArgumentTypeInfo; | |||||||
| import net.minecraft.commands.synchronization.ArgumentTypeInfos; | import net.minecraft.commands.synchronization.ArgumentTypeInfos; | ||||||
| import net.minecraft.network.FriendlyByteBuf; | import net.minecraft.network.FriendlyByteBuf; | ||||||
| import net.minecraft.network.chat.Component; | import net.minecraft.network.chat.Component; | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| 
 | 
 | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| @@ -144,7 +143,7 @@ public final class RepeatArgumentType<T, U> implements ArgumentType<List<T>> { | |||||||
|     ) implements ArgumentTypeInfo.Template<RepeatArgumentType<?, ?>> { |     ) implements ArgumentTypeInfo.Template<RepeatArgumentType<?, ?>> { | ||||||
|         @Override |         @Override | ||||||
|         @SuppressWarnings({ "unchecked", "rawtypes" }) |         @SuppressWarnings({ "unchecked", "rawtypes" }) | ||||||
|         public RepeatArgumentType<?, ?> instantiate(@NotNull CommandBuildContext commandBuildContext) { |         public RepeatArgumentType<?, ?> instantiate(CommandBuildContext commandBuildContext) { | ||||||
|             var child = child().instantiate(commandBuildContext); |             var child = child().instantiate(commandBuildContext); | ||||||
|             return flatten ? RepeatArgumentType.someFlat((ArgumentType) child, some()) : RepeatArgumentType.some(child, some()); |             return flatten ? RepeatArgumentType.someFlat((ArgumentType) child, some()) : RepeatArgumentType.some(child, some()); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ import io.netty.handler.ssl.SslHandler; | |||||||
| import io.netty.handler.timeout.ReadTimeoutException; | import io.netty.handler.timeout.ReadTimeoutException; | ||||||
| import io.netty.handler.traffic.AbstractTrafficShapingHandler; | import io.netty.handler.traffic.AbstractTrafficShapingHandler; | ||||||
| import io.netty.handler.traffic.GlobalTrafficShapingHandler; | import io.netty.handler.traffic.GlobalTrafficShapingHandler; | ||||||
| import org.jetbrains.annotations.NotNull; |  | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| 
 | 
 | ||||||
| @@ -193,7 +192,7 @@ public final class NetworkUtils { | |||||||
|      * @return The SSL handler. |      * @return The SSL handler. | ||||||
|      * @see io.netty.handler.ssl.SslHandler |      * @see io.netty.handler.ssl.SslHandler | ||||||
|      */ |      */ | ||||||
|     private static SslHandler makeSslHandler(SocketChannel ch, @NotNull SslContext sslContext, int timeout, String peerHost, int peerPort) { |     private static SslHandler makeSslHandler(SocketChannel ch, SslContext sslContext, int timeout, String peerHost, int peerPort) { | ||||||
|         var handler = sslContext.newHandler(ch.alloc(), peerHost, peerPort); |         var handler = sslContext.newHandler(ch.alloc(), peerHost, peerPort); | ||||||
|         if (timeout > 0) handler.setHandshakeTimeoutMillis(timeout); |         if (timeout > 0) handler.setHandshakeTimeoutMillis(timeout); | ||||||
|         return handler; |         return handler; | ||||||
|   | |||||||
| @@ -72,7 +72,6 @@ import net.minecraft.world.phys.BlockHitResult; | |||||||
| import net.minecraft.world.phys.EntityHitResult; | import net.minecraft.world.phys.EntityHitResult; | ||||||
| import net.minecraft.world.phys.Vec3; | import net.minecraft.world.phys.Vec3; | ||||||
| 
 | 
 | ||||||
| import javax.annotation.Nonnull; |  | ||||||
| import javax.annotation.Nullable; | import javax.annotation.Nullable; | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| @@ -284,7 +283,7 @@ public class PlatformHelperImpl implements PlatformHelper { | |||||||
|     public boolean hasToolUsage(ItemStack stack) { |     public boolean hasToolUsage(ItemStack stack) { | ||||||
|         var item = stack.getItem(); |         var item = stack.getItem(); | ||||||
|         return item instanceof ShovelItem || stack.is(ItemTags.SHOVELS) || |         return item instanceof ShovelItem || stack.is(ItemTags.SHOVELS) || | ||||||
|             item instanceof HoeItem || stack.is(ItemTags.HOES); |                item instanceof HoeItem || stack.is(ItemTags.HOES); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
| @@ -295,8 +294,8 @@ public class PlatformHelperImpl implements PlatformHelper { | |||||||
|     @Override |     @Override | ||||||
|     public boolean interactWithEntity(ServerPlayer player, Entity entity, Vec3 hitPos) { |     public boolean interactWithEntity(ServerPlayer player, Entity entity, Vec3 hitPos) { | ||||||
|         return UseEntityCallback.EVENT.invoker().interact(player, entity.level, InteractionHand.MAIN_HAND, entity, new EntityHitResult(entity, hitPos)).consumesAction() || |         return UseEntityCallback.EVENT.invoker().interact(player, entity.level, InteractionHand.MAIN_HAND, entity, new EntityHitResult(entity, hitPos)).consumesAction() || | ||||||
|             entity.interactAt(player, hitPos.subtract(entity.position()), InteractionHand.MAIN_HAND).consumesAction() || |                entity.interactAt(player, hitPos.subtract(entity.position()), InteractionHand.MAIN_HAND).consumesAction() || | ||||||
|             player.interactOn(entity, InteractionHand.MAIN_HAND).consumesAction(); |                player.interactOn(entity, InteractionHand.MAIN_HAND).consumesAction(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
| @@ -350,7 +349,6 @@ public class PlatformHelperImpl implements PlatformHelper { | |||||||
|             return object; |             return object; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         @Nonnull |  | ||||||
|         @Override |         @Override | ||||||
|         public Iterator<T> iterator() { |         public Iterator<T> iterator() { | ||||||
|             return registry.iterator(); |             return registry.iterator(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates