Everything posted by MistaOmega
-
[1.15.2] Getting a block position as soon as block is placed, and storing in NBT for later use
Doing it on the construction phase returns null because it hasn't been placed yet, apologies, was at work rushed the response. I stated about it in the original post See this is why you're the smart people here, thank you for the help, I'll give it a go, see how it ends up
-
[1.15.2] Getting a block position as soon as block is placed, and storing in NBT for later use
So I tried that before, I was storing the blockpos as an int array. but you see in my tick method, where I have the runOnFirstTick, that resets whatever I put as a stored value, and I need it because without it, it breaks as it can't get it's own position I'll try storing the boolean flag aswell, it might help my problem, I'll have another shot at it when I finish work Thank you
-
How to make a custom flower pot?
Oh absolutely, for basic things, sure why not, but I'd start with something like bukkit or spigot tbh, it's a lot less involved to make some interesting stuff happen
-
[1.15.2] Getting a block position as soon as block is placed, and storing in NBT for later use
Gwanin fellas, guess who? Right, so I'm making a quarry which you can find the important code for here: https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/tiles/TerraEngineTile.java It works fine, pls ignore the mess, I haven't tidied it yet, just got it basically functional So the issue I'm having is storing the block position for where it last mined, so if it's broken, and replaced, it can keep going I've tried getting the x, y and z coords, storing them in an int array and putting that in NBT and that's all well and good but the problem is that when placed, the constructor won't be able to instantiate a starting position (blockpos comes up as null, because it's being constructed), so I need a boolean flag to get the block pos first tick (runOnFirstTick) (i've got rid of that saving btw, but I pinky promise it was there) Which then becomes an issue after making the block because whatever I saved just gets replaced, or at worst, comes out as null because "currentMiningBlockPos" is null from beforehand. At this point all I'm wondering is, is there a simpler way to go about this that I'm missing. Thank you all as always ❤️
-
How to make a custom flower pot?
yeah, what boss man here said
-
How to make a custom flower pot?
I don't want to be rude or just pie you off, it's no way to go about things, but saying "I don't have the time" is a completely backwards way to think about it, you want that knowledge first, or you'll have no idea what's actually doing what. I haven't made a flower pot yet, but by extending the FlowerPotBlock class, most of the functionality should be present already for things like blockupdates and adding the flower itself. from there it may just be a case of add your own texture/model/whatever you want to do. You want a basic block tutorial, look for McJTY (the absolute unit who makes RFTools).
-
How to make a custom flower pot?
You want to make a model, sure, you can make a model using something like blockbench, which someone suggested to me and its good, but the functionality and implementing it into your mod, you need some code knowledge I'm afraid, if you don't know java, go learn about it and then come back to this.
-
How to make a custom flower pot?
Have a look at the vanilla classes, flower pots exist in the base game, so use your IDE and have a look, hopefully all the info you need is already there ? Class you're looking for is called FlowerPotBlock btw
-
[1.15.2]RayTracingResult is not working as it should be
You may at one point have the option to input a range for the raytrace, increasing that (may) help, also trying seeing what happens when you're right in front of a block, also, trying to filter out air blocks might be a shout too. I'm no expert at this so I'm just broadcasting ideas here.
-
[1.15.2]RayTracingResult is not working as it should be
Well, there's your first problem, don't do blank copy pastes, if you're going to, fork it on github, run it and try and understand its function before you just take from there. But, what would help is some of the code you have so we can see what the problem is.
-
[1.15.2] Getting surrounding blocks from a player broken block (based on face block was broken from)
Got it I'll mess around until I've got something working, thank you both for the help!
-
[1.15.2] Getting surrounding blocks from a player broken block (based on face block was broken from)
Vector math for the RayTrace I assume here. Correct? I'm experienced (ish) with it from back in my A-Level math days, treating eyePos of player as the origin I assume again. Thanks for the help, appreciate it as always ❤️
-
[1.15.2] Getting surrounding blocks from a player broken block (based on face block was broken from)
Howdy! I think you've got the right idea, the basis being that when I break a block a 3x3 area around that blockface is destroyed, does that make sense? And yeah, a direction isn't defined so it displays null. So the idea of using raytracing from a player can return the side of the block I'm looking at? If so, awesome I'll look into it. Thank you.
-
[1.15.2] Help with AbstractGui.blit
I'm sure I got these from Mekanism once, Hol up, I'll find for you https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/blocks/CrystalInfuser/CrystalInfuserGUI.java Refer to the bottom of this file, hopefully these are what you're after or at least of some use If you're talking animation like a moving arrow too, that happens in that file too, idk if it's in the same way you'd like, but if so, use away ❤️
-
[1.15.2] Getting surrounding blocks from a player broken block (based on face block was broken from)
What's popping gamers, It's ya boi Bernie back at it with another stupid question because I'm incapable of developing things. Right, so this time I've wanted to go off and design a pickaxe that could break blocks in an AOE, and I've (somewhat) done that in the following code: https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/tools/CaelestisPickaxe.java Now the issue I've come across is this will only behave properly when hit from above the block it will break all other blocks in an area from the block broken, The block that the player breaks behaves as a corner, I will sort it to be center but I kinda wanted it basically working before that. So the question I have for you is how should I go about modifying the code to work with it based on the direction the block was broken from, as in if hit from the side, the values I use should be different, how would I go about getting said values ❤️ My current though is subscribing to the playerInteractEvent, but I always ended up with a null case, plus I'm not 100% sure what I can do with that direction value example of PIE code (player Interact would be a void method in this case) @SubscribeEvent playerInteract (PlayerInteractEvent e){ currentFace = e.getFace(); } **Where currentFace is a direction value set at the top of the pickaxe class.** Thank you all ❤️
-
help with NoSuchMethodError
Reckon you can get us a full pastebin of the crash log? Will be easier to analyse from there. Also, when are you getting this error, world building, start up, in game after doing something, etc And what Minecraft version too pls x
-
Getting a list of ores, dusts, ingots etc
Yikes, i clearly wasn't paying attention to what I was writing ? Got it, is that stored in the NBT?? Also, thank you ❤️
-
Getting a list of ores, dusts, ingots etc
Hello all! I would find the "I'm once again asking for your support" Bernie Sanders (thank you for correction) meme, but alas, maybe next time. My issue for which I am asking for assistance in this time, is getting a list of things like ores and dusts and ingots, does forge resister these items in a unique way that I need to be aware of, I've tried getting all the ores in a biome to no avail beforehand Not asking for any handouts, as usual, just a gentle nudge in the right direction, eg, is there a vanilla class I should be looking into for this Thank you all ❤️
-
Where to get started making more complex block models [1.15.2]
Thank you for the help man! Appreciate it ❤️
-
Where to get started making more complex block models [1.15.2]
Yeah I don't think the blockstate is in the assets folder ?
-
Where to get started making more complex block models [1.15.2]
@sciwhiz12, @Ugdhar Thank you both, you've helped tremendously ❤️
-
Where to get started making more complex block models [1.15.2]
Hello fellow programming humans I want to get into making different block models, ones that don't take up a full block space, an example could be something like a conduit from EnderIO. Now sadly, despite loving the coding lifestyle, I can't for the life of me figure out how to go about it with my one single solitary remaining brain cell. I'm asking in short, if anyone knows of some big documentation I can sink my head in to, or any other places I can find explanations for how I would go about doing such a thing, and if you've done it yourself, any particular things I should avoid doing I'm pretty new to all this stuff, but I do have a fairly reasonable knowledge base for general java and OOP development, just a touch out of my depth here, because I don't really know where to start. Thank you ❤️
-
[Solved] [1.14.4] Stairs with extra blockstates
Here's some code that may help, I don't understand the full logistics of your issue, but if you're missing a direction value, this is one way to set the blockstate with one. Apologies if it isn't of use ofc ❤️
-
[Solved] [1.14.4] Stairs with extra blockstates
Hi! I'm not entirely sure if this is helpful to you, but overwriting onBlockPlacedBy inside the class and calling a method that uses the getFacingFromVector method, you should be able to set a BlockState dependant on that.
-
Help with backporting my mod to 1.14.4
Some common google searches will give you some fun stuff you may find useful to know, for example here's one for eclipse: https://dzone.com/articles/effective-eclipse-shortcut-key and for IntelliJ: https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html# diesieben may have meant to learn it in a different way, but knowing shortcuts and how to search and find things when I need them was a huge part of helping me actually learn ❤️
IPS spam blocked by CleanTalk.