Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

vntlyy007

Members
  • Joined

  • Last visited

Everything posted by vntlyy007

  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. In theory, JEI Mod must be broken or not compatible with any of the mods in order to get this error
  6. 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
  7. 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?
  8. 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:
  9. 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
  10. GIT, I'll be grateful for any help)
  11. 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))
  12. Okay, even when getBurmDuration return the 200, my code still doesn't work. It's sad
  13. Wood and coal How can i pass it? I don't really understand))
  14. Hi man, i have: 0 - input slot 1 - fuel slot 2 - output slot 3 - addition slot I've just checked debug mod, so it doesnt work: protected int getBurnDuration(ItemStack p_58343_) { if (p_58343_.isEmpty()) { return 0; } else { Item item = p_58343_.getItem(); return net.minecraftforge.common.ForgeHooks.getBurnTime(p_58343_, null); } } it return 0* My server tick using this int: ItemStack itemstack = p_155017_.items.get(1); p_155017_.litTime = p_155017_.getBurnDuration(itemstack); p_155017_.litDuration = p_155017_.litTime;
  15. Hi guys, i have a not default furnace (with one extra slot), but it has default furnace code in basic I cant set lit the furnace(smth with serverTick or components in it) The result - System.out.println('P') Annotated code is my version of serverTick Not annotated - AbstractFurnaceBlockEnity
  16. Hopper takes items from input slot, i tried to clone the code of vanilla containers, but it doesn't work BlockEntity:
  17. I have completed two tasks, it remains to add the time in json. But I still have a problem with Hopper. It takes items from input slots (I still haven't figured out what I was advised to do with getCapabilities) I tried all my ideas to reproduce it, so I still will be grateful for help BlockEntity:
  18. HOWEVER, actualy there are more things My furnace more like crafting table, but with time - cleaning of fossil ores with special item with durability everything is in order: 1)to prevent items from the output slot from moving into the hopper 2)to be able to put in the slot only items with a special tag (like furnace fuel) 3)remove the ability to discard a finished smelting item back to output slot through use quick move 4) add the ability to add smelting time in json recipe(it's the easier) GITHub There is my project, if somebody want/can, I will be grateful for your help < 3
  19. I found this code in my custom block entity: public class CleaningTableBlockEntity extends BlockEntity implements MenuProvider { @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @javax.annotation.Nullable Direction side) { if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return lazyItemHandler.cast(); } return super.getCapability(cap, side); } } but actually idk what should i do about this?) i tried deleted it(but slots dont load) Or what do you mean by "do not expose the capability at all"? Also, I have another thing I'm trying to do is be able to put in the slot only items with a special tag (like furnace fuel)
  20. Hi guys) I have a custom furnace, and an idea that is impossible to implement if it is possible to move items from there to somewhere using a hopper (automatic farm or something), so I need to prevent the item from exiting to third-party objects (ie, not the player)
  21. I want to add a separate slot for oil and other cooking substances in the new furnace, and in order to replace the vanilla style, I decided to get rid of the smoker)

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.