-
Get tool used in BlockEvent
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?
-
Change blockstate location for block
https://github.com/Focamacho/MysticalCreations
-
Change blockstate location for block
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.
-
Change blockstate location for block
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.
-
Change blockstate location for block
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.
-
[1.12.2] Get open container source
Thanks!
-
[1.12.2] Get open container source
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
-
[1.12.2] Cancel Elytra Render
Oh, it worked. Thank you!
-
[1.12.2] Cancel Elytra Render
Please, can u make a example for "Get the value of RenderLivingBase#layerRenderers from the player renderer using reflection."?
-
[1.12.2] Cancel Elytra Render
Is it possible to cancel the Renderer of the Elytra when it's equipped?
-
[1.12.2] Get player mod list
I just want create something basic to get the mods installed. Something like that... https://www.curseforge.com/minecraft/mc-mods/mod-control, maybe?
-
[1.12.2] Get player mod list
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.
-
[1.12.2] Get player mod list
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?
-
[1.12.2] Detect time without press a key?
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?
-
Get Block from String?
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
IPS spam blocked by CleanTalk.