Everything posted by GotoLink
-
Electricity Mod
Send a packet to the side where you are not running this code. As for connected texture, I am no magician. I can't debug code from thin air.
-
updating entity render
Did you register your renderer on client side ? Remove all this Minecraft.getMinecraft().renderEngine.func_110577_a(myresourcelocation); protected ResourceLocation func_110779_a(EntityDagger par1EntityDagger) { return myresourcelocation; } Change with this protected ResourceLocation func_110775_a(Entity par1Entity) { return myresourcelocation; }
-
Mods crashing game when debuggin in Eclipse
import kmccmk9.commandBlockRecipe.CommonProxy; That is what you get when you work on two mods Wrong import !
-
How to Hook Mod into Bukkit Plugin
All public methods are called the same way. Use the method name and give it the necessary arguments. By the way, this isn't Bukkit forums here.
-
Custom Slabs 1.6.2
Yes, the main issue is you can't read code. Please, learn. @Override protected ItemStack createStackedBlock(int par1) { return new ItemStack(MagicElementsMod.darkwoodslab1.blockID, 2, par1 & 7); } Look at the ItemStack you are giving here.
-
Frustrating Nullpointer-exception....
Unless you have registered a block with tallGrassID, blocksList[tallGrassID] will be null. So you should check where your block is registered, and if you called the same id when doing new WorldGenSoulGrass(id, meta)
-
Rotate the block texture the way you placed it, storing in TE?
Sadly, the only onBlockPlacedBy method is public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {} So your method doesn't exist for Minecraft. If you have been coding for years, you should be using @Override annotation.
-
Mods crashing game when debuggin in Eclipse
Use lowercase for packages and modid.
-
[Still need help] Gui with container, help!
I never said you should remove this return i == 0 ? true : Do you know how to code ? Calling your own method is one of the basics.
-
Dungeon Loot?
Why use reflection here You have public methods in ChestGenHooks class ! Look at getItems(args)...
-
[Solved]un Server problem
Attempted to load class DragonvaleMod/renderer/RenderDragons for invalid side SERVER You told the server to render something. It can't.
-
1.6.2 PlayBackGroundMusicEvent In a Custom Dimension
public void onSoundLoadEvent(SoundLoadEvent event, URL URL) ... public void onBackgroundMusic(PlayBackgroundMusicEvent event, Random rand) Do you call those methods yourself ?
-
[Still need help] Gui with container, help!
public boolean isItemValidForSlot(int i, ItemStack itemstack) { return i == 0 ? true : (itemslots[i].getItem().itemID == ItemBook.book.itemID); } Use the itemstack argument...itemstack!=null?itemstack.getItem().itemID==...
-
Error With Tools
Well...where is the wrong semicolon ?
-
Creating new XP orb
Use EntityRegistry.registerModEntity(args); and don't use findGlobalUniqueEntityId(). And do private static final ResourceLocation orbTexture = new ResourceLocation("textures/entity/experience_orb.png"); public RenderMyNewOrb() { this.shadowSize = 0.15F; this.shadowOpaque = 0.75F; } /** * Renders the Orb. */ public void renderTheOrb(EntityMyNewOrb par1EntityMyNewOrb, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); this.func_110777_b(par1EntityMyNewOrb); int i = par1EntityMyNewOrb.getTextureByValue(); float f2 = (float)(i % 4 * 16 + 0) / 64.0F; float f3 = (float)(i % 4 * 16 + 16) / 64.0F; float f4 = (float)(i / 4 * 16 + 0) / 64.0F; float f5 = (float)(i / 4 * 16 + 16) / 64.0F; float f6 = 1.0F; float f7 = 0.5F; float f8 = 0.25F; int j = par1EntityMyNewOrb.getBrightnessForRender(par9); int k = j % 65536; int l = j / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)k / 1.0F, (float)l / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); float f9 = 255.0F; int i1 = (int)f9; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); float f11 = 0.3F; GL11.glScalef(f11, f11, f11); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); int r = 188; int g = 94; int b = 94; if (par1EntityMyNewOrb.isLight) { r = 131; g = 227; b = 227; } tessellator.setColorRGBA(r,g,b, 128); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV((double)(0.0F - f7), (double)(0.0F - f8), 0.0D, (double)f2, (double)f5); tessellator.addVertexWithUV((double)(f6 - f7), (double)(0.0F - f8), 0.0D, (double)f3, (double)f5); tessellator.addVertexWithUV((double)(f6 - f7), (double)(1.0F - f8), 0.0D, (double)f3, (double)f4); tessellator.addVertexWithUV((double)(0.0F - f7), (double)(1.0F - f8), 0.0D, (double)f2, (double)f4); tessellator.draw(); GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } protected ResourceLocation func_110775_a(Entity par1Entity) { return orbTexture; } public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.renderTheOrb((EntityMyNewOrb)par1Entity, par2, par4, par6, par8, par9); } By the way, what is this ? int i = par1EntityMyNewOrb.getTextureByValue();
-
Rendering mob as different mob
if(event.entity instanceof EntityXanafiedMob) Is EntityXanafiedMob a living entity with a renderer ? if(xana.infectedMob != null) Where do you set the infectedMob field ? Render r = RenderManager.instance.getEntityClassRenderObject(xana.infectedMob.getClass()); r.doRender(xana.infectedMob, xana.posX, xana.posY, xana.posZ, xana.rotationYaw, 0.0F); You are using the infectedMob renderer to render the infectedMob field at the position of xana entity. Is that what you want ?
-
Rotate the block texture the way you placed it, storing in TE?
Your onBlockPlacedBy method is then wrong. It should get called. Show some programming spirit and try to find your mistake.
-
[Still need help] Gui with container, help!
Remove that, it is useless.
-
Open Vanilla GUI w/ item right click?
Use a GuiHandler, player.openGui(...), then open the container and gui on corresponding side. Of course, you'll need to override the container since you may be far from any workbench.
-
Mods crashing game when debuggin in Eclipse
Attempted to load a proxy type kmccmk9.witchCraft.client.ClientProxy into kmccmk9.witchCraft.WitchCraft.proxy, but the types don't match An error occured trying to load a proxy into {clientSide=kmccmk9.witchCraft.client.ClientProxy, serverSide=kmccmk9.witchCraft.CommonProxy}.kmccmk9.witchCraft.WitchCraft Does your ClientProxy extends CommonProxy ? Are they located where there are supposed to be ?
-
How to create an API for my mod?
Give interfaces and register methods, just like Forge
-
NBT Tag setting for all players that join the world, not just one
The errors I can see: -checking twice if string is in the array of aliases -sending chat messages instead of using the WrongUsageException tool -making arrays and converting them to lists instead of using lists directly -not making Element as an object, thus resulting in use of static methods and multiple side checks As for your issue, it can in if (BendingMethods.hasElement(player)) but can't be sure without the code.
-
Texture for portal?
Give a texture to your BlockPortal or whatever. Look for texture tutorial if needed.
-
My crafting manager "addRecipe" returns a Null Pointer Exception
Nice In your CraftingManager constructor maybe ? public class CraftingManager { public static IBrewingManager brewery; public CraftingManager(IBrewingManager brewingMnger) { this.brewery = brewingMnger; } }
-
Saving data w/ items [Solved]
You are not using the code i gave you :'( You can add println for sure, but at least try it... Anyway, hydroflame suggestion to rework a bit the readFromNBT/ writeToNBT part, I guess is a valid point.
IPS spam blocked by CleanTalk.