Jump to content

izako

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by izako

  1. and how would i save that chunkPos so that it only ever spawns once(even when reloading the game) sorry for the questions im really confused
  2. how would i get a random chunkpos from the world seed?
  3. but my structure's size is several chunks, is your method still valid?
  4. So after alot of messing around and trying random stuff I was able to get my structure to work. my problem is that i want the structure to only spawn once per world. I did that in 1.12.2 by using worldsaveddata but i cant do that here because the generate structure methods runs in every chunk and not for the whole structure. I tried looking at how the stronghold does it but i didn't really understand it. basically my question is how can I limit my structure spawning to x amount of times. if you need it:
  5. Yeah I tested it and it seems that the entity doesn't spawn on client. Even after doing what you said and I also added a customClientFactory but it's still null on client side
  6. It seems that the entity itself is never present. I checked the loop and the projectile entity never appears. It can't be the registration of the entity since i can summon the entity.
  7. if i put a breakpoint there it'll stop the game every tick so I can't really debug that way and I'm not quite sure what to do since I'm not used to the debugger.
  8. So, I've dealt with this error before back in 1.12.2 where the projectile would shoot and hit the entity but it'd be invisible. the fix i used in 1.12.2 doesn't seem to be the problem this time. I'm trying to make a custom projectile that shoots and im using a custom renderer but the doRender method never actually runs. this is my item class: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/items/YoyoItem.java this is my entity class: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/items/entities/YoyoEntity.java this is my render class: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/items/renderers/YoyoRenderer.java this is where i register my renderer: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/registerers/ClientSideRegistry.java and that method gets called here: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/Main.java here i register my entity: https://github.com/izako666/HunterX/blob/1.14.4/main/java/com/izako/hunterx/registerers/ModEventSubscriber.java I used the debugger and all registry code does run, i also checked doRender in the renderer class but doRender didn't work
  9. So basically @diesieben07 fix actually worked. it was just that I was looking in the wrong files to find the .dat files + i had a command to get the pos of the build and my get command was not working as intended so i just thought the data reset (my bad). here's the updated class for whoever needs it: https://pastebin.com/Ex4ipDRW
  10. No like i said the dat file doesn't get created, and thus it doesn't get modified either.
  11. I tried your fixes, sadly still doesn't work and the dat file still doesn't exist updated data class https://pastebin.com/7JeYbuNn
  12. Hello, So I'm making a world data class to check how many structures ive spawned in the world and everything works fine but it resets when i leave the world and i checked, and there is no dat file in world nbt. this is my data class https://pastebin.com/E8EdD1sZ and this is the generation class that i implement with https://pastebin.com/VNcgRiPu
  13. i have reset the value to get the capability of the player which is initially 0, would that work? I haven't tried it online yet
  14. I didn't think that would make it reset, its weird I didn't think of that tbh but thanks it works now
  15. So I'm trying to add stats to my mod using a mixture of capabilities to save the values and events to set attribute modifiers, but I'm having this universal problem with all my stats where when i exit out the game and re enter the capability value gets reset. https://github.com/izako666/HunterX_Public_2/blob/master/main/java/com/izako/HunterX/stats/events/HealthStatEvent.java this is one of the events that i use for stats ^ in it the value healthStatCap gets reset when i exit mc and re enter, I think it has something to do with my capabilities so im going to put my capability code here too > https://github.com/izako666/HunterX_Public_2/tree/master/main/java/com/izako/HunterX/stats/capabilities here is the capability interface, capability implementation, the provider, and the IStorage class
  16. thanks, None of that would really fix my major problem but those are things i should've fixed either way, in the end i figured out the problem and im currently fixing it.
  17. alright so I'm trying to make an event that basically "if conditions are met spawn sword in hand and if conditions are met for other if statement remove sword" but thing is when i tried the event it seemed to run both if statements at almost the same time making my sword invisible upon spawning it i basically had to throw the sword out of my inventory to see it then i tried checking if the world wasn't remote for it to work but when i do "if(!world.isRemote)" it basically completely stops working. no code is run. My event class. https://pastebin.com/Rr24Nj2g
  18. thanks it worked i was just using the wrong method it was actually onArmorTick not onArmorTickUpdate
  19. that just gave me the error "The method onArmorTickUpdate(World, EntityPlayer, ItemStack, EnumHand) of type HanzoArmorBase must override or implement a supertype method"
  20. i did everything you said and i made it extend ItemArmor instead and added all missing code but it still doesn't seem to work at all it gives no mention of what i asked of it *id post a pastebin but its not allowed in my country and my vpn isn't working currently* HanzoArmorBase.txt
  21. So I'm trying to make a custom chestplate that spawns a sword when you sneak and right click but before i even reach the part about the summoning sword I want to make sure that its actually checking if im wearing it and if that's working So my current two problems are: it won't do the command I'm asking it to do so i could make sure it actually works I can't seem to find a way to make it so it would do it when i right click it i know onItemRightClick but that's "onItem". package com.izako.HunterX.items.armor; import com.izako.HunterX.init.ModItems; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHand; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; public class HanzoArmorBase extends ArmorBaseSkin { public HanzoArmorBase(String name, String pathName, ArmorMaterial material, int renderIndex, EntityEquipmentSlot equipmentSlot) { super(name, pathName, material, renderIndex, equipmentSlot); } public void onArmorTickUpdate(World world, EntityPlayer playerIn, ItemStack itemStack, EnumHand handIn) { while (playerIn.isSneaking()) { playerIn.setHealth(playerIn.getHealth() - 1); playerIn.sendMessage(new TextComponentString("woah there fella")); } } }
  22. Hello, so I want to make a card projectile for my mod and I've reached a bug where I can throw the card but the projectile itself will not render but it will still hit enemies here is my EntityCard https://pastebin.com/cCYGZqBV and here is my ItemCard https://pastebin.com/kZXY5vur I'm not sure what else to add other than these two files.
  23. So yeah not much more is needed just wondering how to make a custom fishing rod weird that there isn't a tutorial for it. version: 1.12.2 doe
×
×
  • Create New...

Important Information

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