
Tameet
Members-
Posts
23 -
Joined
-
Last visited
Everything posted by Tameet
-
How to make it so that when using the tool in crafting, it does not disappear, but simply receives damage?
-
[1.14.2] Is it allowed to ask questions about the Fabric?
Tameet replied to Tameet's topic in Modder Support
thx -
If yes, then here is my question: Why can't minecraft data be edited in fabric mod? I create a mod. In the resources folder, I create package data.minecraft.loot_tables.blocks and place the grass.json file there, but nothing works. I checked the right of the loot table written by me.
-
[1.13.2] How to run minecraft command from the mod?
Tameet replied to Tameet's topic in Modder Support
I want to run the minecraft command (for example, /say hello) from the mod main class -
I searched info but find nothing helpful.
-
I want to change drop chances for the vanilla sand block for only one item, for example, for the stick. But if i write this code, i change drop chances for all drops of the sand block: if ((event.getState().getBlock() instanceof BlockSand)) { event.getDrops().add(new ItemStack(Items.STICK, 1)); event.setDropChance((float) 0.08); }
-
Many thanks
-
I wrote this code, but test_item don't drops when i break a gravel with a stick in mainhand. What's wrong? if ((event.getState().getBlock() instanceof BlockGravel)) { if (event.getHarvester() != null) { ItemStack tool = event.getHarvester().getHeldItemMainhand(); ItemStack item = new ItemStack(Items.STICK); if (tool == item) { event.getDrops().add(new ItemStack(ItemList.test_item, 1)); event.setDropChance((float) 0.8); } } }
-
I do not understand anything but ok ?. As they say in russian 'Них#я не понял, но очень интересно'
-
And that's working. Thank you very much
-
but my english "has a mistake"?
-
it means, that line "IBlockState blockState = event.getState().getBlockState();" has no mistake?
-
I want to disable drops from wooden logs when player breaks it without an axe. But i have a mistake in my code, getHarvestLevel is red. Why? if ((event.getState().getBlock() instanceof BlockLog)) { if (event.getHarvester() != null) { ItemStack tool = event.getHarvester().getHeldItemMainhand(); EntityPlayer player = event.getHarvester(); IBlockState blockState = event.getState().getBlockState(); if (tool == null || !(tool.getItem().getHarvestLevel(tool, "axe", player, blockState)) > -1) { event.getDrops().clear(); } } }
-
[Solved] [1.13.2] How to modify vanilla blocks drops?
Tameet replied to Tameet's topic in Modder Support
It's working, thanks for help @SubscribeEvent public void HarvestDropsEvent(HarvestDropsEvent event) { if ((event.getState().getBlock() == Blocks.GRASS && event.getWorld().getRandom().nextInt(2) == 0)) { event.getDrops().add(new ItemStack(ItemList.fiber, 1)); } } -
[Solved] [1.13.2] How to modify vanilla blocks drops?
Tameet replied to Tameet's topic in Modder Support
i did it, but i don't know how to change the drop chance @SubscribeEvent public void HarvestDropsEvent(HarvestDropsEvent event) { if ((event.getState().getBlock() == Blocks.GRASS)) { event.getDrops().add(new ItemStack(ItemList.fiber, 1)); } } -
[Solved] [1.13.2] How to modify vanilla blocks drops?
Tameet replied to Tameet's topic in Modder Support
Should i type HarvesDropsEvent#getDrops into void HarvestDropsEvent event? (Sorry if i look like a stupid noob) -
I want to change grass drops, but i'm absolutely noob in minecraft modding. I can just create new custom items using different tutorials. How i can do it?
-
Where in mod main class should be this function?
-
I can't find any modding guide that shows how to create custom tool and material for it. Has something changed in this thing with the release of version 1.13.2?
-
I decided to try to create a mod for minecraft. I downloaded the forge mdk of the required version, unpacked it into the 'MinecraftMod' folder. Then I used the cmd command to run the 'gradlew eclipse' command (I decided to create a mod using eclipse). The command was runned successfully (i've seen 'BUILD SUCCESSFULL' message). But when I run eclipse and select the folder 'MinecraftMod / eclipse' as my workspace, there is nothing in the 'Project Explorer'. When I do the same on the game version 1.12.2, then in the 'Project Explorer' I see the project 'MDKExample', where the mod is being developed. What is wrong with version 1.13.2?