Jump to content

Luckydel

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by Luckydel

  1. Does the block have a block identifier(or anything integer) in the world that will always be original? Kind of like ВlockState.hashCode()
  2. What is regName ? Is it a Holder <block> ? ----------------------------------------------------------------- A problem that I don't know how to solve. Let's say there are 2 workbenches (3x3x1), I need to make sure that if I break 1 workbench, 2 does not break. I'm thinking of adding 3x3x1 to everyone, some kind of ID that I randomly generate at the setPlacedBy stage. Perhaps your regName will suit me, but I don’t quite understand what it is 😃
  3. Thanks, it didn't quite help me, but it got me on the right track.
  4. I have a large workbench 1x3x3, and let's say I break one of the blocks, how can I make all the blocks break? https://ibb.co/KXTHMHd How do I set up a workbench and check the place for it: I've looked at the Door and Bed classes, only paying attention to playerWillDestroy. Poke your finger as they delete 2 blocks at once 😃 ------------------------------------------------------------------------------------------------------------------------------------------------ Upd. I thought to write the coordinates of other blocks in the memory of the "main block", but this is probably not the right solution.
  5. I'm an idiot, this should be done on the server side, and I had the wrong validation. Thanks to everyone who took the time.
  6. I need to put an item in a menu cell. I use something like this. The problem is that the item is duplicated without removeItem. And with it, the object turns into AIR and does not work. I have a menu, dragging to the slot works fine. I'm sure I'm doing something wrong, can you please advise? ICapability class (I can provide a class menu if needed)
  7. I can't figure out what I'm doing wrong. Menu is not called up. Reg screen Reg menu Menu class Screen class Item class
  8. Hands are not displayed ... Maybe I'm doing something wrong. Event: Render: I check if my item is in my hands: if(checkItem(event.getItemStack().getItem())) { Object itemstack = Minecraft.getInstance().player.getItemInHand(event.getHand()).getItem();//возможно оптимизация выводом на шаг верх if (itemstack instanceof GunShot gunShot) { Without it I get crash It enters rendering, but sometimes it crashes if I set a breakpoint
  9. I want my hands to be displayed with the item.
  10. Hi, I have a couple of questions, maybe it's not difficult for someone to answer. As far as I understand, I need RenderHandEvent Further, as far as I understand, I need: ItemInHandRenderer#renderHandsWithItems But how is it supposed to work? Should I change the PoseStack somehow? Or, I need PlayerRenderer#renderHand Or do I need to create my own PlayerRenderer or ItemInHandRenderer
  11. Sorry at the last moment I saw an error. Please delete topic
  12. I'm using geckoLib, I'd like to add an attack animation to an entity. The IronGolem#doHurtTarget methods associated with the entity fire when it attacks, but I'm not sure if I can use it somehow?
  13. Item model render Item reg Main class geo model json build.gradle Instead of a model, a default black and pink square. Forgive me for asking this question here. EDIT: The examples from the mod work great.
  14. I'm doing something wrong. Doesn't go to registration event. Model loader class, as a basis I used ElementsModel. I have another question, after I register it and set "loader". I will be able to interact with the model via IUnbakedGeometry#bake in item class or am I misunderstanding something?
  15. It looks like I misunderstood something Custom model loader is CompositeModelBuilder or CompositeModel$Loader ? EDIT: Can you give more details about the `loader` key, or a link to the documentation
  16. After I use an item, the game thinks that I changed the item (Maybe because it loses durability), any ideas how to get around this?
  17. Thank you for your patience. Okay, I've created a custom model loader, how do I tell the item to use it?
  18. How would I be able to tell if a player has changed an item in their hand?
  19. Then, for regular json, do I need to use UnbakedModel? Something does not work.
  20. I would like to add a sight to the weapon, a silencer, as a layer (If possible) and change item texture. As far as I understand, I need BakedModel. But it looks like I'm doing something wrong. ( I don't go to methods. ) Maybe I still need ItemOverrides But, my json looks different (Blockbench), I don't have "model". I have vertices and groups of them in JSON
  21. Am I doing something wrong? I don't go to this method public class Makarov extends ProjectileWeaponItem implements IClientItemExtensions { public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) { HumanoidModel.ArmPose humanoidModel = HumanoidModel.ArmPose.create("P",true, new PoseTransformer()); return humanoidModel; } ... IArmPoseTransformer should there be something like this? @OnlyIn(Dist.CLIENT) public class PoseTransformer implements IArmPoseTransformer { @Override public void applyTransform(HumanoidModel<?> model, LivingEntity entity, HumanoidArm arm) { model.rightArm.yRot = -0.1F + model.head.yRot - 0.4F; model.leftArm.yRot = 0.1F + model.head.yRot; } }
  22. I don't see .getArmPose() ( IClientItemExtensions.getArmPose() ) And I don't see the use of IExtensibleEnum in IClientItemExtensions I don't see IArmPoseTransformer =(
×
×
  • Create New...

Important Information

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