Jump to content

-TheLittleGuy

Members
  • Posts

    26
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

-TheLittleGuy's Achievements

Tree Puncher

Tree Puncher (2/8)

3

Reputation

  1. hmm the code i used in my old mod came from the source code of a different mod, but im not sure if it can be adapted to 1.15, i believe it involved vector math aswell might have to give it a go Thank you for the pointers though! Edit: Found some code from another mod that I believe I can adapt to my specific use case
  2. Since 1.15 introduced a lot of significant changes as opposed to 1.12, I cannot figure out how to RayTrace an entity from a range further than what pointedEntity allows (~4 blocks) I am able to raytrace blocks from an increased range using BlockRayTraceResult, but I am unsure how to apply this to entities. I want to be able to target an entity from a range of about 50 blocks. Please let me know where to start. Thank You.
  3. Hello! I am curious on how I would go about creating a "second camera" for use with perspectives. In the past I have heard methods of creating a client side entity and then using setRenderViewEntity() to switch perspectives. However, I want to take this a bit further and Create a second popup window (that can be dragged onto a secondary display) giving me two perspectives independent from each other. The concept would work similar to splitscreen or even those popular free cam mods. My basic thought process for this is as follows: Create client side "camera" entity, would act as if I were running the game with another account (in regards to a camera view) create a second game window with the secondary view - when window is in focus you would be able to move camera around, but cannot interact with GUI's etc. So how would I go about doing this? Would I need to create a frame buffer/render to texture and do some of that weird openGL related stuff?
  4. thank you everything works perfectly now!
  5. So I came up with this code but I am unsure how to "tie" it to the tooltips. No crashes occur but it does not work List<ITextComponent> tooltip = event.getToolTip(); ArrayList<String> list = new ArrayList<>(); String regex = TextFormatting.YELLOW + "(Efficiency \\d+|Fortune \\d+|Unbreaking \\d+).*"; //add all lines of the tooltip for(int i = 0; i < tooltip.size(); i++) { String line = tooltip.get(i).getFormattedText(); list.add(line); } Iterator itr = list.iterator(); while (itr.hasNext()) { String next = (String) itr.next(); if(regex.equals(next)) { tooltip.remove(next); //unsure if this is correct test = true; //test boolean } }
  6. You have a basic example? Haven't worked with iterators much.
  7. A server I play on has this annoying "feature" where it changes how enchants are displayed on an item to look like the following: However I don't want that so i used some code to "reveal" the vanilla enchants (which are hidden with HideFlags nbt tag) and then removing the yellow text Problem is, not all of the yellow lines are getting removed - Ideally there should be no yellow lines on the item. Here is the following code that results in the image above: @SubscribeEvent public void onToolTip(final ItemTooltipEvent event) { List<ITextComponent> tooltip = event.getToolTip(); ArrayList<String> list = new ArrayList<>(); for(int i = 0; i < tooltip.size(); i++) { String line = tooltip.get(i).getFormattedText(); if (line.matches(TextFormatting.YELLOW + "(Efficiency \\d+|Fortune \\d+|Unbreaking \\d+).*")) { //other enchants will be added here //if(line.startsWith(TextFormatting.YELLOW + )) { list.add(line); tooltip.remove(i); } index = tooltip.size(); //used for testing s = list.toString(); //used for testing } CompoundNBT nbt = event.getItemStack().getOrCreateTag(); nbt.remove("HideFlags"); } So what exactly is failing? Any help would be appreciated!
  8. I switched over to IntelliJ and everything worked fine, must have had a bad eclipse installation or something
  9. i appreciate it thanks!
  10. same error still occurs
  11. I basically did what the README.txt said to do. Extract files to folder > Run gradlew genEclipseRuns (this is where the error occurs) > After importing the project into eclipse the mentioned dependency is missing.
  12. I am trying to create a new modding workspace for 1.15.2 however I keep running into this error when trying to setup the project: Could not resolve: net.minecraftforge:forge:1.15.2-31.1.37_mapped_snapshot_20200225-1.15.1 Did I forget to install something? I am unsure whats causing this.
  13. Thank you for all your help!
  14. I actually do have a question: I changed the gradient to start from the left instead of the top however, the current method applies the gradient effect to the individual character. What would have to be changed in order to have the gradient be applied to the entire string? Where would the GL Functions go in that case? Where they are currently or would it have to go after the chars are "assembled" into the string? Ex: i have the string "Test String" the start color is Green and the end color is Red, the first letter will start green and will fade to red by the time it gets to the last letter.
×
×
  • Create New...

Important Information

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