Jump to content

poopoodice

Members
  • Posts

    1160
  • Joined

  • Days Won

    7

Everything posted by poopoodice

  1. Probably by adjusting the alpha value might work?
  2. https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/#sending-to-clients
  3. That's because your block is not in the list of valid blocks for vanilla hopper tileentity when it is registered. Check net.minecraft.tileentity.TileEntityType And your block does not have boolean property ENABLED Therefore it won't respond to your own hopper. Inherit from existing resource instead of copy and pasting, then override the things you want to modify with.
  4. So....is there a hopper tileentity at that position?
  5. Check onEntityCollision in net.minecraft.block.HopperBlock
  6. I'm not sure why you still have this ClientPlayerEntity player = Minecraft.getInstance().player; //getInstance().playerをplayerにぶち込む LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); //playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental(); You have the value that has passed in to the contructor, just store it there, and use it when needed.
  7. What's the reason of you sending another packet in PacketUpdateContainer.handle ? Also in encode you've written a int array into the buffer, but then you read two ints out of the buffer which won't work because the first int will be the length of the array.
  8. You should probably upload all the code, not only that file.
  9. I believe this is sending the packet to everyone PacketDistributor.ALL.noArg() You can simply use SimpleChannel#sendToServer()
  10. In you encode you are writing data from the instance of the packet class to the buffer that is going to be send to the client/server. In decode you are reading the data of the buffer, and pass it into the instance of the packet class which is what handle() will receive and proceed with it.
  11. Remove .func_235859_g_() This is preventing yuor block getting destroyed.
  12. https://mcforge.readthedocs.io/en/latest/blocks/states/ Lots of blocks has similar attributes to what you want, e.g.composter and crops.
  13. I feel we are repeating everything in the last exact same topic you posted... Answers are all in there, please at least try and have a research on some of those suggestions, then ask if there's something you don't understnad.
  14. Why do you have this? .func_235859_g_()
  15. You shouldn't just cast it to player entity, use instanceof check first.
  16. It should be resources/assets/urmodid/...
  17. Show the whole class.
  18. Override getShape() (check blocks like torch, button, doors...etc), and return different voxel shape according to the blockstate.
  19. Use ItemStackHandler instead of IInventory https://forums.minecraftforge.net/topic/61757-common-issues-and-recommendations/?do=findComment&comment=289566
  20. Although I've never done one before, but if you register with your mod id it won't work.
  21. Make sure the listener is static (L5 https://pastebin.com/rHWc6H6k)
  22. Can you show all the updated code?
  23. That is still on the mod event bus, the default bus value of annotation @Mod.EventBusSubscriber is forge bus already, so what you need to do is remove bus = Bus.MOD here. And maybe add some loggings to make sure it is triggered. Edit: by using @Mod.EventBusSubscriber or MinecraftForge.EVENT_BUS.register the listener must be static
  24. Iirc attach capability event is fired on forge bus.
  25. There's no such thing afaik. But you can try to find them yourself, for example you want to know how does Parrots handle jukeboxes, you may want to look into ParrotEntity, if you want to know how chicken drops egg, you look into ChickenEntity, it is usually pretty straight forward.
×
×
  • Create New...

Important Information

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