Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. nop i got an new Error: [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at java.base/java.lang.reflect.Method.invoke(Method.java:564) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent.EntityInteractSpecific(OnEntityInteractSpecificEvent.java:51) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraftforge.eventbus.ASMEventHandler_16_OnEntityInteractSpecificEvent_EntityInteractSpecific_EntityInteractSpecific.invoke(.dynamic) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraftforge.common.ForgeHooks.onInteractEntityAt(ForgeHooks.java:760) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.network.play.ServerPlayNetHandler.processUseEntity(ServerPlayNetHandler.java:1246) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.network.play.client.CUseEntityPacket.processPacket(CUseEntityPacket.java:89) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.network.play.client.CUseEntityPacket.processPacket(CUseEntityPacket.java:15) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:139) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:758) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:159) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:109) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.driveOneInternal(MinecraftServer.java:741) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:735) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:122) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:721) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:667) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:233) [10:25:09] [Server thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:EntityInteractSpecific:59]: at java.base/java.lang.Thread.run(Thread.java:832) this is my code: package net.luis.cave.events.client.entity; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.UUID; import net.luis.cave.Cave; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.monster.ZombieVillagerEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Items; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; @Mod.EventBusSubscriber(modid=Cave.Mod_Id, bus = Mod.EventBusSubscriber.Bus.FORGE) public class OnEntityInteractSpecificEvent { private static final Method startConverting = ObfuscationReflectionHelper.findMethod(ZombieVillagerEntity.class, "func_191991_a", UUID.class, int.class); @SubscribeEvent public static void EntityInteractSpecific(PlayerInteractEvent.EntityInteractSpecific event) { PlayerEntity player = event.getPlayer(); LivingEntity target = (LivingEntity) event.getTarget(); World world = event.getWorld(); if (target instanceof ZombieVillagerEntity) { if (player.getHeldItem(event.getHand()).getItem() == Items.GOLDEN_APPLE) { if (!player.abilities.isCreativeMode) { player.getHeldItem(event.getHand()).shrink(1); } if (!world.isRemote) { try { startConverting.invoke(player.getUniqueID(), 1); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } } } }
  2. i just use this but i cant find a command with this name i try to get the command with !help <each Command>
  3. is the rest of my code correct: https://github.com/Luis-st/Forge-1.16.4-35.1.4-mdk/blob/main/forge-1.16.4-35.1.4-mdk/src/main/java/net/luis/cave/events/client/entity/OnEntityInteractSpecificEvent.java and which is the comand for the bot? !sgr and then the name -> !sgr startConverting
  4. i understand but what are SRG names? okay the conversion is start by a player so i use player.getUniqueID() this is my code: https://github.com/Luis-st/Forge-1.16.4-35.1.4-mdk/blob/main/forge-1.16.4-35.1.4-mdk/src/main/java/net/luis/cave/events/client/entity/OnEntityInteractSpecificEvent.java
  5. so like this: Method startConverting = ObfuscationReflectionHelper.findMethod( zombieVillager.getClass(), "startConverting", UUID.class, int.class); startConverting.setAccessible(true); try { startConverting.invoke(zombieVillager.getUniqueID(), 1); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); }
  6. okay thanks now i creat this: but now how to set the int? Method startConverting = ObfuscationReflectionHelper.findMethod( zombieVillager.getClass(), "startConverting", zombieVillager.getUniqueID().getClass(), /**int ?**/);
  7. what did you mean if you want to creat a sword creat a enum class which implements IItemTier and creat a construktor like minecraft in ItemTier after you creat this creat a new ShwordItem in this you have to set the ItemTier an then you can edit the damage there are examples: ItemTier: https://github.com/Luis-st/Forge-1.16.4/blob/main/forge-1.16.4-35.1.15-mdk/src/main/java/net/luis/cave/util/enums/CaveItemTier.java and the SwordItem: https://github.com/Luis-st/Forge-1.16.4/blob/main/forge-1.16.4-35.1.15-mdk/src/main/java/net/luis/cave/init/CaveTools.java
  8. i'm not sure if you need this but the folder of loot_table is located at: data/modid/loot_tables/blocks because of the loottable generation you can look how minecraft does this just look in the forge libary at client-extra and then data/minecraft/loot_tables/blocks/there are all Block loot tables if you want a generator just "google" or look at: https://misode.github.io/loot-table/
  9. I just want to overite the Conversion Progress of the Zombie Villager. I use the PlayerInteractEvent.EntityInteractSpecific but the methode which i need is private so i use this to execute the Method: but i got an error. And i dont know where the error is becaus its the first time i just use: "reflect" package net.luis.cave.events.client.entity; imports[..]; @Mod.EventBusSubscriber(modid=Cave.Mod_Id, bus = Mod.EventBusSubscriber.Bus.FORGE) public class OnEntityInteractSpecificEvent { @SubscribeEvent public static void EntityInteractSpecific(PlayerInteractEvent.EntityInteractSpecific event) { PlayerEntity player = event.getPlayer(); LivingEntity target = (LivingEntity) event.getTarget(); World world = event.getWorld(); if (target instanceof ZombieVillagerEntity) { ZombieVillagerEntity zombieVillager = (ZombieVillagerEntity) target; if (player.getHeldItem(event.getHand()).getItem() == Items.GOLDEN_APPLE) { if (target.isPotionActive(Effects.WEAKNESS)) { event.setCanceled(true); if (!player.abilities.isCreativeMode) { player.getHeldItem(event.getHand()).shrink(1); } if (!world.isRemote) { executeMethod(zombieVillager, "startConverting", zombieVillager.getUniqueID(), 1); } } } } } public static Object executeMethod(Object obj, String methodName, Object... params) { int paramCount = params.length; Method method; Object requiredObj = null; Class<?>[] classArray = new Class<?>[paramCount]; for (int i = 0; i < paramCount; i++) { classArray[i] = params[i].getClass(); } try { method = obj.getClass().getDeclaredMethod(methodName, classArray); method.setAccessible(true); requiredObj = method.invoke(obj, params); } catch (Exception e) { e.printStackTrace(); } return requiredObj; } } [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: java.lang.NoSuchMethodException: net.minecraft.entity.monster.ZombieVillagerEntity.startConverting(java.util.UUID,java.lang.Integer) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at java.base/java.lang.Class.getDeclaredMethod(Class.java:2553) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent.genericInvokeMethod(OnEntityInteractSpecificEvent.java:45) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent.EntityInteractSpecific(OnEntityInteractSpecificEvent.java:24) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.eventbus.ASMEventHandler_17_OnEntityInteractSpecificEvent_EntityInteractSpecific_EntityInteractSpecific.invoke(.dynamic) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.common.ForgeHooks.onInteractEntityAt(ForgeHooks.java:760) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.common.ForgeHooks.onInteractEntityAt(ForgeHooks.java:754) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.multiplayer.PlayerController.interactWithEntity(PlayerController.java:399) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1390) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1692) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.Minecraft.runTick(Minecraft.java:1507) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:979) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.Minecraft.run(Minecraft.java:612) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraft.client.main.Main.main(Main.java:184) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at java.base/java.lang.reflect.Method.invoke(Method.java:564) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [20:37:57] [Render thread/INFO] [STDERR/]: [net.luis.cave.events.client.entity.OnEntityInteractSpecificEvent:genericInvokeMethod:51]: at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105)
  10. I'm not quite sure about it, but I think it depends on your pc your cpu was released 11 years ago!
  11. i want to create a custom furnace with the same gui like the vanilla furnace but with custom recipe but what is the best way to do that? i just try to creat a block which extends the vanilla furnace and the i overide the TileEntity Methode. 1. my custom tileentity extends the AbstractFurnaceTileEntity but i have to set the TileEntityType and i cant creat a new one - how do i create a new TileEntityType? this\/ is not work but why it says: "The type SmeltingFurnaceTileEntity does not define SmeltingFurnaceTileEntity() that is applicable here" TileEntityType.Builder.create(SmeltingFurnaceTileEntity::new, CaveBlocks.SMELTING_FURNACE.get()) 2. and my custom container extends AbstractFurnaceContainer but i have to set the ContainerType there is no method to creat a new one. - so how can i creat a new ContainerType / use an existing ContainerType for my block
  12. i just use this: private static BasicTrade enchantedBook(int xp) { Random rng = new Random(); ItemStack book = new ItemStack(Items.ENCHANTED_BOOK); List<Enchantment> enchantments = Registry.ENCHANTMENT.stream().filter((enchantment) -> { return !enchantment.isCurse(); }).collect(Collectors.toList()); Enchantment enchantment = enchantments.get(rng.nextInt(enchantments.size())); int enchLevel = MathHelper.nextInt(rng, enchantment.getMinLevel(), enchantment.getMaxLevel()); EnchantedBookItem.addEnchantment(book, new EnchantmentData(enchantment, enchLevel)); int count = 2 + rng.nextInt(5 + enchLevel * 10) + 3 * enchLevel; return new BasicTrade(new ItemStack(Items.EMERALD, count > 64 ? 64 : count), new ItemStack(Items.BOOK), book, 16, xp, 0.2f); } and it work fine
  13. how do i enchant a book with a random enchantment i need this for my costum trade i just use this but i think ist not correct: private static ItemStack EnchantedBook(int level) { ItemStack book = new ItemStack(Items.ENCHANTED_BOOK); Random rng = new Random(); ItemStack dummy = EnchantmentHelper.addRandomEnchantment(rng, new ItemStack(Items.DIAMOND_SWORD), level, true); Map<Enchantment, Integer> map = EnchantmentHelper.getEnchantments(dummy); List<Enchantment> enchantmenList = new ArrayList<Enchantment>(map.keySet()); List<Integer> levelList = new ArrayList<Integer>(map.values()); EnchantedBookItem.addEnchantment(book, new EnchantmentData(enchantmenList.get(0), levelList.get(0))); return book; }
  14. This is the code you need to use replace "item" with "RegistryHandler.DRAGON_SOUL_BOW.get()" and then i think its work ItemModelsProperties.registerProperty(item, new ResourceLocation("pulling"), (p_239428_0_, p_239428_1_, p_239428_2_) -> { return p_239428_2_ != null && p_239428_2_.isHandActive() && p_239428_2_.getActiveItemStack() == p_239428_0_ ? 1.0F : 0.0F; }); ItemModelsProperties.registerProperty(item, new ResourceLocation("pull"), (p_239429_0_, p_239429_1_, p_239429_2_) -> { if (p_239429_2_ == null) { return 0.0F; } else { return p_239429_2_.getActiveItemStack() != p_239429_0_ ? 0.0F : (float)(p_239429_0_.getUseDuration() - p_239429_2_.getItemInUseCount()) / 20.0F; } });
  15. I know my code isn't the shortest, but I mean is there a method like player.wearArmor or something like this
  16. Is there a better way to ckeck if a player wears a full armor i just use this: private static boolean hasSaphireArmor(PlayerEntity player) { ItemStack itemHead = player.getItemStackFromSlot(EquipmentSlotType.HEAD); ItemStack itemChest = player.getItemStackFromSlot(EquipmentSlotType.CHEST); ItemStack itemLegs = player.getItemStackFromSlot(EquipmentSlotType.LEGS); ItemStack itemFeet = player.getItemStackFromSlot(EquipmentSlotType.FEET); ItemStack hasitemHead = new ItemStack(CaveArmor.SAPHIRE_HELMET.get()); ItemStack hasitemChest = new ItemStack(CaveArmor.SAPHIRE_CHESTPLATE.get()); ItemStack hasitemLegs = new ItemStack(CaveArmor.SAPHIRE_LEGGINS.get()); ItemStack hasitemFeet = new ItemStack(CaveArmor.SAPHIRE_BOOTS.get()); if (itemHead.equals(hasitemHead, true)) { if (itemChest.equals(hasitemChest, true)) { if (itemLegs.equals(hasitemLegs, true)) { if (itemFeet.equals(hasitemFeet, true)) { return true; } else { return false; } } else { return false; } } else { return false; } } else { return false; } }
  17. You need to add to your bow custom ItemModelsProperties just use the FMLClientSetupEvent. Just look in this class: net.minecraft.item.ItemModelsProperties minecraft will add there the vanilla properties "starwars:pulling": 1 -> and remove the starwars there "pulling": 1
  18. i want to check if a player has an item in his inventory (player.inventory when it's right a only on client method). so what is the best way to check that
  19. where then? in the constructor of my main class?
  20. I think you can try this: if(event.getCategory().equals(Biome.Category.NETHER)) { }
  21. My Ore generation: it works fine on client but on server no one will generate https://github.com/Luis-st/Forge-1.16.4/blob/main/forge-1.16.4-35.1.15-mdk/src/main/java/net/luis/cave/world/gen/OreGen.java and the registration in the FMLClientSetupEvent: https://github.com/Luis-st/Forge-1.16.4/blob/main/forge-1.16.4-35.1.15-mdk/src/main/java/net/luis/cave/events/FMLClientSetup.java
  22. sweeping edge has a method which handle that but I think you can try to use the entity attributes which are located at: net.minecraft.entity.ai.attributes than use: to get the base value player.getAttribute(net.minecraft.entity.ai.attributes.Attributes.field_233825_h_ ).getBaseValue() // field_233825_h_ is "attribute.name.generic.attack_speed" and: to set the value player.getAttribute(net.minecraft.entity.ai.attributes.Attributes.field_233825_h_ ).setBaseValue(your value);
×
×
  • Create New...

Important Information

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