06/03/2015

This commit is contained in:
brandon3055 committed 2015-03-06 10:55:46 +11:00
1 parent 95cd8f1bae
commit 92b04e6a2b
10 files changed
+117 -14

No files matched your search

+7 -3
View File
@@ -1,4 +1,9 @@
######## 1.0.1-Snapshot(?) ########
######## 1.0.1-Snapshot(6) ########
-fixed teleporting mobs with a dislocator on a server crashing the client.
######## 1.0.1-Snapshot(5) ########
-fixed tesseracts not accepting energy from pylons.
-updated RF API.
-fixed energy pylons not remembering which core they are connected to.
@@ -23,8 +28,7 @@
-added Crystal Wrench [WIP]
-added version checker.
-fixed fake air blocks messing with energy core.
######## 1.0.1-Snapshot(3) ########
-fixed spawner display mob shaking when disabled.
+1 -1
View File
@@ -26,7 +26,7 @@ repositories {
apply plugin: 'forge'
version = "1.7.10-v1.0.1-snapshot_5" //Version System A.B.CD A=Minecraft version (increments with each new minecraft version) B=Major mod change (Will break saves) C=Release Number (Increments with each public release) D=Bugfix version (a-z)
version = "1.7.10-v1.0.1-snapshot_6" //Version System A.B.CD A=Minecraft version (increments with each new minecraft version) B=Major mod change (Will break saves) C=Release Number (Increments with each public release) D=Bugfix version (a-z)
group= "com.brandon3055.draconicevolution" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Draconic-Evolution"
@@ -2,11 +2,13 @@ package com.brandon3055.draconicevolution;
import com.brandon3055.draconicevolution.client.creativetab.DETab;
import com.brandon3055.draconicevolution.common.CommonProxy;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import com.brandon3055.draconicevolution.common.lib.OreDoublingRegistry;
import com.brandon3055.draconicevolution.common.lib.References;
import com.brandon3055.draconicevolution.common.utills.LogHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
@@ -72,4 +74,17 @@ public class DraconicEvolution { // TODO Update Licence and add change log to gi
proxy.postInit(event);
}
//FMLInterModComms.sendMessage("DraconicEvolution", "addChestRecipe:item.coal", new ItemStack(Items.diamond, 2));
@Mod.EventHandler
public void processMessage(FMLInterModComms.IMCEvent event) {
for (FMLInterModComms.IMCMessage m : event.getMessages()) {
LogHelper.info(m.key);
if (m.isItemStackMessage() && m.key.contains("addChestRecipe:")) {
String s = m.key.substring(m.key.indexOf("addChestRecipe:") + 15);
OreDoublingRegistry.resultOverrides.put(s, m.getItemStackValue());
LogHelper.info("Added Chest recipe override: " + s + " to " + m.getItemStackValue());
}
}
}
}
@@ -4,6 +4,7 @@ import cofh.api.energy.IEnergyContainerItem;
import com.brandon3055.draconicevolution.common.blocks.DraconiumChest;
import com.brandon3055.draconicevolution.common.inventory.InventoryCraftingChest;
import com.brandon3055.draconicevolution.common.inventory.InventoryCraftingChestResult;
import com.brandon3055.draconicevolution.common.lib.OreDoublingRegistry;
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -31,6 +32,7 @@ public class ContainerDraconiumChest extends Container {
/**how much energy is stored in the tile*/
private int lastEnergyStored;
private int lastBurnSpeed;
private int lastTickFeedMode;
public ContainerDraconiumChest(InventoryPlayer invPlayer, TileDraconiumChest tile) {
this.tile = tile;
@@ -190,8 +192,13 @@ public class ContainerDraconiumChest extends Container {
{
icrafting.sendProgressBarUpdate(this, 2, tile.smeltingBurnSpeed);
}
if (lastTickFeedMode != tile.smeltingAutoFeed)
{
icrafting.sendProgressBarUpdate(this, 3, tile.smeltingAutoFeed);
}
}
lastTickFeedMode = tile.smeltingAutoFeed;
lastBurnSpeed = tile.smeltingBurnSpeed;
lastProgressTime = tile.smeltingProgressTime;
lastEnergyStored = tile.getEnergyStored(ForgeDirection.DOWN);
@@ -203,6 +210,7 @@ public class ContainerDraconiumChest extends Container {
if (id == 0) tile.smeltingProgressTime = value;
else if (id == 1) tile.energy.setEnergyStored(value*32);
else if (id == 2) tile.smeltingBurnSpeed = value;
else if (id == 3) tile.smeltingAutoFeed = value;
}
public TileDraconiumChest getTile(){return tile;}
@@ -215,7 +223,7 @@ public class ContainerDraconiumChest extends Container {
@Override
public boolean isItemValid(ItemStack stack) {
return FurnaceRecipes.smelting().getSmeltingResult(stack) != null;
return FurnaceRecipes.smelting().getSmeltingResult(stack) != null || OreDoublingRegistry.getOreResult(stack) != null;
}
}
@@ -10,6 +10,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraft.world.World;
import java.util.List;
@@ -74,6 +75,19 @@ public class Tclogo extends ItemDE {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if (world.isRemote)
{
String str = "A String";
IChatComponent localIChatComponent;
localIChatComponent = IChatComponent.Serializer.func_150699_a("[{\"text\":\"" + str + "\",\"color\":\"aqua\"}," + "{\"text\":\" " + EnumChatFormatting.WHITE + "[" + EnumChatFormatting.GREEN +
"info.cofh.updater.download" + EnumChatFormatting.WHITE + "]\"," + "\"color\":\"green\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":" + "{\"text\":\"" +
"info.cofh.updater.tooltip" + ".\",\"color\":\"yellow\"}}," + "\"clickEvent\":{\"action\":\"open_url\",\"value\":\"" + "www.google.com" + "\"}}]");
//player.addChatMessage(localIChatComponent);
}
if (!player.isSneaking())
@@ -19,6 +19,7 @@ import java.util.Map;
public class OreDoublingRegistry {
private static Map<String, ItemStack> oreResults = new HashMap<String, ItemStack>();
private static String[] names = {"oreGold", "oreIron", "oreAluminum", "oreCopper", "oreLead", "oreSilver", "oreTin", "oreUranium", "orePlatinum", "oreNickel", "oreMithril", "oreCobalt", "oreArdite"};
public static Map<String, ItemStack> resultOverrides = new HashMap<String, ItemStack>();
public static void init(){
@@ -34,7 +35,10 @@ public class OreDoublingRegistry {
}
public static ItemStack getOreResult(ItemStack stack){
public static ItemStack getOreResult(ItemStack stack)
{
if (resultOverrides.containsKey(stack.getItem().getUnlocalizedName(stack))) return resultOverrides.get(stack.getItem().getUnlocalizedName(stack)).copy();
if (stack.getItem() instanceof DraconiumBlend) return new ItemStack(ModItems.draconiumIngot, 4);
else if (stack.getItem() == Item.getItemFromBlock(Blocks.cobblestone)) return new ItemStack(Blocks.stone, 2);
else if (stack.getItem() == Item.getItemFromBlock(Blocks.sand)) return new ItemStack(Blocks.glass, 2);
@@ -45,12 +49,14 @@ public class OreDoublingRegistry {
String name;
ItemStack resultStack = null;
if (ids.length > 0){
if (ids.length > 0)
{
name = OreDictionary.getOreName(ids[0]);
resultStack = oreResults.get(name);
}
if (resultStack != null) {
if (resultStack != null)
{
ItemStack doubledStack = resultStack.copy();
doubledStack.stackSize = FurnaceRecipes.smelting().getSmeltingResult(stack).stackSize * 2;
return doubledStack;
@@ -6,7 +6,7 @@ package com.brandon3055.draconicevolution.common.lib;
public class VersionHandler
{
public static final String VERSION = "1.0.1";
public static final int SNAPSHOT = 5;
public static final int SNAPSHOT = 6;
public static final String MCVERSION = "1.7.10";
public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT: "");
@@ -59,7 +59,6 @@ public class TileDraconiumChest extends TileEntity implements IInventory, IEnerg
@Override
public void updateEntity() {
super.updateEntity();
// Resynchronize clients with the server state
if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + this.xCoord + this.yCoord + this.zCoord) % 200 == 0) {
this.numUsingPlayers = 0;
@@ -223,7 +222,7 @@ public class TileDraconiumChest extends TileEntity implements IInventory, IEnerg
{
if (candidate == null) break;
boolean candidateSmeltable = FurnaceRecipes.smelting().getSmeltingResult(candidate) != null;
boolean candidateSmeltable = getResult(candidate) != null;
if (candidateSmeltable) {
setInventorySlotContents(234 + j, candidate.copy());
setInventorySlotContents(i, null);
@@ -258,7 +257,7 @@ public class TileDraconiumChest extends TileEntity implements IInventory, IEnerg
private boolean getAll() {return smeltingAutoFeed == 3;}
private boolean isSmeltable(ItemStack stack) {
return FurnaceRecipes.smelting().getSmeltingResult(stack) != null;
return FurnaceRecipes.smelting().getSmeltingResult(stack) != null || OreDoublingRegistry.getOreResult(stack) != null;
}
private ItemStack getResult(ItemStack stack) {
@@ -268,7 +267,6 @@ public class TileDraconiumChest extends TileEntity implements IInventory, IEnerg
public void setAutoFeed(int i){
smeltingAutoFeed = i;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
@Override
@@ -75,6 +75,7 @@ public class Teleporter
public int getDimension() {return dimension;}
public String getDimensionName() {
if (DraconicEvolution.proxy.getMCServer() == null) return String.valueOf(dimension);
return MinecraftServer.getServer().worldServerForDimension(dimension).provider.getDimensionName();
}
@@ -0,0 +1,57 @@
{
"item.test.name":
{
"images":["www.image1", "www.image2"],
"content":
[
"line 1",
"line 2",
"line 3",
"www.image1",
"line 4",
"www.image2"
]
},
"block.test.name":
{
"images":["www.image1", "www.image2"],
"content":
[
"line 1",
"line 2",
"line 3",
"www.image1",
"line 4",
"www.image2"
]
},
"info.Ritual of Draconic Awakening":
{
"images":["www.image1", "www.image2"],
"content":
[
"line 1",
"line 2",
"line 3",
"www.image1",
"line 4",
"www.image2"
]
},
"unlocalized name":
{
"images":["www.image1", "www.image2", "images that will be used on the page"],
"content":
[
"line 1",
"line 2",
"line 3",
"www.image1",
"line 4",
"www.image2"
]
}
}