Advertisement
Guest User

Visual Basic Invalid castexception was unhandled.

a guest
Jul 20th, 2012
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 6.46 KB | None | 0 0
  1.        Me.Hide()
  2.             Loading.Show()
  3.         Code_Viewer.TextCodeViewer.Text = "//Generated using MAYAN.  MinecraftMayan.tk" + vbNewLine
  4.             Code_Viewer.TextCodeViewer.Text += "package net.minecraft.src;" + vbNewLine
  5.             Code_Viewer.TextCodeViewer.Text += "import java.util.Random;" + vbNewLine
  6.             Code_Viewer.TextCodeViewer.Text += "public class " + TextName.Text + " extends BaseMod" + vbNewLine
  7.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  8.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  9.             Code_Viewer.TextCodeViewer.Text += "public void load()" + vbNewLine
  10.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  11.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  12.             Code_Viewer.TextCodeViewer.Text += "//This is our to-do list." + vbNewLine
  13.             Code_Viewer.TextCodeViewer.Text += "   addNames();" + vbNewLine
  14.             Code_Viewer.TextCodeViewer.Text += "   setTextures();" + vbNewLine
  15.             Code_Viewer.TextCodeViewer.Text += "   addRecipes();" + vbNewLine
  16.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  17.             Code_Viewer.TextCodeViewer.Text += "}" + vbNewLine
  18.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  19.             Code_Viewer.TextCodeViewer.Text += "public String getVersion()" + vbNewLine
  20.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  21.             Code_Viewer.TextCodeViewer.Text += "return " + TextVersion.Text + vbNewLine
  22.             Code_Viewer.TextCodeViewer.Text += "}" + vbNewLine
  23.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  24.             Code_Viewer.TextCodeViewer.Text += "public void addNames();" + vbNewLine
  25.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  26.             Code_Viewer.TextCodeViewer.Text += "ModLoader.AddName(" + TextItemName.Text + ", " + TextAddName.Text + ");" + vbNewLine
  27.             Code_Viewer.TextCodeViewer.Text += "}" + vbNewLine
  28.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  29.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  30.             Code_Viewer.TextCodeViewer.Text += "public void setTextures()" + vbNewLine
  31.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  32.             Code_Viewer.TextCodeViewer.Text += TextItemName.Text + ".iconIndex = ModLoader.addOverride(""/gui/items.png""," + TextTexture.Text + ".png );" + vbNewLine
  33.             Code_Viewer.TextCodeViewer.Text += "}" + vbNewLine
  34.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  35.             Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  36.             Code_Viewer.TextCodeViewer.Text += "public void addRecipes()" + vbNewLine
  37.             Code_Viewer.TextCodeViewer.Text += "{" + vbNewLine
  38.             Code_Viewer.TextCodeViewer.Text += "ModLoader.addRecipe(new ItemStack(" + TextItemName.Text + ", " + NumQuant.Value + "), new Object[] {" + vbNewLine
  39.  
  40.         If s1.Visible = True Then
  41.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + vbNewLine
  42.         ElseIf s1.Visible And s2.Visible = True Then
  43.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + ", Character.valueOf('" + s2.Text + "'), Item." + Combos2.Text + vbNewLine
  44.         ElseIf s1.Visible And s2.Visible And s3.Visible = True Then
  45.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + ", Character.valueOf('" + s2.Text + "'), Item." + Combos2.Text + ", Character.valueOf('" + s3.Text + "'), Item." + Combos3.Text + vbNewLine
  46.         ElseIf s1.Visible And s2.Visible And s3.Visible And s4.Visible = True Then
  47.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + ", Character.valueOf('" + s2.Text + "'), Item." + Combos2.Text + ", Character.valueOf('" + s3.Text + "'), Item." + Combos3.Text + ", Character.valueOf('" + s4.Text + "'), Item." + Combos4.Text + vbNewLine
  48.         ElseIf s1.Visible And s2.Visible And s3.Visible And s4.Visible And s5.Visible = True Then
  49.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + ", Character.valueOf('" + s2.Text + "'), Item." + Combos2.Text + ", Character.valueOf('" + s3.Text + "'), Item." + Combos3.Text + ", Character.valueOf('" + s4.Text + "'), Item." + Combos4.Text + ", Character.valueOf('" + s5.Text + "'), Item." + Combos5.Text + vbNewLine
  50.         ElseIf s1.Visible And s2.Visible And s3.Visible And s4.Visible And s5.Visible And s6.Visible = True Then
  51.             Code_Viewer.TextCodeViewer.Text += " """ + R1.Text + R2.Text + R3.Text + """," + " """ + R4.Text + R5.Text + R6.Text + """," + " """ + R7.Text + R8.Text + R9.Text + """," + "Character.valueOf('" + s1.Text + "'), Item." + Combos1.Text + ", Character.valueOf('" + s2.Text + "'), Item." + Combos2.Text + ", Character.valueOf('" + s3.Text + "'), Item." + Combos3.Text + ", Character.valueOf('" + s4.Text + "'), Item." + Combos4.Text + ", Character.valueOf('" + s5.Text + "'), Item." + Combos5.Text + ", Character.valueOf('" + s6.Text + "'), Item." + combos6.Text + vbNewLine
  52.  
  53.         End If
  54.         Code_Viewer.TextCodeViewer.Text += "});" + vbNewLine
  55.         Code_Viewer.TextCodeViewer.Text += "//You can go to the forums and look at my tutorial and the above code will make much more sense!" + vbNewLine
  56.         Code_Viewer.TextCodeViewer.Text += "}" + vbNewLine
  57.         Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  58.         Code_Viewer.TextCodeViewer.Text += "public static final Item " + TextItemName.Text + " = new " + ComboDefIT.Text + "(" + TextID.Text + ", EnumToolMaterial." + Combostr.Text + ").setItemName('" + TextItemName.Text + "');" + vbNewLine
  59.         Code_Viewer.TextCodeViewer.Text += "" + vbNewLine
  60.         Code_Viewer.Show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement