-
Posts
444 -
Joined
-
Last visited
-
Days Won
5
Everything posted by kiou.23
-
[SOLVED] I need help at making a tooltip for 1.16.5
kiou.23 replied to Geilomaticer's topic in Modder Support
public ItemStack return new ItemStack(Iteminit.TELE_STICK.get()); what is this line that's in the paste bin?? please learn basic Java -
what for?
-
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
-
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
-
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?
-
Draw text on the screen (Minecraft 1.16.4 - 1.16.5)
kiou.23 replied to andrussy44's topic in Modder Support
you can use MatrixStack#scale, as said before, to make the text smaller -
Draw text on the screen (Minecraft 1.16.4 - 1.16.5)
kiou.23 replied to andrussy44's topic in Modder Support
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 -
Draw text on the screen (Minecraft 1.16.4 - 1.16.5)
kiou.23 replied to andrussy44's topic in Modder Support
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 -
[1.16] Need help with ProjectileItemEntity Physics
kiou.23 replied to kiou.23's topic in Modder Support
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 -
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
-
Using NonNullList to add and remoove a ItemStack
kiou.23 replied to [email protected]'s topic in Modder Support
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 -
you use the CookingRecipeBuilder
-
[1.16] Need help with ProjectileItemEntity Physics
kiou.23 replied to kiou.23's topic in Modder Support
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) -
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
-
[SOLVED] [1.16.4] random values not sync between client and server
kiou.23 replied to theagente00g's topic in Modder Support
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 -
[Solved] 1.16 Storing ArrayList<BlockPos> to NBT
kiou.23 replied to Titmar's topic in Modder Support
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 -
[SOLVED] [1.16.4] random values not sync between client and server
kiou.23 replied to theagente00g's topic in Modder Support
do you need to run this on the client? runninng only on the server should be fine what's the context? -
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
-
where is your recipe json?
-
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)
-
post the full recipe json
-
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
-
https://minecraft.fandom.com/wiki/Tag you know that tags and items aren't the same thing, right?
-
you need to give some more detail if you want help