
kaiser_
Members-
Content Count
21 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout kaiser_
-
Rank
Tree Puncher
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Hello! I want to render a text above each PlayerEntity. This text contains data that can and will change for each individual player, but I'm not sure how to properly override the renderer. I know that I have to use forge events to achieve this, but I don't know anything else. I'm also curious if that data is synced to other clients. I've tried to look up the way minecraft syncs player names but no luck. Any idea?
-
I actually tried this. I don't think it's how it's should be done as the texture does not render. What am I doing wrong? bufferbuilder.begin(7, DefaultVertexFormats.POSITION_COLOR); bufferbuilder.pos(-i - 1, -15 + verticalShift - 10, 0.0D).color(0.0f, 0.0f, 0.0f, f).endVertex(); bufferbuilder.pos(-i - 1, 8 + verticalShift - 10, 0.0D).color(0.0f, 0.0f, 0.0f, f).endVertex(); bufferbuilder.pos(i + 1, 8 + verticalShift - 10, 0.0D).color(0.0f, 0.0f, 0.0f, f).endVertex(); bufferbuilder.pos(i + 1, -15 + verticalShift - 10, 0.0D).color(0.0f, 0.0f, 0.0f, f).endVertex(); this.mc.getTextureManager().bindTexture(location); tessellator.draw();
-
Yes, I managed to make my quad, I only need the image to be rendered, that's where I got stuck.
-
Thanks for the help! However I still have problems with the image render part of the solution. Anywhere to go?
-
Hello! I'm trying to render an image above my entity just as the label that displays the player's name. I've searched through the entity's render class, but I did not find anything related. When searched for this, I found a few examples but they most likely outdated, as they are from 2013. Can anyone help me out?
-
Oh thank you! works just as I expected now with Minecraft's ResourceManager.
-
I actually looked at the FontResourceManager class to get some ideas on what to pass in, then when I tried it myself I did not get anything at all. I was expecting to get a few json files from the vanilla font directory, but seems it works differently. Anyway that is the exact code I tried last time: public static void test(){ FallbackResourceManager r = new FallbackResourceManager(ResourcePackType.CLIENT_RESOURCES); Collection<ResourceLocation> res = r.getAllResourceLocations("font", (t) -> {return t.toLowerCase().endsWith(".json");}); Logger.getLogger("Log").info(String.valueOf(res.size())); for(ResourceLocation resource : res) { Logger.getLogger("Log").info(resource.getPath()); } } In the meantime I'm also trying to figure out the implementation.
-
Thank you! I found it, however, I have problems with what to pass in to the pathIn parameter as most of the times it won't return anything for me. I've looked at some vanilla usages but after some tries, I came up empty handed.. Can you explain it for me, if you don't mind?
-
Hello! I'm trying to get all files from one asset. For example I have a asset like this: "textures/gui/.." and I want to have all files from this asset in a List. I don't know if it's enough to describe what I need, but I hope You can get the point.
-
Hello! I was wondering if anyone has any idea or advice on how to create a button that renders with a look of an arrow like this: Thanks a lot for anyone who has any info!
-
Hello! I'm trying to begin learning how containers work, but the vanilla files are no help for me to understand them. I've been trying to find some guides but they are mostly outdated or useless. My questions are the following about them: how to use containers? A simple guide or a link would do. when to use them? how to use them correctly? and how to use containers without a TileEntity? Just like the MerchantContainer in vanilla. I appreciate any answer!
-
I would be glad if someone who had this problem and solved it would answer. This thing is on my head for a few days now, and I can't really proceed with my code without this part. If You know some similar statement like this, I would be happy as well. however, I'll keep trying.
-
The problem is with the statement asking if the "killer" of the entity is a player or not. It supposed to return false in the code below, if the player was the source, Sadly it returns true in every way public static void onMobKill(LivingDeathEvent e) { if(!(e.getSource().getTrueSource() instanceof PlayerEntity)) { return; } // do something here } I've also tried to reverse the statement like below, but the problem still remains public static void onMobKill(LivingDeathEvent e) { if(e.getSource().getTrueSource() instanceof PlayerEntity) { // do something here } } Any ideas?
-
I meant this: Just to explain it a bit further: this statement returns true even if the player landed the last hit, and it pretty much worked for a few more tests, then it somehow changed. That was my main problem.
-
Thank You! I wonder if You would have an answer to my first problem in the topic as well, as if that problem remains, I can't even experiment anything that You've said. It was pretty late when I wrote this topic, so if it needs more explanation, let me know!