Everything posted by hydroflame
-
about Item.func_111206_d(String s)
i dont know who wrote it, but mine is right : http://www.minecraftforge.net/wiki/Hydroflame_guide_to_textures
-
about Item.func_111206_d(String s)
care to point out which tutorial ? mine or someone else ?
-
RenderPlayerEvent returning NullPointerException when method called.
that mean myclass.instance() return null
-
Using API's?
not really offtopic, actually quite on topic as thats what op is trying to do. today i learned
-
[UNRESOLVED] Custom camera - Getting block mouse is over
yes it will work, its true that raytraycing is more popular when used with reflection/refraction/shadow/lighting but thats in the context of graphic rendering. in game programming ray traycing is used a lot to see if the trajectory of 2 object will interact (in your case blocks and your vision)
-
Using API's?
no you got it right in my case i want to have access to the Timer reference in Minecraft (for rendering). so i only need to copy the reference once since it will be the exact same timer during your whole session. but in the case of redstone theres redstone all over the world so you dont want to have reference to everything. what you would do is use reflection every time you need to access it but that slow btw when we say slow we mean "slower then strong reference" in some case reflection will be "slow" but still fast enough so that your fps wont drop
-
Using API's?
well example in one of my mod i need to read value from a private field in some class, using reflection i am able to get a reference to that object, save it elsewhere and read the value i need from that reference. so i technicly use reflection only 1 time, to get the reference and after i dont need it. basicly its slow while im getting the reference for the first time and after that everythign is smooth. on the other side sometimes youll need to constantly use reflection so that not super efficient
-
Block texture not updating based on TileEntity variable
it it being called from server side, i can safely confirm it does (similar feature)
-
Using API's?
your choice really, if you use strong reference it will generally be faster. but you if the mod is not installed then it wont work (like gotolink said) if you need to reflect all the time (like every milisecond) then reflection might not be such a good idea but if its only for setup then reflection is awesome!
-
Hooking chat commands client-side on multiplayer
you must be kidding me... yes ok it works well on linux because you have auto complete and drawing all the icons take a butload of time, but for a game ?!?! sign-shop is the worst system in the world and really ? efficient? please tell me how typing "/gold" is faster then opening your eyes:
-
The Datawatcher
yes and no, im my case i need mana to be sent to the players (and i want the amount of mana to affect how players are rendered, so every client must know about the mana stats of every player) so in my case i have to take one of the 22 free id and use one to store the mana level but generally speaking yes people could probably use the datawatcher for their custom mobs without screwing up everything
-
The Datawatcher
well with 1.6 its actually very easy to change between profile, so in the worst case you could specificly tell that you cannot use this on a vanilla server but i think you're right and it's not worth it, there's probably only a very small amount of mods that will need to use those and for now we probably wont be running out of id the minimum that we should do (those who want to use datawatchers) is to get the id from a config file, so that if 2 mods come in conflict the player can always change them
-
[Solved] Setting light value of block based on metadata [1.6.2]
hmm... well... gotolink is rarely wrong so maybe i just read the code wrong but it seems to me like: public static final int[] lightValue = new int[4096]; public Block setLightValue(float par1) { lightValue[this.blockID] = (int)(15.0F * par1); return this; } it will be the same for every block... but considering gotolink post... i would try it just in case
-
The Datawatcher
good point... i did not think of that, do you remember if the Datawatcher class is loaded when you connect to the server or before that ? (in one case you could simply omit to change the class, in the other you would have to launch the game in "normal datawatcher mode")
-
[Solved] Setting light value of block based on metadata [1.6.2]
actually... this seems to be the same for every block in the world using thsi method you could make the block look bright, but not emit light
-
[Solved] Setting light value of block based on metadata [1.6.2]
hmmm, are you usign 162 ? my Block.java only has /** * Sets the amount of light emitted by a block from 0.0f to 1.0f (converts internally to 0-15). Returns the object * for convenience in constructing. */ public Block setLightValue(float par1) { lightValue[this.blockID] = (int)(15.0F * par1); return this; } which obviously will be the same for every block in the world (which you dont want )
-
Checking if a png file exists in a jar
yeah ok, sooo .. whats the problem now ?
-
The Datawatcher
after more research in the issue i have discovered that there is actually a very low amount of values that are actually used result: meaning we actually have more values to play with then we tought we would (average of 22 free id) considering the proper usage of these (like i said earlier, values changing a lot like mana or energy) we probably don't need to expand it further then 31 for now values worth interrest: Entity uses 0, 1 meaning 29 free id EntityLivingBase use 0, 1, 6, 7, 8, 9 meaning every single of your mobs has 25 id free! EntityAnimal uses 12 (as well as every other before) for age. 24 free for your passif mobs EntityPlayer uses 16, 17, 18 as well as EntityLivingBase so you still have 22 free id! (should be enough for our small needs) so considering the free space, its probably not a big deal to expand the watch list size, but for the sake of it i did it anyway all you have to do is remove the check for id>31, change the "writeWatchableObject" method to write [int][byte] (id, type) instead of [byte] (which was 3 bit for type 5 for id) and finally change the "readWatchableObjects" so that it reads [int][byte] instead @Mazetar, the goal was to use the already implemented system to pack all values in 1 packet and prevent overhead caused by sending multiple packet. but it might be possible to simply add more information after the end byte that vanilla puts in the packet and retreive that information later @gotoLink, same as maz
-
Checking if a png file exists in a jar
well you can always use JarEntry or ZipEntry to check the content of a jar
-
[Solved] Setting light value of block based on metadata [1.6.2]
hmmm well redstone simply change the block when you click it :\ which isnt really what you want but it could work anyway /** * The redstone ore glows. */ private void glow(World par1World, int par2, int par3, int par4) { this.sparkle(par1World, par2, par3, par4); if (this.blockID == Block.oreRedstone.blockID) { par1World.setBlock(par2, par3, par4, Block.oreRedstoneGlowing.blockID); } } i looked quickyl through Block.java and there doesnt seem to be anything but maybe im wrong
-
Checking if a png file exists in a jar
isnt it the same thing as a texture pack ?
-
Same block, different textures
Block.java: /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return this.blockIcon; }
-
Custom Enchantment adding effect when attacking an Entity
specific answer: no idea general answer: you could always look at how vanilla code does it highlight "enchantmentTagList", right-click and click "show call hierarchy". this will show you everywhere in code where this method is called, you can just follor til you find what vanilla code does with it
-
Getting kicked
can you post your main mod class please (also, LOL @ the guy saying you should use MCCreator )
-
[Solved]Question About attributes.
well specificly "thePlayer" is a field in Minecraft class .. but obviously theres also a couple of place were you can have reference to EntityPlayer objects
IPS spam blocked by CleanTalk.