Everything posted by Draco18s
-
Block creation throws ArrayOutOfBoundsException
300 is not a valid block ID. It is, in fact already taken by, Leather Pants.
-
[CLARIFIED] Confused about Events
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.
-
[CLARIFIED] Confused about Events
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.
-
[CLARIFIED] Confused about Events
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.
-
Block acting strange with large metadata
Just so you're aware: Blocks in-world aren't item stacks.
-
Running and making commands in code.
The word I understand, it's the phrasing that was used.
-
Ore/LiquidDictionary Problems (Please Make IT PLEASE)
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); } } }
-
How do I get the mcmod.info file to work?
"name": AdditionalCrafting", You're missing a "
-
Understanding updateTick()
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).
-
Understanding updateTick()
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.
-
Understanding updateTick()
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)
-
Damage Indicator Bar
net.minecraft.client.render.ItemRenderer.java line 493
-
how to open GUI or Network mod
Oh yeah, well that I give people passes for.
-
Why doesn't this render? (Custom suns)
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.
-
how to open GUI or Network mod
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.
-
how to open GUI or Network mod
www.apostropheabuse.com
-
Why doesn't this render? (Custom suns)
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.
-
How do I get the mcmod.info file to work?
Nooo.... It matches this: @Mod(modid="Custom Celestials")
-
How do I get the mcmod.info file to work?
http://www.minecraftforge.net/forum/index.php/topic,7663.msg38969.html#msg38969
-
Running and making commands in code.
*cough* 1) "Missed" 2) "When" 3) I am not sure what this means
-
Custom save data
7+ hours from the time of this post. And when I had it open last night, there wasn't much in it.
-
Running and making commands in code.
Good. It just isn't always apparent that any given poster has. Especially when the opening post is as short and as confusingly written* as it is. That said, I have no idea how to do what you're trying to do. I simply looked at the decompiled source code for a mod that does and tried to figure out how it worked (but as its not deobfuscated, references to vanilla classes is shaky at best). All I can tell is that he extended that base class. :\ *My guess is that English is not your native language.
-
Block acting strange with large metadata
0-15
-
Spawning Custom Mobs at Night (or whenever)
I think you mean ‼Fun‼.
-
Custom save data
Yeah, its not simple. And I'm away from my implementation at the moment.
IPS spam blocked by CleanTalk.