Jump to content

Focamacho

Members
  • Posts

    32
  • Joined

  • Last visited

Recent Profile Visitors

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

Focamacho's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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. Please, can u make a example for "Get the value of RenderLivingBase#layerRenderers from the player renderer using reflection."?
  8. Is it possible to cancel the Renderer of the Elytra when it's equipped?
  9. I just want create something basic to get the mods installed. Something like that... https://www.curseforge.com/minecraft/mc-mods/mod-control, maybe?
  10. 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.
  11. 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?
  12. 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?
  13. 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
×
×
  • Create New...

Important Information

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