Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Commit

Permalink
2.3.1 release
Browse files Browse the repository at this point in the history
- Added ThaumCraft4 module
  • Loading branch information
jimnordb committed Apr 26, 2014
1 parent f1032dc commit a28d9ae
Show file tree
Hide file tree
Showing 25 changed files with 425 additions and 196 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,4 @@
bin/
build/ build/
distribute/ distribute/
eclipse/ eclipse/
Expand Down
2 changes: 1 addition & 1 deletion .settings/org.eclipse.jdt.core.prefs
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
# #
#Fri Apr 25 17:49:50 CEST 2014 #Sat Apr 26 01:47:24 CEST 2014
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,10 @@
[![image](recipear.png)](http://www.minecraftforum.net/topic/1621605-) [![image](src/main/resources/recipear.png)](http://www.minecraftforum.net/topic/1621605-)
========== ==========
Recipear's goal is to be able to remove every recipe in the game including from most of the forge mods Recipear's goal is to be able to remove every recipe in the game including from most of the forge mods


##Download & Installation ##Download & Installation


you can get the latest builds @ http://ci.fragwith.us/job/Recipear2/ you can get the latest builds @ http://teamcity.sk89q.com/viewType.html?buildTypeId=recipear2_main&guest=true


put the mod in your mods folder and run the server at least once to get your configs all set up put the mod in your mods folder and run the server at least once to get your configs all set up


Expand Down Expand Up @@ -44,6 +44,26 @@ Disables "Light Blue Wool" from being Crafted
- **reload** will reload config and send out update to players - **reload** will reload config and send out update to players
- **output** outputs recipe list to *Recipear-output.log* - **output** outputs recipe list to *Recipear-output.log*


##Supported Recipe Types
To get a proper list of supported names and itemid's you should use **/recipear output** to get all the recipes logged into a file

- CRAFTING (ITEMID, ITEMID:META, NAME)
- FURNACE (ITEMID, ITEMID:META, NAME)
- INVENTORY (ITEMID, ITEMID:META, NAME)
- CENTRIFUGE (ITEMID, ITEMID:META, NAME)
- COMPRESSOR (ITEMID, ITEMID:META, NAME)
- EXTRACTOR (ITEMID, ITEMID:META, NAME)
- MACERATOR (ITEMID, ITEMID:META, NAME)
- OREWASHING (ITEMID, ITEMID:META, NAME)
- METALFORMER_CUTTING (ITEMID, ITEMID:META, NAME)
- METALFORMER_EXTRUDING (ITEMID, ITEMID:META, NAME)
- METALFORMER_ROLLING (ITEMID, ITEMID:META, NAME)
- SCRAPBOX (ITEMID, ITEMID:META, NAME)
- NEI (ITEMID)

##Compile & Build ##Compile & Build


Mostly follow this guide here
http://www.minecraftforge.net/forum/index.php?topic=14048.0 http://www.minecraftforge.net/forum/index.php?topic=14048.0

but "Program Arguments" for run configuration have to be "--version 1.6.4 --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --accessToken FML"
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {


apply plugin: 'forge' apply plugin: 'forge'


version = "2.3.0" version = "2.3.1"
group= "mods.recipear" group= "mods.recipear"
description = "Remove recipes ingame" description = "Remove recipes ingame"


Expand Down
Binary file added deps/NotEnoughItems-dev 1.6.1.9.jar
Binary file not shown.
48 changes: 30 additions & 18 deletions src/main/java/mods/recipear/BannedRecipe.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import java.io.Serializable; import java.io.Serializable;


public class BannedRecipe implements Serializable{ public class BannedRecipe implements Serializable{
int id, metadata;
String name, type; public int id, metadata;
public String name, type;


public BannedRecipe(int id) public BannedRecipe(int id)
{ {
Expand Down Expand Up @@ -36,7 +37,10 @@ public BannedRecipe(String name, String type)
this.metadata = -1; this.metadata = -1;
this.type = type; this.type = type;
} }


/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
Expand All @@ -47,40 +51,48 @@ public int hashCode() {
result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode());
return result; return result;
} }


/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj) {
return true; return true;
if (obj == null) }
if (obj == null) {
return false; return false;
if (!(obj instanceof BannedRecipe)) }
if (!(obj instanceof BannedRecipe)) {
return false; return false;
}
BannedRecipe other = (BannedRecipe) obj; BannedRecipe other = (BannedRecipe) obj;
if (id != other.id) if (id != other.id) {
return false; return false;
if (metadata != other.metadata) }
if (metadata != other.metadata) {
return false; return false;
}
if (name == null) { if (name == null) {
if (other.name != null) if (other.name != null) {
return false; return false;
} else if (!name.equals(other.name)) }
} else if (!name.equals(other.name)) {
return false; return false;
}
if (type == null) { if (type == null) {
if (other.type != null) if (other.type != null) {
return false; return false;
} else if (!type.equals(other.type)) }
} else if (!type.equals(other.type)) {
return false; return false;
}
return true; return true;
} }


