Jump to content

vemerion

Members
  • Posts

    390
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by vemerion

  1. From what I can see, you are missing a parenthesis after the call to .sound().
  2. If you don't want it to glow at all, why not just remove the call to .lightLevel() completely? Also, from what I have heard, HarryTalks' tutorials are not the best. If you want to follow a video tutorial, I think McJty's tutorials are recommended.
  3. You can either lower the boxes in the model by changing the y values, or do a translation on the matrix stack just before rendering the entity.
  4. Check out the javadoc in IItemHandler, it is really detailed and should give you an idea of what methods to use to manipulate the inventory.
  5. I haven't tested it, but this might work: Before drawing the text, do a matrix translation to move the text forward by adding to the z value.
  6. Well, you should definitely add the NearestAttackableTargetGoal to the targetSelector and not the goalSelector, but I am not sure that will fix problem.
  7. That just sets the target of the villager to the player. You also need to add some kind of goal to the goalSelector that uses the target, such as MeleeAttackGoal.
  8. This is a really detailed tutorial on how to use capabilities. If you just want a simple inventory attached to your item, you don't need much else besides an implementation of ICapabilityProvider that you return a new instance of in initCapabilities(). Of course you might also want a container and screen to interact with the inventory. initCapabilities() is called when a new item stack is created, and should return a new instance of an ICapabilityProvider that can be used to get the item stack handler for you item. This is the capability for item handlers. You can use it to retrieve an item handler like this: someItemStack.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) The @CapabilityInject annotation injects a capability into a field, similar to how @ObjectHolder injects registry entries into fields. You shouldn't need to use it since you can just use CapabilityItemHander.ITEM_HANDLER_CAPABILITY to retrieve your capability.
  9. Sure! What I would do is create a new Goal (there are a lot of similar vanilla goals that you can draw inspiration from or even extend, such as CatSitOnBlockGoal and MoveToBlockGoal) that implements the cat behavior you want. Then you can add the goal to the goalSelector of the cat in the EntityJoinWorldEvent event.
  10. What exactly do you want to achieve? You can use events (event documentation here) to change a lot of vanilla behavior.
  11. No problem, glad I could be of help!
  12. No problem, glad I could help Interesting mod idea, adding dice to Minecraft! Do you have any plans to add functionality/some effect when the dice lands on different numbers?
  13. You have to remove the "the" in "thestoreofneedfulthings", since that is not part of the modid.
  14. Since you are registering an instance of the Main class to the event buss, you need to remove the static keyword on the onEntityInteraction() method. In addition to that, you also need to override canBeCollidedWith() in your entity class. This should resolve both your issues.
  15. I have never personally used the World Saved Data system, but from what I can see these two pages explain it fairly well: Forge Documentation on World Saved Data Forge Community Wiki on World Saved Data
  16. Saving data to a world can be done either via World Save Data or via capabilities. If you want the data to be shared between all dimensions I think best practice is to attach the data to the overworld.
  17. It is possible, but a little arduous. It is ItemRenderer.renderItemOverlayIntoGUI() that draws the count, which is called in ContainerScreen.drawItemStack() (unfortunately a private method), which in turn is called in the ContainerScreen.render() method.
  18. What exactly did you try? For me, this does the trick: @Override public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) { return 1; }
  19. You can use repositionEntity in that case, but supply it with false to prevent a portal from spawning. I suggest reading the javadoc in ITeleporter, it is very detailed!
  20. Instead of using the vanilla Teleporter, create your own implementation of ITeleporter.
  21. You might have already done so, but if you haven't, then I recommend taking a look at the Forge Sounds Documentation. Among other things, it details which method to call based on if the code is run on the client/server/both sides.
  22. Last I tried, overriding the getAmbientOcclusionLightValue() method (called getShadeBrightness() in the official mappings) did the trick.
  23. I am not quite sure what you mean. Can you elaborate?
  24. I believe you can achieve that by overriding the getAmbientOcclusionLightValue() method (called getShadeBrightness() in the official mappings). Take a look at the AbstractGlassBlock class to see how vanilla does it.
×
×
  • Create New...

Important Information

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