Everything posted by Mazetar
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Yeah that's kinda how I started with C++ a few years back, until I found some more structured courses! Heres the link: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111 After finishing it you can find two others, the CS106B deals with Sorting Alogaritms and that's quite useful to learn! After that you could take a look into CS107 which is more advance and will give you some insight into how programming languages work and how they are converted into assembly etc. I really do recommend watching CS106A before you mod any more, because after it you will probably be a lot faster at modding since you can solve most problems on you're own and in just a few minutes compared to being frustrated and blind searching for hours
-
[Solved!] Problems with mod (Ore Generation, error at startup)
It's no wonder eclispe can't find it, I can't either! Using CTRL+SHIFT+T opens up the type search window There's no such class. I guess it's meant to be self made or something? check the tutorial you got it from
-
[Solved!] Problems with mod (Ore Generation, error at startup)
That's just the fact that it has no idea what and where EventManager is. You need to import it from someplace, there's probably a quickfix to import it I got something better than tutorials, I got a whole university course in java (Beginner level, no worries even tough it IS a proffesional university course it's made for non-programmers to get started with programming!) It contains EVERYTHING the actual students recieved with regards to handouts and assignments. All is video recorded and the proffessor is a fun guy They also give you their own eclipse version so you can do the first assignment in their special language thingy! Does it sound interesting? I did know the java basics but I still found them worthwhile to watch.
-
[Solved!] Problems with mod (Ore Generation, error at startup)
No it doesn't and I'm sorry if it sounds rude but it sounds like you need a simple course in java basics? The constructor cannot (not can any other method) contain method declerations. That's the reason for the error, Eclipse thinks you are stating a variable named preInit since it knows you can't declear a method inside another method, therefore it expects a ";" and throws an error when it sees a "(" instead
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Exactly! and that's the problem!
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Line 220: public hbhbtm() { where is the matching } to end this constructor?
-
Get the nearest hostile mob
I guess you could look at the worldObj's loadedEntityList and search trough their positions to see if they are within the area and then do whatever you want with them? There may be better ways of course, but I guess that's ONE way to do it
-
[Solved!] Problems with mod (Ore Generation, error at startup)
Found it I think! Took me a while but check you're constructor. I think all the pre-init methods are inside the constructor's }!
-
Problem using GUI's drawRect during RenderGameOverlayEvent
I'm trying to render some information on a bar at the top of the screen. At the moment I'm just trying to get a single color rectangle to be rendered and make it scale nicely into the position I want it before I start adding text and icons to it. So during a RenderGameOverlayEvent I do the following: if (event.isCancelable() || event.type != ElementType.EXPERIENCE) { return; drawRect(10, 10, 100, 100, 0x383838); I have checked that the drawRect line is being run, but nothing happens on the screen. Which means no effect what so ever. What reason could this be? I did use drawTexturedModalRect() method in my other mod and it worked perfectly while being called from the same kind of position.
-
teleporting players between dimensions and to new location with command
set a breakpoint at the player.dimension = pi.scannerDim; Line and see that it executes correctly, then after the player.setPositionAndRotation() is done, check what cordinates the player really is at, did it the player object's coords change? also I haven't used Player information before, but "pi.getScannerPosX()" is this the X pos you want him to end up at or the location he currently is at? Just wondering since I have no idea what it is
-
[Solved!] Problems with mod (Ore Generation, error at startup)
that bunch of errors makes me think of a wrongly placed { } or ; something along those lines. if you show someone the whole class then it would be possible to detect the error. edit: maybe larsgerrits spotted the error for you already
-
[Unsolved] After receiving redstone signal, wait for a couple second [1.6.2]
int TICKS_NEEDED = 60; int currentTick = 0; at every update tick do: currentTick++; if currentTick >= TICKS_NEEDED thatBooleanValue = true;
-
furnace inputs from hoppers
Since you have a choice well then it's you're choice?
-
[Solved]Entity collides with riding player.
And the reason he could say this is because he guessed you're code being the way it is, since you didn't show you're problem code
-
[Unsolved] After receiving redstone signal, wait for a couple second [1.6.2]
Well what do you currently have? If you have everything except the wait in place then this is all you need to know: Make the TileEntity keep track of if it's powered or not and a boolean to keep track of it's been powered for more than 3 seconds. Then when the block gets powered by redstone, make it's TE's variable change to true. Have a counter count the ticks from it got powered and when it reaches the value you want (i.e. 3 secs = 60 ticks) then change the other boolean to true. If the redstone power gets removed then set both to false again and reset the timer. Inn the TileEntitySpecialRenderer check the boolean value, simple as that I'd guess?
-
[1.6.1]Mod updating problems
Just wondering, you're API isn't it more of a file with utility methods?
-
newb in July- learn 1.62 or 1.5x ?
There's not really any "learning 1.5 or 1.6" if you know you're java then it's just learning the changes to the API which aren't that many after one update. So if you know you're java then it doesn't matter to be honest. If you don't know OOP well then it's time to learn. If that's the case I'd recommend using the first two days on this: http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111 Complete java course with all assignments and exercises used during the CS106A class at stanford. All available for free! You also get their own version of eclipse so you can follow along the whole thing! After you are done with that you can proceed into CS106B and CS107 to get some better understanding of sorting alogarithms and low-level programming Anyways if you do have a SOLID foundation with OOP then go 1.6 as it's the newest and follow from there, you can use 1.3.X+ tutorials and most should work except for textures and liquids, whatever ain't working shouldn't be a problem fixing with you're understanding and a quick look up on the net
-
Does the case of the ID matter? [solved]
I had no idea, so I googled "pack.mcmeta" for you. This was the result: http://www.minecraftwiki.net/wiki/Resource_pack#pack.mcmeta
-
How to get a block from world coordinates?
Well for chests it's no problem to get the IDs, nor to convert them. The problem would be if one wanted to support custom mods yeah I see that one.. But for one's own mod and vanilla it's totally doable. Come to think of it, isn't MC edit supporting custom mods with inventories and such? if so you could look into how it's done there
-
How to get a block from world coordinates?
Endershadow: that's somewhat what it is, but it's a bit more complex than that. but the end result is what you wrote, more or less. If you want to see how it all works take a look into how WorldObj.GetBlockID and .SetBlockID works. Their implementation should tell you how the system works It's quite interesting Rex Dark: Also remember that you have blocks which have TileEntities, you will also need to bring the data from those along as well. A solution could be to export all the block data, metadata and tileEntity saved data per location, then have a place where all the IDs are stored and how they relate to the block names. Then you can write a small java software which can convert the IDs, so that if you want to import a structure and the IDs are different it will convert the IDs for you, to the values you are using?
-
Does the case of the ID matter? [solved]
modid should always have been lowercase. But now it's being enforced when you export the mod for release in a .zip file as that req. it to be lowercase Also all folder and filenames should be lowercase, this is also quite standard and not a bug per say. This sentence didn't make sense to me. You could set item textures before with it's own method. You should set an UnlocalizedName, because that's the non-translated name for you're block. It's the blocks unique name and will probably be the way to find you're block with Code when you don't know the block ID. But you should then havehout using the setUnlocalizedName way.
-
When Mod Done Textures Not Working When In A ZIP
my mod id is lower cased with no spaces between tho my package and classes have capital letters in their names. and i cant change the names of the package or and classes in eclipse Yes you can, Ctrl+shift+R I think it is, but you can find it out under the right-click menu under Refactoring Also check this for packages: http://stackoverflow.com/questions/1355818/renaming-packages-in-eclipse
-
[Solved]Packets...
uhm, what weird thing is it you don't understand? If I recall correctly he is generating random numbers on the server side, then sending them to the client with a packet to display it on screen for the client? In other words, it just shows how to transfer an int from server -> client. It also states that you can send strings, floats etc. as well using the same procedure. So what is it you are struggling with?
-
[1.6.2] Custom Sound (SOLVED)
There are other PlaySound(..something..) check them out. Some of them work for what ya need. gogo check it out
-
[Unsolved] Custom block model invisible and black/purple square when hold[1.6.2]
Sorry we seem to be unable to mind read you're code at the moment, so it's hard to tell what you did wrong
IPS spam blocked by CleanTalk.