mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +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:
		| @@ -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