Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

-1 Poor

About SHiLLySiT

  • Rank
    Tree Puncher


  • Gender
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is it possible to translate a chat message and then replace a specified pattern with a replacement string upon translation? Say for example I have this in my language file: my.test.string=Hello {PLAYERNAME}! How are you today? Ideally the string would arrive at the client, be translated, and then replace "{PLAYERNAME}" with the player's display name.
  2. Ah sorry if that wasn't clear in my first post - yes the chunk that the AI is in before attempting to move it is definitely unloaded.
  3. Is there a way to force the AI on?
  4. I'm trying to move an entity when a player right-clicks with an item. It works as intended if the Entity is in a nearby loaded chunk, but if its far enough away, the player has to move a bit before the entity appears after right clicking. Here's the code: public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float offsetX, float offsetY, float offsetZ) { if (!player.getEntityWorld().isRemote) { if (side == 1) { // only spawn on top of blocks EntityExtendedPlayer extPlayer = EntityExtendedPlayer.get(player)
  5. I just realized its because forge creates a new player each time I compile and run the mod, which is generating a new UUID. If I simply leave the world without closing the client it works as intended.
  6. I've extended the EntityTameable class, so the methods I'm using are the ones found in there. I had assumed they were setup to sync since other classes do nothing extra. Here they are anyway: public void func_152115_b(String p_152115_1_) { this.dataWatcher.updateObject(17, p_152115_1_); } public EntityLivingBase getOwner() { try { UUID uuid = UUID.fromString(this.func_152113_b()); return uuid == null ? null : this.worldObj.func_152378_a(uuid); } catch (IllegalArgumentException illegalargumentexception) { return null; } }
  7. My custom mob is losing its owner after I logout and back into a world. public EntityCustom(World world) { super(world); this.setSize(0.6F, 0.8F); _type = 0; preventEntitySpawning = true; this.func_110163_bv(); // forces entity to not despawn this.getNavigator().setAvoidsWater(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F)); this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true)); this.tasks.addTask(5, new EntityAIFollowOwner(thi
  8. I'm trying to add custom structures (similar to villages) to map generation. I've so far worked out that I need to create a generator that implements the IWorldGenerator class and I can generate blocks within a single chunk. Beyond that I'm not sure where to go; most tutorials I've found have been for ore generation. If anyone can point out any tutorials or open-source mods that accomplish something similar I'd greatly appreciate it!
  9. I'm having an issue with chat colors not carrying over to new lines. You can see the behavior here: https://s32.postimg.org/4lbyeg5xh/2016_07_13_1027.png[/img] Here's the code I used to produce the message: sender.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Lorem ipsum dolor sit amet, eius maiorum accusam at cum, eu congue facilisi quaerendum mea, est id discere honestatis intellegebat. Et vel iuvaret aliquando sadipscing. Nam et dolore nominati. Est ancillae adolescens no, his falli dolor ut. An vel feugait nusquam indoctum, ad ius munere putant aperiri."));
  10. I'd love to upgrade but we must be able to support MinecraftEDU and the current stable version is forked from 1.7.10. In what class is getRegistryName() located? It doesn't seem to be on Item or ItemStack.
  11. I want to search through the players inventory to check and see if any of the items match a specified string which is defined in an XML. I've found getUnlocalizedName(), however the string is often quite long. Is there anything more concise? I've seen websites that list ids similar to this website: http://minecraft-ids.grahamedgecombe.com/
  12. Oh I just assumed that since the command was being run on the server that it should check the entity on the server rather than the client, but if this isn't a problem then I will leave it!
  13. I just discovered IEntityAdditionalSpawnData which seems to have fixed the issue, but as you pointed out, I'm using the client to get the entity the player is looking at. What would be the alternative for the server?
  14. I created a new Entity that has two properties - bundleId and npcId: public EntityQuestNpc(World world, String bundleId, String npcId) { super(world); this.bundleId = bundleId; this.npcId = npcId; preventEntitySpawning = true; } Currently the entity is only spawned via a console command: private void commandSpawnNpc(ICommandSender sender, String bundleId, String npcId) { EntityQuestNpc npc = new EntityQuestNpc(sender.getEntityWorld(), bundleId, npcId); npc.setLocationAndAngles(sender.getPlayerCoordinates().posX, sender.getPlayerCoordinates().posY, sender.getPlayerCoordina
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.