Fix merge conflicts

This commit is contained in:
mDiyo committed 2013-10-19 07:48:55 -07:00
commit 38cc3fb60e
48 files changed
+417 -211

No files matched your search

+15 -15
View File
@@ -4,48 +4,48 @@ progwml6:https://dl.dropboxusercontent.com/s/i6gra1pc6gxawwz/capeTCLogo.png
_Sunstrike:http://talon.sunstrike.io/files/sun_cape.png
Fudgy_Fetus:https://dl.dropboxusercontent.com/u/27415688/fudgecape.png
Vexatos:https://dl.dropboxusercontent.com/u/57704711/Dokumente/Speziell/Minecraft/Public/TCape.png
pillbox:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_orange.png
Hysting:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_blue.png
Xythyl:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_blue.png
andrejsavikin:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_blue.png
pillbox:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_orange.png
Hysting:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_blue.png
Xythyl:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_blue.png
andrejsavikin:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_blue.png
alexbegt:https://dl.dropboxusercontent.com/u/48633261/cape.png
DentedLeftFender:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
DentedLeftFender:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
Pokefenn:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
sondrex76:http://i.imgur.com/a7QMfjc.png
Steelflameblade:http://i.imgur.com/pz1O4pe.png
elkillo:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
Habselaar:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
elkillo:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
Habselaar:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
LordDarkona:http://i.imgur.com/MY4RmgO.png
master801:https://dl.dropboxusercontent.com/u/90842632/Ender-Cape.png
Zerokyuuni:https://dl.dropboxusercontent.com/u/76684489/zerocape.png
Frosty_Chicken:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
EntityOmega:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
skedone:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
Frosty_Chicken:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
EntityOmega:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
skedone:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
type1ninja:https://dl.dropboxusercontent.com/s/0ufr1gtqktt1nl2/JeffCape.png
turbeauke:http://i.imgur.com/XdOIone.png
Nieue:http://i.imgur.com/8c5yUgX.png
starr274:https://github.com/mDiyo/TinkersConstruct/blob/master/capes/default_gray.png
starr274:https://github.com/SlimeKnights/TinkersConstruct/blob/master/capes/default_gray.png
zeflap:http://i.imgur.com/6OhKrVE.png
kendfinger:https://dl.dropboxusercontent.com/u/48633261/cape.png
GameGeek1998:http://i.imgur.com/hiMFLXY.png
fumoffu616:https://dl.dropboxusercontent.com/s/f70j8xfwax1p0t5/myeah.png
7X_star:http://i.imgur.com/ebQ4IvF.png
TheNinjaM:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_green.png
TheNinjaM:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_green.png
1Enderman10:http://i.imgur.com/SGm6cd0.png
Lance_Bombardier:http://i.imgur.com/ueHSGf4.png
Schluck123:http://i.imgur.com/a7QMfjc.png
redblackdragon3:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_red.png
redblackdragon3:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_red.png
xXThunderstarXx:http://i.imgur.com/zJgdW3C.png
tonius11:https://dl.dropboxusercontent.com/s/a05r5c68e91dk2h/endercape.png
Leilana:http://i.imgur.com/lMXcbre.png
evaluno2:http://i.imgur.com/YYqlRRp.png
andypie1010:http://oi41.tinypic.com/mlj9jm.jpg
hayden_swanick:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_orange.png
hayden_swanick:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_orange.png
PeggleFrank:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
the_j485:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
dgdas12:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
SatanicSanta:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
GPuzzle:https://dl.dropboxusercontent.com/s/etrersgka8n7g3s/vineCape.png
ajloveslily14:https://raw.github.com/mDiyo/TinkersConstruct/master/capes/default_blue.png
ajloveslily14:https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes/default_blue.png
multisofteis:http://i.imgur.com/AgGBsX8.png
----------------------------------------FINALISED - ONLY ALLOW REMOVAL OF CAPES----------------------------------------
@@ -1,10 +0,0 @@
package powercrystals.minefactoryreloaded.api.rednet;
public enum RedNetConnectionType
{
None,
CableSingle,
PlateSingle,
CableAll,
PlateAll
}
-1
View File
@@ -1 +0,0 @@
The ghost of mods past. May they rest in peace and update in explosions.
+5
View File
@@ -240,6 +240,11 @@ item.tconstruct.ArmorPattern.chestplate.name=Chestplate Cast
item.tconstruct.ArmorPattern.leggings.name=Leggings Cast
item.tconstruct.ArmorPattern.boots.name=Boots Cast
item.tconstruct.helmetWood.name=Wooden Helmet
item.tconstruct.chestplateWood.name=Wooden Chestplate
item.tconstruct.leggingsWood.name=Wooden Leggings
item.tconstruct.bootsWood.name=Wooden Boots
item.tconstruct.jerky.beef.name=Beef Jerky
item.tconstruct.jerky.pig.name=Bacon Jerky
item.tconstruct.jerky.chicken.name=Chicken Jerky
+6 -6
View File
@@ -10,7 +10,7 @@
"authors": [
"mDiyo", "fuj1n", "ProgWML6", "Sunstrike"
],
"credits": "Ecu",
"credits": "Slime Knights, EcuTruin",
"logoFile": "",
"screenshots": [],
"parent":"",
@@ -22,12 +22,12 @@
"description": "Preloader for Tinkers Construct",
"version": "0.0.1",
"mcversion": "@MCVERSION@",
"url": "https://github.com/mDiyo/TinkersConstruct/tree/master/src/tconstruct/preloader",
"url": "https://github.com/SlimeKnights/TinkersConstruct/tree/master/src/tconstruct/preloader",
"updateUrl": "",
"authors": [
"AlgorithmX2", "Sunstrike"
"Sunstrike", "Slime Knights"
],
"credits": "",
"credits": "AlgorithmX2 (ASMInterfaceRepair)",
"logoFile": "",
"screenshots": [],
"parent":"",
@@ -44,7 +44,7 @@
"authors": [
"mDiyo", "fuj1n", "ProgWML6", "Sunstrike"
],
"credits": "",
"credits": "Slime Knights",
"logoFile": "",
"screenshots": [],
"parent":"TConstruct",
@@ -63,7 +63,7 @@
"authors": [
"mDiyo", "fuj1n", "ProgWML6", "Sunstrike"
],
"credits": "",
"credits": "Slime Knights",
"logoFile": "",
"screenshots": [],
"parent":"TConstruct",
@@ -1,9 +1,9 @@
package powercrystals.minefactoryreloaded.api;
import java.lang.reflect.Method;
import powercrystals.minefactoryreloaded.api.rednet.IRedNetLogicCircuit;
import java.lang.reflect.Method;
import net.minecraft.item.ItemStack;
/**
@@ -12,8 +12,11 @@ import net.minecraft.item.ItemStack;
* Class used to register plants and other farming-related things with MFR. Will do nothing if MFR does not exist, but your mod should be set to load
* after MFR or things may not work properly.
*
* To avoid breaking the API, additional FactoryRegistry##s will appear on major MFR versions that contain API additions. On a Minecraft version change,
* these will be rolled back into this class.
*
*/
public class FarmingRegistry
public class FactoryRegistry
{
/**
* Registers a plantable object with the Planter.
@@ -36,7 +39,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a harvestable block with the Harvester.
*
@@ -58,7 +61,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a fertilizable block with the Fertilizer.
*
@@ -80,7 +83,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a fertilizer item Fertilizer.
*
@@ -102,7 +105,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a ranchable entity with the Rancher.
*
@@ -126,7 +129,8 @@ public class FarmingRegistry
}
/**
* Registers a grindable entity with the Grinder.
* Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable"
* on MC 1.6.
*
* @param grindable The entity to grind.
*/
@@ -147,10 +151,33 @@ public class FarmingRegistry
}
}
/**
* Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable"
* on MC 1.6.
*
* @param grindable The entity to grind.
*/
public static void registerGrinderBlacklist(Class<?> ...ungrindables)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerGrinderBlacklist", Class[].class);
reg.invoke(registry, (Object[])ungrindables);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Registers a possible output with the sludge boiler.
*
* @param weight Likelihood that this item will be produced. Lower means rarer.
* @param weight Likelihood that this item will be produced. Lower means rarer.
* @param drop The thing being produced by the sludge boiler.
*/
public static void registerSludgeDrop(int weight, ItemStack drop)
@@ -169,11 +196,11 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers specific food to use in the Breeder (instead of wheat) for a given mob.
*
* @param entityToBreed Entity this food will be used with.
* @param entityToBreed Entity this food will be used with.
* @param food The item to use when breeding this entity.
*/
public static void registerBreederFood(Class<?> entityToBreed, ItemStack food)
@@ -192,74 +219,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a Safari Net handler to properly serialize a type of mob.
*
* @param handler The Safari Net handler.
*/
public static void registerSafariNetHandler(ISafariNetHandler handler)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class);
reg.invoke(registry, handler);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Registers a mob egg handler, which allows the Safari Net to properly change colors.
*
* @param handler The mob egg handler
*/
public static void registerMobEggHandler(IMobEggHandler handler)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class);
reg.invoke(registry, handler);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Allows Rubber Trees to spawn in the specified biome.
*
* @param biome The biome name.
*/
public static void registerRubberTreeBiome(String biome)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerRubberTreeBiome", String.class);
reg.invoke(registry, biome);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Bans an entity class from being collected by Safari Nets
*
@@ -281,7 +241,74 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a Safari Net handler to properly serialize a type of mob.
*
* @param handler The Safari Net handler.
*/
public static void registerSafariNetHandler(ISafariNetHandler handler)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class);
reg.invoke(registry, handler);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Registers a mob egg handler, which allows the Safari Net to properly change colors.
*
* @param handler The mob egg handler
*/
public static void registerMobEggHandler(IMobEggHandler handler)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class);
reg.invoke(registry, handler);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Allows Rubber Trees to spawn in the specified biome.
*
* @param biome The biome name.
*/
public static void registerRubberTreeBiome(String biome)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("registerRubberTreeBiome", String.class);
reg.invoke(registry, biome);
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
/**
* Registers an entity as a possible output from villager random safari nets. Note that the "id" field must be initialized
* (i.e. with Entity.addEntityID()) for it to work correctly.
@@ -305,7 +332,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a handler for drinking liquids with the straw.
*
@@ -328,11 +355,11 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a possible output with the laser drill.
*
* @param weight Likelihood that this item will be produced. Lower means rarer.
* @param weight Likelihood that this item will be produced. Lower means rarer.
* @param drop The thing being produced by the laser drill.
*/
public static void registerLaserOre(int weight, ItemStack drop)
@@ -354,21 +381,22 @@ public class FarmingRegistry
/**
* Registers a preferred ore with the laser drill. Focuses with the specified color will make the specified ore more likely.
* Note that this will overwrite existing ore preferences - you may want to coordinate with PC before using this one.
* Used by MFR itself for vanilla: Black (Coal), Light Blue (Diamond), Lime (Emerald), Yellow (Gold), Brown (Iron), Blue (Lapis),
* Red (Redstone), and White (nether quartz).
*
* This will replace setLaserPreferredOre on MC 1.6.
*
* @param color The color that the preferred ore is being set for. White is 0.
* @param ore The ore that will be preferred by the drill when a focus with the specified color is present.
*/
public static void setLaserPreferredOre(int color, ItemStack ore)
public static void addLaserPreferredOre(int color, ItemStack ore)
{
try
{
Class<?> registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry");
if(registry != null)
{
Method reg = registry.getMethod("setLaserPreferredOre", int.class, ItemStack.class);
Method reg = registry.getMethod("addLaserPreferredOre", int.class, ItemStack.class);
reg.invoke(registry, color, ore);
}
}
@@ -400,7 +428,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers a fruit for the Fruit Picker.
*
@@ -422,7 +450,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers an entity string as an invalid entry for the autospawner.
* See also: {@link net.minecraft.entity.EntityList}'s classToStringMapping and stringToClassMapping.
@@ -445,7 +473,7 @@ public class FarmingRegistry
e.printStackTrace();
}
}
/**
* Registers logic circuit to be usable in the Programmable RedNet Controller.
*
@@ -15,9 +15,9 @@ public interface IDeepStorageUnit
void setStoredItemCount(int amount);
/**
* Sets the type of the stored item and initializes the number of stored items to count. Will overwrite any existing stored items.
* Sets the type of the stored item and initializes the number of stored items to amount. Will overwrite any existing stored items.
*/
void setStoredItemType(int itemID, int meta, int Count);
void setStoredItemType(ItemStack type, int amount);
/**
* @return The maximum number of items the DSU can hold.
@@ -3,7 +3,7 @@ package powercrystals.minefactoryreloaded.api;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
/**
@@ -11,19 +11,26 @@ import net.minecraft.world.World;
*
* Defines a grindable entity for the Grinder.
*/
@SuppressWarnings("deprecation")
public interface IFactoryGrindable
{
/**
* @return The class that this grindable instance is handling. This must be a subtype of EntityLiving or the entity will never
* @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never
* be noticed by the Grinder.
*/
public Class<?> getGrindableEntity();
/**
* @param world The world this entity is in.
* @param entity The entity instance being ground.
* @param random A Random instance.
* @param random A Random instance.
* @return The drops generated when this entity is killed.
*/
public List<MobDrop> grind(World world, EntityLiving entity, Random random);
public List<MobDrop> grind(World world, EntityLivingBase entity, Random random);
/**
* @param entity The entity instance being ground.
* @return Whether this entity has been fully processed or not.
*/
public boolean processEntity(EntityLivingBase entity);
}
@@ -2,9 +2,8 @@ package powercrystals.minefactoryreloaded.api;
import java.util.List;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
@@ -15,7 +14,7 @@ import net.minecraft.world.World;
public interface IFactoryRanchable
{
/**
* @return The entity being ranched. Must be a subtype of EntityLiving.
* @return The entity being ranched. Must be a subtype of EntityLivingBase.
*/
public Class<?> getRanchableEntity();
@@ -25,5 +24,5 @@ public interface IFactoryRanchable
* @param rancher The rancher instance doing the ranching. Used to access the Rancher's inventory when milking cows, for example.
* @return A list of drops.
*/
public List<ItemStack> ranch(World world, EntityLiving entity, IInventory rancher);
public List<RanchedItem> ranch(World world, EntityLivingBase entity, IInventory rancher);
}
@@ -0,0 +1,12 @@
package powercrystals.minefactoryreloaded.api;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface INeedleAmmo
{
public boolean onHitEntity(EntityPlayer owner, Entity hit, double distance);
public void onHitBlock(EntityPlayer owner, World world, int x, int y, int z, int side, double distance);
public float getSpread();
}
@@ -1,6 +1,6 @@
package powercrystals.minefactoryreloaded.api;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -18,7 +18,7 @@ public interface ISyringe
* @param syringe The syringe ItemStack.
* @return True if the entity can be injected by this syringe.
*/
public boolean canInject(World world, EntityLiving entity, ItemStack syringe);
public boolean canInject(World world, EntityLivingBase entity, ItemStack syringe);
/**
* Called to perform an injection.
@@ -27,5 +27,5 @@ public interface ISyringe
* @param syringe The syringe ItemStack.
* @return True if injection was successful.
*/
public boolean inject(World world, EntityLiving entity, ItemStack syringe);
public boolean inject(World world, EntityLivingBase entity, ItemStack syringe);
}
@@ -0,0 +1,68 @@
package powercrystals.minefactoryreloaded.api;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
/**
* @author skyboy026
*
* Defines an ItemStack or a FluidStack that is the result of an entity being ranched
*/
public final class RanchedItem {
private final ItemStack item;
private final FluidStack fluid;
public RanchedItem(Block item, int amount, int meta)
{
this(new ItemStack(item, amount, meta));
}
public RanchedItem(Block item, int amount)
{
this(new ItemStack(item, amount));
}
public RanchedItem(Block item)
{
this(new ItemStack(item));
}
public RanchedItem(Item item, int amount, int meta)
{
this(new ItemStack(item, amount, meta));
}
public RanchedItem(Item item, int amount)
{
this(new ItemStack(item, amount));
}
public RanchedItem(Item item)
{
this(new ItemStack(item));
}
public RanchedItem(ItemStack item)
{
this.item = item;
fluid = null;
}
public RanchedItem(FluidStack fluid)
{
this.fluid = fluid;
item = null;
}
public boolean hasFluid()
{
return item == null & fluid != null;
}
public Object getResult()
{
return item == null ? fluid : item;
}
}
@@ -4,7 +4,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
/**
* Defines a Block that can connect to RedNet wires. This must be implemented on your Block class.
* Defines a Block that can connect to RedNet cables. This must be implemented on your Block class.
* Note that when you implement this, the RedNet network makes several assumptions about your code -
* primarily, it will not clamp values to 0 <= x <= 15. This means you must be able to accept any
* possible integer without crashing, even negatives. It will also assume that calling the onInput(s)Changed()
@@ -12,6 +12,12 @@ import net.minecraftforge.common.ForgeDirection;
* output methods in All mode, and will only query the methods contained in this interface in that case. In Single
* mode, it will call onInputChanged, and will check for strong power (or weak if in Plate mode) through the vanilla
* method calls.
*
* RedNet cables have their subnets indicated to the user by colored bands on the cable.
* The color of a given subnet is the same as the wool with metadata equal to the subnet number.
* For reference:
* 0:White, 1:Orange, 2:Magenta, 3:LightBlue, 4:Yellow, 5:Lime, 6:Pink, 7:Gray,
* 8:LightGray, 9:Cyan, 10:Purple, 11:Blue, 12:Brown, 13:Green, 14:Red, 15:Black
*/
public interface IConnectableRedNet
{
@@ -0,0 +1,6 @@
package powercrystals.minefactoryreloaded.api.rednet;
public interface IRedNetNoConnection
{
}
@@ -0,0 +1,64 @@
package powercrystals.minefactoryreloaded.api.rednet;
import java.util.HashMap;
import java.util.Map;
/**
* Defines how RedNet cable connects to a block
*
* None: RedNet will never connect to this block (if this is all you want: use IRedNetNoConnection)
*
* CableSingle: Connections will use the cable renderer with a single band, best used for whole blocks
* PlateSingle: Connections will use the plate renderer with a single band, used for conveyers and rails
*
* CableAll: Connections permit access to all 16 bands
* PlateAll: Connections permit access to all 16 bands
*
* Forced connection modes are best used for decoration blocks: RedNet will not connect normally, but will if the user forces it
*
* ForcedCableSingle: Connections permit access to a single band only when the cable is in forced connection mode
* ForcedPlateSingle: Connections permit access to a single band only when the cable is in forced connection mode
*
* ForcedCableAll: Connections permit access to all 16 bands only when the cable is in forced connection mode
* ForcedPlateAll: Connections permit access to all 16 bands only when the cable is in forced connection mode
*/
public enum RedNetConnectionType
{
None, // 0
CableSingle, // 11
PlateSingle, // 13
CableAll, // 19
PlateAll, // 21
ForcedCableSingle, // 43
ForcedPlateSingle, // 45
ForcedCableAll, // 51
ForcedPlateAll; // 53
public final boolean isConnected = this.ordinal() != 0;
public final boolean isSingleSubnet = this.name().endsWith("Single");
public final boolean isAllSubnets = this.name().endsWith("All");
public final boolean isConnectionForced = this.name().startsWith("Forced");
public final boolean isPlate = this.name().contains("Plate");
public final boolean isCable = this.name().contains("Cable");
public final short flags = toFlags(isConnected, isCable, isPlate, isSingleSubnet, isAllSubnets, isConnectionForced);
public static final RedNetConnectionType fromFlags(short flags)
{
return connections.get(flags);
}
private static final short toFlags(boolean ...flags)
{
short ret = 0;
for (int i = flags.length; i --> 0;)
ret |= (flags[i] ? 1 : 0) << i;
return ret;
}
private static final Map<Short, RedNetConnectionType> connections = new HashMap<Short, RedNetConnectionType>();
static {
for (RedNetConnectionType type : RedNetConnectionType.values())
connections.put(type.flags, type);
}
}
+1 -1
View File
@@ -94,6 +94,6 @@ public class TankAirBlock extends BlockContainer
@Override
public boolean isAirBlock(World world, int x, int y, int z)
{
return true;
return false;
}
}
@@ -185,7 +185,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
}
}
float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
float percent = (float)logic.getLiquidAmount() / (float)logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -402,7 +404,10 @@ public class SearedRender implements ISimpleBlockRenderingHandler
maxZ = rec.fluidRenderProperties.maxZ;
}
}
float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
float percent = (float)logic.getLiquidAmount() / (float)logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -13,7 +13,7 @@ import net.minecraftforge.event.ForgeSubscribe;
public class EventCloakRender {
private final String serverLocation = "https://raw.github.com/mDiyo/TinkersConstruct/master/capes.txt";
private final String serverLocation = "https://raw.github.com/SlimeKnights/TinkersConstruct/master/capes.txt";
private final int timeout = 1000;
private static final Graphics TEST_GRAPHICS = new BufferedImage(128, 128, BufferedImage.TYPE_INT_RGB).getGraphics();
+22 -11
View File
@@ -1,5 +1,11 @@
package tconstruct.common;
import tconstruct.library.client.FluidRenderProperties;
import tconstruct.library.client.FluidRenderProperties.Applications;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.*;
@@ -415,7 +421,7 @@ public class TContent implements IFuelHandler
GameRegistry.registerBlock(castingChannel, CastingChannelItem.class, "CastingChannel");
GameRegistry.registerTileEntity(CastingChannelLogic.class, "CastingChannel");
tankAir = new TankAirBlock(PHConstruct.airTank, Material.air).setBlockUnbreakable().setUnlocalizedName("tconstruct.tank.air");
tankAir = new TankAirBlock(PHConstruct.airTank, Material.leaves).setBlockUnbreakable().setUnlocalizedName("tconstruct.tank.air");
GameRegistry.registerBlock(tankAir, "TankAir");
GameRegistry.registerTileEntity(TankAirLogic.class, "tconstruct.tank.air");
@@ -1314,16 +1320,16 @@ public class TContent implements IFuelHandler
basinCasting.addCastingRecipe(new ItemStack(Block.whiteStone), new FluidStack(moltenEnderFluid, 25), new ItemStack(Block.obsidian), true, 100); //endstone
basinCasting.addCastingRecipe(new ItemStack(metalBlock.blockID, 1, 10), new FluidStack(moltenEnderFluid, 1000), null, true, 100); //ender
//Armor casts
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 0), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(helmetWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 0), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(helmetWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 1), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(chestplateWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 1), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(chestplateWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 2), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(leggingsWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 2), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(leggingsWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 3), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(bootsWood), 50);
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 3), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(bootsWood), 50);
//Armor casts
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 0), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(helmetWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 0), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(helmetWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 1), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(chestplateWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 1), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(chestplateWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 2), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(leggingsWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 2), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(leggingsWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 3), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(bootsWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
basinCasting.addCastingRecipe(new ItemStack(armorPattern, 1, 3), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 10), new ItemStack(bootsWood), 50, new FluidRenderProperties(Applications.BASIN.minHeight, 0.65F, Applications.BASIN));
//TODO TEST
// basinCasting.addCastingRecipe(new ItemStack(armorTest), new FluidStack(moltenIronFluid, TConstruct.ingotLiquidValue * 24), new ItemStack(armorPattern, 1, 0), false, 100, new FluidRenderProperties(0.5F, 0.575F, 0.15F, 0.85F, 0.15F, 0.85F));
@@ -1571,6 +1577,11 @@ public class TContent implements IFuelHandler
GameRegistry.addRecipe(new ItemStack(materials, 1, 25), "sss", "sns", "sss", 'n', new ItemStack(Item.goldNugget), 's', new ItemStack(Item.silk));
GameRegistry.addRecipe(new ItemStack(materials, 1, 26), " c ", "cec", " c ", 'c', new ItemStack(materials, 1, 25), 'e', new ItemStack(Item.emerald)); //Silky Jewel
GameRegistry.addRecipe(new ShapedOreRecipe(helmetWood, new Object[]{"www", "w w", 'w', "logWood"}));
GameRegistry.addRecipe(new ShapedOreRecipe(chestplateWood, new Object[]{"w w", "www", "www", 'w', "logWood"}));
GameRegistry.addRecipe(new ShapedOreRecipe(leggingsWood, new Object[]{"www", "w w", "w w", 'w', "logWood"}));
GameRegistry.addRecipe(new ShapedOreRecipe(bootsWood, new Object[]{"w w", "w w", 'w', "logWood"}));
//FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 1, new ItemStack(materials, 1, 3), 3f);
//FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 2, new ItemStack(materials, 1, 4), 3f);
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 3, new ItemStack(materials, 1, 9), 0.5f);
@@ -40,7 +40,7 @@ public class FluidRenderProperties {
public static enum Applications {
TABLE(0.9375F, 1F, 0.0625F, 0.9375F, 0.0625F, 0.9375F), BASIN(0.25F, 0.95F, 0.0625F, 0.9375F, 0.0625F, 0.9375F);
float minHeight, maxHeight, minX, maxX, minZ, maxZ;
public float minHeight, maxHeight, minX, maxX, minZ, maxZ;
Applications(float minHeight, float maxHeight, float minX, float maxX, float minZ, float maxZ) {
this.minHeight = minHeight;
@@ -1,24 +1,11 @@
package tconstruct.library.component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.HashSet;
import java.util.*;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagIntArray;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.*;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.classloading.FMLForgePlugin;
import scala.compat.Platform$;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.util.CoordTuple;
import tconstruct.library.util.CoordTupleSort;
import tconstruct.library.util.IFacingLogic;
import tconstruct.library.util.IMasterLogic;
import tconstruct.library.util.IServantLogic;
import tconstruct.library.util.*;
public class TankLayerScan extends LogicComponent
{
@@ -449,7 +436,7 @@ public class TankLayerScan extends LogicComponent
}
}
NBTTagList blocks = tags.getTagList("AirLayer");
NBTTagList blocks = tags.getTagList("Blocks");
if (blocks != null)
{
blockCoords.clear();
@@ -462,7 +449,7 @@ public class TankLayerScan extends LogicComponent
}
}
NBTTagList air = tags.getTagList("AirLayer");
NBTTagList air = tags.getTagList("Air");
if (air != null)
{
airCoords.clear();
@@ -6,11 +6,8 @@ import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import powercrystals.minefactoryreloaded.api.FarmingRegistry;
import tconstruct.common.TContent;
import tconstruct.plugins.minefactoryreloaded.harvestables.HarvestableOreBerry;
@Mod(modid = "TConstruct|CompatMineFactoryReloaded", name = "TConstruct Compat: MFR", version = "0.1", dependencies = "after:MineFactoryReloaded;after:TConstruct")
@Mod(modid = "TConstruct|CompatMineFactoryReloaded", name = "TConstruct Compat: MFR", version = "0.2", dependencies = "after:MineFactoryReloaded;required-after:TConstruct")
@NetworkMod(clientSideRequired = false, serverSideRequired = false)
public class MineFactoryReloaded
{
@@ -25,11 +22,8 @@ public class MineFactoryReloaded
try
{
FMLLog.fine("MineFactoryReloaded detected. Registering TConstruct farmables/grindables with MFR's Farming Registry.");
FarmingRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerry.blockID, TContent.oreBerries.itemID, 0));
FarmingRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerrySecond.blockID, TContent.oreBerries.itemID, 4));
/*
mfrRegistering.registerWithMFR();
/*
* Perhaps TC ores should be registered as drops from the MFR Laser Drill here, but I don't know which things would be suitable for that.
* Syntax: FarmingRegistry.registerLaserOre(int weight, ItemStack droppedStack));
* Currently used weights are from about 50 (emerald) to 175 (coal).
@@ -0,0 +1,15 @@
package tconstruct.plugins.minefactoryreloaded;
import powercrystals.minefactoryreloaded.api.FactoryRegistry;
import tconstruct.common.TContent;
import tconstruct.plugins.minefactoryreloaded.harvestables.HarvestableOreBerry;
public class mfrRegistering
{
public static void registerWithMFR ()
{
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerry.blockID, TContent.oreBerries.itemID, 0));
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerrySecond.blockID, TContent.oreBerries.itemID, 4));
}
}
@@ -27,7 +27,7 @@ public class CastingChannelDataProvider implements IWailaDataProvider {
CastingChannelLogic te = (CastingChannelLogic)accessor.getTileEntity();
if (te.liquid != null && te.liquid.amount > 0) {
FluidStack fs = te.liquid;
currenttip.add("Liquid: " + Waila.fluidNameHelper(fs));
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
currenttip.add("Amount: " + fs.amount + "/" + te.getCapacity());
} else {
currenttip.add("§oEmpty"); // "§o" == Italics
@@ -27,7 +27,7 @@ public class SearedTankDataProvider implements IWailaDataProvider {
LavaTankLogic te = (LavaTankLogic)accessor.getTileEntity();
if (te.containsFluid()) {
FluidStack fs = te.tank.getFluid();
currenttip.add("Liquid: " + Waila.fluidNameHelper(fs));
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
currenttip.add("Amount: " + fs.amount + "/" + te.tank.getCapacity());
} else {
currenttip.add("§oEmpty"); // "§o" == Italics
@@ -32,7 +32,7 @@ public class SmelteryDataProvider implements IWailaDataProvider {
} else {
for (int i = 0; i < fls.size(); i++) {
FluidStack st = fls.get(i);
currenttip.add(Waila.fluidNameHelper(st) + " (" + st.amount + "mB)");
currenttip.add(WailaRegistrar.fluidNameHelper(st) + " (" + st.amount + "mB)");
}
}
} else {
+4 -25
View File
@@ -7,13 +7,7 @@ import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.network.NetworkMod;
import mcp.mobius.waila.api.IWailaRegistrar;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import tconstruct.blocks.LavaTankBlock;
import tconstruct.blocks.SmelteryBlock;
import tconstruct.blocks.logic.CastingChannelLogic;
import java.util.logging.Logger;
@@ -33,27 +27,12 @@ public class Waila {
return;
} try {
logger.info("Waila detected. Registering TConstruct tank blocks with Waila registry.");
FMLInterModComms.sendMessage("Waila", "register", "tconstruct.plugins.waila.Waila.wailaCallback");
FMLInterModComms.sendMessage("Waila", "register", "tconstruct.plugins.waila.WailaRegistrar.wailaCallback");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void wailaCallback(IWailaRegistrar registrar) {
logger.info("Got registrar: " + registrar);
// Tanks
registrar.registerBodyProvider(new SearedTankDataProvider(), LavaTankBlock.class);
registrar.registerBodyProvider(new CastingChannelDataProvider(), CastingChannelLogic.class);
//registrar.registerBodyProvider(new EssenceExtractorDataProvider(), EssenceExtractor.class);
// Smeltery
registrar.registerBodyProvider(new SmelteryDataProvider(), SmelteryBlock.class);
}
public static String fluidNameHelper(FluidStack f) {
return StatCollector.translateToLocal(FluidRegistry.getFluidName(f));
}
}
@@ -0,0 +1,29 @@
package tconstruct.plugins.waila;
import mcp.mobius.waila.api.IWailaRegistrar;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import tconstruct.blocks.LavaTankBlock;
import tconstruct.blocks.SmelteryBlock;
import tconstruct.blocks.logic.CastingChannelLogic;
public class WailaRegistrar
{
public static void wailaCallback(IWailaRegistrar registrar) {
Waila.logger.info("Got registrar: " + registrar);
// Tanks
registrar.registerBodyProvider(new SearedTankDataProvider(), LavaTankBlock.class);
registrar.registerBodyProvider(new CastingChannelDataProvider(), CastingChannelLogic.class);
//registrar.registerBodyProvider(new EssenceExtractorDataProvider(), EssenceExtractor.class);
// Smeltery
registrar.registerBodyProvider(new SmelteryDataProvider(), SmelteryBlock.class);
}
public static String fluidNameHelper(FluidStack f) {
return StatCollector.translateToLocal(FluidRegistry.getFluidName(f));
}
}
@@ -25,7 +25,7 @@ public class ASMInterfaceRepair implements IClassTransformer {
@Override
public byte[] transform(String name, String transformedName, byte[] bytes)
{
if ( name.startsWith( "tconstruct." ) && ! name.startsWith( "tconstruct.preloader." ))// && !isBlacklisted(name) )
if ( name.startsWith( "tconstruct." ) && !isBlacklisted(name) )
{
ClassReader cr = new ClassReader(bytes);
ClassNode cn = new ClassNode();
@@ -59,10 +59,11 @@ public class ASMInterfaceRepair implements IClassTransformer {
}
// Used in transform() above.
/*private boolean isBlacklisted( String path )
private boolean isBlacklisted( String path )
{
return path.startsWith( "tconstruct.plugins.minefactoryreloaded." );
}*/
return path.startsWith( "tconstruct.plugins." )
|| path.startsWith("tconstruct.preloader.");
}
private boolean isClassAvailable( String inf )
{
@@ -383,6 +383,7 @@ public class PHConstruct
Configuration gtConfig = new Configuration(gtDyn);
gtConfig.load();
gregtech = gtConfig.get("smelting", "tile.anvil.slightlyDamaged", false).getBoolean(false);
TConstruct.logger.severe("Gelatinous iceberg dead ahead! Entering Greggy waters! Abandon hope all ye who enter here! (No, seriously, we don't support GT. Don't report any issues. Thanks.)");
}
}