@Override @Override
public String toString() public String toString()
{ {
if(id > 0) { return String.format("BannedRecipe[name: %s, id: %s, metadata: %s, type: %s]", name, id, metadata, type);
return String.format("BannedRecipe[id: %s, metadata: %s, type: %s]", id, metadata, type);
} else {
return String.format("BannedRecipe[name: %s, type: %s]", name, type);
}
} }
} }
22 changes: 14 additions & 8 deletions src/main/java/mods/recipear/BannedRecipes.java
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,7 @@
package mods.recipear; package mods.recipear;


import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList; import java.util.ArrayList;


import net.minecraft.network.packet.Packet250CustomPayload;

public class BannedRecipes { public class BannedRecipes {
private static ArrayList<BannedRecipe> BannedRecipes = new ArrayList<BannedRecipe>(); private static ArrayList<BannedRecipe> BannedRecipes = new ArrayList<BannedRecipe>();
private static ArrayList<String> BannedRecipeTypes = new ArrayList<String>(); private static ArrayList<String> BannedRecipeTypes = new ArrayList<String>();
Expand Down Expand Up @@ -65,16 +60,27 @@ public static boolean Check(int ID, int METADATA, String TYPE) {
public static boolean CheckSpecifically(int ID, int METADATA, String TYPE) { public static boolean CheckSpecifically(int ID, int METADATA, String TYPE) {


BannedRecipe bannedrecipe = new BannedRecipe(ID, METADATA, TYPE); BannedRecipe bannedrecipe = new BannedRecipe(ID, METADATA, TYPE);
if(BannedRecipes.contains(bannedrecipe)) return true; if(BannedRecipes.contains(bannedrecipe)) {
return true;
}
return false;
}

public static boolean CheckSpecifically(int ID, String TYPE) {


BannedRecipe bannedrecipe = new BannedRecipe(ID, -1, TYPE);
if(BannedRecipes.contains(bannedrecipe)) {
return true;
}
return false; return false;
} }


public static boolean CheckSpecifically(String NAME, String TYPE) { public static boolean CheckSpecifically(String NAME, String TYPE) {


BannedRecipe bannedrecipe = new BannedRecipe(NAME, TYPE); BannedRecipe bannedrecipe = new BannedRecipe(NAME, TYPE);
if(BannedRecipes.contains(bannedrecipe)) return true; if(BannedRecipes.contains(bannedrecipe)) {

return true;
}
return false; return false;
} }


Expand Down
6 changes: 0 additions & 6 deletions src/main/java/mods/recipear/ConfigPacket.java
Original file line number Original file line Diff line number Diff line change
@@ -1,14 +1,8 @@
package mods.recipear; package mods.recipear;


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;


import net.minecraft.network.packet.Packet250CustomPayload;

public class ConfigPacket implements Serializable { public class ConfigPacket implements Serializable {
boolean debug, removeclient; boolean debug, removeclient;
String placeholderDescription; String placeholderDescription;
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/mods/recipear/ConnectionHandler.java
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,9 @@
package mods.recipear; package mods.recipear;


import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

import net.minecraft.network.INetworkManager; import net.minecraft.network.INetworkManager;
import net.minecraft.network.NetLoginHandler; import net.minecraft.network.NetLoginHandler;
import net.minecraft.network.packet.NetHandler; import net.minecraft.network.packet.NetHandler;
import net.minecraft.network.packet.Packet1Login; import net.minecraft.network.packet.Packet1Login;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import cpw.mods.fml.common.network.IConnectionHandler; import cpw.mods.fml.common.network.IConnectionHandler;
import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.network.PacketDispatcher;
Expand Down
16 changes: 3 additions & 13 deletions src/main/java/mods/recipear/PacketManager.java
Original file line number Original file line Diff line number Diff line change
@@ -1,26 +1,16 @@
package mods.recipear; package mods.recipear;


import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.List;


import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import mods.recipear.api.RecipearEvent; import mods.recipear.api.RecipearEvent;
import mods.recipear.modules.RecipearVanilla;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager; import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload; import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;


public class PacketManager implements IPacketHandler public class PacketManager implements IPacketHandler
{ {
Expand Down
24 changes: 2 additions & 22 deletions src/main/java/mods/recipear/Recipear.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry; import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


@Mod(modid = "Recipear2", name = "Recipear2", version = "2.2.0", dependencies="required-after:Forge@[9.10,)") @Mod(modid = "Recipear2", name = "Recipear2", version = "2.3.1", dependencies="required-after:Forge@[9.10,)")
@NetworkMod(clientSideRequired = false, serverSideRequired = false, channels = {"recipear"}, packetHandler = PacketManager.class) @NetworkMod(clientSideRequired = false, serverSideRequired = false, channels = {"recipear"}, packetHandler = PacketManager.class)
public class Recipear public class Recipear
{ {
public static boolean debug = true;
public static RecipearListener events = new RecipearListener(); public static RecipearListener events = new RecipearListener();


@SidedProxy(clientSide="mods.recipear.RecipearClientProxy", serverSide="mods.recipear.RecipearCommonProxy") @SidedProxy(clientSide="mods.recipear.RecipearClientProxy", serverSide="mods.recipear.RecipearCommonProxy")
Expand All @@ -52,7 +50,7 @@ public void preInit(FMLPreInitializationEvent event)


mcDataDir = event.getModConfigurationDirectory().getParentFile().getAbsolutePath(); mcDataDir = event.getModConfigurationDirectory().getParentFile().getAbsolutePath();


BannedRecipes.AddBannedRecipeType("CRAFTING","FURNACE","INVENTORY"); BannedRecipes.AddBannedRecipeType("INVENTORY");
RecipearLogger.setLogger(Logger.getLogger("Recipear"), new File(mcDataDir, "Recipear-" + (proxy.isServer() ? "server" : "client") + ".log").getAbsolutePath()); RecipearLogger.setLogger(Logger.getLogger("Recipear"), new File(mcDataDir, "Recipear-" + (proxy.isServer() ? "server" : "client") + ".log").getAbsolutePath());
if(proxy.isServer()) { if(proxy.isServer()) {
config = new RecipearConfig(); config = new RecipearConfig();
Expand All @@ -68,24 +66,6 @@ public void init(FMLInitializationEvent event)
} }
} }


@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
// show supported recipe types
String supported_types = "Supported Recipe Types are";

for(String type : BannedRecipes.getBannedRecipeTypes()) {
supported_types += " " + type;
}

if(debug) {
RecipearConfig.debug = true;
}
RecipearLogger.info(supported_types);

events.add(new RecipearVanilla());
}

@EventHandler @EventHandler
void ServerStartingEvent(FMLServerStartingEvent event) { void ServerStartingEvent(FMLServerStartingEvent event) {
if (!proxy.isSinglePlayer()) { if (!proxy.isSinglePlayer()) {
Expand Down
31 changes: 17 additions & 14 deletions src/main/java/mods/recipear/RecipearCommand.java
Original file line number Original file line Diff line number Diff line change
@@ -1,22 +1,16 @@
package mods.recipear; package mods.recipear;


import java.util.ArrayList;
import java.util.List; import java.util.List;


import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
import mods.recipear.api.RecipearEvent; import mods.recipear.api.RecipearEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandBase; import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommand; import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender; import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException; import net.minecraft.command.WrongUsageException;
import net.minecraft.entity.player.EntityPlayer; import cpw.mods.fml.common.network.PacketDispatcher;
import net.minecraft.entity.player.EntityPlayerMP; import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.util.ChatMessageComponent; import cpw.mods.fml.common.registry.TickRegistry;
import net.minecraft.util.EnumChatFormatting; import cpw.mods.fml.relauncher.Side;


public class RecipearCommand extends CommandBase implements ICommand { public class RecipearCommand extends CommandBase implements ICommand {


Expand Down Expand Up @@ -90,25 +84,34 @@ else if((astring.length > 0) && (astring[0].equals("output")))
outputting = false; outputting = false;
} }
} }
else if((astring.length > 0) && (astring[0].equals("types")))
{
String supported_types = "Supported Recipe Types are";

for(String type : BannedRecipes.getBannedRecipeTypes()) {
supported_types += " " + type;
}

notifyAdmins(sender, supported_types, new Object[] {sender.getCommandSenderName()});
}
else else
{ {
throw new WrongUsageException("/recipear <reload/output>", new Object[0]); throw new WrongUsageException(getCommandUsage(sender), new Object[0]);
} }
} }


@Override @Override
public String getCommandUsage(ICommandSender icommandsender) { public String getCommandUsage(ICommandSender icommandsender) {
return "/recipear <reload/output>"; return "/recipear <reload/output/types>";
} }


public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
{ {
return par2ArrayOfStr.length == 1 ? getListOfStringsMatchingLastWord(par2ArrayOfStr, new String[] {"reload", "output"}): null; return par2ArrayOfStr.length == 1 ? getListOfStringsMatchingLastWord(par2ArrayOfStr, new String[] {"reload", "output", "types"}): null;
} }


@Override @Override
public int compareTo(Object arg0) { public int compareTo(Object arg0) {
// TODO Auto-generated method stub
return 0; return 0;
} }
} }
2 changes: 1 addition & 1 deletion src/main/java/mods/recipear/RecipearConfig.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static void BannedRecipesProperties() {
if(ITEMID == 0) { if(ITEMID == 0) {
BANNEDRECIPE.name = NAME; BANNEDRECIPE.name = NAME;
} }

BannedRecipes.AddBannedRecipe(BANNEDRECIPE); BannedRecipes.AddBannedRecipe(BANNEDRECIPE);


RecipearLogger.info("Added: " + BANNEDRECIPE.toString()); RecipearLogger.info("Added: " + BANNEDRECIPE.toString());
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/mods/recipear/RecipearLogger.java
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,10 @@
package mods.recipear; package mods.recipear;


import java.io.IOException; import java.io.IOException;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler; import java.util.logging.FileHandler;
import java.util.logging.Formatter;
import java.util.logging.Handler; import java.util.logging.Handler;
import java.util.logging.LogRecord;
import java.util.logging.Logger; import java.util.logging.Logger;


import mods.recipear.api.RecipearEvent;

public class RecipearLogger { public class RecipearLogger {


private static Logger logger; private static Logger logger;
Expand Down
Loading

0 comments on commit a28d9ae

Please sign in to comment.