Jump to content

LazerMan47

Forge Modder
  • Posts

    38
  • Joined

  • Last visited

Everything posted by LazerMan47

  1. Ok, i've been away from modding for over a year and I've decided to come back to it. This is an error that I could never quite figure out. On any mod I make that involves drawing an HUD, I get this error It just keeps on going. This error seems to be completley harmless and hasn't caused any problems in the mod, but it makes it impossible for me to print things to the console because this error keeps spamming. My code for my mod's GuiInGame: Any help would be greatly appreciated!
  2. My mod creates a highly configurable HUD from the anime Sword Art Online, and im working on replacing the hotbar. I have sucesfully created a vertical hotbar at the top right corner of the screen, and disabled the old one by canceling the ElementType.HOTBAR event using setCanceled(true). But i still cant seem to get rid of the fading text that appears above the hotbar whenever you switch items. Is there a way to disable this? Thanks in advance -LazerMan47
  3. I tried but i dont really know where to set it up, do i have to make a new class for it or should i put it in my clientproxy
  4. Is there any way to edit or add to the player model? I managed to make changes to the HUD using the RenderGameOverlayEvent with EventHandler, is it the same way for 3D models? Do i have to register an event handler to change the render process or do i have to register a completley new renderer?
  5. well, this is a problem ive been avoiding from the start of this mod, but it became alot more popular than i thought (10K+ downloads ). I now want to implement a health bar for other players rendered next to them, preferably curved. I would also like to render a gem like icon above the players head, preferably 3D and spinning. I have some rendering experience and know how to make custom models with techne, but i have no idea how to do this. Any help would be appreciated. Health Bar From Anime:
  6. I just tried running 2 instances of minecraft and a server to test multiplayer and found out that my projectiles don't render for the player who isnt firing them. (Ex. - I Fired A Shot From The Railgun at Another guy, and it renders for me, but not for him) I suspect that this is being caused by the entity to exist server side, but not client side, for the player who didnt spawn the entity, because the entity still does damage Item Class: Entity Class: Entity Render Class:
  7. I have removed them from my item class, and switched their references to tagCompounds. It still doesnt seem to be working though My New Item Code:
  8. It seems to be letting me add and call tags, but it wont let me change ones i already created, is this possible? My New Item Class:
  9. I have never used addWeatherEffect, but I have spawned lightining using a different line. instead try: EntityLightningBolt lightning = new EntityLightningBolt(world, x, y+1, z); world.spawnEntityInWorld(lightning); As for the explosions: world.createExplosion(lightning, lightning.posX, lightning.posY, lightning.posZ, <Explosion Strength, Go With A # Around 4>, false);
  10. There are alot of changes, and I had a hard time updating my mod. Use these tutorials by wuppy29, I found them very helpful Link: http://www.wuppy29.com/minecraft/modding-tutorials/forge-modding-1-7/#sthash.3QJiGDp1.dpbs
  11. If you use Forge 1.7.2, they have gotten rid of the @NetworkMod annotation, it is no longer needed. Consider Updating. As for 1.6.4 & @NetworkMod, i didn't create GUIs until 1.7.2 so i have never used it
  12. Im not familliar with NBTTagCompound, can u point me to a good tutorial?
  13. I have a weapon in my mod that can switch modes, and it works fine in singleplayer. But when I switch over to multiplayer, it says i switched modes, but the effect is always that of the first mode My Item Class Plz help -LazerMan47
  14. Im trying to make my lasers render like the lightining bolt does, but facing the right direction. I have tried to do this, but it shoots vertical bolts instead.
  15. I put this in the mod class @SubscribeEvent public void onServerChatReceivedEvent(ServerChatEvent event) { // make sure a player is involved if (event.player != null) { // Declare player EntityPlayer player = (EntityPlayer) event.player; if (player != null) { // Cancel the event event.setCanceled(true); // Cycle through players and send the chat List players = MinecraftServer.getServer().getConfigurationManager().playerEntityList; for (int i = 0; i < + players.size(); i++) { // Get the player EntityPlayer target = (EntityPlayer) players.get(i); // send the chat if(target.getDisplayName().contains("Player")) { String chattxt = EnumChatFormatting.RED + "[" + EnumChatFormatting.YELLOW + "Weapons+ Developer" + EnumChatFormatting.RED + "]" + player.getDisplayName() + event.message; target.addChatMessage(new ChatComponentTranslation(chattxt)); } } } } } But it doesnt seem to work
  16. Ive figured out packets!!! I am now able to use them to call the addChatMessage() method, but there is no world variable public void handleServerSide(EntityPlayer player) <<---- There is no World par2World in there My Custom Packet Class: package lazerman47.weaponsplus.PacketHandling; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; public class PacketGUI extends AbstractPacket { @Override public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { // TODO Auto-generated method stub } @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { // TODO Auto-generated method stub } @Override public void handleClientSide(EntityPlayer player) { // TODO Auto-generated method stub } @Override public void handleServerSide(EntityPlayer player) { player.addChatMessage(new ChatComponentText("PACKETS WORK!!!")); } }
  17. I checked the tutorials and made these 2 classes AbstractPacket
  18. Im not too familliar with packets, can u show me a good tutorial on how to use them?
  19. Im trying to spawn entities using a gui for my laser designator When i click the button, the entity appears, but it doesnt react with anything. I tried adding the if(par2World.isRemote) and if(!par2World.isRemote) statements but it didnt work. GUI Code package lazerman47.weaponsplus.GUI; import lazerman47.weaponsplus.Entity.EntityLaserDesignation; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; public class GUILaserDesignator extends GuiScreen { public GUILaserDesignator(EntityPlayer par1EntityPlayer) { } public final int xSizeOfTexture = 176; public final int ySizeOfTexture = 180; protected int type = 0; @Override public void drawScreen(int x, int y, float f) { drawDefaultBackground(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int posX = (this.width - xSizeOfTexture) / 2; int posY = (this.height - ySizeOfTexture) / 2; this.mc.renderEngine.bindTexture(new ResourceLocation("weaponsplus:textures/gui/guiLaserDesg.png")); drawTexturedModalRect(posX, posY, 0, 0, xSizeOfTexture, ySizeOfTexture); drawString(fontRendererObj, "Type: " + type, posX + 15, posY + 30, 0xFF0000); this.initGui(); super.drawScreen(x, y, f); } public void initGui() { int posX = (this.width - xSizeOfTexture) / 2; int posY = (this.height - ySizeOfTexture) / 2; this.buttonList.add(new GuiButton(0, posX + 15, posY + 60, 150, 20, "Send Conventional Missile")); this.buttonList.add(new GuiButton(1, posX + 15, posY + 100, 150, 20, "Send Incindeary Missile")); this.buttonList.add(new GuiButton(2, posX + 15, posY + 140, 150, 20, "Send Nuclear Missile")); } public void actionPerformed(GuiButton button) { switch(button.id) { case 0: this.type = 0; this.mc.theWorld.spawnEntityInWorld(new EntityLaserDesignation(this.mc.theWorld, this.mc.thePlayer.posX, this.mc.thePlayer.posY, this.mc.thePlayer.posZ)); this.mc.thePlayer.closeScreen(); break; case 1: this.type = 1; this.mc.thePlayer.closeScreen(); break; case 2: this.type = 2; this.mc.thePlayer.closeScreen(); break; } } @Override public boolean doesGuiPauseGame() { return false; } }
  20. I'm my weapons+ mod, when i use the createExplosion() method, it creates a wierd square shaped explosion if i pass 10F as the power. I would like it to be circular shaped like in voltz. If there is any way to do this please tell me. My createExplosion line: worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10F, true);
×
×
  • Create New...

Important Information

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