-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
[SOLVED] [1.7.2] Rendering bow in 3rd person
SanAndreaP replied to JimiIT92's topic in Modder Support
There is the FOVUpdateEvent you can use. For how vanilla does it, look at the getFOVMultiplier method within the EntityPlayerSP class (dunno if it's still named like that in 1.7.x or if it's a func_xxxx name) For an example, look at this: https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/client/event/FOVManipulator.java Note that this zooms in more than the regular bow, so if you don't want that, follow the vanilla values (20.0F instead of 10.0F, 0.15F instead of 0.3F). -
[SOLVED] [1.7.2] Rendering bow in 3rd person
SanAndreaP replied to JimiIT92's topic in Modder Support
This is a better approach to the original bow rendering (since isFull3D wasn't quite right) https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/client/render/ItemRendererNiobBow.java -
MinecraftServer.getServer() returns null! [Help]
SanAndreaP replied to Nimolo's topic in Modder Support
You need to send packets. -
multiple textures/Recipe with metadata
SanAndreaP replied to majesticmadman98's topic in Modder Support
Can you show your main class (where you initialize / register your block)? -
Also if all else fails, you really need to edit base classes and you know what you're doing, use a coremod and utilize ASM.
-
multiple textures/Recipe with metadata
SanAndreaP replied to majesticmadman98's topic in Modder Support
Also in 1.7.x aren't they called IIcon and IIconRegister? You even imported the right classes, just missed the I in front of the names in your methods. -
It is, but the OP got the wrong method signature! @OP: the two EntityLiving parameters should be EntityLivingBase parameters. hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) And as coolboy4531 suggested, always add @Override above methods you intend to override to avoid errors.
-
Like this: https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/sanandreasp/core/manpack/helpers/client/RenderBlockGlowOverlay.java#L106-L126 Basically I render the block (which is not glowing), set the brightness to 240 (max brightness), then rendered the glowing texture and last but not least reset the brightness. In your case it's vice versa (set brightness, render glowy texture, reset brightness, render standard block)
-
Your mod class? An example block class?
-
[1.7.2] armor material in configuration file
SanAndreaP replied to thomassu's topic in Modder Support
You should learn Java before you start modding... Just because you put that now at the bottom doesn't mean it gets called after all methods in the class. Aside: static initializers actually do get called in the order they appear in the code, according to Java docs: "The runtime system guarantees that static initialization blocks are called in the order that they appear in the source code." While that refers specifically to static blocks, it's true for all static initializations. More info. Indeed, you could look at all static initialization stuff in your class as a huge classload-initialization method. -
You actually know what glPushMatrix does? It surely doesn't "init OpenGL". Yes I know it doesn't actually "init" openGL, it saves current matrix right? I just thought it's easier to understand that way... It pushes the current matrix up the stack. It should always be paired with glPopMatrix, which takes the topmost matrix away and the matrix below becomes the topmost one. Example: glTranslatef(...); // translates the current matrix (#1) glPushMatrix(); // pushes current matrix up, previous translation still in effect glTranslatef(...); // translates the current matrix (#2) renderStuff(); // renders stuff with translation #1 and #2 glPopMatrix(); // pops the current matrix, translation #2 is not in effect anymore, #1 still is renderMoreStuff(); // renders stuff with translation #1 http://www.opengl.org/sdk/docs/man2/xhtml/glPushMatrix.xml
-
[1.7.2] armor material in configuration file
SanAndreaP replied to thomassu's topic in Modder Support
You should learn Java before you start modding... Just because you put that now at the bottom doesn't mean it gets called after all methods in the class. -
updateTick only gets called if you use true as parameter in setTickRandomly.
-
Errors With Running Minecraft on eclipse IDE For java EE
SanAndreaP replied to chess46's topic in Modder Support
[15:39:48] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! You can ignore this error. For the rest, follow Robosphinx' suggestion And no, you don't need Java EE, The only thing you need is the JDK and JRE, and your preferred IDE (you could also use Notepad, but meh) -
IMO, creating a (ticking) EntityItem just to render some item seems like a waste of resources.
-
If you want to look at some example code, here's how I've done it: https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/client/render/RenderTileEntityWeatherAltar.java#L29-L54
-
Adding enchantments to an item when crafted [SOLVED]
SanAndreaP replied to KaikonX's topic in Modder Support
Only if you want to let the user enchant the item further upon your added effect (on the enchantment table of course). If you don't want that, or you want the user to be able to "disenchant" your item (possible by repairing the item on the workbench rather than on the anvil), use The_SlayerMC's suggestion. -
It clearly states that you're missing a mod (hence the name "MissingModsException"). In order to see which one, we need the full log.
-
[1.7.2]How can i check if a player kills a mob
SanAndreaP replied to megabitus's topic in Modder Support
use the LivingDeathEvent. use event.source.getEntity() and check if it's an instance of EntityPlayer. -
[SOLVED] Read all contents of an assets: directory?
SanAndreaP replied to Veovis Muaddib's topic in Modder Support
Here is where I've got the code from: http://stackoverflow.com/questions/13848333/accessing-files-in-specific-folder-in-classpath-using-java And as I said, it seems to work, at least for me. EDIT: If you want to know if a path is a file or a directory, convert the path into an URL, which then is converted into a File (for some reason if I suppy the path string directly, it always thinks it's a file): File file = new File(this.getClass().getClassLoader().getResource("assets/enderstuffp/" + name).toURI()); System.out.println(file.isDirectory()); -
[SOLVED] Read all contents of an assets: directory?
SanAndreaP replied to Veovis Muaddib's topic in Modder Support
I tried it and it seems to work, even if I compile it and load it up as a jar. -
[1.7.2]How to setup a mod dependency correctly
SanAndreaP replied to Russoul's topic in Modder Support
have a read -
[SOLVED] Read all contents of an assets: directory?
SanAndreaP replied to Veovis Muaddib's topic in Modder Support
You actually can list files from your classpath using the code below: InputStream stream = this.getClass().getClassLoader().getResourceAsStream("assets/enderstuffp"); BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while( reader.ready() ) { System.out.println(reader.readLine()); } } catch( IOException e ) { e.printStackTrace(); } where this represents your mod class and "assets/enderstuffp" is your assets folder It prints a list into your console of all files and folders within the assets folder. Please note that it doesn't do a "deep-search", so you need to write your own method for that if you desire to do a deep search.