Jump to content

reapersremorse

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by reapersremorse

  1. (i basically wanna install jei or nei or something similar) Things ive tried 1) run.mods folder (normal install) // does not work 2)build.JustEnoughItems-1.15.file 3)build.JustEnoughItems-1.15.zip 4)build.(mods name i made up).JustEnoughItems-1.15.file 5)build.(mods name i made up).JustEnoughItems-1.15.zip 6)build.jei-1.15.2-6.0.0.4.jar 7)build.jei-1.15.2-6.0.0.4.file 8)MOD_ID.src.main.java.com.mods.jei-1.15.2-6.0.0.4 .jar.file.zip none of these options work in 1.12.2 you could install mods in the mods folder in the run dir. then it changed to just about anywhere in the build folder. i tried released and dev versions, nothing worked. when mods installed, the game still loaded but did not load the mods, obfuscated and de-obfuscated did not seem to matter. i also do not want to the mod a dependency can anyone tell me where i need to install mods these days? i hate the default creative menu.
  2. i plan to make a more advanced constructor in the future, one where when i initialize items. i can choose container item as a property. doing this now just means i shouldn't have to do it in the future. unless i have to change it.
  3. thanks ill do that, i thought i sent this earlier. that totally fixed my issues btw thanks @diesieben07 @poopoodice i understood that, i was just testing things. i ended up looking to make sure the item was a container item then if it is i make it one by returning itemstack. it was the easiest and most simplistic way to do it. the issue is fixed now. public class UTOContainerItem extends Item { //TODO: make RepairItemRecipe much more elaborate public UTOContainerItem (Properties properties) { super(properties); } @Override public boolean hasEffect(ItemStack stack){return true;} @Override public void setDamage(ItemStack stack, int damage){} @Override public boolean isRepairable(ItemStack stack) { return super.isRepairable(stack); } @Override public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) { return super.getIsRepairable(toRepair, repair); } @Override public boolean hasContainerItem(ItemStack stack){return true;} @Override public ItemStack getContainerItem(ItemStack itemStack) { if (!hasContainerItem(itemStack)) { return ItemStack.EMPTY; } return new ItemStack(getItem()); } }
  4. when i return null and craft an item, i crash (of course) when i try to return ItemInit.MYITEM, or when i try to return (this) the code is not functional. so i tried returning itemStack this allows the crafting to work without crashing but the item is still used up. @Override public ItemStack getContainerItem(ItemStack itemStack) { return itemStack; } this bit of code is the only thing my tiny brain has gotten to work. (by work i mean it didn't crash) i tried returning a specific item, tried passing the itemstack in the constructor, i tried a few different things. should i be passing getContainerItem in the init class instead? @Override public ItemStack getContainerItem(ItemStack itemStack) { return ItemInit.uto_generic_eye; }//when i try this, its all errored when i try to pass a specific item, it errors and becomes unusable. im finding it hard to find information on this topic, could i maybe find this in the energy api or something?
  5. hello and thank you to anyone who reads this. im trying to make a containeritem, it seems it does not work the same in this version. just to be clear, i do not want to create a gui, i want to create an item which returns to the player inventory or stays in crafting grid after a craft is preformed. much like the old equivalent exchange philosopher stone, or the juicer from many other mods. and i would like to change damage on craft. i tried passing hasContainerItem and i could not figure out what i did wrong. (im not great at java and the last time i made a mod was 1.10.2, my mod was not released) here is base code before i tried properly setting up the constructors (if i do anything else, the class throws errors) raw code public class UTOContainerItem extends Item { //TODO: make it so i can change all attributes of an item aswell as add tooltips to items in 1 line of code in the init class. public UTOContainerItem (Properties properties) { super(properties); } @Override public void addInformation(ItemStack stack, @Nullable World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); } @Override public boolean hasEffect(ItemStack stack) { return true; } @Override public boolean hasContainerItem(ItemStack stack) { return true; } }
  6. that was an instance that i had already setup, i did refresh when i set it up, i just remade my instance and the run folder wasnt showing anything, its not a lack of knowledge on my part (for once). before i left for work, i redid the whole thing and i still didnt have a run folder or the minecraft libraries, then i ran minecraft.exe and the folder showed up. i did the install in the exact order that the forge forums says this time for sure. no way of doing things different because i read from top to bottm, i did not do anything different than i normally would so thats a relief. my folder was empty, untill i tried running minecraft. i mean in intellij and in the mod environment folder. the refresh icon on the gradle panel does jackshit after i sync the gradle project. and it still does nothing if i only refresh and do not sync the project. the libraries and minecraft run folder only show up when ive tried to run minecraft. sorry for the delay in messaging, i fell asleep in my chair not long after the post. i believe my intellij is messed up and im going to reinstall it when i get home. i only have 2 hours a day i can be at the computer, kinda wish i had more spare time. more if i dont sleep.
  7. im using the latest version of forge at the moment for 1.12.2, im just re writing my mod.... ive done this many times before and never had this issue. i have no external libraries and or anything in the run folder steps i take when making an environment 1) make folder 2) add mdk to folder, then extract the mdk (currently using "forge-1.12.2-14.23.4.2757-mdk") 3) double click build.gradle deselect "create seperate module per source set" because i do not need more than one. set jdk to the proper 1.8.0_172 click ok 4) project opens in intellij and i open the gradle on the right then select the setupDecompWorkspace and edit the vm to be 1gig to 7 gigs then runit, then it says no errors. 5) go back to folder and run the dradlew.bat (only need to do this once, but i did it every time i make the environment.) 6) return to intellij and configure the genIntellijRuns then run it and no errors, yet i have no run files or minecraft libraries. im confused, ive never had this problem. video of me showing you what i am talking about, although i cant post logs for i have none... minecraft modded environment without the environment...
  8. oh i get it, thank you for the help. i was just inputting the method incorrectly. this works well, thanks for the speedy help.
  9. i tried setting as an int instead of a string, it only wants a string so i converted it to a string. does this mean i have to set 2 fields for my tooltips? i could not use an int in any way inside the tooltips, when i tried setting the field from public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { into public void addInformation(ItemStack stack, World worldIn, List<int> tooltip, ITooltipFlag flagIn) { or public void addInformation(ItemStack stack, World worldIn, List<Integer> tooltip, ITooltipFlag flagIn) { it would not add the tooltips.
  10. could someone help me with int conversion for my tooltips?? above constructor ive set public int BurnTime; public String burntime = String.valueOf(BurnTime); in constructor i set int BurnTime in the super i set this. BurnTime = burntime; in the add information code i set tooltip.add(this.burntime); i get no errors and yes the item has the right burn time set to it (the items burn at the rate in which they are set) but the tooltip says 0, i cant get it to write the proper int ive tried using Integer.toString(BurnTime) String.valueOf(BurnTime) Integer(BurnTime).toString() https://github.com/reapersremorse/UTO-Mod/blob/master/src/main/java/com/reapersremorse/uto/prefabs/items/BasicItemPrefab.java
  11. please excuse the odd placed classes, when i want to test something i kind of just make a class... i really do need to rewrite the mod in order for other people to easily understand what im doing, my mind is always a jumble so its easy for me.
  12. i need to rewrite my mod in order to make things make since XD i have a very different invironment than most people would like, but if you care to take a look, this is my fixed github repo https://github.com/reapersremorse/UTO-Mod
  13. i had a github setup and i have way to many files, when i tried adding the rest of my files, it put them in the wrong place, i need to learn github a bit better
  14. my inital post was loading the oregen in 2:48 my system is as follows amd Ryzen 7 2700x eight core 32gigs (7271mb allocated to minecraft) gforce gtx 1060 6gb gpu the fact that it took that long is insane this is what i changed it to and i havent looked in world yet, ill need to tweak it till its right. package com.reapersremorse.uto.prefabs.worldgen; import com.reapersremorse.uto.init.blocks.InitiateBlocks.BasicBlockRegistry; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.fml.common.IWorldGenerator; import java.util.Random; public class OreGen implements IWorldGenerator { private static WorldGenerator T0; private static WorldGenerator T1; private static WorldGenerator T2; private static WorldGenerator T3; private static WorldGenerator T4; private static WorldGenerator T5; private static WorldGenerator T6; private static WorldGenerator T7; private static WorldGenerator T8; private static WorldGenerator T9; private static WorldGenerator T10; private static WorldGenerator T11; private static WorldGenerator T12; private static WorldGenerator T13; private static WorldGenerator T14; public static WorldGenerator T15; public OreGen() { T0 = new WorldGenMinable(BasicBlockRegistry.T0ORE.getDefaultState(),7); T1 = new WorldGenMinable(BasicBlockRegistry.T1ORE.getDefaultState(),6); T2 = new WorldGenMinable(BasicBlockRegistry.T2ORE.getDefaultState(),5); T3 = new WorldGenMinable(BasicBlockRegistry.T3ORE.getDefaultState(),4); T4 = new WorldGenMinable(BasicBlockRegistry.T4ORE.getDefaultState(),3); T5 = new WorldGenMinable(BasicBlockRegistry.T5ORE.getDefaultState(),3); T6 = new WorldGenMinable(BasicBlockRegistry.T6ORE.getDefaultState(),3); T7 = new WorldGenMinable(BasicBlockRegistry.T7ORE.getDefaultState(),3); T8 = new WorldGenMinable(BasicBlockRegistry.T8ORE.getDefaultState(),3); T9 = new WorldGenMinable(BasicBlockRegistry.T9ORE.getDefaultState(),3); T10 = new WorldGenMinable(BasicBlockRegistry.T10ORE.getDefaultState(),3); T11 = new WorldGenMinable(BasicBlockRegistry.T11ORE.getDefaultState(),3); T12 = new WorldGenMinable(BasicBlockRegistry.T12ORE.getDefaultState(),3); T13 = new WorldGenMinable(BasicBlockRegistry.T13ORE.getDefaultState(),3); T14 = new WorldGenMinable(BasicBlockRegistry.T14ORE.getDefaultState(),3); T15 = new WorldGenMinable(BasicBlockRegistry.T15ORE.getDefaultState(),3); } public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimension()) { //overworld case 0: runGenerator(T0, world, random, chunkX, chunkZ, 1, 60, 64); runGenerator(T1, world, random, chunkX, chunkZ, 1, 56, 60); runGenerator(T2, world, random, chunkX, chunkZ, 1, 52, 56); runGenerator(T3, world, random, chunkX, chunkZ, 1, 48, 52); runGenerator(T4, world, random, chunkX, chunkZ, 1, 44, 48); runGenerator(T5, world, random, chunkX, chunkZ, 1, 40, 44); runGenerator(T6, world, random, chunkX, chunkZ, 1, 36, 40); runGenerator(T7, world, random, chunkX, chunkZ, 1, 32, 36); runGenerator(T8, world, random, chunkX, chunkZ, 1, 28, 32); runGenerator(T9, world, random, chunkX, chunkZ, 1, 24, 28); break; //end case 1: runGenerator(T14, world, random, chunkX, chunkZ, 5, 6, 128); runGenerator(T15, world, random, chunkX, chunkZ, 5, 6, 128); break; //Nether case -1: runGenerator(T10, world, random, chunkX, chunkZ, 1, 65, 69); runGenerator(T11, world, random, chunkX, chunkZ, 1, 70, 74); runGenerator(T12, world, random, chunkX, chunkZ, 1, 75, 79); runGenerator(T13, world, random, chunkX, chunkZ, 1, 80, 84); runGenerator(T14, world, random, chunkX, chunkZ, 1, 85, 89); runGenerator(T15, world, random, chunkX, chunkZ, 1, 90, 94); break; } } private void runGenerator(WorldGenerator gen, World world, Random rand, int chunkX, int chunkZ, int chance, int minHeight, int maxHeight) { if(minHeight > maxHeight || minHeight < 0 || maxHeight > 256) throw new IllegalArgumentException("Ore Generated Out of Bounds"); int heighDiff = maxHeight - minHeight + 1; for(int i = 0; i < chance; i++) { int x = chunkX * 16 + rand.nextInt(16); int y = minHeight + rand.nextInt(heighDiff); int z = chunkZ * 16 + rand.nextInt(16); gen.generate(world, rand, new BlockPos(x, y, z)); } } } i basically did as animefan8888 said, i changed the spawn chance and upped the vein count, its at 25 seconds load time now, but it takes 24 seconds without any mods
  15. i do not know what values i want to add but i have it where the world loads in about 25 seconds
  16. i initally thaught it was a % chance built into random, butanimefan8888 made me realize it a spawning random loop, the higher the number, the more times it passes to spawn more veins
  17. i used a catalyst from projecte and i mined out a 67x67x9 area and i have 231 iron ore 109 tier0 ore(my mod) 27 tier 1 in my mod, iron is technically tier 2 ore. ill lower the values a bit, ut i would like t0 to have the highest count of all my ores and i do not want them to be impossible to find y level at the top is 64 y level at the bottom is 58 my aim is to make it so no matter what biome you start in, you do not need wood and you do not need iron to start. my t0 is basically a throwaway ore, it only mines at hand level (0) but its much faster and has infinate durability. it will have ok armor that will protect against knockback hopefully but it will be basic, im also making it so you need the previous tier to make the next one so you will need a lot of this ore in the future. especially when i get into making machines. if you believe this is still too op i can change it to be lower, im not good at judging these values yet. i also do not want to impeed on other ore generation from other mods...
  18. ive changed my chance on all 16 ores, now it loads from world creation in 26.5 seconds. switch(world.provider.getDimension()) { //overworld case 0: runGenerator(T0, world, random, chunkX, chunkZ, 15, 60, 64); runGenerator(T1, world, random, chunkX, chunkZ, 12, 56, 60); runGenerator(T2, world, random, chunkX, chunkZ, 11, 52, 56); runGenerator(T3, world, random, chunkX, chunkZ, 10, 48, 52); runGenerator(T4, world, random, chunkX, chunkZ, 9, 44, 48); runGenerator(T5, world, random, chunkX, chunkZ, 8, 40, 44); runGenerator(T6, world, random, chunkX, chunkZ, 7, 36, 40); runGenerator(T7, world, random, chunkX, chunkZ, 6, 32, 36); runGenerator(T8, world, random, chunkX, chunkZ, 5, 28, 32); runGenerator(T9, world, random, chunkX, chunkZ, 4, 24, 28); break; //end case 1: runGenerator(T14, world, random, chunkX, chunkZ, 10, 6, 128); runGenerator(T15, world, random, chunkX, chunkZ, 10, 6, 128); break; //Nether case -1: runGenerator(T10, world, random, chunkX, chunkZ, 8, 65, 69); runGenerator(T11, world, random, chunkX, chunkZ, 7, 70, 74); runGenerator(T12, world, random, chunkX, chunkZ, 6, 75, 79); runGenerator(T13, world, random, chunkX, chunkZ, 5, 80, 84); runGenerator(T14, world, random, chunkX, chunkZ, 4, 85, 89); runGenerator(T15, world, random, chunkX, chunkZ, 3, 90, 94); break; }
  19. yeah i just figured that out when i saw your explanation.
  20. oh my, i misunderstood completely, i was under the impression the random function from java was looking to see what chance to spawn once was. i didnt realize i was telling it to spawn 100x i should have looked at that random function in java a bit closer. thank you
  21. T0 = new WorldGenMinable(BasicBlockRegistry.T0ORE.getDefaultState(),3); in this line, im setting the block to spawn, and how many blocks per vein. this is 3 blocks per vein runGenerator(T0, world, random, chunkX, chunkZ, 100, 60, 64); int 100 = chance to spawn, int 60 is min height, int 64 is max height. the case statement uses the code in WorldProvider.java in minecraft for(int i = 0; i < chance; i++) { are you referring to the portion of code that has the i++ if so, i couldnt get the game to run without doing that, i do not see the 100x spawn you are talking about. and this i++ is the only mention of 3x in any of the math. for(int i = 0; i < chance; i++) { int x = chunkX * 16 + rand.nextInt(16); int y = minHeight + rand.nextInt(heighDiff); int z = chunkZ * 16 + rand.nextInt(16); gen.generate(world, rand, new BlockPos(x, y, z)); } this whole portion of code should be making the ore generate in the chunk at a random interval with a chance of atleast 1 spawn and 3 blocks per vein with a random built into the vein size. and it sets the chunk size and uses the function built above this portion of code in order to tell what y level to spawn between.
  22. first line, its running the random generation at a 100%chance to spawn at least once between y level 60 and 64 second line, it should be setting an int, then saying if that int is for which ever world, then spawn in that world at the y levels specified in the first line -1,0,1 for worlds
  23. hello, can anyone help me make my ore gen more efficient? i am using some mods for ease and comparisons for values and such. mods list jei_1.12.2-4.11.0.206 jepb-1.12-1.12.1 journeymap-1.12.2-5.5.2 justenoughbuttons-1.12.2-1.2.2-5 mantle-1.12-1.3.2.24 moartinkers-0.6.0 projecte-1.12-pe1.3.0 tconstruct-1.12.2-2.10.1.87 veinminer-1.12-0.38.2+b31535a my mod (UTO-Mod-0.5.3) reason for posting, it takes quite a bit for my world to load, ive played with many mods with a great deal of mods and usually modpacks that add a lot of ores, and i never had to load a world for this long my ore gen code, loading an instance is no problem, with this invironment it only takes me 30 seconds to load from hitting play, till it gets to the title screen. so thats not a problem but when i clock create world, it takes 2:48 in order to get to the menu screen,(i was tabbed out so it went to menu screen) noticable chunk gen lag aswell, ive played with many mods adding way more ored than this and had no where near as much loading lag as this. anyone have any suggenstions?? package com.reapersremorse.uto.prefabs.worldgen; import com.reapersremorse.uto.init.blocks.InitiateBlocks.BasicBlockRegistry; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.fml.common.IWorldGenerator; import java.util.Random; public class OreGen implements IWorldGenerator { private static WorldGenerator T0; private static WorldGenerator T1; private static WorldGenerator T2; private static WorldGenerator T3; private static WorldGenerator T4; private static WorldGenerator T5; private static WorldGenerator T6; private static WorldGenerator T7; private static WorldGenerator T8; private static WorldGenerator T9; private static WorldGenerator T10; private static WorldGenerator T11; private static WorldGenerator T12; private static WorldGenerator T13; private static WorldGenerator T14; public static WorldGenerator T15; public OreGen() { T0 = new WorldGenMinable(BasicBlockRegistry.T0ORE.getDefaultState(),3); T1 = new WorldGenMinable(BasicBlockRegistry.T1ORE.getDefaultState(),3); T2 = new WorldGenMinable(BasicBlockRegistry.T2ORE.getDefaultState(),3); T3 = new WorldGenMinable(BasicBlockRegistry.T3ORE.getDefaultState(),3); T4 = new WorldGenMinable(BasicBlockRegistry.T4ORE.getDefaultState(),3); T5 = new WorldGenMinable(BasicBlockRegistry.T5ORE.getDefaultState(),3); T6 = new WorldGenMinable(BasicBlockRegistry.T6ORE.getDefaultState(),3); T7 = new WorldGenMinable(BasicBlockRegistry.T7ORE.getDefaultState(),3); T8 = new WorldGenMinable(BasicBlockRegistry.T8ORE.getDefaultState(),3); T9 = new WorldGenMinable(BasicBlockRegistry.T9ORE.getDefaultState(),3); T10 = new WorldGenMinable(BasicBlockRegistry.T10ORE.getDefaultState(),3); T11 = new WorldGenMinable(BasicBlockRegistry.T11ORE.getDefaultState(),3); T12 = new WorldGenMinable(BasicBlockRegistry.T12ORE.getDefaultState(),3); T13 = new WorldGenMinable(BasicBlockRegistry.T13ORE.getDefaultState(),3); T14 = new WorldGenMinable(BasicBlockRegistry.T14ORE.getDefaultState(),3); T15 = new WorldGenMinable(BasicBlockRegistry.T15ORE.getDefaultState(),3); } public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.getDimension()) { //overworld case 0: runGenerator(T0, world, random, chunkX, chunkZ, 100, 60, 64); runGenerator(T1, world, random, chunkX, chunkZ, 80, 56, 60); runGenerator(T2, world, random, chunkX, chunkZ, 75, 52, 56); runGenerator(T3, world, random, chunkX, chunkZ, 70, 48, 52); runGenerator(T4, world, random, chunkX, chunkZ, 65, 44, 48); runGenerator(T5, world, random, chunkX, chunkZ, 60, 40, 44); runGenerator(T6, world, random, chunkX, chunkZ, 55, 36, 40); runGenerator(T7, world, random, chunkX, chunkZ, 50, 32, 36); runGenerator(T8, world, random, chunkX, chunkZ, 45, 28, 32); runGenerator(T9, world, random, chunkX, chunkZ, 40, 24, 28); break; //end case 1: runGenerator(T14, world, random, chunkX, chunkZ, 100, 6, 128); runGenerator(T15, world, random, chunkX, chunkZ, 100, 6, 128); break; //Nether case -1: runGenerator(T10, world, random, chunkX, chunkZ, 50, 65, 69); runGenerator(T11, world, random, chunkX, chunkZ, 45, 70, 74); runGenerator(T12, world, random, chunkX, chunkZ, 40, 75, 79); runGenerator(T13, world, random, chunkX, chunkZ, 35, 80, 84); runGenerator(T14, world, random, chunkX, chunkZ, 30, 85, 89); runGenerator(T15, world, random, chunkX, chunkZ, 25, 90, 94); break; } } private void runGenerator(WorldGenerator gen, World world, Random rand, int chunkX, int chunkZ, int chance, int minHeight, int maxHeight) { if(minHeight > maxHeight || minHeight < 0 || maxHeight > 256) throw new IllegalArgumentException("Ore Generated Out of Bounds"); int heighDiff = maxHeight - minHeight + 1; for(int i = 0; i < chance; i++) { int x = chunkX * 16 + rand.nextInt(16); int y = minHeight + rand.nextInt(heighDiff); int z = chunkZ * 16 + rand.nextInt(16); gen.generate(world, rand, new BlockPos(x, y, z)); } } }
  24. Ill remember this. Thanks, when i get off work ill change my values for my creative tools. (I should just make them -1 and forget the damage since they wont be used in normal play.
×
×
  • Create New...

Important Information

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