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.

Focamacho

Members
  • Joined

  • Last visited

  1. I want to get the tool used in a BreakEvent or HarvestDropsEvent, but I'm not sure how to do this. Usually the tool used is in the main hand, so I could use getHeldItemMainhand(), but sometimes the offhand can also break blocks(Modded Items like staffs can do it). So how do I know which hand was used to break the block?
  2. https://github.com/Focamacho/MysticalCreations
  3. They are? I'm using a config file to get things like item name, etc ... so I create the item using these arguments. Everything works perfectly, the only problem is the texture of the blocks.
  4. I need to do it because I am registering blocks & items using a config file. Yes, all the blocks will have the same texture, and I'll try to change only the block color. Using ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation("modid:base_item", "inventory")); Works fine for items, but I'm not sure how to do it with blocks.
  5. Hello, I'm trying to make all of my blocks use the same .json (assets/.../blockstates/block_base.json & assets/.../models/block/block_base.json), but I have no idea how to do it.
  6. Is there any way to get the source from an open container? I would like to check if the player has an open container from a determinated block Something like: player.openContainer.getSource so I wanted to get a BlockState or BlockPos So I could check if the openContainer is from x block
  7. Oh, it worked. Thank you!
  8. Please, can u make a example for "Get the value of RenderLivingBase#layerRenderers from the player renderer using reflection."?
  9. Is it possible to cancel the Renderer of the Elytra when it's equipped?
  10. I just want create something basic to get the mods installed. Something like that... https://www.curseforge.com/minecraft/mc-mods/mod-control, maybe?
  11. I would like to check the mods that the player has installed, and if he is using some mod that is not allowed on the server, disconnect the player from the server.
  12. Is it possible to get the list of mods loaded from a player as it enters the server? Like a server-side only mod to get all mods loaded and do something if a specific mod is loaded?
  13. It's possible get the time that a player is without pressing any key? Like to detect if he's AFK and do something if yes?
  14. I'm using 1.12.2. I found a way to fix my problem, I don't know if it's the best way, but it works. I create a new List<Block> for each seed, and get his values using: public static List<Block> getBlockConfig2(String config) { List<Block> allBlocks = new ArrayList<Block>(); String[] blockList = config.split(";"); if(!(blockList.length <= 0)) { for(String block : blockList) { if(block.startsWith("ore:")) { //nothing } else { String[] split = block.split(":"); if(split.length > 2) { ItemStack blockA = new ItemStack(Item.getByNameOrId(split[0] + ":" + split[1]), 1, Integer.parseInt(split[2])); if(blockA.getItem() == Items.AIR) { Block blockB = Block.getBlockFromName(split[0] + ":" + split[1]); if(blockB != null) { allBlocks.add(blockB); } } } else if(split.length == 2){ ItemStack blockA = new ItemStack(Item.getByNameOrId(split[0] + ":" + split[1])); if(blockA.getItem() == Items.AIR) { Block blockB = Block.getBlockFromName(split[0] + ":" + split[1]); if(blockB != null) { allBlocks.add(blockB); } } } } } } return allBlocks; } https://github.com/Focamacho/MysticalAdaptations/commit/f4f233d76ce057ba79b10379c571cc62cfe18522

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.