Everything posted by Asweez
-
[1.10.2] Modify outgoing chat
I have a server side mod that I want to change the chat with. I want to make it compatible with whispering and other chat mods, so I want it to intercept chat messages right before it goes to the player. To be a bit more specific, I want to know the message being sent, the sender, and who the message is being sent to. Is there an event or something that would allow me to do this? Thanks
-
[1.10.2] Making player wander like EntityAIWander
Bump
-
[1.10.2] Making player wander like EntityAIWander
Bump
-
[1.10.2] [SOLVED]Potion effect when full set is worn. Where do I put it?
If you knew basic Java then you would't put a method inside of another method... That's just ridiculous.
-
[1.10.2] [SOLVED]Potion effect when full set is worn. Where do I put it?
What? Those are the same thing, one is just specific to armor. Just set the potion effect length to whatever you want after checking that the player doesn't already have that potion effect.
-
[1.10.2] [SOLVED]Potion effect when full set is worn. Where do I put it?
Please learn some basic Java and come back once you have done that. No where in BedrockMiner's tutorial does it put a method inside of a method, that is a good tutorial.
-
[1.10.2] Making player wander like EntityAIWander
I want the player to act like they are using EntityAIWander by simulating mouse and keyboard input (this is a client side mod). What's the best way to do this? AI can only be applied to EntityLivings and that's what most AI algorithms use. Right now I use a PathFinder with a WalkNodeProcessor, then calculate the path to a randomly calculated position nearby. To do this I use PathFinder#findPath and creating a new ChunkCache (with the client-side world object), and then here's where it gets iffy: I make a new EntityCow and use that for the EntityLiving param. Is there a better way to do this? NodeProcessor nodeProcessor = new WalkNodeProcessor(); nodeProcessor.setCanEnterDoors(true); PathFinder pf = new PathFinder(nodeProcessor); Vec3d vec3d = findRandomTargetBlock(player, 4, 1, (Vec3d) null); BlockPos pos = new BlockPos(vec3d); float f = 128; BlockPos blockpos = new BlockPos(player); int i = (int) (f + 8.0F); ChunkCache chunkcache = new ChunkCache(Minecraft.getMinecraft().theWorld, blockpos.add(-i, -i, -i), blockpos.add(i, i, i), 0); EntityCow cow = new EntityCow(Minecraft.getMinecraft().theWorld); cow.setPosition(blockpos.getX(), blockpos.getY(), blockpos.getZ()); Path path = pf.findPath(chunkcache, cow, pos, f);
-
Updating Chest contents repeatedly server-side
Where do I change the slots?
-
Updating Chest contents repeatedly server-side
I am making a server side mod in which I want to allow the player to open a chest (vanilla) and have several of the contents moving around. How do I make the contents update their location while the player has the chest GUI open?
-
[SOLVED]Adding a name tag to a block
Ah ok thanks, for all wondering, here is the final code: FontRenderer fontrenderer = Minecraft.getMinecraft().fontRendererObj; EntityPlayer player = Minecraft.getMinecraft().thePlayer; double x = ((pos.getX() - player.posX) + 0.5) ; double y = ((pos.getY() - player.posY) + 0.5); double z = ((pos.getZ() - player.posZ) + 0.5); RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); float f = 1.6F; float f1 = 0.016666668F * f; GlStateManager.pushMatrix(); GlStateManager.translate((float)x + 0.0F, (float)y + 1, (float)z); GL11.glNormal3f(0.0F, 1.0F, 0.0F); GlStateManager.rotate(-renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(renderManager.playerViewX, 1.0F, 0.0F, 0.0F); GlStateManager.scale(-f1, -f1, f1); GlStateManager.disableLighting(); GlStateManager.depthMask(false); GlStateManager.disableDepth(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); int i = 0; if (str.equals("deadmau5")) { i = -10; } int j = fontrenderer.getStringWidth(str) / 2; GlStateManager.disableTexture2D(); worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); worldrenderer.pos((double)(-j - 1), (double)(-1 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(-j - 1), (double)(8 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(j + 1), (double)(8 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(j + 1), (double)(-1 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); tessellator.draw(); GlStateManager.enableTexture2D(); fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, i, 553648127); GlStateManager.enableDepth(); GlStateManager.depthMask(true); fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, i, -1); GlStateManager.enableLighting(); GlStateManager.disableBlend(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix();
-
[SOLVED]Adding a name tag to a block
So I copy pasted the renderLivingLabel from Render and tweaked it for a block: FontRenderer fontrenderer = Minecraft.getMinecraft().fontRendererObj; int x = pos.getX(); int y = pos.getY(); int z = pos.getZ(); RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); float f = 1.6F; float f1 = 0.016666668F * f; GlStateManager.pushMatrix(); GlStateManager.translate((float)x + 0.0F, (float)y + 1, (float)z); GL11.glNormal3f(0.0F, 1.0F, 0.0F); GlStateManager.rotate(-renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(renderManager.playerViewX, 1.0F, 0.0F, 0.0F); GlStateManager.scale(-f1, -f1, f1); GlStateManager.disableLighting(); GlStateManager.depthMask(false); GlStateManager.disableDepth(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); int i = 0; if (str.equals("deadmau5")) { i = -10; } int j = fontrenderer.getStringWidth(str) / 2; GlStateManager.disableTexture2D(); worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); worldrenderer.pos((double)(-j - 1), (double)(-1 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(-j - 1), (double)(8 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(j + 1), (double)(8 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); worldrenderer.pos((double)(j + 1), (double)(-1 + i), 0.0D).color(0.0F, 0.0F, 0.0F, 0.25F).endVertex(); tessellator.draw(); GlStateManager.enableTexture2D(); fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, i, 553648127); GlStateManager.enableDepth(); GlStateManager.depthMask(true); fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, i, -1); GlStateManager.enableLighting(); GlStateManager.disableBlend(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix(); But nothing shows up. I have declared pos and str elsewhere and I'm sure it's being called. What am I doing wrong?
-
[SOLVED]Adding a name tag to a block
Where do I render the name tag, in the event?
-
[SOLVED]Adding a name tag to a block
1) Where would I get the instance of the block that should have a name tag? 2) Do I need to make a new renderer that renders name tags for blocks?
-
[SOLVED]Adding a name tag to a block
Is there any way to add a name tag-type-thing to a block, where the name hovers over it? How would I do so? Note: I would like to be able to do this to any block, even vanilla ones Thanks
-
Vehicle movement is very jittery
I have made a vehicle that can fly, and it is controlled by the way the player is facing. Here is the code: The vehicle, whenever I ride it, jitters ands moves a lot back and forth. The actual speed doesn't seem to be affected, but when you are looking at the broom, it is just moving back and forth really quickly. How can I fix this?
-
[SOLVED][1.7.10]Odd GUI rendering bug
Never mind, I solved it myself, the key was in that thread that I posted
-
[SOLVED][1.7.10]Odd GUI rendering bug
Alright, thank you that is fixed, but now the experience bar is messed up like in this post. How do I fix this?
-
[SOLVED][1.7.10]Odd GUI rendering bug
I made a gui overlay that is only rendered when the player has a certain item in their hand. Part of it, however, is only rendered when a certain value is true in ExtendedPlayerProps. Here is what it normally looks like: Here is what it looks like now: I'm not sure why it does this. However, when I mess around with the items in the hotbar (adding items, moving them, removing them), I can sometimes get the gui overlay to look normal. I have no clue what is going on. Here is the code that I use to render the gui overlay:
-
[Solved] Forge can't find files that are obviously there
Ah that works, thanks
-
[Solved] Forge can't find files that are obviously there
- [1.7.10] Spell Book help
Look at how the fireworks are crafted with various items to create different effects (RecipeFireworks), and how leather armor is crafted with dyes to make various colors(RecipesArmorDyes). These both modify NBT tags after crafting.- [Solved] Forge can't find files that are obviously there
Same error with that, too.- [Solved] Forge can't find files that are obviously there
That doesn't work either, not even in eclipse. I get an NullPointerException on this line: String urlDic = getClass().getClassLoader().getResource("/assets/hpspells/speech/spells.txt").getPath();- [Solved] Forge can't find files that are obviously there
That doesn't work either, not even in the dev environment. Here is the error after trying to run it in eclipse.- [Solved] Forge can't find files that are obviously there
Yes, everything is lower case - [1.7.10] Spell Book help
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.