Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by kiou.23

  1. public ItemStack return new ItemStack(Iteminit.TELE_STICK.get()); what is this line that's in the paste bin?? please learn basic Java
  2. first: search for Java tutorials, there are PLENTY of really good and free information on Java programming online. it will be really hard to make your own mods withouth proper knowledge of programming. learn Java, and learn Object Oriented Programming. second: funny enough I can recommend you the same videos I started out watching for modding: the ones by silentChaos512 on youtube, very recently he released a video on Tile Entities third: you won't find tutorials for absolutely everything that you may need, sadly. there are some tutorials out there for the basics, but that very often isn't all you'll want to know. the best way is to look at the vanilla code itself, look at other mods code, or ask for help (for specific stuff) in the forums here is a really good youtube video on Java programming: https://www.youtube.com/watch?v=GoXwIVyNvX0 also, take a look at the official forge documentation: https://mcforge.readthedocs.io/en/latest/ and there's also the community documentation: https://forge.gemwire.uk/wiki/Main_Page
  3. you can't have two blocks occupy the same space. however, you could it a property in the slab's blockstate, and use of the blockstate json file to point to different models. then handle the logic on the onBlockActivated, to switch the blockstates
  4. could you elaborate? is the stone slab the vanilla slab, or a block of your own? what do you mean by "inside"? is the rod a block?
  5. you can use MatrixStack#scale, as said before, to make the text smaller
  6. it scales what is going to be rendered with that matrix stack to 0 on x axis, 0 on the y axis, and 0 on the z axis, therefore making it infinetelly small
  7. the first param is a matrixStack the second is the String you want to draw the third is the starting x position of the string, and the fourth is the starting y position and the fifth is the color, it is better to write it in hexadecimal than decimal, you use 0x to say you're writing a hex number. if you still don't get it, you can search on hexadecimal color and also: don't create your own matrixStacks, use the ones that are passed to you, you should always have a matrixStack in the context you'd want to call drawString
  8. thanks for the example! but as I've said, since my entities use some more complicated shapes, I think I'm better off using a third-party physics library
  9. you don't need to have the jar just add the maven depency in your build.gradle, under where the minecraft forge dependecy is defined then refresh the gradle project
  10. 1: your List holds 12 Item Stacks, why are you only checking from 0 to 9 in the for loop? intentional? 2: don't use System.out, use a Logger, the example mod already comes with one in the ExampleMod class 3: the following will always return false bowlContents.get(i).equals(new ItemStack(Items.AIR) It must be the 4th time I have to explain this: an Item Stack (and any other class for that matter) is only ever equal to itself, any other instance of an ItemStack (even if it has the same item and count!) is not going to be equals, since it is a DIFFERENT object. however, minecraft ever only has one instance of an Item, so what you want is to check if the items are the same. basic knowledge of OOP would help 4: you have a NonNullList of ItemStack: private NonNullList<ItemStack> bowlContents and then try adding an Item to it: bowlContents.set(i, new ItemStack(playerIn.getHeldItemMainhand().getItem())); Items and ItemStack are not the same thing, again: basic knowledge of OOP would help In recommend just watching a video on Java OOP, it shouldn't take more than a couple hours, and would avoid simple mistakes
  11. how do I get the associated face? it doesn't seem that RayTraceResult can tell me that. note: I was/am about to implement the jBullet engine (I might as well since my projectiles have shapes more complex than a cube)
  12. I'm making an projectile item, that when thrown, should bounce around a bit before stopping on the ground. however I'm having a really hard time with the physics of it, I've tried a few things but none of them quite worked. I tried looking at the code for some other entities, such as the ArrowEntity, but it didn't help either. For making the item bounce, I'd probably need the normal at the hit point to be able to "reflect" it's velocity How could I make it so the entity would behave more like a physics object? here's the code for the entity: DSixEntity.java
  13. you can play sounds from the server using ServerWorld#playSound I haven't done anything with potion effects, so I'm not sure I could help you with this. but post some code nevertheless
  14. for (int i = 0; i <= size; i++) size is the amount of items in the list. but the list is 0-indexed, meaning the items indexes goes from 0 to size - 1 you're trying to get an element at an index which doesn't exist
  15. do you need to run this on the client? runninng only on the server should be fine what's the context?
  16. did you name the folders with actual periods? don't do that, IntelliJ doesn't make it subfolders (it works for Java packages, but not for regular directories), it's literally just a directory name with periods in it recipes must be under data/modid/recipes
  17. I'm not sure the serializer accepts shaped recipes that only have one ingredient, try using a shapeless recipe (I'm not entirely sure tho)
  18. tags is a way of grouping together items that have something in common. look at Coal and Charcoal for example, they're both individual items, but for the torch recipe (and the campfire iirc), you can use any of the coals. minecraft doesn't make the recipe twice, once for each coal. instead it groups the coals together under a tag there are tags for a whole bunch of stuff, some from vanilla, some from forge, and you can even make your own type of tags, it's all data-driven and the minecraft wiki article I posted goes into further detail
  19. https://minecraft.fandom.com/wiki/Tag you know that tags and items aren't the same thing, right?
  20. you need to give some more detail if you want help
  21. what mappings are you using? you can check that in your build.gradle, look for mappings channel if you recently updated forge or the mappings, try refreshing the gradle project
  • Create New...

Important Information

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