Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. He is not having that problem and I know it is an unhelpful suggestion as the problem he is actually having I've dealt with before. The client can't load the data values from the save (because it's a client) but the server isn't sending the info because he hasn't told it to.
  2. Did you read why that returned as a positive result? Coming here for modloader support would be like going to Bukkit forums trying to code a forge mod. Sure, there's MCPC+ and Bukkitforge that provide cross-compatibility, but that doesn't mean that it's the right place to go for help. You're probably best off going here and reading the last FAQ question.
  3. It's because of a client-server disparity. You need to send a datapacket to all players with the information.
  4. Should be able to. You'd have to make sure not to intercept your own events!
  5. Still doesn't explain why you're asking on the FORGE forums on how to use MODLOADER. Forge != Modloader
  6. 300 is not a valid block ID. It is, in fact already taken by, Leather Pants.
  7. You may be able to. I don't know how the event system of Minecraft works internally so I can't say for sure if the new event would get picked up or not. I know that in Flash it wouldn't because the listening object isn't listening to the intermediary object that snagged the event first.
  8. It's inside my custom mob entity class. If you want to edit vanilla mobs you're going to need to look elsewhere. I'm not sure this is doable without base class editing.
  9. I take it that this was not enough for your needs? /** * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack. */ attackEntity(Entity par1Entity, float par2) { int i = this.rand.nextInt(this.maxDamage - this.minDamage) + this.minDamage +1; return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), i); } Events are NOT useful of your needs. Um...duh? Events are "hey, this thing happened. Here's what it was." They are a after-the-fact alert. Now, you can cancel them (prevents other code up the chain from receiving the event and doing things with it--doing so may prevent the effects of the event, e.g. the player wouldn't actually take the damage) but you can't alter the event details: the damage was already assigned.
  10. Just so you're aware: Blocks in-world aren't item stacks.
  11. The word I understand, it's the phrasing that was used.
  12. Event handlers. public class EventHookOreRegistration { @ForgeSubscribe public void entityAttacked(OreDictionary.OreRegisterEvent event) { if(event.Name.indexOf("ore") >= 0 || event.Name.indexOf("gem") >= 0) { MapsBase.oreBlocks.add(event.Ore); } } }
  13. "name": AdditionalCrafting", You're missing a "
  14. Directly? Probably. You should either cause a neighbor update (world.setBlock(x, y, z, block, meta, 3) <-- the 3 is the important bit) or use world.scheduleBlockUpdate and pass either 1 or 0 ticks (preferably 1, but if you know that it's not going to trigger an excessive number of changes, you can pass a 0; redstone wire is effectively a 0).
  15. this.setTickRandomly(true) or world.scheduleBlockUpdate(x, y, z, blockID, dealy) NOTE: scheduleBlockUpdate is a first-in-only-served. Doesn't matter what the delay is, calling another scheduled update on the same location will get ignored.
  16. updateTick is a function, not a class. Depending on what object type you're dealing with, this function will be called at different intervals. Entities get it called 20 times a second (once per tick) blocks will be called at different intervals (either randomly per block or on a schedule, as determined by world.scheduleUpdateTick(x, y, z, blockID, delayInTicks)
  17. net.minecraft.client.render.ItemRenderer.java line 493
  18. Oh yeah, well that I give people passes for.
  19. Not sure if it would or not. I did end up...solving the problem, although I don't know what it actually is. Here's working code. public void render(RenderEngine eng, World worldObj, float partial) { Tessellator tessellator = Tessellator.instance; GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); GL11.glPushMatrix(); float rainStr = 1.0F - worldObj.getRainStrength(partial); GL11.glColor4f(1.0F, 1.0F, 1.0F, rainStr); //GL11.glTranslatef(0F,0F,0F); GL11.glRotatef(angle, 0.0F, 1.0F, 0.0F); GL11.glRotatef(getCelestialPeriod(worldObj.getWorldTime(), partial) * 360.0F, 1.0F, 0.0F, 0.0F); float size = 30.0F; eng.bindTexture("/mods/CustomCelestials/textures/environment/sun_type"+this.type+".png"); tessellator.startDrawingQuads(); tessellator.addVertexWithUV((double)(-size), 100.0D, (double)(-size), 0.0D, 0.0D); tessellator.addVertexWithUV((double)size, 100.0D, (double)(-size), 1.0D, 0.0D); tessellator.addVertexWithUV((double)size, 100.0D, (double)size, 1.0D, 1.0D); tessellator.addVertexWithUV((double)(-size), 100.0D, (double)size, 0.0D, 1.0D); tessellator.draw(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); renderHorizon(eng, worldObj, getCelestialPeriod(worldObj.getWorldTime(), partial), this.angle, partial, 1.0F); } Note that the quad's verts are draw in the same order as the original.
  20. www.apostropheabuse.com Not if they're obviously foreign... What we need on this forum is a "native language" field by the profile box. I can't find any foreign language that uses apostrophes to denote a plural word. In fact, I can only find evidence to the reverse: native English speakers using an apostrophe to denote foreign plurals.
  21. www.apostropheabuse.com
  22. public void render(RenderEngine eng, World worldObj, float partial) { Tessellator tessellator = Tessellator.instance; float invertRain = 1.0F - worldObj.getRainStrength(partial); float celestial_period = getCelestialPeriod(worldObj.getWorldTime(), partial); GL11.glEnable(3553); GL11.glBlendFunc(770, 1); GL11.glColor4f(1.0F, 1.0F, 1.0F, invertRain); GL11.glPushMatrix(); GL11.glRotatef(this.angle, 0.0F, 1.0F, 0.0F); GL11.glRotatef(celestial_period * 360.0F, 1.0F, 0.0F, 0.0F); float size = 30.0F; System.out.println("I am rendering"); GL11.glBindTexture(3553, eng.getTexture("/mods/CustomCelestials/textures/environment/sun_type"+this.type+".png")); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-size, 100.0D, -size, 0.0D, 0.0D); tessellator.addVertexWithUV(size, 100.0D, -size, 1.0D, 0.0D); tessellator.addVertexWithUV(size, 100.0D, size, 1.0D, 1.0D); tessellator.addVertexWithUV(-size, 100.0D, size, 0.0D, 1.0D); tessellator.draw(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); this.renderHorizon(eng, worldObj, celestial_period, this.angle, partial, 1.0F); } My print statement prints. Sunsets render (the this.renderHorizon call, to a function in the same class). The sun object itself does not. This code works in 1.5.1 and does not in 1.5.2.
  23. Nooo.... It matches this: @Mod(modid="Custom Celestials")
  24. http://www.minecraftforge.net/forum/index.php/topic,7663.msg38969.html#msg38969
  25. *cough* 1) "Missed" 2) "When" 3) I am not sure what this means
×
×
  • Create New...

Important Information

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