
jordan30001
Members-
Posts
157 -
Joined
-
Last visited
Everything posted by jordan30001
-
can you show code please
-
I think this is what you want Configuration cfg = new Configuration(e.getSuggestedConfigurationFile()); cfg.load(); String someInputThingy = cfg.get(Configuration.CATEGORY_GENERAL, "Material List", "Herp, Derp, HerpDerp, DerpHerp").getString(); String[] toStringArray = someInputThingy.split(","); for(int i = 0; i < toStringArray.length; i++) System.out.println(toStringArray[i]);
-
hmm you could do what I do when an object needs to have multiple block ids save the necessary values as a string so for instance "Herp, 3, 900, 15, 3, 15" then just do a string.split(,) then with the split string EnumHelper.addToolMaterial(string[0], string[1], string[2], string[3], string[4], string[5]) obviously you need to convert the strings to int/floats before parsing and if you wanted to load infinite possibilies just do the same but use another delimiter for seperating the tool mats "Herp, 3, 900, 15, 3, 15; Derp, 5, 1463, 3, 15" string.split( then you need to loop over the split string and then string.split(1) and do what i said above is this what you wanted?
-
is this what you mean? public static final EnumToolMaterial herpaDerpMaterials[] = { EnumHelper.addToolMaterial("Herp", 3, 900, 15F, 3, 15), EnumHelper.addToolMaterial("Derp", 3, 9001, 15F, 3, 15) }; this can go in your main class
-
How to change the position of a lightning bolt
jordan30001 replied to SubSide's topic in Modder Support
I am not sure thats possible unless you edit baseclasses but you could when its thundering randomly cause thunder from within your TE to strike a random area around your conductor so that its possible it could hit your conductor -
weird inventory glitches on GUI Container block
jordan30001 replied to jordan30001's topic in Modder Support
Thanks worked perfectly -
Sending packets for itemstacks in tile entities?
jordan30001 replied to Zeretul4's topic in Modder Support
I still think my first answer is correct except you need to detect if its server side or not using update things needed by your gui outside of the if statment below if (!worldObj.isRemote) { //do everything thats serverside here for example when grinding your item it needs to be in here grindItem(); and then onInventoryChanged(); //on serverside this will update slots and send to client } -
Sending packets for itemstacks in tile entities?
jordan30001 replied to Zeretul4's topic in Modder Support
I am not 100% sure but I think you need to call onInventoryChanged(); package zeretul4.geology.grinder; import java.util.HashMap; import zeretul4.geology.Geology; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; public class TileEntityGrinder extends TileEntity implements IInventory { @Override public void updateEntity() { boolean pleaseUpdateMe = false; if (fuelLevel > 0 && canGrind()){ fuelLevel--; grindTime += 2; if (grindTime >= 200){ grindTime = 0; grindItem(); pleaseUpdateMe = true; } } else grindTime = 0; if(pleaseUpdateMe) onInventoryChanged(); } } -
weird inventory glitches on GUI Container block
jordan30001 replied to jordan30001's topic in Modder Support
bump -
Sending packets for itemstacks in tile entities?
jordan30001 replied to Zeretul4's topic in Modder Support
Please show the code of your TileEntity and ContainerBlock please -
so basically what happens whenever I open the blocks GUI all the Slots are shifted to the right and shifted down into wrong places, BUT if I resize minecraft it corrects itself and then if I change it back to its original resolution it still works but then if I exit from the GUI and re open it does the same thing again. If you don't completely understand what I am saying here is a short video of what is happening. http://youtu.be/As06gafplSo Class ContainerBlockFreezer Gui class
-
I just put your exact code into my current workspace and it works and loads fine without crashes what items/blocks are you trying to add to the creative tab?
-
[FORGE] 1.5.1 Crafting With Damaged Items In Recipes
jordan30001 replied to Lord_Rius's topic in Modder Support
the random value is in oreDictionary I think it is OreDictionary.WILDCARD_VALUE -
Item/Block meta/damage data maxinum value
jordan30001 replied to jordan30001's topic in Modder Support
Why use enchantments for uniqueness? why not just use Note: writing this from memory so there probably are errors -
Item/Block meta/damage data maxinum value
jordan30001 replied to jordan30001's topic in Modder Support
*short Touche. Still allows for a maximum value of +/-32,767, which is sufficient for most needs. Though I suspect IC2 hacked things so that their items can use a long int (+/-9,223,372,036,854,775,807, yes, that's 9 pentillion) nice to know but I don't think I am going to use 9 pentillion meta data items -
Does block/item meta data have a maximum value of 15? if it can have more than 15 does it cause any issues? is this just the case that only blocks can have a maximum damage of 15?
-
I know how to read code but my brain doesn't compile java code to check what the error is, need the error log.
-
what is the error?
-
the problem with blocking certain mods is you'd need to block it via its mod name and it takes around 5 seconds to circumvent the block of that mod. for instance if you blocked XrayMod you could just change its name to NotAXrayMod and its no longer blocked you could just block all mods except specified ones but then if people have mods that add certain things like shaders they would not be happy joining the server and removing X mods just because the server owner has blocked all mods except approved ones
-
What is the error?
-
due to the ambiguousness of your question I am just going to give what I think you need/want Note: I am coding this on my phone so just paste it in and ctrl + shift + f if your using eclipse to format it public ArrayList getBlockDropped(World w, int x, int y, int z, int meta, int fortune) { ArrayList list = new ArrayList();int w = par2Random.nextInt(100);int l = par2Random.nextInt(100); if (l < 25) list.add(ashtonsmod.IngotBush.blockID); if (w < 3) list.add(ashtonsmod.Amethyst.itemID); else if (w >= 70 && w <= 79) {list.add(ashtonsmod.LightSteelNugget.itemID); else if (w >= 86 && w <= 90) list.add(Item.ingotGold.itemID); else if (w >= 80 && w <= 84) list.add(Item.goldNugget.itemID); else if (w >= 60 && w <= 59) list.add(Item.ingotIron.itemID); else if (w >= 90 && w <= 95) list.add(Item.emerald.itemID); else if (w >= 4 && w <= 10) list.add(Block.obsidian.blockID); else if (w > 96) list.add(Item.diamond.itemID); else if (w >= 30 && w <= 49) list.add(Item.coal.itemID); return list; }
-
I understood the code I just didn't understand you and yet I still don't fully understand what you want do you a) want to drop one item from l and w b) drop more than one item from l OR drop more than one item from w
-
edit: confused with your question please rephrase your question with your English a little more understandable please.
-
I am sorry but the link I gave you gave you the right answer String someInputThingy = cfg.get(Configuration.CATEGORY_GENERAL, "blockIDList", "1,2,55,74,14,453").getString(); String[] toStringArray = someInputThingy.split(","); int[] blockIds = new int[toStringArray.length]; for(int i = 0; i < toStringArray.length; i++) { try { blockIds[i] = Integer.parseInt(toStringArray[i]); } catch(NumberFormatException numberFormatException) { numberFormatException.printStackTrace(); } }
-
[lmgtfy]Creating configuration files forge[/lmgtfy]