Jump to content

Beethoven92

Members
  • Posts

    687
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Beethoven92

  1. Sorry, this was not meant to be a grammatical correction 😆 my english is pretty bad as well...i thought that what i said after that explained my first sentence, but for clarification i just meant that you should not put modding before java learning into your mindset, thats all Good Java knowledge (and a great amount of patience) should be enough to get you appreciable results..of course knowledge of how a video games generally works can only be of help, but its not really mandatory regarding minecraft modding (in my opinion). You marking the VIDEO word makes me think that you are someone who learns better by watching and listening rather than by reading? Unfortunately i do not know if there are good java tutorials on youtube because personally i learnt on a java manual. Probably someone else can point you to good java tutorials/courses on the web. Last, since you seem to prefer video tutorials, regarding forge modding there's actually a good tutorial on youtube. Take a look at McJty channel here: https://www.youtube.com/channel/UCYMg1JQw3syJBgPeW6m68lA/videos?view_as=subscriber
  2. First of all, this sentence is in the wrong order: You ideally would not want to start minecraft modding and hope to also learn java along the way because, trust me, it will be painful and probably will lead to you give up and stop modding very soon. First thing everyone here would suggest you is to get yourself a solid foundation in java programming, and only then start digging into the mess that is minecraft code. After you have learnt java the best sources when modding are: vanilla minecraft code, various test mods around the web, and a ton of open source mods you can look into to see how they do things. Regarding tutorials on the web, GreyGhost's one is a good place to learn: https://github.com/TheGreyGhost/MinecraftByExample. I suggest to not follow the tutorial series you can find on youtube because: 1) They follow and teach some bad coding practices (refer to this post for explanations https://forums.minecraftforge.net/topic/92655-1163-how-do-i-create-a-new-dimension/?tab=comments#comment-427419) 2) For the most part they don't explain how the code they are showing works 3) They don't really cover many things and if you need to do something that there is not a tutorials for you would be stuck because they didn't give you the tools to do things on your own. Again, its highly suggested to learn java before even thinking to start modding minecraft (if you care about your mental sanity)
  3. Documentation here: https://mcforge.readthedocs.io/en/latest/tileentities/tileentity/ and here: https://minecraft.gamepedia.com/Block_entity I would not be able to explain it better personally. EDIT: you may actually not need a tile entity to achieve what you want
  4. Yeah, i know you don't want to make a hopper, but you want to detect if an item entity is on top of your block, which is something that the hopper block does and that you can take inspiration from...then after detecting if the items are on top of you block apply your logic to craft them into another item
  5. All right, can you show your code please?
  6. Take a look at this post which discuss a similar problem: https://forums.minecraftforge.net/topic/92987-1163-test-is-item-is-on-certain-block/?tab=comments#comment-428440 Also the vanilla HopperBlock and HopperTileEntity classes are a good source of information, since the hopper can detect when item entities land on its top
  7. "parent": "matchlockguns:item/baseModel" You are using invalid characters in your json file name, don't use capital letters
  8. Did you bind your entity renderer to your entity? You can do that with RenderingRegistry.registerEntityRenderingHandler
  9. You need an entity renderer...look at vanilla TNTRenderer
  10. I did this in 1.16.1, and at the time i posted this topic there was an issue with the forge version i was using that prevented the code above to work correctly..and as i said at the end of the post the issue was addressed and fixed. See the relative changelog:
  11. As far as i know forge doesn't provide a hook where a fishing rod is casted (altough a hook is provided to handle the catch of fish/loot). It depends on what you are trying to achieve...a way you could go about this is to check for when a FishingBobberEntity joins the world (that would mean a rod has been casted). You can do this by listening to the EntityJoinWorldEvent and checking if the spawned entity is an instance of FishingBobberEntity
  12. Yep, i wonder how i missed that 😆
  13. Show your mods.toml file please
  14. Didn't see this line, my bad: bipedBody.addChild(Wings); Are you sure your event handler is actually getting called?
  15. public magi_wings(float size) { super(size, 0, 16, 16); ModelRenderer Wings; ModelRenderer wing1; ModelRenderer wing2; Wings = new ModelRenderer(this); Wings.setRotationPoint(0.0F, -8.0F, 0.0F); wing1 = new ModelRenderer(this); wing1.setRotationPoint(-1.0F, 0.0F, -1.25F); Wings.addChild(wing1); setRotationAngle(wing1, 0.0F, -0.6545F, 0.0F); wing1.setTextureOffset(0, 0).addBox(1.524F, -9.0F, 0.3653F, 13.0F, 16.0F, 0.0F, 0.0F, false); wing2 = new ModelRenderer(this); wing2.setRotationPoint(1.0F, 0.0F, -1.25F); Wings.addChild(wing2); setRotationAngle(wing2, 0.0F, 0.6545F, 0.0F); wing2.setTextureOffset(0, 0).addBox(-14.524F, -9.0F, 0.3653F, 13.0F, 16.0F, 0.0F, 0.0F, true); bipedBody.addChild(Wings); } // @Override // public void setRotationAngles(LivingEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) // { // } // @Override // public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){ // Wings.render(matrixStack, buffer, packedLight, packedOverlay); // } Why are your ModelRenderers declared inside the model class constructor? Also you commented out the "render" function, where the rendering of your model actually happens
  16. You cannot just put an int variable in your block class, this will not work, as only one instance of your block class exists in the game. To do what you want you have to use blockstate properties or a tile entity. Take a look at the vanilla RespawnAnchorBlock, which is a block that can be charged multiple times
  17. Entity#setPose...to see how its used to make the player lie in bed check the LivingEntity#startSleeping method
  18. Take a look at the tick method of the ItemEntity class...there you can see how vanilla makes item entities float when in water. Apply the same concept when checking if your item entity is in lava.
  19. setRegistryName("minecraft", "sugar"); You don't need this in your item class. Your deferred register already handles that
  20. Yes, there could be issues and incompatibilities.. Define "doesn't work". Maybe show your complete code? Also i found this post where a similar question has been asked. There may another solution to edit the food property of vanilla items without replacing the item: https://forums.minecraftforge.net/topic/90655-making-leaves-edible/?tab=comments#comment-420705
  21. You have to override the onReplaced method and tell your block to drop the contents of its tile entity when replaced or broken...look at vanilla chest, hopper etc. for examples on how to handle container blocks
  22. You have to create your custom item class, with your custom logic (apply potion effect when consumed) and make it be a food item (you can see how vanilla specifies that some items are to be treated as food in the Items class). Then you have to register your custom item with the same registry name as vanilla sugar, so it will replace it
  23. Mmmm it seems you did not folllow the advice of Draco18s, which i'll quote here: Your block extends the vanilla CraftingTableBlock class, but its not the vanilla crafting table itself (Blocks.CRAFTING_TABLE)...the vanilla crafting table container checks for the player proximity only with the Block.CRAFTING_TABLE, so of course your block doesn't satisfy the condition for the container to open. I think you would need to create a custom container which extends WorkbenchContainer and override the canInteractWith method to check for proximity with your own crafting table block. Then you have to tell your CraftingTable block to open your custom container instead of the vanilla one. You can see how vanilla opens the WorkbenchContainer by looking inside the CraftingTableBlock class. I don't know if this is the best way to achieve this though, there may be a better way
  24. I see you already made a post regarding the crafting table GUI: https://forums.minecraftforge.net/topic/92683-1163-my-item-gui-closes-instantaneously/ Didn't the answer you received help you? Does your GUI still open and closes right after, or doesn't show up at all? Be more specific please, and show what you tried
×
×
  • Create New...

Important Information

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