Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • izako

izako

Members
 View Profile  See their activity
  • Content Count

    35
  • Joined

    January 24, 2019
  • Last visited

    May 11, 2020

 Content Type 

  • All Activity

Profiles

  • Status Updates
  • Status Replies

Forums

  • Topics
  • Posts

Calendar

  • Events

Posts posted by izako

  • Prev
  • 1
  • 2
  • Next
  • Page 1 of 2  
  1. Custom Structure Spawn Conditions 1.14.4

    in Modder Support

    Posted March 26, 2020


    1 hour ago, diesieben07 said:

    Yes, the chunk coordinates you generate would be a fixed reference point on your structure, e.g. the north-west-most chunk of the structure.

    If you then get a request to generate a specific chunk you can work out which part of your structure you need to generate (if any) from the position of the north-west-most chunk (generated by the seeded Random) and the chunk being generated.

    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. Custom Structure Spawn Conditions 1.14.4

    in Modder Support

    Posted March 26, 2020


    1 hour ago, diesieben07 said:

    Yes, the chunk coordinates you generate would be a fixed reference point on your structure, e.g. the north-west-most chunk of the structure.

    If you then get a request to generate a specific chunk you can work out which part of your structure you need to generate (if any) from the position of the north-west-most chunk (generated by the seeded Random) and the chunk being generated.

    how would i get a random chunkpos from the world seed?

  3. Custom Structure Spawn Conditions 1.14.4

    in Modder Support

    Posted March 26, 2020


    1 minute ago, diesieben07 said:

    Using WorldSavedData or similar mechanisms isn't ideal because it means the world is no longer 100% dependent on the Seed (where your structure ends up being depends on in which order the chunks are generated).

     

    The way I'd do it is derive another Random instance from the World seed and use that to generate the two chunk coordinates (x and z) of the chunk you want to be in. Then only generate in that chunk.

    but my structure's size is several chunks, is your method still valid?

  4. Custom Structure Spawn Conditions 1.14.4

    in Modder Support

    Posted March 26, 2020


    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: 

    Spoiler

    https://github.com/izako666/HunterX/tree/1.14.4/src/main/java/com/izako/hunterx/structures

     

  5. projectile wont render-1.14.4

    in Modder Support

    Posted March 17, 2020


    1 hour ago, VirtCraft said:

    I had the exact same problem in 1.15.

     

    My Problem was, that the entity was not synced with the client correctly.

    My Solution was to override the

    
    ThrowableEntity#createSpawnPacket

    method in the Entity class, and call

    
    return NetworkHooks.getEntitySpawningPacket(this);

     inside that method.

     

    Maybe that helps.

    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. projectile wont render-1.14.4

    in Modder Support

    Posted March 17, 2020


    12 hours ago, TheGreyGhost said:

    Hi Izako

     

    Yes you're right, it will stop the game every tick.  But that doesn't matter because once it is stopped (paused) you can easily find the problem and solve it.

     

    If you're not used to the debugger I think it would be very helpful for you to spend some time learning how to use breakpoints, variable watches, and tracing in your debugger.  It makes debugging much much easier and it will make your programming experience very frustrating if you don't use it.  There are many many great online tutorials, and it really isn't difficult to learn the basics.

     

    Cheers

      TGG

    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. projectile wont render-1.14.4

    in Modder Support

    Posted March 16, 2020


    5 hours ago, TheGreyGhost said:

    Howdy

    I suggest you could troubleshoot it by putting a breakpoint in WorldRenderer::updateCameraAndRender() at the 

    
    iprofiler.endStartSection("entities");

    section, then stepping through the entity loop until it reaches your entity and then tracing in to see where the problem is, eg

    1) Is your entity present at all?

    2) Is it being clipped (out of view)?

    3) Is the correct renderer being called?

    4) Is the renderer actually drawing anything?

     

    etc

     

    Cheers

      TGG

     

    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. projectile wont render-1.14.4

    in Modder Support

    Posted March 16, 2020


    bump

  9. projectile wont render-1.14.4

    in Modder Support

    Posted March 15, 2020


    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

  10. WorldSavedData doesn't save [FIXED] 1.12.2

    in Modder Support

    Posted August 17, 2019


    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

  11. WorldSavedData doesn't save [FIXED] 1.12.2

    in Modder Support

    Posted August 17, 2019


    On 8/16/2019 at 3:11 PM, diesieben07 said:

    Is the data ever created? Is it's data ever modified? Use the debugger.

    No like i said the dat file doesn't get created, and thus it doesn't get modified either.

  12. WorldSavedData doesn't save [FIXED] 1.12.2

    in Modder Support

    Posted August 16, 2019


    30 minutes ago, diesieben07 said:
    • The ID for your WorldSavedData must be a valid file name, it can't include a ":".
    • Your readFromNBT method does nothing but waste CPU cycles. You read the data from NBT and then... drop it on the ground and do nothing with it.
    • I doubt you want this.
    • I doubt you own this domain.

    I tried your fixes, sadly still doesn't work and the dat file still doesn't exist 
    updated data class
    https://pastebin.com/7JeYbuNn

  13. WorldSavedData doesn't save [FIXED] 1.12.2

    in Modder Support

    Posted August 16, 2019


    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

  14. Capability values get reset?(1.12.2)

    in Modder Support

    Posted July 11, 2019


    1 hour ago, diesieben07 said:

    How would it not reset? It's just a field in a class. When you create an instance of the class it will be set to the initial value: 0. I am not sure what this is trying to achieve, but you cannot share data like this. Your event class exists once there is one value for these fields for all players.

    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

  15. Capability values get reset?(1.12.2)

    in Modder Support

    Posted July 10, 2019


    1 hour ago, Meldexun said:

    The healthStatCap variable in your HealthStat event is always 0 at the beginning. When your event gets called the first time it sets the value of healthStat from your capability to healthStatCap + 1 (0 + 1 = 1).

    I didn't think that would make it reset, its weird I didn't think of that tbh but thanks it works now

  16. Capability values get reset?(1.12.2)

    in Modder Support

    Posted July 10, 2019 · Edited July 10, 2019 by izako
    wrote the version


    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

     

  17. Event not working and magical bug

    in Modder Support

    Posted June 13, 2019


    On 6/12/2019 at 7:05 PM, Draco18s said:

    1) You have fields that you can't have (what happens when there's more than 1 player?) You shouldn't need either of these variables anyway. If the sword exists, it must be in the active hand to be removed (if the sword exists at all, and can be removed, then its been spawend). If the player moves the sword to a different slot then itemArea will be wrong.

    2) RightClickEmpty already runs when the active hand slot is empty, so why are you checking to see if the active hand slot is empty?

    3) And of course, if there's a sword in that slot, the event won't fire because you right clicked while not empty

    4) Your code style is awful, please put the two if statements on line 38 on different lines and correctly indent things.

    5) Don't check chest.getItem().equals(ModItems.HANZOS_CHESTPLATE) && playerIn.isSneaking() twice. Put those in the outer if statement.

    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.
     

  18. Event not working and magical bug

    in Modder Support

    Posted June 12, 2019


    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

  19. Custom Chestplate <SOLVED>

    in Modder Support

    Posted April 30, 2019


    2 hours ago, DavidM said:

    That is suppose to happen; the @Override annotation should give a compile-time error when the method associated with it does not override a super method.

    Make sure the return type and parameters of your onArmorTickUpdate matches the return type and parameters of the onArmorTickUpdate method in the class you are overriding.

     

    If you still cannot understand what you are suppose to do, the I'm afraid you might not be ready to make Minecraft mods. You should have basic Java knowledge, which includes overriding and inheritance, before attempting to make a mod. I would recommend looking up some Java tutorials in order to get familiar with Java before making mods.

    thanks it worked i was just using the wrong method it was actually onArmorTick not onArmorTickUpdate

  20. Custom Chestplate <SOLVED>

    in Modder Support

    Posted April 30, 2019


    6 minutes ago, DavidM said:

    You still did not annotate your onArmorTickUpdate method with the @Override annotation.

    that just gave me the error "The method onArmorTickUpdate(World, EntityPlayer, ItemStack, EnumHand) of type HanzoArmorBase must override or implement a supertype method"

     

  21. Custom Chestplate <SOLVED>

    in Modder Support

    Posted April 30, 2019


    32 minutes ago, DavidM said:

    1.

    Do not create "base" classes (ItemBase, BlockBase, etc). Do not abuse inheritance to write less code.

      

     2. Remember to check the side by using World#isRemote.

      

    3.

    Are you sure you want to use a while loop there?

     (Hint: no)

     

    4. Annotates your methods that are meant to override methods from the parent class with the @Override annotation (onArmorTickUpdate in this case).

     This is leading to your current problem, as the method signature of your onArmorTickUpdate method does not match that of its super method.

    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

  22. Custom Chestplate <SOLVED>

    in Modder Support

    Posted April 30, 2019 · Edited May 1, 2019 by izako


    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"));
    			}
    
    		}
    
    	}
    

     

  23. projectile wont render 1.12.2

    in Modder Support

    Posted March 18, 2019


    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.

  24. Fishing rod

    in Modder Support

    Posted February 19, 2019


    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

  25. How to replace IHasModel

    in Modder Support

    Posted February 13, 2019


    22 hours ago, Cadiboo said:

    You should learn Java. You need to only copy the ModelLoader.setCustomResourceLocation line. You can’t have a method inside another method

    WOOOOH it worked. thanks :)

  • Prev
  • 1
  • 2
  • Next
  • Page 1 of 2  
  • All Activity
  • Home
  • izako
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community