Jump to content

mrkirby153

Members
  • Posts

    186
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

mrkirby153's Achievements

Creeper Killer

Creeper Killer (4/8)

3

Reputation

  1. When I went to test my mod in an obfuscated environment, I noticed that only my coremods shows up in the modlist and not my main mod class. They're in two different classes and both the mod and coremod interact with each other in ways that require both to be loaded. Is there anything that I am missing? EDIT: Source: https://github.com/mrkirby153/AntiChatSpam
  2. I am creating a mod that allows server admins to put a server into "Beta Test Mode." In beta test mode, each player can create his own dimension to fool around with. However, I've run into a small problem. How do I use the same world provider but have it generate different worlds? I'm assuming world providers are instantiated through reflection and I can't actually pass any arguments through to the constructor. Another thing is I want these worlds to persist. When the server starts up, I want the world provider to continue generating the same world that was initially generate. (Kinda like how mystcraft does it.)
  3. I was making a custom sound for my mod and when I try to play it it doesn't exactly work. My sounds.json is located at assets\<modid>\sounds.json and has the following in it: { "poof":{ "category": "master", "sounds": [ "sounds/poof" ] } } However, when I try to play it via "/playsound <modid>:poof mrkirby153", the console says "[18:20:19] [Client thread/WARN]: Unable to play empty soundEvent: <modid>:poof" My sound file is located under assets\<modid>\sounds\poof.ogg" I feel like I'm missing something incredibly obvious right now
  4. Hilariously, that still made the item bounce around. Does this have to deal with client/server syncing?
  5. Okay. I saw that the entity was being moved down by 0.03999999910593033D so I tried conteracting that by moving it up by 0.03999999910593033D (The same number), but the item still glitches around. Code now: @Override public void onUpdate() { super.onUpdate(); Block currentBlock = worldObj.getBlock((int) Math.floor(posX), (int) Math.floor(posY), (int) Math.floor(posZ)); /*if (currentBlock == null) return; if (currentBlock instanceof BlockLiquid) { this.motionY += 0.03999999910593033D; this.moveEntity(motionX, motionY, motionZ); } Block blockBelow = worldObj.getBlock((int) Math.floor(posX), (int) Math.floor(posY -1), (int) Math.floor(posZ)); if(blockBelow instanceof BlockLiquid){ this.motionY += 0.03999999910593033D; this.moveEntity(motionX, motionY, motionZ); }*/ this.motionY += 0.03999999910593033D; this.moveEntity(motionX, motionY, motionZ); }
  6. I see that the entity is still having its y axis position lowered. However, this doesn't really explain how to arrest the movement of an item.
  7. try setting the velocity to 0. That didn't work. It still glitches around.
  8. Hey guys, How can I prevent an item from falling in a liquid. This is the code I have now but the item just seems to jump around and stuff: package me.mrkirby153.KCNerfer.playTime; import net.minecraft.block.Block; import net.minecraft.block.BlockLiquid; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class IndestructibleItem extends EntityItem { private final EntityPlayer owner; public IndestructibleItem(EntityPlayer owner, World world, double x, double y, double z, ItemStack itemStack) { super(world, x, y, z, itemStack); this.isImmuneToFire = true; this.owner = owner; } public boolean canPickup(EntityPlayer player) { return player.getCommandSenderName().equalsIgnoreCase(this.owner.getCommandSenderName()); } @Override public boolean isEntityInvulnerable() { return true; } @Override public boolean canRenderOnFire() { return false; } @Override public void onUpdate() { super.onUpdate(); Block currentBlock = worldObj.getBlock((int) Math.floor(posX), (int) Math.floor(posY), (int) Math.floor(posZ)); if (currentBlock == null) return; if (currentBlock instanceof BlockLiquid) { posY += 1; // System.out.println("in liquid"); } } }
  9. Nope. I don't need stuff on the client. I was just planning on interfacing through commands. Now, how does one get the IExtendedEntityProperties of an offline player? I also have this issue when the player logs out, apparently there's two of them? Code: http://pastebin.com/zSUBWnYa and http://pastebin.com/wPui5vKv
  10. Okay. And PlayerTickEvent is called once a tick right? (20x a second)
  11. Hello, What would be the best way for me to track the player's time spent logged into the server? I was thinking about logging their login and logout times but that doesn't help if the server crashes.
  12. What about having a data watcher? Do I need that?
  13. So... Is there anything easier than that? Like I know thaumcraft has <my uuid>.thaum in the playerdata folder.
  14. Hello, It's been a long time since I've posted here and I've come across a hitch in my mod. I was designing a forced-progression type mod for my server and I was wondering how I'd store the player data of the mods he is allowed to access. I've ultimately decided to use the player NBT but have a few questions. Should I store the nbt tag using the EntityPlayer.getEntityData() or use a separate data file like I've seen Thaumcraft use.
×
×
  • Create New...

Important Information

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