mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 13:42:59 +00:00 
			
		
		
		
	A couple of fixes for maven and CCEmuX
- Add additional maven metadata and strip dependencies - Shift ICommand registration into the proxy, to avoid class loading issues. This is probably rather temperamental, but classloading always is.
This commit is contained in:
		
							
								
								
									
										29
									
								
								build.gradle
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								build.gradle
									
									
									
									
									
								
							| @@ -144,11 +144,40 @@ uploadArchives { | ||||
|         if(project.hasProperty('mavenUploadUrl')) { | ||||
|             mavenDeployer { | ||||
|                 configuration = configurations.deployerJars | ||||
|  | ||||
|                 repository(url: project.property('mavenUploadUrl')) { | ||||
|                     authentication( | ||||
|                         userName: project.property('mavenUploadUser'), | ||||
|                         privateKey: project.property('mavenUploadKey')) | ||||
|                 } | ||||
|  | ||||
|                 pom.project { | ||||
|                     name 'CC: Tweaked' | ||||
|                     packaging 'jar' | ||||
|                     description 'A fork of ComputerCraft which aims to provide earlier access to the more experimental and in-development features of the mod.' | ||||
|                     url 'https://github.com/SquidDev-CC/CC-Tweaked' | ||||
|  | ||||
|                     scm { | ||||
|                         url 'https://github.com/dan200/ComputerCraft.git' | ||||
|                     } | ||||
|  | ||||
|                     issueManagement { | ||||
|                         system 'github' | ||||
|                         url 'https://github.com/dan200/ComputerCraft/issues' | ||||
|                     } | ||||
|  | ||||
|                     licenses { | ||||
|                         license { | ||||
|                             name 'ComputerCraft Public License, Version 1.0' | ||||
|                             url 'https://github.com/dan200/ComputerCraft/blob/master/LICENSE' | ||||
|                             distribution 'repo' | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 pom.whenConfigured { pom -> | ||||
|                     pom.dependencies.clear() | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
							
								
								
									
										1
									
								
								settings.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								settings.gradle
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| rootProject.name = 'cc-tweaked' | ||||
| @@ -462,8 +462,7 @@ public class ComputerCraft | ||||
|     @Mod.EventHandler | ||||
|     public void onServerStarting( FMLServerStartingEvent event ) | ||||
|     { | ||||
|         event.registerServerCommand( new CommandComputer() ); | ||||
|         event.registerServerCommand( new CommandComputerCraft() ); | ||||
|         proxy.initServer( event.getServer() ); | ||||
|     } | ||||
|  | ||||
|     @Mod.EventHandler | ||||
|   | ||||
| @@ -10,6 +10,8 @@ import dan200.computercraft.ComputerCraft; | ||||
| import dan200.computercraft.api.ComputerCraftAPI; | ||||
| import dan200.computercraft.api.pocket.IPocketUpgrade; | ||||
| import dan200.computercraft.core.computer.MainThread; | ||||
| import dan200.computercraft.shared.command.CommandComputer; | ||||
| import dan200.computercraft.shared.command.CommandComputerCraft; | ||||
| import dan200.computercraft.shared.command.ContainerViewComputer; | ||||
| import dan200.computercraft.shared.common.ColourableRecipe; | ||||
| import dan200.computercraft.shared.common.DefaultBundledRedstoneProvider; | ||||
| @@ -51,6 +53,7 @@ import dan200.computercraft.shared.turtle.inventory.ContainerTurtle; | ||||
| import dan200.computercraft.shared.util.*; | ||||
| import dan200.computercraft.shared.wired.CapabilityWiredElement; | ||||
| import net.minecraft.block.Block; | ||||
| import net.minecraft.command.CommandHandler; | ||||
| import net.minecraft.creativetab.CreativeTabs; | ||||
| import net.minecraft.entity.player.EntityPlayer; | ||||
| import net.minecraft.entity.player.EntityPlayerMP; | ||||
| @@ -63,6 +66,7 @@ import net.minecraft.item.ItemStack; | ||||
| import net.minecraft.item.crafting.IRecipe; | ||||
| import net.minecraft.item.crafting.Ingredient; | ||||
| import net.minecraft.network.play.server.SPacketUpdateTileEntity; | ||||
| import net.minecraft.server.MinecraftServer; | ||||
| import net.minecraft.tileentity.TileEntity; | ||||
| import net.minecraft.util.*; | ||||
| import net.minecraft.util.math.BlockPos; | ||||
| @@ -115,6 +119,14 @@ public abstract class ComputerCraftProxyCommon implements IComputerCraftProxy | ||||
|         registerForgeHandlers(); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void initServer( MinecraftServer server ) | ||||
|     { | ||||
|         CommandHandler handler = (CommandHandler) server.getCommandManager(); | ||||
|         handler.registerCommand( new CommandComputer() ); | ||||
|         handler.registerCommand( new CommandComputerCraft() ); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public abstract boolean isClient(); | ||||
|  | ||||
|   | ||||
| @@ -16,6 +16,7 @@ import dan200.computercraft.shared.turtle.blocks.TileTurtle; | ||||
| import net.minecraft.entity.player.EntityPlayer; | ||||
| import net.minecraft.entity.player.InventoryPlayer; | ||||
| import net.minecraft.item.ItemStack; | ||||
| import net.minecraft.server.MinecraftServer; | ||||
| import net.minecraft.util.EnumHand; | ||||
| import net.minecraft.util.SoundEvent; | ||||
| import net.minecraft.util.math.BlockPos; | ||||
| @@ -28,6 +29,7 @@ public interface IComputerCraftProxy | ||||
| { | ||||
|     void preInit(); | ||||
|     void init(); | ||||
|     void initServer( MinecraftServer server ); | ||||
|     boolean isClient(); | ||||
|  | ||||
|     boolean getGlobalCursorBlink(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 SquidDev
					SquidDev