Jump to content

allout58

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Tennesee, US
  • Personal Text
    this.status="Beginning Modder";

allout58's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. In addition to this, in the blocks constructor, add a call to //this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); This allowed me to walk through a block. Let me know if this doesn't work and I can look into it more.
  2. thebest108: the y is the only one I am changing, but I set the motionX, motionY and motionZ to constants > 0 and client still wasn't moving. I can get the client to move, but not with the server. GotoLink: yes, but after running a world.isRemote check. How else am I going to get the particle settings? The particles can only be spawned client side. The particles are the real reason I want both client and server side. If I make sure that only the serverside entity is spawned, everything works fine but I can't spawn particles, and I really want particles...
  3. I am having some issues with the server updating the client as to its position. My full project can be view here: https://github.com/allout58/SpaceCraft Here is the code file for the entity in question: EntityRocket.java package allout58.mods.SpaceCraft.Rockets.Entity; import java.util.Random; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import allout58.mods.SpaceCraft.Rockets.Rocket; public class EntityRocket extends Entity { Rocket rocketLogic; public EntityRocket(World world) { super(world); // this.preventEntitySpawning = true; } public EntityRocket(World par1World, Rocket rLogic, double x, double y, double z) { this(par1World); this.setPosition(x, y, z); rocketLogic = rLogic; rocketLogic.Launch(); } @Override protected void readEntityFromNBT(NBTTagCompound nbttagcompound) { rocketLogic = new Rocket(); rocketLogic.readFromNBT(nbttagcompound); } @Override protected void writeEntityToNBT(NBTTagCompound nbttagcompound) { rocketLogic.writeToNBT(nbttagcompound); } @Override public void onUpdate() { super.onUpdate(); if (ticksExisted > 500) this.kill(); if (rocketLogic == null) return; if (!worldObj.isRemote) { rocketLogic.tick(); this.motionX = rocketLogic.velX; this.motionY = rocketLogic.velY; this.motionZ = rocketLogic.velZ; } setPosition(posX + motionX, posY + motionY, posZ + motionZ); if (worldObj.isRemote) { Random rand = new Random(); for (int i = 0; i < (rocketLogic.Size.ordinal() + 1) * (2 - Minecraft.getMinecraft().gameSettings.particleSetting); i++) { worldObj.spawnParticle("flame", this.posX + rand.nextDouble() * (rand.nextBoolean() ? -1 : 1), this.posY - rand.nextDouble(), this.posZ + rand.nextDouble() * (rand.nextBoolean() ? -1 : 1), rand.nextInt(35) / 100 * (rand.nextBoolean() ? -1 : 1), -rand.nextDouble(), rand.nextInt(35) / 100 * (rand.nextBoolean() ? -1 : 1)); } } System.out.println("Rocket entity-" + (worldObj.isRemote ? "Client" : "Server") + " x:" + posX + " y:" + posY + " z:" + posZ); } @Override protected void entityInit() { } } FYI, the class Rocket updates "velY" on "tick()". See the github for the full file. Here is some of the output: 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Server x:-594.5 y:246.40848585690674 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Client x:-594.5 y:231.5 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Server x:-594.5 y:246.40848585690674 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Client x:-594.5 y:231.5 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Server x:-594.5 y:246.40848585690674 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Client x:-594.5 y:231.5 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Server x:-594.5 y:246.40848585690674 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Client x:-594.5 y:231.5 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Server x:-594.5 y:246.40848585690674 z:-165.5 2013-09-02 23:24:43 [iNFO] [sTDOUT] Rocket entity-Client x:-594.5 y:231.5 z:-165.5 Thanks for any help you can give!
  4. I have a question about the ore dictionary. My mod is adding an ore, ingot and ingot storage block (e.g. Block of Iron). I am registering the ore and ingot with the ore dictionary but I was wondering if I ought to add the storage block to the ore dictionary. What is common practice? Thanks in advance for your help!
×
×
  • Create New...

Important Information

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