Jump to content

Zerahi

Members
  • Posts

    28
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Zerahi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Once or twice I have entered my custom dimension and had a few mobs near the portal be invisible but still able to attack. re-connecting fixes this. I had two players on and both couldn't see some mobs, some could see ones others couldn't at the same time. happened with the Void Beast and Shade but they are the only ones you see entering the dimension. Any ideas why this could be happening? Nothing shows up in the logs and they are general world spawns, usually only happens the first time someone enters that dimension in their area when everything is loaded. Mob class/Model class/Render class Render Registry - triggered in client proxy in pre-init Entity Registry - triggered in general registry during pre-init
  2. That would work to write templates you already had loaded but all the read or add function in the manager are private. I created a new template and it was an item variable. I got it stored to a new nbt compound and then looked how the template manager saves nbt files from and nbt and it's just a file stream writer with CompressedStreamTools.writeCompressed(nbt , OutStream). So its working now.
  3. I'm trying to figure out how to use this method but I can't get it to work. It starts writing but the overloads. I can't find any examples of what to put for DataFixer version. Also how to refer to my current template. net.minecraft.world.gen.structure.template.TemplateManager TemplateManager manage = new TemplateManager("/save", new DataFixer(1)); manage.writeTemplate(null, new ResourceLocation("?")); TemplateManger#writeTemplate comment says "writes the template to an external folder" I have the template in nbt right now on and item.
  4. yeah but then like an item frame could be used to get around it too. and i have a charging stand that just right click with no inventory, just takes it from you hand and copy it, the upkeep tick also charges the item so its not like its not running anyway just seeing if their was a better way
  5. I have an activated item that gives a buff, i got it to take the buff off if it leaves your action bar, and if you drop it. My only problem is it a player puts it in an inventory like a chest nothing gets called that i can see, any method for that i'm missing? Or should i just stick to short duration buffs so they fall off it its not maintained. onUpdate stops calling on leave but that also means i cant turn it off with that and onDroppedByPlayer doesn't call unless its spawns in world
  6. no the mod packs pick a version with a lot of mods and set it all up nice then wait for enough mods for a new pack, so make mods for current and be in the new packs =P
  7. i went right to 1.10.2 from 1.7.10 most of the 1.8 -1.9 code applies so you can look at tutorials for them to get close, anything after 1.7.10 is a bit hard to find examples for but not impossible (github has a few) i'm fairly far into my complex mod i started a week ago
  8. i didn't find that out in examples i just assumed it since you spawn items in with the mod id and that how its refereed to in game on items
  9. it works perfectly with my mod id have 2 mobs spawnable, with forge your mod id is the reference to your instance
  10. ref.modid is linked to my mod id @Mod(modid = Ref.MODID, public static final String MODID = "rv"; so i could replace that ref.modid with just rv and it would work, but i just like refering so i remember where its from
  11. its to my ref class that stores things its just the mod id modid = Ref.MODID
  12. happened to me once when i messed up my register i dont know exactly what fixed it but here is my working entity register (had something to do with the registry id being registered with the mc not the mod id) public class VoidEntities { public static void registerEntities() { registerEntity(EntityVoidBeast.class, "voidbeast", 64, 3, true); } private static int entityID = 0; private static void registerEntity(Class<? extends Entity> entityClass, String entityName, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates) { EntityRegistry.registerModEntity(entityClass, entityName, entityID++, Ref.MODID, trackingRange, updateFrequency, sendsVelocityUpdates, 1, 1); }
  13. yeah but it will only fire once cause any item of that type that doesn't have a tag will get one on the first tick public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) { if (!item.hasTagCompound()) { item.setTagCompound(new NBTTagCompound()); this.setDamage(item, 2000); item.getTagCompound().setInteger("power", 2000); item.getTagCompound().setBoolean("active", false); } and i use on update for other things so not like its not ticking anway
  14. just staring at the same code too long, that makes sense added a !item.hasTagCompound() check to the update tick and did the setup in their works great now
  15. Having a problem with item nbt. i setup the item with onCreated, then when i go to get something from the nbt with onItemRightClick it null points any ideas? Crash at item.getTagCompound().getInteger("power") <= 1900; public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) { item.setTagCompound(new NBTTagCompound()); this.setDamage(item, 2000); item.getTagCompound().setInteger("power", 2000); item.getTagCompound().setBoolean("active", false); } public ActionResult<ItemStack> onItemRightClick(ItemStack item, World world, EntityPlayer player, EnumHand hand) { if (item.getTagCompound().getInteger("power") <= 1900 && !item.getTagCompound().getBoolean("active")) { item.getTagCompound().setBoolean("active", false); this.setDamage(item, (int) (this.getDamage(item) +(100))); item.getTagCompound().setShort("power", (short) this.getDamage(item)); player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 100)); return new ActionResult(EnumActionResult.SUCCESS, item); } else if (!item.getTagCompound().getBoolean("active")) { item.getTagCompound().setBoolean("active", false); player.removePotionEffect(MobEffects.NIGHT_VISION); return new ActionResult(EnumActionResult.SUCCESS, item); } return new ActionResult(EnumActionResult.FAIL, item); } https://github.com/Zerahi/RavenousVoid/blob/master/src/main/java/com/ravvoid/items/AwakenedVoidOrb.java
×
×
  • Create New...

Important Information

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