Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DoorCloser

Members
  • Joined

  • Last visited

Everything posted by DoorCloser

  1. You also havent answered on another part of my question. Am i suppose to create ResourceLocation file, and if i suppose, what i have to type in ResourceLocation file?
  2. bindTexture is not working ofcourse. It says that i have to change method bindTexture(String) to bindTexture(ResourceLocation) Also i use 1.5.2 ver
  3. Hey guys. I've met a serious problem for me here. Well, i've created a 3d model of pistol. So its kinda item, but 3d rendered. It works fine, so its 3d rendered, but i dont know how to put textures on it. I tried out that code in my ItemRenderPistol file: Minecraft.getMinecraft().renderEngine.func_110577_a(new ResourceLocation ("testmod", "textures/models/blasterModelTexture.png")); It wants me to create a ResourceLocation class! I can create one, but what i have to type inside of that class, to make my textures appear on my 3D item? Can you help me, i really need this. Please give examples of code of your ResourceLocation if you can.
  4. You have to make it so that setProfession gets called after you set the initial value (which you do in entityInit currently). NVM. I fixed it out. I've just copied all stuff from Villager and removed not needed by "removing" method and everything is now fine! Thanks guys. Here is the files, so you can see the changes: So, how you can see i only needed to set a registry file and add this string to my EntityFile: public void initCreature() { ScientistRegistry.applyRandomTexture(this, worldObj.rand); }
  5. You mean this? RenderingRegistry.registerEntityRenderingHandler(EntityHLPainting.class, new RenderHLPainting()); I tried that out, thats not works. Paintings is not placing. Maybe i did it not correct? P.S: Dont Worry about Client and Common proxy stuff. I'll change it later
  6. You mean this? hlpainting = new ItemHLHangingEntity(1800, EntityHLPainting.class) .setUnlocalizedName("hlpainting"); LanguageRegistry.addName(hlpainting, "Hl Painting"); Im using one mod class file instead of client proxy and common proxy
  7. Thats all my files. Thats all what i have for my paintings: -------------------------------------------------------------------------------------------------------------------------------------------------- My EnumArt My EntityPainting My RenderPainting My ItemHangingENtity I have Renderer here, how you can see. What else i need? I also turned out, that i can put infinite number of pictures on one block, and if i broke it, alot of pictures is dropping. Thats not Rendering problem i think.
  8. Ok, so i did it. And when i place a picture it doesnt show up, but when i break a block with it, it drops a picture. So basiclly that means that im putting those pictures, but they doesnt show up. So its not reading textures or idk something another?
  9. It's the class passed to ItemHangingEntity's constructor. Mojang didn't use reflection to just create a new instance of the class, which is kind of unfortunate. hangingEntityClass cannot be resolved or is not a type. I have to create a field or constant? Also, when i use this as a field to EntityHLPainting, it gives me an error: - Incompatible operand types Class<EntityHLPainting> and Class<EntityItemFrame>. That means i have to create a field to both of them? And just in case, where i have to put that code?
  10. I know what the problem is. ItemHangingEntity doesn't take arbitrary classes. It looks like it does, but it doesn't: /** * Create the hanging entity associated to this item. */ private EntityHanging createHangingEntity(World par1World, int par2, int par3, int par4, int par5) { return (EntityHanging)(this.hangingEntityClass == EntityPainting.class ? new EntityPainting(par1World, par2, par3, par4, par5) : (this.hangingEntityClass == EntityItemFrame.class ? new EntityItemFrame(par1World, par2, par3, par4, par5) : null)); } What is this.hangingEntityClass? Its ItemHangingEntity class or something? Or i have to create my own hangingEntityClass?
  11. So i have to put setProfession after constructor, or entityInit in constructor. I tried both variants and it doesnt help.
  12. I forgot to say. My mob is rendering and everything is fine, all goes without lags, errors and stuff. But it doesnt randomizes skins. So it only reads texture upon case 0, but i need it to randomly choose from case 0 to case 2. Its like the Villager, so when i spawn villager, his texture randomizing. I've taken code from villager, so it suppose to work but its not. Here is the code. What can i do? @SideOnly(Side.CLIENT) public String getTexture() { switch (this.getProfession()) { case 0: return "/mob/HL/Mesa/Scientist1.png"; case 1: return "/mob/HL/Mesa/Scientist2.png"; case 2: return "/mob/HL/Mesa/Scientist3.png"; default: return VillagerRegistry.getVillagerSkin(this.getProfession(),super.getTexture()); } }
  13. Did you check that your item set your paintings entity ? Did you check that your paintings entity contains one of the paintings value ? Did you check that your paintings entity is being rendered with your renderer ? I shouldn't have to ask those questions only to get a useful error report. Ofcourse i did. How can i know where is error. Picture just not spawning, that means item doesnt make any actions. What can i change? Ofcourse my Item is set to the Entity: hlpainting = new ItemHangingEntity(1800, EntityHLPainting.class) .setUnlocalizedName("hlpainting"); LanguageRegistry.addName(hlpainting, "Hl Painting"); P.S> Thats the main class file( if you would ask even this )
  14. You should really consider changing this. With changing, or without my item does the same - nothing. Ofcourse i put the texture in .jar file and named it the same. So there is another problem, entity, something with it.
  15. This file creates item itself? No? Because my item is displaying in tab and i can take it. And yes, i have EntityMyPainting, RenderMyPainting, EnumMyArt.
  16. Ok, so they not causing lags and errors right now, but skins not randomizing too Here is the code It takes only "case 0" skin and putting it in on model. Whats the matter with this?
  17. Learn to read the code you are using please: Quote from DataWatcher.java: throw new IllegalArgumentException("Data value id is too big with " + par1 + "! (Max is " + 31 + ")"); And even some of those are already used: From http://www.minecraftforge.net/wiki/Datawatcher Still nothing works. I tried out other ID's. Again it spawns an empty space instead of Mob. So that means something with render. Because entity is still ok. So i can beat it and do other stuff, but its like invisible. And console getting alot of errors.
  18. There suppose to be more of painting files. Like Model or something, cuz i havent seen any String on taking texture. EntityPainting uses an ENUM to describe paintings. The texture path is handled by the renderer, but the ENUM describes the painting name ("skull") as well as its UV position in the texture and width and height (UVWH are all full-block values, eg. 0,0 with width/height 1,1 would be a 1x1 painting located in the upper left of the texture, which at the default resolution would be 16x16 pixels). So, i've done everything and my paintings are not working. I've made textures, render class, entity class ,enum class. Copied stuff, changed names and nothing. When i try to place a picture with my item, it just not placing. I missed something? Check out my files, i dont understand what i could miss. Entity file Render file Enum file The texture actually in minecraft.jar. Idk...
  19. There suppose to be more of painting files. Like Model or something, cuz i havent seen any String on taking texture. EntityPainting uses an ENUM to describe paintings. The texture path is handled by the renderer, but the ENUM describes the painting name ("skull") as well as its UV position in the texture and width and height (UVWH are all full-block values, eg. 0,0 with width/height 1,1 would be a 1x1 painting located in the upper left of the texture, which at the default resolution would be 16x16 pixels). Yes, i've seen that. Thanks, i'll try to do something with it.
  20. Once again: Bumping after one hour is rude. You can't use 160 as a DataWatcher id, it's too high. It was set on 16 in Villager. Which i can use?
  21. There suppose to be more of painting files. Like Model or something, cuz i havent seen any String on taking texture.
  22. Hey guys. I was wondered about if i could set random textures to mob. So its like Villager. I tried to mess up with it. I added some Strings and what i get: public void setProfession(int par1) { this.dataWatcher.updateObject(160, Integer.valueOf(par1)); } public int getProfession() { return this.dataWatcher.getWatchableObjectInt(160); } @SideOnly(Side.CLIENT) public String getTexture() { switch (this.getProfession()) { case 0: return "/mob/HL/Mesa/Scientist_1.png"; case 1: return "/mob/HL/Mesa/Scientist_2.png"; case 2: return "/mob/HL/Mesa/Scientist_3.png"; case 3: return "/mob/HL/Mesa/Scientist_4.png"; default: return "/mob/HL/Mesa/Scientist_4.png"; } } For that to work villager didnt need anything speciefied. But when i go to Minecraft, i cant see my mob and there is alot of errors in console. Any guesses what i could try to do?
  23. Hey guys. I was wondering on how to add my own pictures in minecraft. All of the tutorials i saw shows only how to replace already existed pics, but i want to make a new one. So basicly add my own new custom picture to minecraft, not replacing any existing one. Have u got any ideas on how to do so?
  24. What? How i suppose to do that? Please give the code if you know something about it. See the line task.addTask ? Then this exist too task.removeTask Now, how to find a player ? EntityPlayer closePlayer = this.worldObj.getClosestPlayerToEntity(this, putSomeDistanceHere); if(closePlayer==null){ //forever alone }else{ //kill the bastard } I think that exactly what you mean? Well it works. Sometimes he mess up a little though EntityPlayer closePlayer = this.worldObj.getClosestPlayerToEntity(this, 4); if(closePlayer==null){ EntityAIArrowAttack arrowattack = null; this.tasks.removeTask(arrowattack); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false)); }else { EntityAIAttackOnCollide attackoncollide = null; this.tasks.removeTask(attackoncollide); } }
  25. I wouldnt put the post here if i havent tried that out. I dont know, but Iron Golem's codes not working on my mob. I basicly changed what i need, and it still doesnt work. I think thats the Iron Golem's string where he suppose to do an attack animations: I used only getAttackTimer one, i removed stuff about holding rose.I tried to change values, all variables was fine. Names was correct, still doesnt work. It has no errors, but limbs of my mob doesnt work. Here is the remaded code of this: Whats wrong with it? Why not correct? Help?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.