Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/19 in all areas

  1. Clicking is processed in the Container which is client and server. Override slotClick or onSlotClick(its one of those) and perform your action there. Then update the player by calling sendAndDetectChanges.
    1 point
  2. The broad strokes response is that its a Loot Condition. One already exists for shears, but it is possible to write your own, too.
    1 point
  3. Xaero's Minimap needs to be updated for your forge version
    1 point
  4. https://github.com/ldtteam/Piston-Unlimited/issues/11
    1 point
  5. The problem is your use of iTag.hasUniqueId you can always be assured that the tag wont be null so dont do it. And the get methods will always return a value even if it's not present.
    1 point
  6. We will be making an announcement about it when we can. The current state is that it means almost nothing for us. As the license doesn't allow for us to actually USE this information. We are waiting to hear back from Mojang's legal team {This is all stuff they could of answered before the public announcement by asking us, but whatever} Keep an eye on Github/Twitter and we'll keep you updated.
    1 point
  7. What you have there is not an event. How much do you know Java? If not much I don't recommend starting with creating a Minecraft Modding. If you know Java you don't have the right method signature It's Item#onItemRightClick(World, EntityPlayer, EnumHand) You don't get the ItemStack but you can get it via EntityPlayer#getHeldItem()
    1 point
  8. What do you mean by 'the sounds are already called in preinit" The problem is that forge registers items before soundevents. Your records don't play sound because when they were registered, the soundevents were null. Basically, you need to make it so that the soundevents are instantiated before the registration of items. You can do this in FMLPreInitializationEvent, because it fires before registration. You need to move this line soundEvent = (SoundEvent)new SoundEvent(rs).setRegistryName(rs); so that it gets called in FMLPreInitializationEvent. And in RegistryEvent.Register<SoundEvent>, you just need to pass each of the soundevents in event.getRegistry.registerAll(). If that doesn't work, remove the static from onRegisterSoundEvent. Also, the reason your sword works is because it uses the onItemRightClick (or something like that) method to play the sound, while records have the sound as a parameter.
    1 point
  9. Check for !World::isRemote. Also, EntityPlayer::rayTrace(double blockReachDistance, float partialTicks) has @SideOnly(Side.CLIENT) annotation, so you can't run it on server thread or you'll crash. Use World::rayTraceBlocks(Vec3d start, Vec3d end) instead. One more thing, make an instance of BlockPos instead of calling the same method three times.
    1 point
  10. No. That doesn't exist. The number can't even be calculated with any level of meaningfulness.
    1 point
  11. Don't put your workspace in the mod, the default location of C:\Users\<You>\eclipse-workspace works fine
    1 point
×
×
  • Create New...

Important Information

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