Jump to content

Unsure if my screwup or bug (1.17.1) [worked though/~fixed, still unsure why what worked & what didn't]


DePhoegon

Recommended Posts

GitHub - Axis Block
GitHub - Slab Block

What I can not figure out is 'why' the tooltips from the axiBlock (via Cut Sand Stones ) will not work, while the ones from directly & indirectly from Slab Block & GitHub - Energetic Slab.

Also, for some reason,  if the name for the Cut Sandstone & Cut Red Sandstone are anywhere close to it..  it seems to entirely confuse creative menu, and it seems to only have it's name if Doesn't start with cut  (which I'm not entirely a fan of, as I would like them to have the same name.. but I am seeming to have problems with the RotatedPillarBlock in a way I'm not understanding.

 

----

I've worked to understand what's going on & even fuss through it, and rework logic (currently  the major work was in the sand logic, expanding it to a class of 'energetic Slabs' to hold them up, and in such a way that it didn't matter lower, double, upper slab either.    To expand design choices & limited the spider up through a energy sand [aka, color sand]
-- would have just included the Override for MC sand  (which worked, but had a nasty complication of 'world gen not including it, and not knowing how to replace the block correctly in the world gen.

I would have replaced sand/red_sand in world with my versions, but I had also ran into complications around plants (cacti & dead bushes)... sooo that's a no go.

===============================

*edit

w10x64
Intellj

Edited by DePhoegon
System OS, & IDE in use
Link to comment
Share on other sites

41 minutes ago, Luis_ST said:

do you know basic java?

I'm just going to say,  I don't get what you're going with that.

---

Quote

private static String tip0;
private static String tip1;
private static String tip2;

---

This exists in the 'SandBlock', 'SlabBlock', & 'GenBlock' as well, and those ones function as intended.
-- I don't get what's different, with this one. I'm partially sure I'm missing something obvious..  but I genuinely am being slightly bent out of shape about it.  (mostly because it just doesn't seem to make sense to me as to the differences... and the only one I can figure out is that it's going through RotatedPillarBlock (built in class from the forge mdk of 1.17)  [but that still goes back to the same block class as the others]

Link to comment
Share on other sites

12 hours ago, Luis_ST said:

do not use @OnlyIn, and learn what static mean
in addition put never DeferredRegister and RegistryObjects in different classes
Have you ever checked whether the methods are called the way you want them to? use Debbuger?


and btw: https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html

Have you even dug through the minecraft methods with the 1.17.1 (Forge) MDK?  You're kinda coming off as if you ignored the question just to insult someone for how they wrote something down and don't understand what's actually going on. 

OnlyIn is actively used for Client side only behaviors, and has very legitimate server side applications as well.   (as well as others, but I am not sure they are 'needed' or really able to use them for my purpose.)
--- I really shouldn't need to tell you that attempting to capture the window for the Minecraft server will produce quite alot of problems.  (which is exactly why I use it in getting the KB input)
---  Further more.. The 'OnlyIn' that is in use is in | net.minecraftforge.api.distmarker | and isn't a native Java call in this context.

 

Yes, Everything works..  With the exception of the ones from RotatedPillarBlock, and in such ways that it's not making sense.

They work, and I'm more than open to being 'wrong' with how I do things, but I kinda know enough enough that 'while these methods are -weird-', they should work consistently with each other... and one working while another one doesn't is a sign something isn't setting right.

_________________________

Taking the chance I likely defaulted to the wrong one without fully testing it[or under faulty logic] (using the IDE to suggest what it should be) [suggested final] 

Now what Bothers me .. is the inconsistent behavior, & this explains a tiny bit of what's going on with other seemingly ... weird MC behavior w/ text.
--  Though honestly, What didn't make sense is that the sands, slabs, & general blocks worked (albeit with abnormal text for the subtext, for MC which didn't entirely seem right) but refused to work with the ones in the pillar blocks.

Also, while I might be not understand what's 'acceptable' for MC in terms of 'Names', there might be issues at naming blocks too similarly to ones in the base game (Still testing) that out
-- No seriously I think there might be somethin to this.

Though really, you might not have been a self absorbed prick, and said something more along the lines of 'Are you sure you want to use 'static' in that String?'  instead of coming off like someone who didn't read what was going on, and doesn't understand the point of the forum (Modding Minecraft w/ forge MDK) and attempting to say a method within that MDK shouldn't be touched, as if it was some forbidden Java code.

Ya, I'm using a debugger... CONSTANTLY...   build, test, dig through the logs/errors feed, and fixing what I see and am able to corrected & overlooked
-- There is only so much an IDE can really do to 'guide'.. and Kinda why I asked if I was missing something or it was some bug because it Seemed to be working just fine for others & kicking back no errors either.

--------

I also get the naming conventions, but I needed something that I could keep consistent & not step on my own damn'd toes ever 5 minutes.
--  Ya, the conventions are their to help people keep aspects of the programing straight...  not to be used as a tool for the anal to crack others on the head with.   If you have a particular problem with how I did things, speak up or shove it.   I'm more than willing to look at what I do and what others suggest might not be wise or not.. but shoving the equivalent of a book into my face without a singular word about 'what is what', is insulting, and utterly pointless.

Link to comment
Share on other sites

  • DePhoegon changed the title to Unsure if my screwup or bug (1.17.1) [worked though/~fixed, still unsure why what worked & what didn't]
1 hour ago, diesieben07 said:

Please elaborate what your actual issue is and provide a way to reproduce it.

Replace 'final' with 'static' [in all the locations for the tooltips] 
-- Pretty sure this was the issue, but what I can't figure out is ...  why it was so inconsistent & why it produces different text size/style (ignoring the MOTD slash colorcodes influences)
== pretty sure my thought process was it was static per container & given I was able to actually get it to take a value before (with the sand_slabs)  I don't think I get what's really going on in that set of interactions.
~~ my only idea, and this is a shot in the dark is that not all of the blocks/items called from it had the tooltips, so the null over wrote... or maybe it was the last item item to set all of them ... IDK...  it just doesn't seem to click, and all I know is 'static' was just wrong to use that way and produced ....abnormal results w/ no obvious errors flagged or shown.

It gets inconsistent, the tooltip (when it does show) Shares the same property of the Base item name.
-- It's larger & overall  disjointed compared to regular tooltips (even colorized ones)

The one you are showing is the one using 'final' instead (and is how I expected it to look for the load of mods  tooltips, in regards to how the font is displayed)

----------

I'm up for naming conventions & to keep a standardized understanding >.>  Though atm, I admit it's not my first focus.
-- I'll get onto making sure it all is flowing correctly after I get more of the logic worked out.

Ok, Since the only place (OnlyIn) was used was in the keyboards capture.  What would the solution actually be?  Since I clearly didn't understand how it's intended to be used, or what it does / does not do. 

----

ATM, working at figuring out how to get a 'Supplier<BlockState>' from a Blockstate. (For stairs)  I'd rather not use a deprecated method.. again.  (maybe I do need to rework out I do block registration for this.. IDK)

Link to comment
Share on other sites

59 minutes ago, diesieben07 said:

Again basic Java. A supplier is a functional interface.

.....  I'm not going to talk about it. >.>  

I genuinely do not fully get this | () -> |  thing.  

Guess the Supplier<BlockState> got me mislead & 'functional Interface' didn't clue me in either. 

Any reading resources to help better understand that,  It's never truly made sense to me.  I only get nameless inline function.

==============
Yes, I'm still new to java &.. I've been learning by taking the preassembled code apart & studying it, as I can.. and obviously I know I'm missing  the finer parts.. but I'm not leaving those unforgotten either.

++++++++++++

As for what I thought I say.. hell if I bloody know now.  The text is coming out the same.  Perhaps I was just seeing things from stress or I don't understand what caused it to be visually larger & all capital when it did happen & can not reproduce it.  Will keep an eye out, but bugger me sideways if I will find it again, knowingly.
-- It went away when I switch to the final, and no idea what I did to cause or trigger it.

Edited by DePhoegon
*sigh*
Link to comment
Share on other sites

1 hour ago, DePhoegon said:

I genuinely do not fully get this | () -> |  thing.  

Guess the Supplier<BlockState> got me mislead & 'functional Interface' didn't clue me in either.

this is a simple summary of functional interfaces, and how to use them, i hope this is helpful

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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