Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by Elix_x

  1. OreDictionary.getOres(String name) returns list of all ores registered to this name. If list is empty... well you got the idea...
  2. There's a speciall recipe class, that accepts oredictionary string values in it's [] as well as Item or Blocks. Try finding it yourself!
  3. I don't think that forge fixed fluids in 1.8 yet. But in 1.8 there's no iicons anymore...
  4. In CraftingManager there's public list of recipes. Iterate through those and remove ones that you want..
  5. Completely forgot that... Oops...
  6. I wasn't sure about this either. Because chunks are 16*16 and they start count from 0, wouldn't 16 make 17 blocks? Anyways, i'll change it to 16...
  7. so how do i check the block next to one placed? do i have the ~ like in relative teleport Nope, you have to assemble multiblock in method that is passing you original block args. Then just use originPoint + Offset...
  8. All i wanted is logic of converting 3d in 1d. Of course i'll rewrite it to write in 1d array directly. But for now i was searching for correct logic.
  9. Hello, my question is: How can i convert my 3 dimensional Block array into 1 dimensional that will be used in chunk for filling. Basically i create a Block[][][] blocks3d = new Block[15][255][15] Then i fill it with needed blocks. And now i want to convert it to Block[] blocks1d = new Block[16*16*256] which will be used in new Chunk(worldObj, blocks1d, chunkX, chunkY) After looking at vanilla code i'm thinking about: for(int xx = 0; xx < 15; xx++){ for(int zz = 0; zz < 15; zz++){ for(int yy = 0; yy < 255; yy++){ blocks1d[xx << 11 | zz << 7 | yy / 256] = blocks3d[xx][yy][zz]; } } } Would that work? Do i have to test it to see (i can't test this part of mod yet)? Thanks for help! If you have any questions - just ask!
  10. Ok, then put println() there to check if it gets run.
  11. To check you have to: First: Check that block placement code is reached, using System.out.println Second: Or: Bump chances up and search for it manually Or: Bump chances (optional), generate new world,l open it with mcedit and clean all stone. Save, enter the worl and now search your ore...
  12. If lang file translation is correct, you may also try translating it manually (like you did with gun using StatCollector)...
  13. Probably you jsut don't see them, because one particle is one small texture... And you spawn only few of them...
  14. To be short, yes. I don't think i need it... After trying this and getting awesome result: @Override public void renderParticle(Tessellator tesselator, float f1, float f2, float f3, float f4, float f5, float f6) { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); renderParticleSpecial(tesselator, f1, f2, f3, f4, f5, f6); Minecraft.getMinecraft().getTextureManager().bindTexture(particleTextures); } public void renderParticleSpecial(Tessellator tesselator, float ff1, float ff2, float ff3, float ff4, float ff5, float ff6) { float f10 = 0.1F * this.particleScale; float f6 = 0; float f7 = 8; float f8 = 0; float f9 = 8; float f11 = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)ff1 - interpPosX); float f12 = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)ff1 - interpPosY); float f13 = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)ff1 - interpPosZ); tesselator.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha); tesselator.addVertexWithUV((double)(f11 - ff2 * f10 - ff5 * f10), (double)(f12 - ff3 * f10), (double)(f13 - ff4 * f10 - ff6 * f10), (double)f7, (double)f9); tesselator.addVertexWithUV((double)(f11 - ff2 * f10 + ff5 * f10), (double)(f12 + ff3 * f10), (double)(f13 - ff4 * f10 + ff6 * f10), (double)f7, (double)f8); tesselator.addVertexWithUV((double)(f11 + ff2 * f10 + ff5 * f10), (double)(f12 + ff3 * f10), (double)(f13 + ff4 * f10 + ff6 * f10), (double)f6, (double)f8); tesselator.addVertexWithUV((double)(f11 + ff2 * f10 - ff5 * f10), (double)(f12 - ff3 * f10), (double)(f13 + ff4 * f10 - ff6 * f10), (double)f6, (double)f9); } I think that now all problems are solved!!!
  15. So you mean that to render with custom exture, i have to go with custom rendering?
  16. I'll tell you only one thing: EntityLightiningBolt.class
  17. Hello, here i will present you 2 weird bugs with particles! (While describing, i'll present you responsible code parts. Links to full classes are on the bottom of the page...) 1) Wierd velocity... Using my code, particles should go in random vector around my look, but they do this instead: Herу main spawning code: @Override public void createParticles(EntityLivingBase entity, boolean b){ if(b){ if(vectoredAffect(entity)){ World world = entity.worldObj; PositionnedRotatedRangedVec3 vvec = new PositionnedRotatedRangedVec3(entity.worldObj, entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch, getDegree(entity), getRange(entity)); Vec3[] vec2s = vvec.getMainVecs(); for(int i = 0; i < particleAmount(); i++){ Vec3 pvec = Vec3Utils.getRandomVecBetween(random, vec2s); if(createNameBasedParticles()){ world.spawnParticle(getParticleName(), entity.posX, entity.posY, entity.posZ, pvec.xCoord, pvec.yCoord, pvec.zCoord); } else { world.spawnEntityInWorld(new EntityFXBreathingParticles(world, entity.posX, entity.posY, entity.posZ, pvec.xCoord, pvec.yCoord, pvec.zCoord, getR(), getG(), getB(), getA())); } } } } } It becomes even stranger if i return false on createNameBasedParticles(), which spawns vanilla particles with same velocity values and this... works... Again, all concerned classes on the bottom of the page. 2) Really strange icon... I'm trying to set particle icon in constructor, to render it with: public EntityFXBreathingParticles(World world, double posX, double posY, double posZ, double velX, double velY, double velZ, float r, float g, float b, float a) { super(world, posX, posY, posZ, velX, velY, velZ); setRBGColorF(r, g, b); setAlphaF(a); setParticleIcon(new IIcon() { @Override public float getMinV() { return 0; } @Override public float getMinU() { return 0; } @Override public float getMaxV() { return 8; } @Override public float getMaxU() { return 8; } @Override public float getInterpolatedV(double p_94207_1_) { return 0; } @Override public float getInterpolatedU(double p_94214_1_) { return 0; } @Override public int getIconWidth() { return 8; } @Override public String getIconName() { return BreathModBase.MODID + ":textures/paticles/breath.png"; } @Override public int getIconHeight() { return 8; } }); } This particle icon to be used is in specified location, but my texture is not rendered: I'm not getting any missing texture errors. It is not rendered incorrectly. It is not another flat icon. IT IS MINI BLOCKS OF SNOW!!!! No, seriously, where is a logic there? How can flat icon draw blocks of snow in 3D... Ok, here's all the code conserned. Spawn methods (and methods called from main): https://gist.github.com/elix-x/c4c4ac5799a17bf0e21a Particles class: https://gist.github.com/elix-x/e1da82ce1f5738362465 PositionnedRotatedRangedVec3.class: https://gist.github.com/elix-x/2795d7b845b11bc9d910 Vec3Utils.class: https://gist.github.com/elix-x/de0de6504fdad2d1849c SpecialArrayUtils.class: https://gist.github.com/elix-x/4058bf72841d6a9f0f30 AdvancedRandomUtils.class: https://gist.github.com/elix-x/228fa0c176650bd1d958 Hope that's all... Thanks for help! If you have any questions - just ask!
  18. No, this will not work. But you are close. This will rotate empty matrix. To rotate renderer - create new matrix, rotate it, render block, pop this matrix.
  19. Check that it's in src/main/resources + modid/assets/lang folders
  20. Are you sure that you want to extend ItemBlock? This my not be the best idea...
  21. Used where? For blocks in 1.8? Or for shaders? Why are you saking?
  22. When do you want to access it (phase)? Where (client/server)?
  23. world.setBlock and not just setBlock. Everything else is ok!
  24. GOT IT!!! Upper and lower case means a lot for java and nbt!!!
  25. Probably yes.
×
×
  • Create New...

Important Information

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