
Vtec234
Members-
Posts
31 -
Joined
-
Last visited
Everything posted by Vtec234
-
[1.7.10][SOLVED]Client crash on connecting to server
Vtec234 replied to Vtec234's topic in Support & Bug Reports
I have bought the game, it's just theoretical. And yes, you CAN run the game as ForgeDevName, but as I said before, you can't connect to the server (I get the same crash as when using only --username). -
[1.7.10][SOLVED]Client crash on connecting to server
Vtec234 replied to Vtec234's topic in Support & Bug Reports
Thanks, I was actually wondering why I still had the default skin. It works with --username and --password. However, when I don't provide anything and use the default ForgeDevName I get the same crash. Does that mean you have to have bought Minecraft in order to test server-client? -
[1.7.10][SOLVED]Client crash on connecting to server
Vtec234 replied to Vtec234's topic in Support & Bug Reports
Default ForgeGradle ones, except I changed the username in client to my own. CLIENT Main class: GradleStart JVM: -Xincgc -Xmx1024M -Xms1024M -Djava.library.path="D:/Programowanie/Java/MinecraftForgeDev\build\natives" -Dfml.ignoreInvalidMinecraftCertificates=true Program arguments: --username=Vtec234 SERVER Main class: GradleStartServer JVM: -Xincgc -Dfml.ignoreInvalidMinecraftCertificates=true Program arguments: none -
[1.7.10][SOLVED]Client crash on connecting to server
Vtec234 posted a topic in Support & Bug Reports
Hello, I'm using the latest Forge (10.13.0.1187) and Minecraft 1.7.10. This error happened in a dev enviroment, but the stack trace doesn't say anything about my mod, so I'm posting this issue here. Basically, the server runs fine, but when I try to connect to it with client, the client crashes. Here are the Forge logs: server > https://gist.github.com/anonymous/37914c517774ff094c35 Note: The error at line 183 is something else, it happens while closing the server manually. Client crash is at line 91. client > https://gist.github.com/anonymous/577de12346e8fb31718a From line 156. -
[1.7.10][SOLVED]Server crashing without a client-only call
Vtec234 replied to Vtec234's topic in Modder Support
I already rerouted this through a proxy because spawnParticle() requires the particle to be registered with a String name, but thanks for the info about when to use Minecraft.xxxxx -
Excuse me for starting so many threads here, but one's gotta learn somehow. One of my items crashes the server when I try to run it. It renders particles on use, but the particle rendering is never called on server side, and it crashes anyway, so I have to ask. Here's the error log: https://gist.github.com/anonymous/12336aa0745323f1d4cc from line 87. This is where it crashes: dustRainbow = new ItemRainbowDust(); And here's the ItemRainbowDust class: public class ItemRainbowDust extends Item { private Vector3d target = new Vector3d(0.0d, 0.0d, 0.0d); protected ItemRainbowDust() { super(); setUnlocalizedName("dustRainbow"); setTextureName(Reference.MODID + ":" + getUnlocalizedName().substring(5)); setCreativeTab(CreativeTabsAwesom.tabAwesom); } @Override public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float offsetX, float offsetY, float offsetZ){ if (world.isRemote) { if (player.isSneaking()) { this.target = new Vector3d(x+0.5d, y+1.5d, z+0.5d); player.addChatMessage(new ChatComponentTranslation("Target set to X: " + target.x + " Y: " + target.y + " Z: "+target.z)); } else { double x1 = (double) (x + offsetX); double y1 = (double) (y + offsetY); double z1 = (double) (z + offsetZ); Minecraft.getMinecraft().effectRenderer.addEffect(new EntityRainbowFX(world, x1, y1, z1)); //Minecraft.getMinecraft().effectRenderer.addEffect(new EntityFXTargettingParticle(world, x1, y1, z1, target.x, target.y, target.z, 1F)); } } return false; } } As you can see, in onItemUse, everything is only called on isRemote worlds, meaning the client. And the stack trace tells me it crashed at ItemRainbowDust constructor. Thanks in advance When I comment out these lines: Minecraft.getMinecraft().effectRenderer.addEffect(new EntityRainbowFX(world, x1, y1, z1)); Minecraft.getMinecraft().effectRenderer.addEffect(new EntityFXTargettingParticle(world, x1, y1, z1, target.x, target.y, target.z, 1F)); it works.
-
First Mod, trying to add a texture to a biped entity model
Vtec234 replied to Milkshakes00's topic in Modder Support
Try this: private static final ResourceLocation textureLocation = new ResourceLocation(TutorialMod.modid, "textures/models/Wandering_Entity.png"); -
First Mod, trying to add a texture to a biped entity model
Vtec234 replied to Milkshakes00's topic in Modder Support
What does the error in the Forge log say? -
[1.7.10][SOLVED]For and for each in model initialization
Vtec234 replied to Vtec234's topic in Modder Support
Ok, so when I use a for each loop, is the screen variable in it not a reference to an object in the screens array? EDIT: Nevermind, I finally got this. It would work if I used an array of Objects from start, and not an array of null pointers. -
Hello. I already posted this issue in a previous thread, but nobody answered, and then I switched to 1.7.10 to see if it changes anything - it didn't. I can't find any difference in how those two loops work, so potentially both should run fine, but it appears like for each doesn't. Here's what I'm doing (this is in a ModelBase extending class): -First I create a ModelRenderer array: ModelRenderer[] screens = {null, null, null, null, null, null, null}; -Then, in the constructor, I fill the array with models. There are two, theoretically identical ways to do this. First one is a for loop: int textOffsetY = 66; for (int i = 0; i < 7; i++) { screens[i] = new ModelRenderer(this, 0, textOffsetY); screens[i].addBox(0F, 0F, 0F, 28, 20, 0); screens[i].setRotationPoint(-14F, 20F, -4F); screens[i].setTextureSize(64, 256); screens[i].mirror = true; setRotation(screens[i], 0F, 0F, 0F); textOffsetY += 21; System.out.println(i); } -The second way is a for each loop: int textOffsetY = 66; int i = 0; for (ModelRenderer screen : screens) { screen = new ModelRenderer(this, 0, textOffsetY); screen.addBox(0F, 0F, 0F, 28, 20, 0); screen.setRotationPoint(-14F, 20F, -4F); screen.setTextureSize(64, 256); screen.mirror = true; setRotation(screen, 0F, 0F, 0F); textOffsetY += 21; System.out.println(i); i++; } They both work, because I've checked the console and both output the i variable, from 0 to 6. -After this I try to render one of the array elements in a TileEntitySpecialRenderer: modelArcadeGameTop.screens[0].render(0.0625F); Here's when it gets really wierd. If I've intialized the models with a for loop, everything works fine. However, if I've used the for each loop, I get this: https://gist.github.com/anonymous/4f85c79b11749d821e72 I am either having a complete brainfart here and don't know how Java works, or there's something seriously wrong with Forge/FML/Minecraft/OpenGL. Any help would be appreciated
-
Anybody?
-
Blocks in the inventory also are items, they use the ItemBlock class.
-
[1.7.2] How to export 3D Models from Blender to Minecraft!
Vtec234 replied to peti446's topic in Modder Support
.obj files can be exported easily from Blender. As to loading them into Minecraft, it's a little harder. You need to write your own, custom .obj loader and TileEntitySpecialRenderer that is going to render the model. Or, you can try to find one somewhere in the internet. -
@Override only checks if you've overriden a supertype method, so you get an error when you didn't, and because of that you know where you've made a mistake. This annotation, however, doesn't actually make the method override anything. For it to override a supertype method, it has to have the same signature and the modifiers as the one in the superclass. A signature of a method is what follows: its name: onBlockPlaced its parameter types: World, int, int, int, int, float, float, float, int While the method name is important, the parameter names are only for your convenience. Now look at the error you got. It says that the method onBlockPlaced(World, int, int, int) must override or implement a supertype method. The supertype method signature for onBlockPlaced is: onBlockPlaced(World, int, int, int, int, float, float, float, int) And the modifiers are: public int As you can see, it is not the same as your method. You have to change the parameters of your method to be the same as in the supertype, and then it is going to override it.
-
Your onBlockPlaced doesn't work, because you're not overriding it, you created your own function. The signature for it is not the same as in the Block class. Always use @Override annotations to check if you overrode it correctly. Here are the signatures for these methods in Block.java: public void onBlockAdded(World, int, int, int) public int onBlockPlaced(World, int, int, int, int, float, float, float, int) public void onBlockPlacedBy(World, int, int, int, EntityLivingBase, ItemStack)
-
And now it refuses to work. I have to use 7 different screen versions, so I decided I'll use an array instead of 7 variables, because they are the same. For some reason, Minecraft/GL hates arrays and crashes. Here's how the code looks. Model: ModelRenderer base; ModelRenderer controls; ModelRenderer body; ModelRenderer top; ModelRenderer[] screens = new ModelRenderer[7]; ModelRenderer fff; ModelRenderer fff2; public ModelArcadeGameTop() { textureWidth = 64; textureHeight = 256; base = new ModelRenderer(this, 0, 0); base.addBox(0F, 0F, 0F, 16, 2, 16); base.setRotationPoint(-8F, 22F, -8F); base.setTextureSize(64, 256); base.mirror = true; setRotation(base, 0F, 0F, 0F); controls = new ModelRenderer(this, 0, 41); controls.addBox(-8F, 0F, 0F, 16, 2, 7); controls.setRotationPoint(0F, 22F, -8F); controls.setTextureSize(64, 256); controls.mirror = true; setRotation(controls, 0.2792527F, 0F, 0F); body = new ModelRenderer(this, 0, 18); body.addBox(0F, 0F, 0F, 16, 13, 10); body.setRotationPoint(-8F, 9F, -2F); body.setTextureSize(64, 256); body.mirror = true; setRotation(body, 0F, 0F, 0F); top = new ModelRenderer(this, 0, 50); top.addBox(0F, 0F, 0F, 16, 1, 11); top.setRotationPoint(-8F, 8F, -3F); top.setTextureSize(64, 256); top.mirror = true; setRotation(top, 0F, 0F, 0F); int textOffsetY = 66; for (ModelRenderer screen : screens) { screen = new ModelRenderer(this, 0, textOffsetY); screen.addBox(0F, 0F, 0F, 28, 20, 0); screen.setRotationPoint(-14F, 20F, -4F); screen.setTextureSize(64, 256); screen.mirror = true; setRotation(screen, 0F, 0F, 0F); textOffsetY += 21; System.out.println(screens.length); } fff = new ModelRenderer(this, 0, 66); fff.addBox(0F, 0F, 0F, 28, 20, 0); fff.setRotationPoint(-14F, 20F, -4F); fff.setTextureSize(64, 256); fff.mirror = true; setRotation(fff, 0F, 0F, 0F); fff2 = new ModelRenderer(this, 0, 87); fff2.addBox(0F, 0F, 0F, 28, 20, 0); fff2.setRotationPoint(-14F, 20F, -4F); fff2.setTextureSize(64, 256); fff2.mirror = true; setRotation(fff2, 0F, 0F, 0F); } Renderer: @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f1) { int dir = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(dir * 90.0F, 0.0F, 1.0F, 0.0F); bindTexture(fileTexture); modelArcadeGameTop.renderModel(0.0625F); GL11.glScalef(0.5F, 0.5F, 0.5F); //modelArcadeGameTop.screens[2].render(0.0625F); modelArcadeGameTop.fff.render(0.0625F); modelArcadeGameTop.fff2.render(0.0625F); GL11.glPopMatrix(); } fff and fff2 are just for testing. When I comment out the rendering call for the screens, everything works fine. However, when I try to access any of the 7 screens in the screens array and render it, the game crashes. Here's the log: https://gist.github.com/anonymous/53c149bc11bebe6f11dd, from line 183.What is up with this, and why won't it work?
-
[1.7.10] Mod won't startup due to IntelliJ error?
Vtec234 replied to kurisubrooks's topic in Modder Support
I had the same issue, just use JDK7 and all will be fine. -
Method 1 works, because I've already tested it, but I think I'll follow your advice and create a few Screens, each one pointing to a different place in the same texture file. As to moving the texture binding methods into the model, look at my Renderer code. Shouldn't all this GL11 stuff stay in the Renderer? @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f1) { int dir = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(dir * 90.0F, 0.0F, 1.0F, 0.0F); bindTexture(fileTexture); modelArcadeGameTop.renderModel(0.0625F); bindTexture(fileScreenTexture); modelArcadeGameTop.Screen.render(0.0625F); GL11.glPopMatrix(); }
-
[1.7.2] How to export 3D Models from Blender to Minecraft!
Vtec234 replied to peti446's topic in Modder Support
I haven't done anything like this myself, but this video will definitely help you, because from what I understood, this guy has basically accomplished what you are trying to do. -
Hello, here's the deal: I am making a custom rendered model for a tile entity. Most parts of it are static and do not need changing, so that's simple. But one part has to change its texture depending on the state of the tile entity. Now, I want to make this as clean and efficient as possible, so I'm asking you, the people of Forge. The model class extends ModelBase and contains a few ModelRenderers. Four of them are static, and one has to have variable textures. Specifically, the Screen. Here is the code: ModelRenderer Base; ModelRenderer Controls; ModelRenderer Body; ModelRenderer Top; ModelRenderer Screen; public ModelArcadeGameTop() { textureWidth = 64; textureHeight = 64; Base = new ModelRenderer(this, 0, 0); Base.addBox(0F, 0F, 0F, 16, 2, 16); Base.setRotationPoint(-8F, 22F, -8F); Base.setTextureSize(64, 64); Base.mirror = true; setRotation(Base, 0F, 0F, 0F); Controls = new ModelRenderer(this, 0, 41); Controls.addBox(-8F, 0F, 0F, 16, 2, 7); Controls.setRotationPoint(0F, 22F, -8F); Controls.setTextureSize(64, 64); Controls.mirror = true; setRotation(Controls, 0.2792527F, 0F, 0F); Body = new ModelRenderer(this, 0, 18); Body.addBox(0F, 0F, 0F, 16, 13, 10); Body.setRotationPoint(-8F, 9F, -2F); Body.setTextureSize(64, 64); Body.mirror = true; setRotation(Body, 0F, 0F, 0F); Top = new ModelRenderer(this, 0, 50); Top.addBox(0F, 0F, 0F, 16, 1, 11); Top.setRotationPoint(-8F, 8F, -3F); Top.setTextureSize(64, 64); Top.mirror = true; setRotation(Top, 0F, 0F, 0F); textureWidth = 32; textureHeight = 32; Screen = new ModelRenderer(this, 0, 0); Screen.addBox(0F, 0F, 0F, 14, 10, 0); Screen.setRotationPoint(-7F, 10F, -2F); Screen.setTextureSize(32, 32); Screen.mirror = true; setRotation(Screen, 0F, 0F, 0F); } As you can see, I've initialized the texture offset for the Screen in the constructor of this ModelBase. It also has different texture size, because it uses a separate texture file to all the other parts. I've come up with two options for changing the texture. The one above only intializes the Screen variable once, but requires more than one texture file for it, since the offset is already set here and I think it can't be changed (correct me if I'm wrong). So, I'd have to make a few ResourceLocations and then swap them in the renderer. The second option would be to create a separate function for the rendering of this one part, like so: public void renderScreen(int textXOffset, int textYOffset, int sizeX, int sizeY, int sizeZ, float offX, float offY, float offZ, float moveX, float moveY, float moveZ, float rotX, float rotY, float rotZ, int textWidth, int textHeight, float f) { textureWidth = textWidth; textureHeight = textHeight; Screen = new ModelRenderer(this, textXOffset, textYOffset); Screen.addBox(offX, offY, offZ, sizeX, sizeY, sizeZ); Screen.setRotationPoint(moveX, moveY, moveZ); Screen.setTextureSize(textWidth, textHeight); Screen.mirror = true; setRotation(Screen, rotX, rotY, rotZ); Screen.render(f); } However, this option creates a new ModelRenderer every time the model is rendered, so very, very often. On the other hand, it can be set so that there is one texture file, and a few options in it, and I can just change the offset of the Screen. Besides, both options seem kinda dirty, so maybe there is some kinda method for changing the texture offset in the file? So, I'm asking which option is better, and if there are any other ones. Thanks in advance.
-
[SOLVED][1.7.2]Eclipse wants me to cast my class to itself?
Vtec234 replied to jabelar's topic in Modder Support
And the declaration for the instance itemGoldenEgg is in my main class and is: Hello Jabelar! Java does not want you to cast your ItemGoldenEgg to itself, it wants you to cast an Item to ItemGoldenEgg. What you are assigning to MagicBeans.itemGoldenEgg is not the object returned by your constructor, but rather the object returned by setTextureName(), which is the last method in that line, therefore what is returned by it is assigned to your variable. If you look at the definition for setTextureName(String par1Str), you can see that it returns an Item object. Java automatically casts object to their superclasses, like so: Item randomItem = new ItemGoldenEgg(); but you need to manually cast it from a superclass to one of the inheriting classes, like so: ItemGoldenEgg randomItem = (ItemGoldenEgg)new ItemGoldenEgg().setTextureName("TEXTURE"); Also, on a side note, you should probably just make the variable an Item, not an ItemGoldenEgg, and then cast it to your own class when you need to call your own methods. Item itemGoldenEgg = new ItemGoldenEgg().setUnlocalizedName("golden_egg").setTextureName("magicbeans:golden_egg"); (ItemGoldenEgg)itemGoldenEgg.hatchEgg(); -
[FORGE][1.7.2][IntellJ] First Mod Not Showing up in Minecraft
Vtec234 replied to Zorgatone's topic in Modder Support
Hey Zorgatone, Check out this thread I made, regarding the same issue: http://www.minecraftforge.net/forum/index.php/topic,19782 -
Thanks, this seems to actually have fixed it.
-
Hello! I already made a thread about this issue, but then I thought that I managed to fix the issue, so I posted about that in forementioned thread. Sadly, it still errors, and now I have no clue why that happens, so I have to make another thread. The issue I have is that I created a custom EntityFX, and it crashes randomly when it's rendering. Here's the code for the entity: public class EntityRainbowFX extends EntityFX { private static final ResourceLocation textureFile = new ResourceLocation(Reference.MODID, "textures/particle/rainbow.png"); public EntityRainbowFX(World world, double x, double y, double z) { super(world, x, y, z); this.particleMaxAge = 50; this.particleScale = 1.5F; Random rand = new Random(); this.motionX = rand.nextDouble() * 0.1D - 0.05D; this.motionY = rand.nextDouble() * 0.1D; this.motionZ = rand.nextDouble() * 0.1D - 0.05D; } @Override public void renderParticle(Tessellator tess, float tick, float par3, float par4, float par5, float par6, float par7) { Minecraft.getMinecraft().renderEngine.bindTexture(textureFile); glDepthMask(false); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glAlphaFunc(GL_GREATER, 0.003921569F); tess.startDrawingQuads(); tess.setBrightness(getBrightnessForRender(tick)); float scale = 0.1F * particleScale; float x = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)tick - interpPosX); float y = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)tick - interpPosY); float z = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)tick - interpPosZ); tess.addVertexWithUV((double)(x - par3 * scale - par6 * scale), (double)(y - par4 * scale), (double)(z - par5 * scale - par7 * scale), 1, 1); tess.addVertexWithUV((double)(x - par3 * scale + par6 * scale), (double)(y + par4 * scale), (double)(z - par5 * scale + par7 * scale), 1, 0); tess.addVertexWithUV((double)(x + par3 * scale + par6 * scale), (double)(y + par4 * scale), (double)(z + par5 * scale + par7 * scale), 0, 0); tess.addVertexWithUV((double)(x + par3 * scale - par6 * scale), (double)(y - par4 * scale), (double)(z + par5 * scale - par7 * scale), 0, 1); tess.draw(); glDisable(GL_BLEND); glDepthMask(true); glAlphaFunc(GL_GREATER, 0.1F); } @Override public int getFXLayer() { return 3; } @Override public void onUpdate() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if (this.particleAge++ >= this.particleMaxAge) this.setDead(); this.moveEntity(this.motionX, this.motionY, this.motionZ); System.out.println(this.motionX + " " + this.motionY + " " + this.motionZ); } } I spawn it when an item is used, like this: public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float offsetX, float offsetY, float offsetZ){ Minecraft.getMinecraft().effectRenderer.addEffect(new EntityRainbowFX(world, (double)(x + offsetX), (double)(y + offsetY), (double)(z + offsetZ))); return false; } Now what happens, is that I hold RMB with this item on the ground for some time, and the particles keep spawning and flying away. But, sometimes if I hold it for about 3 to 7 seconds, it errors and Minecraft exits. I have no idea what is causing this, I tried moving the random number generation (motionX, motionY, motionZ) to different methods, and then to the constructor (like it is in the posted code), but it still doesn't work. Here's the Forge log: https://gist.github.com/anonymous/bdcb82c8f9692556ccdc The crash happens at line 1682, all those digits before it are caused by me calling println on the motion variables.
-
[NVM][SOLVED IT][1.7.2]Custom EntityFX crash on item use
Vtec234 replied to Vtec234's topic in Modder Support
Alright, I fixed it. Leaving this thread here, so that anybody with a similar issue can refer to it. I reread the error log again, carefully, and found out that what was causing the issue was this code: this.motionX = rand.nextFloat() * 0.1F; this.motionY = rand.nextFloat() * 0.1F; this.motionZ = rand.nextFloat() * 0.1F; this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if (this.particleAge++ >= this.particleMaxAge) this.setDead(); this.moveEntity(this.motionX, this.motionY, this.motionZ); Particularly, the moveEntity method. You can see it on lines 134 and 135 in the error log: java.lang.NullPointerException: Ticking entity at net.minecraft.entity.Entity.moveEntity(Entity.java:735) Apparently, this method has some issues when it receives random doubles as arguments, and it sometimes crashes. Fixed it even more, by doing this: this.motionX = rand.nextDouble() * 0.1D; this.motionY = rand.nextDouble() * 0.1D; this.motionZ = rand.nextDouble() * 0.1D; Looks like Java really does not like float to double conversion, and when I stopped using floats, it all stopped crashing. Never mix up your primitive types!