Jump to content

atrain99

Forge Modder
  • Posts

    1502
  • Joined

  • Last visited

Everything posted by atrain99

  1. atrain99

    Learning Java

    I checked out headfirst java from the library. It was easy to learn with the aid of this book.
  2. Can somebody explain (without making me look at MC's source, as I don't understand any of it), what I need to do to make my robot entity move around and have an inventory/gui/container/whatever? I can just about do the rest, and if I can't, I'll just make something up. package net.minecraft.src.GreenEnergy.Solar.Bot; import net.minecraft.src.EntityAIWander; import net.minecraft.src.EntityCreature; import net.minecraft.src.EntityPlayer; import net.minecraft.src.IInventory; import net.minecraft.src.ItemStack; import net.minecraft.src.NBTTagCompound; import net.minecraft.src.World; import net.minecraft.src.universalelectricity.extend.IDisableable; public class EntitySolarBot extends EntityCreature implements IInventory, IDisableable{ private float moveSpeed; private int batteryRemaining; private ItemStack[] containingItems = new ItemStack[2]; private int disableTimer = 0; private int updateTimer = 0; public EntitySolarBot(World par1World) { super(par1World); this.setSize(0.6F, 0.5F); this.moveSpeed = 0.125F; this.tasks.addTask(0, new EntityAIWander(this, this.moveSpeed)); this.batteryRemaining = 0; } @Override protected void entityInit() { if(this.worldObj.canBlockSeeTheSky((int)this.lastTickPosX, (int) this.lastTickPosY, (int) this.lastTickPosZ)){ this.batteryRemaining += 40; this.onDisable(40); } } protected boolean isAIEnabled() { return true; } public void onEntityUpdate(){ if(this.worldObj.canBlockSeeTheSky((int)this.lastTickPosX, (int) this.lastTickPosY, (int) this.lastTickPosZ) && !this.isDisabled()){ chargeElectricalItem(); } this.batteryRemaining--; } private void chargeElectricalItem() { // TODO Auto-generated method stub } @Override public void readEntityFromNBT(NBTTagCompound var1) { } @Override public void writeEntityToNBT(NBTTagCompound var1) { } @Override public int getSizeInventory() { return 2; } public ItemStack getStackInSlot(int par1) { return this.containingItems[par1]; } @Override public ItemStack decrStackSize(int par1, int par2) { if (this.containingItems[par1] != null) { ItemStack var3; if (this.containingItems[par1].stackSize <= par2) { var3 = this.containingItems[par1]; this.containingItems[par1] = null; return var3; } else { var3 = this.containingItems[par1].splitStack(par2); if (this.containingItems[par1].stackSize == 0) { this.containingItems[par1] = null; } return var3; } } else { return null; } } @Override public ItemStack getStackInSlotOnClosing(int par1) { if (this.containingItems [par1] != null) { ItemStack var2 = this.containingItems[par1]; this.containingItems[par1] = null; return var2; } else { return null; } } @Override public void setInventorySlotContents(int var1, ItemStack var2) { // TODO Auto-generated method stub } @Override public String getInvName() { return "Battery Bot"; } @Override public int getInventoryStackLimit() { // TODO Auto-generated method stub return 0; } @Override public void onInventoryChanged() { // TODO Auto-generated method stub } @Override public boolean isUseableByPlayer(EntityPlayer var1) { return true; } @Override public void openChest() { // TODO Auto-generated method stub } @Override public void closeChest() { } @Override public int getMaxHealth() { return 6; } @Override public void onDisable(int duration) { this.disableTimer += duration; } @Override public boolean isDisabled() { return disableTimer == 0; } @Override public boolean isMovementCeased(){ return this.isDisabled() && (this.batteryRemaining != 0); } }
  3. You need a getBlockTexture or something in the BlockMagnesium.
  4. Uh, just wait like 3 days. And everything is a waste of my time, so no harm done.
  5. Well, yeah. If I give you the URL to the MCF topic, will you post a "works well with" kind of thing? Please? BTW, that wasn't begging. Just close.
  6. I get the "Bad Video Card Drivers" every time with Minecraft 1.3 (vanilla), and I have the Mobile Intel 4 Series Express Chipset. I can't find drivers compatible with this. Any help out there? EDIT: I think I fixed them, but still, this is a problem that plagues many minecrafters.
  7. NO MODLOADER! You dont need it, and modLoader mods can -usually- run with forge.
  8. No problem. Everybody here that's helpful does it to alleviate that pain.
  9. Do you learn this is Pre-Calc/Algebra II? I'm taking both this year.
  10. Use mcnostalgia. Or just wait about 4 days.
  11. Never use mcpatcher. Ever. Did you get the latest? Did you install modLoader/MLMP?
  12. You're welcome. FML is compatible with most modLoader mods.
  13. Tuesday? *Counts fingers* That's like 4 days! You are fast! I thought it would take at least 2 weeks.
  14. Just send me a PM. You'll get a reply within the day. I only use skype to communicate with friends. (Not that we can't be friends, I don't really like giving out my skype)
  15. I did a println after the "shouldGenerate" and it prints out. It even prints it out after the block is set in the world which means it's actually generated/placed in the world. HOWEVER, when I venture around my world (couple of times and my players did also), they found NO ores whatsoever. Huh. Put print statements inside each level of the generation function and see where it gets.
  16. Submit a pull request if you can't do it with reflection.
  17. Best time for them to change over is now, 1.3 needs a good amount of re-coding anyway. EDIT: Also ForgeAPI has a better packet system, at first it isn't as easy as MLMP but as soon as you get the hang of it its far superior. When I converted my mod I cut my packet data down to a 3rd of what MLMP was sending and debugging was easier. Yeah. I screwed around with packet data once, and it was unbelievable how many were sent just to do simple stuff.
  18. Ohh, I see. I was going by the "Your Site Here: 10,000 visitors / $5.00". Thanks for linking me to the rates page. I'd have always thought it was that if you didn't show me. Okay, I didn't know the rates were so close. My bad. Oh, I forgot to leave a message because It was my first time using the system, but I donated some to your ChipIn thingy on about the 10th of July. Which I hope more people will. I'd like to see some streaming. What's ChipIn? Can I use paypal? (I've got 21 cents from adfly downloads) Just so you know, you need to earn at least $5 before you can withdraw your Adfly money.... ...On second thought, I'm not gonna use Adf.ly. There's no way IN HELL I'll get to $5 in any remotely reasonable amount of time. Yeah, but you can say "I've made 3 cents in 24 hrs!". On second thought, that's pretty pathetic.
  19. Ohh, I see. I was going by the "Your Site Here: 10,000 visitors / $5.00". Thanks for linking me to the rates page. I'd have always thought it was that if you didn't show me. Okay, I didn't know the rates were so close. My bad. Oh, I forgot to leave a message because It was my first time using the system, but I donated some to your ChipIn thingy on about the 10th of July. Which I hope more people will. I'd like to see some streaming. What's ChipIn? Can I use paypal? (I've got 21 cents from adfly downloads) Just so you know, you need to earn at least $5 before you can withdraw your Adfly money.... Here's to earning $5 in 10 years!
  20. Yeah, wrong section. I'll gladly provide help, but Im not going to be part of your team (no offense meant). I've got a couple of mods out there already.
×
×
  • Create New...

Important Information

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