Jump to content

SirNiloc

Forge Modder
  • Posts

    18
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    USA
  • Personal Text
    Hello!

SirNiloc's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Here is my player class package _indev.inprogress; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.sirniloc.sirocelot.SirOcelot; import com.sirniloc.sirocelot.entity.SirOcelotLivingBase; import com.sirniloc.sirocelot.network.CommonProxy; import com.sirniloc.sirocelot.network.packets.Packet_001_Skill; import com.sirniloc.sirocelot.network.packets.SendPacket; import com.sirniloc.sirocelot.skills.SkillHandler; public class SirOcelotPlayer extends SirOcelotLivingBase { public final static String EXT_PROP_NAME = SirOcelot.MODID+"Player"; private final EntityPlayer player; public SirOcelotPlayer(EntityPlayer player) { super(player); this.player = player; } public static final void register(EntityPlayer player) { player.registerExtendedProperties(SirOcelotPlayer.EXT_PROP_NAME, new SirOcelotPlayer(player)); } @Override public void init(Entity entity, World world) { } /* public int getDamage(int amount) { //int con = this.player.getDataWatcher().getWatchableObjectInt(CONSTITUTION_WATCHER); int damage = 0; // These two lines are the same as before con -= amount; if(con < 0){ damage = con*-1; con = 0; } // Update the data watcher object with the new value //this.player.getDataWatcher().updateObject(CONSTITUTION_WATCHER, con); // note that we no longer need to call 'sync()' to update the client return damage; } public void fillCon() { //this.player.getDataWatcher().updateObject(CONSTITUTION_WATCHER, this.maxConstitution); } // Simple change public final int getCurrentConstitution() { return this.player.getDataWatcher().getWatchableObjectInt(CONSTITUTION_WATCHER); } public final void setCurrentConstitution(int amount) { this.player.getDataWatcher().updateObject(CONSTITUTION_WATCHER, (amount < this.maxConstitution ? amount : this.maxConstitution)); } /** * Makes it look nicer in the methods save/loadProxyData */ public static void saveProxyData(EntityPlayer player) { SirOcelotPlayer playerData = (SirOcelotPlayer) SirOcelotPlayer.get(player); NBTTagCompound savedData = new NBTTagCompound(); playerData.saveNBTData(savedData); CommonProxy.storeEntityData(getSaveKey(player), savedData); } public static void loadProxyData(EntityPlayer player) { SirOcelotPlayer playerData = (SirOcelotPlayer) SirOcelotPlayer.get(player); NBTTagCompound savedData = CommonProxy.getEntityData(getSaveKey(player)); if(savedData != null) { playerData.loadNBTData(savedData); } } public final void sync() { for(int j = 1; j <= SkillHandler.SKILL_COUNT; j++){ int id = j; int level = skills.getSkillLevel(j); SendPacket.sendServerToClient(SirOcelot.getChannels(), new Packet_001_Skill(id,level), player); } } }[\code]
  2. I may just be doing something dumb and have tunnel vision coding. This is the error package com.sirniloc.sirocelot; import java.util.EnumMap; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.network.FMLEmbeddedChannel; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import _indev.inprogress.SirOcelotEventHandler; import _indev.inprogress.SirOcelotPlayer; import com.sirniloc.sirocelot.input.KeyBindingHandler; import com.sirniloc.sirocelot.network.ChannelHandler; import com.sirniloc.sirocelot.network.CommonProxy; @Mod(modid = SirOcelot.MODID, name = SirOcelot.NAME, version = SirOcelot.VERSION) public class SirOcelot { public static final String NAME = "SirOcelot"; public static final String MODID = "sirocelot"; public static final String VERSION = "0.0"; @SidedProxy(clientSide = "com.sirniloc.sirocelot.network.ClientProxy", serverSide = "com.sirniloc.sirocelot.network.CommonProxy") public static CommonProxy proxy; 35. static EnumMap<Side, FMLEmbeddedChannel> channels = NetworkRegistry.INSTANCE.newChannel(MODID, new ChannelHandler()); public static final boolean DEVMODE = true; public static SirOcelotPlayer clientPlayer; @Instance("sirocelot") public SirOcelot instance; @EventHandler public void preInit(FMLInitializationEvent event){ System.out.println("PREINIT SirOcelot started"); preInitKeys(); System.out.println("PREINIT SirOcelot finished"); } @EventHandler public void init(FMLInitializationEvent event){ System.out.println("INTIT SirOcelot started"); System.out.println("INTIT SirOcelot finished"); } @EventHandler public void postInit(FMLInitializationEvent event){ System.out.println("POST SirOcelot started"); initEvents(); System.out.println("POST SirOcelot finished"); } private void preInitKeys() { if(FMLCommonHandler.instance().getEffectiveSide().isClient()){ FMLCommonHandler.instance().bus().register(new KeyBindingHandler()); KeyBindingHandler.preInit(); } } private void initEvents(){ MinecraftForge.EVENT_BUS.register(new SirOcelotEventHandler()); } public static EnumMap<Side, FMLEmbeddedChannel> getChannels(){ return channels; } public static SirOcelotPlayer getClientPlayer(){ return clientPlayer; } }
  3. Hello guys/gals! First off I'm not sure if this is the best place to put this but here goes nothing. I have always worked on mods solo and it takes loads of time, so now I think I'll try making a team. The team would be mostly democratic. If you would like to help I would sure appreciate it! 1: Texture 2: More Programmers 3: Model and Animation Artist 4: Sound 5: Testers* 6: Other - so anything you think you could help with please pm me! Nickname: Email: Age: Job: Experience: please PM applications but responding here is also fine ___________________________________________________________________________________________________________ Example Nickname: SirNiloc Email: email@mail.com Age: 19 Job: Programmer Experience: I have made some private mods as well as Sir's Mod(http://www.planetminecraft.com/mod/sir-2766752/).
  4. Mine won't build. * What went wrong: A problem occurred evaluating project ':Project1'. > Could not find method processResources() for arguments [build_60m7ce4rho9j76mu eei15hel03$_run_closure2@1698f66] on project ':Project1'.
  5. So I was wondering how you could change a particle's color like fireworks. Or if that is something else how do I spawn those.
  6. I can play singleplayer fine but when I try to start a server it crashes. I've look through and can't seem to find the problem. I am also very new to GUIs. Any suggestions?
  7. Thank you so much I used the 2nd and it worked great!
  8. damageEntity is protected so i can't access it or I just don't know how
  9. Yes that's what I thought it would do, the thing is I don't know where to put it, I have been using the .setHealth in there becasue I don't know were else to put .attackEntityFrom.
  10. I do know that is the problem I can go through the crashlogs. I just don't know exactly how to use line 86.
  11. I've tried that but it crashes and im not sure why. I have the special combat stuff called in LivingAttackEvent if that would mess things up.
  12. So I have been working on a mod that adds lots of stuff that I randomly think up or that gets suggested to me. Anyway I have started work on adding Dungeons and Dragons type skills. The problem is when I use them for combat it is really buggy. For example I am an Elf who is level 1 with 1 Constitution, 2 Strength, and 3 Dexterity. IN my code i have some equations to calculate the resulting damage. Then I use entity.setHealth(calcHealth); (float health = entity.getHealth(); float calcHealth = health - getTotal(a, d); ) which looks good on the outside but when the entity "dies" it sometimes does a spazzy death animation and keeps fighting. Sorry if this is confusing, and thanks in advance.
×
×
  • Create New...

Important Information

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