-
Posts
31 -
Joined
-
Last visited
Everything posted by Wintersky20
-
[SOLVED]-[1.15.2] Break Speed event for vanilla Materials
Wintersky20 replied to Wintersky20's topic in Modder Support
You are right ! @SubscribeEvent public static void breakSpeed(PlayerEvent.BreakSpeed event) { PlayerEntity player = event.getPlayer(); if (player != null && !(player instanceof FakePlayer) && !player.isCreative()) { ItemStack stack = player.getHeldItemMainhand(); Material state = event.getState().getMaterial(); if (stack.isEmpty() && state == Material.WOOD) { event.setNewSpeed(0); } } } I changed that with stack.isEmpty(), bust is still not working! By the way , thanks for the fast replaye ! -
1) You have to use an @SubscribeEvent for this 2) You have to access the ResourceLocation of the recipe 3) Then delete the recipe using ResourceLocation ,event and vanilla recipe string like : "minecraft:bookshelf"
-
Hello.. I need some help with Break Speed Event . I want to make wood material blocks break only with tools @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public class MaterialWoodBreaking { @SubscribeEvent public static void breakSpeed(PlayerEvent.BreakSpeed event) { PlayerEntity player = event.getPlayer(); if (player != null && !(player instanceof FakePlayer) && !player.isCreative()) { ItemStack stack = player.getHeldItemMainhand(); Material state = event.getState().getMaterial(); if (stack == null && state == Material.WOOD) { event.setNewSpeed(0); } } } } Thanks for all replies to this post!
-
[1.7.2] [Solved] How to override/remove vanilla recipes
Wintersky20 replied to SackCastellon's topic in Modder Support
You helped me a lot ... Thank you guys -
Hello guys ! I need a simple 3x3 mining method ! Any idea ?
-
I have some problems with "creation of tools" ! One of the problems that I have with my tool is this : -> I can't enchnat the item in the enchanting table only in a anvil ->I can't brake the crafting table with this tool ( I mean , I can , but is taking me a long time to do ths) -> And if i try to switch the extension with a ItemAxe , the i can't break redstone ores and obsidean ! Some help please !! And sorry for my bad English