Jump to content

N247S

Forge Modder
  • Posts

    222
  • Joined

  • Last visited

Everything posted by N247S

  1. Hey, Your path to the texture is: Modid/blocks/Tisch. as this might be confusing, MC is actually searching for the following File: "assets/fruitsmodpro/blocks/Tisch" Wich doesnt exist I assume. Instead dont forget the texture folder(if you used it "...modid/textures/blocks..."), and more important, add the extension (Tisch.png) again this might be confusing since its different from the icon registry. Final path parameters: (FruitsModPro.MODID, "textures/blocks/Tisch.png") Ps. If this doesnt work yet, post the log please.
  2. Maybe a wierd suggestion, but would it be possible to create a tileEntity on right click? You should have the events(and therefore Coords, world, block etc.) You can for example replace the vanilla cauldron with your own on (the first) right click.
  3. I solved it through (re)setting the interpPos which is working perfectly fine. But this is indeed a second option, though have you tried it already? Because I have my doubts about this method. First of all the texture map is one single texture(FXLayer 0), not a map unfortunatlly. Second, using the FXLayer 1 will apply a colourFilter(brown) over your texture, which kinda messes tings up. (FXLayer 1 is used for blockBreak particles, therefore it uses a colour filter to make a contrast with the block) Anyway, many thanks for thinking with me, and for the time you spend on testing of course! I mentioned before that I would like to create a tutorial/wiki of the particle (for the tuts. you were setting up) if I could figure out one thing. Which is this . So it on its way! Again, many thanks!(both)
  4. The best way to learn java is by trail and error. And I have to say that you are doing a great job at it .(not sceptical, but meant as a compliment). But because Im not english, I have a hard time to understand what the problem actualy is(if its still existing of course ). (So if so) Could you clarify the problem a bit more please?
  5. It can be rather simple. You got a configFile already, so have you written the code to update your configFile yet? If so, you would only have to call the responsoble method when the command is typed in.
  6. Hey, if you are interested in an easier way to edit configFiles.(and actualy ingame through for example a command) I would suggest to take a look at my api. I made especialy for these purposes https://github.com/N247S/N2Configuration
  7. It works a litle bit more complicated than that. What you tried to set was the player model brightness. It does nothing with the players view. If you dont want to make things overcomplicated, I would stick with the nightvision potion. Otherwise you have to dig a lot deeper.
  8. Personaly I would call it an dynamic 2D texture renderer. Since it mainly shares coordinates, movements. Things like behavior, boundingboxes or any server side behavior isnt available.
  9. This part gets your texture: private static final ResourceLocation yourTexture = new ResourceLocation(Main.YOURMODID, "textures/particles/yourTextureFile.png"); And you bind it with the following: Minecraft.getMinecraft().renderEngine.bindTexture(yourTexture ); you can do it with openGL, but that means you got to convert/load in your texture so it can passed through as an Integer. (sound realy strange, but look up a tutorial of opengl, and you'll see what Im talking about) That being said, Minecraft made it way easier for us to bind a texture. (with the example above) So I would suggest using it.
  10. Thats unfortunate to hear . Its a good thing you want to start from the beginning again, sometimes you cant see the rain with all the drops in the way. As an example, I can only give a link to a mod in progress, which adds a 4x4 craftingGrid. Though keep in mind that it usses a totally different CraftingSystem! Your system should do the trick(and is way less complicated ). https://github.com/N247S/mechanical_crafting_table Althoug it isnt finnished, the stuff you need should work perfectly fine. I hope this helps you in the right direction.
  11. I read a lot of questions that can be solved with a bit of java knowledge. Anyway, the way to make a custom particle is by simply extending the EntityFX.Class. On the bottum of this post Ill put an example which I use in one of my mods. And with this line you can spawn in your particle: mc.effectRenderer.addEffect(new YourParticle(World, x, y, z, motionX, motionY, motionZ)); And thats basically all to it. PS. take a look at the vanilla particle classes, it contains a lot of examples! package mechanical_crafting_table.client.particles.entityfx; import static org.lwjgl.opengl.GL11.*; import mechanical_crafting_table.Main; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class EntityWeldSparkFX extends EntityFX { private static final ResourceLocation WellingFXTexture = new ResourceLocation(Main.MODID, "textures/particles/WellingSpark.png"); public EntityWeldSparkFX(World world, double x, double y, double z, double mX, double mY, double mZ) { super(world, x, y, z, mX, mY, mZ); this.motionX = mX; this.motionY = mY; this.motionZ = mZ; this.particleScale *= 0.04F; this.particleAlpha = 1.0F; this.particleMaxAge = 7 + this.rand.nextInt(5); this.particleGravity = 1F; this.noClip = false; } public void renderParticle(Tessellator tess, float partialTick, float x, float y, float z, float u, float v) { if(this.particleAge < this.particleMaxAge) { Minecraft.getMinecraft().renderEngine.bindTexture(WellingFXTexture); glDepthMask(false); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glAlphaFunc(GL_GREATER, 0.003921569F); glAlphaFunc(GL_GREATER, 0.6F - ((float)this.particleAge + partialTick - 1.0F) * 0.25F * 0.5F); float f10 = 0.1F * this.particleScale; float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)partialTick - interpPosX); float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTick - interpPosY); float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTick - interpPosZ); tess.startDrawingQuads(); tess.setBrightness(getBrightnessForRender(partialTick)); tess.addVertexWithUV((double)(f11 - x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 - z * f10 - v * f10), 0, 0); tess.addVertexWithUV((double)(f11 - x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 - z * f10 + v * f10), 0, 1); tess.addVertexWithUV((double)(f11 + x * f10 + u * f10), (double)(f12 + y * f10), (double)(f13 + z * f10 + v * f10), 1, 1); tess.addVertexWithUV((double)(f11 + x * f10 - u * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - v * f10), 1, 0); tess.draw(); glDisable(GL_BLEND); glDepthMask(true); glAlphaFunc(GL_GREATER, 0.1F); } } public void onUpdate() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if (this.particleAge++ >= this.particleMaxAge) { this.setDead(); } if (this.particleAge > this.particleMaxAge / 2) { this.setAlphaF(1.0F - ((float) this.particleAge - (float) (this.particleMaxAge / 2)) / (float) this.particleMaxAge); } this.motionY -= 0.004D * (double)this.particleGravity;; this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.8D; this.motionY *= 0.05D; this.motionZ *= 0.8D; this.setRBGColorF(this.particleRed, this.particleBlue, this.particleGreen); if (this.onGround) { this.motionX *= 0.699999988079071D; this.motionZ *= 0.699999988079071D; } if (this.particleAge < this.particleMaxAge / 2 && (this.particleAge + this.particleMaxAge) % 2 == 0) { EntityWeldSparkFX EntityWell = new EntityWeldSparkFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); EntityWell.particleAge = EntityWell.particleMaxAge / 2; Minecraft.getMinecraft().effectRenderer.addEffect(EntityWell); } } public int getBrightnessForRender(float brightnessFR) { return 15728880; } public float getBrightness(float brightness) { return 1.0F; } public boolean canBePushed() { return true; } public int getFXLayer() { return 3; } public AxisAlignedBB getBoundingBox() { return null; } }
  12. Read carefully again. Otherwise it will change/save the itemStack array's in the vanilla IInventories instead.
  13. I noticed that I forgat to thank both of you. Thank you verry much for thinking with me. It was bugging me for a pretty long time, so Im happy that its finaly solved!
  14. I would change the blockState, and than call the following to change the model: YourTileEntityRenderer renderer = new YourTileEntityRenderer(); TileEntityRendererDispatcher.instance.mapSpecialRenderers.put(YourTileEntity.class, renderer); renderer.func_147497_a(TileEntityRendererDispatcher.instance); This is what I use to change a model ingame. (I actualy linked it to a command for ingame editing models) I hope this helps you a bit in the right direction.
  15. Oke, after some busy days I tried to use other playerdata, like this: Entity player = Minecraft.getMinecraft().thePlayer; this.interpPosX = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)partialTicks; this.interpPosY = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)partialTicks; this.interpPosZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)partialTicks; And it works! But it feels dirty to me. So if anyone has a better suggestion, feel free to post it .
  16. Hey, I sorry that I let you wait this long, I had some bisnuese to attent to. Anyway, I've been thinking whay possibly the link could be for the Slots added in the container and your tileEntity. And I realised that there is no refference to your tileEntity at all(inside your container). Where you used 2 vanilla IInventory-types (craftmatrix and craftresult) there should be your tileEntity instead(which implements IInventory as well). As for the recipes, you seems to do everything oke. But I got some doubts by the way you added the vanilla recipes. Since they are adding regular recipes to the Arraylist which means it still got its limmit I think. Anyway, did you mentioned that non vanilla recipes aren't working either?...
  17. I trying (again) to find a way around this problem, and I found something which might lead to a solution The way I calculate the renderPos is as follows this.prevPosX - interpPosX Basicly this is calculating the offset relative to the Player. Though if the interpPosX isn't correct, that would cause an offset (visible on FXLayer 3) That being said, there is no other position from the renderer Class which refference the playerCoordinates. So I think the problem would be solved if there is a way to get the actual/better playerPos. Though I have no idea what the best way ,to get the exact player position, is.(especialy because the method is likely called more than once a tick) And appart from this, why would there be such a huge difference between the 2 method calls?
  18. Both Thank you verry much for your replies. @TGG That explanation makes a lot more sense to me indeed . I got the other name from an outdated (but one of the few good) tutorials. He explained it as a distance expressed in a certain travel time ?? Anyway I didn't got one bit of it, and it doesn't make sense while the value is changing even when the Player isn't moving, so thank you verry much for that one . @jabelar I tried to debug it before, but its only passing values round 1.0 and lower. Actualy only rotations in radians. Thats why this all doesn't make any sense to me whatsoever. Why would there be 2 separate calls for one Particle.(both for rotation), but more important, why is there a difference in position while the rotation is the only difference between these 2? A suggestion I looked at the activeRenderInfo, and it seems that is a place where the position and rotation of the player is stored. which means that there might be a discrepancy between the first, and second call of the renderParticle() method. While the Values of the rendering is set according the Player's position and rotation form the ActiveRenderInfo inside the renderParticles(), it is using the position and rotation of an entitylivingbase (checked as EntityPlayer) inside the renderLitParticles(). which may explain an slight offset, but that shouldn't be vissible since rendering happens way more often than a tickloop(Following TGG). So that leaves me again with the question unfortunatly.
  19. A scanner should so the trick, but I would recommend to use a BufferedReader instead. Its a bit faster, and you can separate lines easily. If you wonder how to use it, just google it, or look at my N2ConfigAPI(link at the bottum). If you want, you can use the api to automaticly generate a premade custom file in custom folder etc. storing the data. Though that would require a bit of hardcoding.
  20. Oke, you could try to add the detectAndSendChanges() to the container.Class. take a look at this Class for idea's if you wish. https://github.com/N247S/mechanical_crafting_table/blob/master/src/main/java/mechanical_crafting_table/common/inventory/container/ContainerMechanicalCraftingTable.java About the recipe problem, honestly thats a copy-pasta problem. You copied the vanilla craftingManager.Class, though forgat that its adding, compairing and checking vanilla recipeTypes only. (Which has a limit of 3x3). Therefore try to change it so its adding, compairing and checking your recipeType.
  21. oke, luckly . good luck with the model!
  22. Does anybody have an suggestion or a Direction I could search in?
  23. I hope I didnt confuse you, by ModelPart I mean the Cube, and with the Piece I mean the object in techne which is called Piece. since you created your model without the Piece object, you should be fine with the dimensions etc. if you keep the Piece's values on default. Thats all I wanted to point out . Again sorry if I confused you
  24. you don't have to create a single Piece for every ModelPart. the Piece is like a folder, so multiple ModelParts go in one Piece. Note that all these parts will share the offset and rotation set by the the Piece itself. all the rotations and offsets you set in a modelPart are relative to the Piece's offset and rotation. So if you're adding existing ModelParts to a Piece, its recommended to set all the values of the Piece at 0.
  25. Do the NBT methods Override existing methods? And are the items saved when you close the gui? Otherwise Don't worry about it . About the CraftingProblem, I dont think its the problem of the InventoryCrafting.Class, since they don't adjust any limits on the craftingGrid with and height. But what might be the case are the vanilla recipes itself. Their limmits have been set to 3x3, that means if its checking for relative Coords inside your CraftingTable outside the first 3 slots horizontally and vertically, the check will always be false. A work around? duplicating all the craftingRecipes and add them following your own Recipe Mechanism. A better way? I work closly together with CreativeMD, which has created an RecipeManager for modders and modpackCreators. I would recommend to check out his API(if he has updated it) since he has done the first option already for you .
×
×
  • Create New...

Important Information

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