
Mew
Members-
Posts
567 -
Joined
-
Last visited
Everything posted by Mew
-
Do you not like github or something??
-
No, that is a very good worry. I just realized that now any way. So basically, when the block is created, you would go through all the blocks within range to see if there is more network blocks and add them to that list. Then, using some sort of update event, I can't think of what it would be at the moment, you would check that range again and replace the list with the new blocks etc. (that includes removing the blocks that have been removed.) Then when the block is destroyed you could call a universal method on all the blocks in the network making them do a forced check of their ranges and create the new networks from there. It is not very detailed, but it should do if you know what you are doing! (More coming later)
-
I am not sure how good of an idea this is... But here it is anyway ( NOTE I am not thinking 100% atm, so this will probably be pretty patchy ) You could create a list/hashmap that contains the block, and its location in the world. Then, when the block is removed Actually, you could just make a TileEntity for the block (if you haven't already) that contains information about the network that the block is connected to, what blocks are in that network, the range of the network etc. Then when the Block is destroyed, cycle through the locations of the blocks in the network the original is in, and if the are outside the range of the network, split the network into two networks. The hardest part would be checking what blocks are within range of each other so you know how many networks to split into... call a method that would check block locations to range and such so as to decide how many new ''networks" to create. (NOTE2 : I am finishing here for now, I will be posting with a better idea later... This is still part of it though Sorry mate )
-
did you do what gotolink suggested? i.e. fix the instance name? you were using @Instance("The Nether Overhaul") rather than the modid... That would do it...
-
Could I see your code for registering your blocks/items, and the paths for where the textures are kept?
-
Well at least I was on the right track But there you go, I did say I had more to learn And thanks for the Achievement ingiethingie!
-
Haha, nice one ingiethingie! Well I wouldn't say I would be much better on the topic... I have never really played around with Containers too much. Though that is the next thing on my list of GUI stuff to learn (At the moment I am working on draggable GUI's and such. Extremely fun stuff). But from what I do know, there are two differen't slots in the Furnace container. Slot (the generic slot that can hold anything, the slot used for your inventory etc.), and SlotFurnace (Which is the slot to the side, the one that cannot have anything put into it). That is where my idea for the custom Slot comes into play. The SlotFurnace looks like this: Now if we remove all that isn't needed, we get a generic custom slot. This looks like so: But that can still hold anything in it. So we have to change isItemValid(). This should now look like so: /** * Check if the stack is a valid item for this slot. Always true beside for the armor slots. */ public boolean isItemValid(ItemStack par1ItemStack) { if (par1ItemStack.itemID == Item.appleRed.itemID) return true; return false; } So the whole the file should now look like this:
-
Not quite. You will most likely have to create a new slot that ONLY takes in the ore you wanted. Anything else can't be put into it to be smelted etc. Have fun with it!
-
How to reflect on a class before the class loader loads it?
Mew replied to ILuvYouCompanionCube's topic in Modder Support
I know when I followed that tutorial it worked. Oh well. Now I need help too -
Good on you for that stroke of inspiration! That gets OP one step closer to his goal I am assuming
-
*facepalms* I really wish I had thought of that Thought technically speaking my thought process wasn't going along the lines of actually checking the walking distance, more on if there was an event for it...
-
How to reflect on a class before the class loader loads it?
Mew replied to ILuvYouCompanionCube's topic in Modder Support
yeah, the tutorial is pretty outdated. But yes, it is just a new package type thing in your mod src area -
Not that I know of... Sorry.
-
How to reflect on a class before the class loader loads it?
Mew replied to ILuvYouCompanionCube's topic in Modder Support
Not that simple? It made a lot of sense to me... Oh well, just the way things work. I hope it solves your problem though. -
You would subscribe to the event you want, (assuming your talking forge events if not, ill cover that too) then create a random and do the random check thing. Have a "timer" that starts at whatever the random number is, and when it reaches 0, execute the code you want and then make the timer variable equal the next random number etc. For something other than a forge event, it is pretty much the same thing. You just have to change the way it is executed. Say it gets executed via the right click of a sword, you would just execute the timer thing there. Wait, sorry. If you are actually wanting the event to happen every random amount of time, you will want the forge event LivingUpdateEvent. If the event is to do with a player, do a check to see if it is the Player updating etc. If you need a better explanation, just ask.
-
How to reflect on a class before the class loader loads it?
Mew replied to ILuvYouCompanionCube's topic in Modder Support
I am thinking ASM (coremod) would serve you very well here. There is a good tutorial about changing things from public to private etc. on the wiki... Here it is: http://www.minecraftforge.net/wiki/Using_Access_Transformers I am pretty sure it explains how to change something from being final to non-final and vice-versa. Have fun If it's not want your wanting though... -
Crashing upon an if statement. I don't know why.
Mew replied to DrEinsteinium's topic in Modder Support
Why don't you do a null check before hand? That would fix that. if ((WikiLinkableHandler.localizationList.get(x)).toString() != null) // or was it? if (!(WikiLinkableHandler.localizationList.get(x)).toString().equals(null)) Aside from that... I don't know. What does the sysout print to the console?? -
thats because you would have to type: /gold StringOfSubCommand1
-
I will try to fix it...
-
Once again, I updated it
-
change it to just an int. That should fix it... If it doesn't I will try to see what is wrong.
-
Well... I updated that tutorial. I had another way, but then Lex said that was the way to do it. If I may ask, is there any erring? And if so, what is the error??
-
Whats the code now then?
-
Oh right... HAHA! That was my fault partially. Ill redo that for ya public class GoldCommand implements ICommand{ @Override public int compareTo(Object arg0) { return 0; } @Override public String getCommandName() { return "gold"; } @Override public String getCommandUsage(ICommandSender icommandsender) { return "/gold <set|get|mod> player amount"; } @Override public List getCommandAliases() { List l = new ArrayList<String>(); l.add("gold"); return l; } @Override public void processCommand(ICommandSender icommandsender, String[] astring) { if (astring[0].equals("StringOfSubCommand1")) { // execute the code you want to do } else if (astring[0].equals("StringOfSubcommand2")) { // execute code for second sub command } // etc. } @Override public boolean canCommandSenderUseCommand(ICommandSender icommandsender) { return true; } @Override public List addTabCompletionOptions(ICommandSender icommandsender, String[] astring) { return null; } @Override public boolean isUsernameIndex(String[] astring, int i) { return false; } }
-
That is code for 1.5.2... From what I know not much really changed What is it the is not working??? Can you show me code and then point out what is not working correctly?