Jump to content

cinco

Members
  • Posts

    5
  • Joined

  • Last visited

cinco's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm coding a mod that adds placeable Gunpowder into the game, which behaves similarly to Redstone in terms of placing. I also want it to be flammable, so that it can be used as a fuse. However, the default fire spreading behaviour works well for this - the blocks ignite randomly, and they can burn out without spreading the fire to the next block. I want to make it so that, when the gunpowder is set on fire, instead of the Fire block simply floating above it or going to the side, it should replace the gunpowder block every time. I would also like to make fire spread to gunpowder faster than it does to regular blocks, because that would make it more practical as a fuse. I really don't know how I would go about doing these things. I suppose I could make a function in the gunpowder's block class that detects fire and turns into it separately from regular firetick, but that could have problems with things like Soul Fire, especially in terms of compatibility with mods that add other types of fire. Also, there are a bunch of other sources of fire: Flint and Steel, Fire Charges either from a player's hand or a Dispenser, fireballs shot by Ghasts and Blazes, not to mention any modded sources of fire. Is there any way to just make all sources of fire behave differently for this block?
  2. UPDATE: I kept coding, and apparently the code just works even though the IDE can't recognize the class. Annoying to have 64 fake project errors in a functioning program, but I guess this is solved.
  3. UPDATE: I decided to keep going with the programming despite all of the errors, and even though IntelliJ can't recognize Direction, I'm able to run the code okay? I guess this is solved, though it is annoying to have functioning code be flagged with 64 project errors.
  4. I'm making a mod which involves certain blocks having directional properties, however for some reason my IntelliJ is unable to recognise the public enum Direction. I've dug around a bit and it recognizes some other classes in net.minecraft.core just fine (BlockPos for example). Without being able to use Direction I'm pretty much unable to use things like BlockState.isFaceSturdy. Could I have set up my Gradle wrong somehow? Is it something else? Are there any workarounds?
  5. I'm trying to create a mod that involves directional blocks, but IntelliJ is giving an error - "cannot resolve symbol 'Direction'". It offers me several "Direction" classes from various unrelated packages, but not the Direction enum from net.minecraft.core. Upon further investigation, it seems that although it has imported other classes from net.minecraft.core fine, enums such as Direction or RedstoneSide aren't being imported. I've tried to bodge around it, but I can't find a way to make BlockState.isFaceSturdy usable without it, as Direction is one of the input arguments. Why would Gradle import net.minecraft.core, but not import its enums? What file could I have set up wrong? (Alternatively, I would be satisfied with a workaround for BlockState.isFaceSturdy if there is somehow no fix for this.)
×
×
  • Create New...

Important Information

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