Jump to content

TheRPGAdventurer

Members
  • Posts

    642
  • Joined

  • Last visited

Posts posted by TheRPGAdventurer

  1. Hi everyone, i recently fixed the bug when riding a dragon that would cause the camera to be used as an xray passing through the blocks below, basing from rideable vanilla mobs like horse or pigs they orient the camera by using raytraceresult and subtract the distance from behind hence reducing the zoom dist thus fixing xray, their parameters are filled with rarely used methods what are their purposes?

                    for (int i = 0; i < 8; ++i) // max thirdPersonDistance = 4 so 8 is a X 2 version?
                    {
                        float f3 = (float)((i & 1) * 2 - 1); // is 2 half of thirdPersonDistance?
                        float f4 = (float)((i >> 1 & 1) * 2 - 1); // what the point of 1?
                        float f5 = (float)((i >> 2 & 1) * 2 - 1);
                        f3 = f3 * 0.1F; // why are they converted to 10 %?
                        f4 = f4 * 0.1F;
                        f5 = f5 * 0.1F;
                        RayTraceResult raytraceresult = this.mc.world.rayTraceBlocks(new Vec3d(d0 + (double)f3, d1 + (double)f4, d2 + (double)f5), new Vec3d(d0 - d4 + (double)f3 + (double)f5, d1 - d6 + (double)f4, d2 - d5 + (double)f5));

    Their purpose might help improve my xray fix. It isnt perfect XD

  2. On 2/17/2019 at 2:10 AM, diesieben07 said:

    For eclipse: Run gradlew eclipse, then import the project.

    For IntelliJ: Simply open build.gradle as a project (File > Open), the import process will take care of everything.

     

    Do not run gradlew idea.

    what do you mean open build.gradle as a project?

  3. 29 minutes ago, V0idWa1k3r said:

    The banner model is stored in TileEntityBannerRenderer but it's private.

    You can copy what that renderer does but with your banner model.

    @V0idWa1k3r i already done that but how do i get the textures for it? you said puling out the data from the itemstack but i see no methods of getting the tileentity from Item.class. what do i need to call the the banner tile entity since it the only one that tores the data not the blockbanner nor the itembanner

        private ResourceLocation getBannerResourceLocation(TileEntityBanner bannerObj)
        {
            return BannerTextures.BANNER_DESIGNS.getResourceLocation(bannerObj.getPatternResourceLocation(), bannerObj.getPatternList(), bannerObj.getColorList());
        }

     

  4. On 11/1/2018 at 1:17 PM, V0idWa1k3r said:

    Either copy what TileEntityBannerRenderer does but without an actual banner tileentity present(pull the data from the ItemStack) 

    @V0idWa1k3r I used your second option to render it as an item but now i want the  stick to be gone from the item, i will render it from the model so i can set bannerModel.bannerStand.showModel = false; now you gave me this advice how do i pull out the data from the item?

  5. Ok sorry for necroing this post. Using the render by item method works for me. but the problem is that it shows the bannerstand model which is the brown stick below i want it gone now, its there because I rendered it by the item model entity. now i want to render the banner model in the render instead of calling in the item model, with it can finally set

    bannerModel.bannerStand.showModel = true;

    to false removing the stick beloww. but how do i call in the item tileentity straight from the inventory data for the textures to render, the texture is automatically called in by the item?

    unknown.png

  6. 12 hours ago, DavidM said:
    
    public class DragonMountsItemDataFixes implements IFixableData {
    
        @Override
        public int getFixVersion() {
            return 1;
        }
    
        // is the fixTag proper (I think this is the cause tho) derived from PotionItem.class
        public NBTTagCompound fixTagCompound(NBTTagCompound compound) {
            if ("dragonmounts:end_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:nether_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:skeleton_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:wither_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:forest_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:fire_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:water_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:sunlight_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:enchant_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:terra_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
            if ("dragonmounts:moonlight_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
    
            if ("dragonmounts:storm_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
    
            return compound;
        }
    }
  7. 1 hour ago, DavidM said:

    Irrelevant: You might want to use something like regex to clean up that bunch of if elses.

    Using sub-string to check if the last few characters equal to "dragon_amulet" would also work. Just don't use a bunch of if elses.

    i removed the else and left with only if statemets whats left to do it still doesnt fire up

  8. So i needed data fixer because an amulet item that stores the dragons and respawn them saving the nbt data like health breed stuff like has been compressed from 13 registered names corresponding to dragon breeds to one amulet itself. so i need to data fix them. Now it doesnt work so it seems like im doing something wrong here. Also the breed was saved in the amulets inititialize instead of the nbt (now it is) how do i add that breed in?

     

    this was derived especially from ItemTotemRename.class, it doesnt have an initizlization and im not sure how

    DataFixer: https://pastebin.com/41vi5n4J

    Registry: 

    package com.TheRPGAdventurer.ROTD.datafix;
    
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.util.datafix.IFixableData;
    
    public class DragonMountsItemDataFixes implements IFixableData {
    
        @Override
        public int getFixVersion() {
            return 2;
        }
    
        // is the fixTag proper (I think this is the cause tho) derived from PotionItem.class
        public NBTTagCompound fixTagCompound(NBTTagCompound compound) {
            if ("dragonmounts:end_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:nether_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:skeleton_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:wither_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:forest_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:fire_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:water_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:sunlight_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:enchant_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:terra_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            } else if ("dragonmounts:moonlight_dragon_amulet".equals(compound.getString("id"))) {
                compound.setString("id", "dragonmounts:dragon_amulet");
            }
    
            return compound;
        }
    }

     

  9. I have been cleaning up and rearranging my files, well sadly intellij refactor failed me or i dont really understand how it works. When i moved my folders or java classes to another i get a lot of missing import issues and java package declaration that isnt on the right path. is there a way to fix them all at once instead of manually going folder to folder using alt + enter to fix the broken imports and package declatration names? I also tried notepad++ but it failed. I am looking for a program or plugin that when runned it automatically sets the package names and imports?

  10. Well Hello @TheGreyGhost umm i believe i remember you the one who made the unreleased breathweapon port to dragonmounts-1.8 so when i revived dragonmounts, i added in your breathweapons but I changed the controls a bit and i am encountering some problems not clear to me im asking for help. Heres the DragonMounts2 discord: https://discord.gg/6m87pCY

    We can talk a lot there along with my other dev XD. I need to confirm your existence and availability here first.

     

     

  11. No not mcmod.info, for some reason a calsses folder appears and when you open it production then my src folder i think thats whats causing because i edited my modules when my bug appears that my minecraft libraries wont appear. So my friend told me all i had to was run a command and refresh it forgot the command btw. but i think the edited module affected it

×
×
  • Create New...

Important Information

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