Jump to content

vntlyy007

Members
  • Posts

    29
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

vntlyy007's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have a disc which i want to generate in igloo chest. I tried to do it via LootModifier. There are some code i used, but it doesn't work: and the json file:
  2. Deepslate ores are generated in general by smaller veins. Can this be controlled?
  3. I've used this wiki, but the result I'm getting isn't what I want. I searched a lot on the internet and as I understand, there are no more ways to achieve something like this
  4. I have a mod that adds several other ore mining methods and I need to control the vanilla ore generation in the world. I tried to use method with data/worldgen/configured_feature(or placed_feature), but But here comes the problem with the colossal increase in the number of giant veins of iron and copper. Are there ways to do this in a different way or to improve the previous one?
  5. Ore vein – Minecraft Wiki (fandom.com) so, maybe))
  6. In theory, JEI Mod must be broken or not compatible with any of the mods in order to get this error
  7. Hi guys, I am creating a mod in which it is necessary to reduce the quantity of ore that is spawning by the vanilla (for example, a smaller quantity of veins or the quantity of ore in them) I tried it via data/minecraft/worldgen/configured_feature and placed_feature. It works, but know but now a larger amount of "Ore Veins" appears. Literally, every few chunks: iron and copper How can I change the spawning frequency of these giant veins or maybe is there an option not via data/../worldgen? i used google translator, so there may be mistakes
  8. After trying to compile the file through gradle, I get this error: Execution failed for task ':reobfJar'. > Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-17.0.3.7-hotspot\bin\java.exe'' finished with non-zero exit value 1 * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. What do I have to do?
  9. Thanks a lot man you helped me a lot! I seem to have figured everything out, cleaned the code and everything works) My final code is:
  10. There are two serverTick voids. These two options are the basis of what I did (they don't work) in which you can do everything from scratch if you need to. I have one version where smelting is possible, but with a bunch of unfinished stuff, such as the need for coal for smelting. public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, MixingBlockEntity pBlockEntity) { if (pBlockEntity.isLit()) { --pBlockEntity.litTime; System.out.println("GOOD"); } boolean flag = pBlockEntity.isLit(); boolean flag1 = false; ItemStack itemstack = pBlockEntity.items.get(1); if(pBlockEntity.isLit() || hasRecipe(pBlockEntity)) { if (!pBlockEntity.isLit() && pBlockEntity.canBurn(pBlockEntity)) { pBlockEntity.litTime = pBlockEntity.getBurnDuration(itemstack); pBlockEntity.litDuration = pBlockEntity.litTime; timeSet(pBlockEntity); //TRUE if (pBlockEntity.isLit()) { System.out.println('A'); flag1 = true; itemstack.shrink(1); } } if (pBlockEntity.isLit() && pBlockEntity.canBurn(pBlockEntity)) { System.out.println('B'); ++pBlockEntity.cookingProgress; if (pBlockEntity.cookingProgress == pBlockEntity.cookingTotalTime) { pBlockEntity.cookingProgress = 0; craftItem(pBlockEntity); timeSet(pBlockEntity); flag1 = true; } } } else if (!pBlockEntity.isLit() && pBlockEntity.cookingProgress > 0) { System.out.println('C'); pBlockEntity.cookingProgress = Mth.clamp(pBlockEntity.cookingProgress - 2, 0, pBlockEntity.cookingTotalTime); } if (flag1) { setChanged(pLevel, pPos, pState); } } I'm trying to add a dependence on coal by using, but it does not work: if(pBlockEntity.isLit() || hasRecipe(pBlockEntity) && !itemstack.isEmpty()) { As far as I understand, the problem is that this option of getting a slot does not work in this method(it was copied from AbstractFurnaceBlockEntity) So you can use this void to try find a problem The code of mod in GIT maximally simplified and in methods where it is necessary to obtain some information (for example: getTotalCookingTime always gives 400, etc.) I have a done code for obtaining these data from the recipe, so this is not a problem to get it if you need
  11. GIT, I'll be grateful for any help)
  12. public static void serverTick(Level p_155014_, BlockPos p_155015_, BlockState p_155016_, MixingBlockEntity p_155017_) { boolean flag = p_155017_.isLit(); boolean flag1 = false; if (p_155017_.isLit()) { System.out.println('1'); --p_155017_.litTime; } if (p_155017_.canBurn(p_155017_)) { System.out.println('B'); } // HERE ItemStack itemstack = p_155017_.items.get(1); if (p_155017_.isLit() || !itemstack.isEmpty() && !p_155017_.items.get(0).isEmpty()) { if (!p_155017_.isLit() && p_155017_.canBurn(p_155017_)) { p_155017_.litTime = p_155017_.getBurnDuration(itemstack); p_155017_.litDuration = p_155017_.litTime; if (p_155017_.isLit()) { flag1 = true; if (itemstack.hasContainerItem()) p_155017_.items.set(1, itemstack.getContainerItem()); else if (!itemstack.isEmpty()) { Item item = itemstack.getItem(); itemstack.shrink(1); if (itemstack.isEmpty()) { p_155017_.items.set(1, itemstack.getContainerItem()); } } } } if (p_155017_.isLit() && p_155017_.canBurn(p_155017_)) { ++p_155017_.cookingProgress; if (p_155017_.cookingProgress == p_155017_.cookingTotalTime) { p_155017_.cookingProgress = 0; craftItem(p_155017_); p_155017_.cookingTotalTime = getTotalCookTime(p_155017_); flag1 = true; } } else { p_155017_.cookingProgress = 0; } } else if (!p_155017_.isLit() && p_155017_.cookingProgress > 0) { p_155017_.cookingProgress = Mth.clamp(p_155017_.cookingProgress - 2, 0, p_155017_.cookingTotalTime); } if (flag != p_155017_.isLit()) { flag1 = true; p_155016_ = p_155016_.setValue(AbstractFurnaceBlock.LIT, Boolean.valueOf(p_155017_.isLit())); p_155014_.setBlock(p_155015_, p_155016_, 3); } if (flag1) { System.out.println('1'); setChanged(p_155014_, p_155015_, p_155016_); } } It's strange, idk, i didn't change anything))
  13. Okay, even when getBurmDuration return the 200, my code still doesn't work. It's sad
  14. Wood and coal How can i pass it? I don't really understand))
×
×
  • Create New...

Important Information

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