
Kwasti
Members-
Posts
32 -
Joined
-
Last visited
Everything posted by Kwasti
-
Yes, most likely I will be doing 3 packages.
-
Server mod will make a change in the generation of the world, add properties to world and Chunk, change parameters of mobs, add some functions to vanilla blocks. For show properties of the world and chunk, as I understand it, i need to add a GUI for client part, such as is shown in DamageIndicators the status mobs may be i mistake. and i don't want create universal *.jar
-
of corse. this mod only for dedicated server
-
mod for Server, but the client side must handle additional parameters of World and Chunk. and have something to add to the GUI. and I do not want to reveal the secrets of players the server side I want the client and server are in the same project, but when compiling create two * .jar
-
Whant create different *.jar for client and server how create this project in eclipse? and who is Lex? can't search ((
-
tileEntity does not save data and not Refresh render..
Kwasti replied to Kwasti's topic in Modder Support
I'm add: worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); in method: MarkDirty() and onDataPacket() -
tileEntity does not save data and not Refresh render..
Kwasti replied to Kwasti's topic in Modder Support
Thanks, working! -
tileEntity does not save data and not Refresh render..
Kwasti replied to Kwasti's topic in Modder Support
can't understend. constructor TileEntity call two time and created two with different id public class BlockAdvertising extends Block implements ITileEntityProvider { ... @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { // TODO Auto-generated method stub TileEntityAdvertising tileentity = new TileEntityAdvertising(); return tileentity; } when call method: tileentity return with first id public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { if (p_149727_1_.isRemote) { return true; } else { TileEntityAdvertising tileentity = (TileEntityAdvertising)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_); when call render method, return tileentity with second id public class AdvertisingRenderer implements ISimpleBlockRenderingHandler { .... @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { // TODO Auto-generated method stub TileEntityAdvertising ent = (TileEntityAdvertising)world.getTileEntity(x, y, z); -
tileEntity does not save data and not Refresh render..
Kwasti replied to Kwasti's topic in Modder Support
Of course! I forgot to register! -
i rendering my block but can't to find how add 3d icon second item/block on the side my block found this: I want so: (only need to show one item/block)
-
TileEntity: my Block: when player right-click ob this block. tileEntity save one Item from HeldItem and block must refresh render for show getting item. but redraw not working and when disconnect from world item not saved.(if break block then item dropped correctly) what i need to do for save data and refresh render block?
-
I created new block with renderer. This block will get another block or an item, eq the item frame. (click right button of mouse) How i can to draw icon block/item on the sides my block ? public class TestBlockRenderer implements ISimpleBlockRenderingHandler { .... @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { // TODO Auto-generated method stub if(ClientProxy.renderPass == 0) { drawMytestBlock(world, Blocks.diamond_block,x,y,z); } return false; } public void drawMytestBlock(IBlockAccess world, Block par1Block,int x,int y, int z) { Tessellator tessellator = Tessellator.instance; IIcon iicon = Blocks.diamond_block.getBlockTextureFromSide(0); tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F); double d0 = (double)iicon.getMinU(); double d1 = (double)iicon.getMinV(); double d2 = (double)iicon.getMaxU(); double d3 = (double)iicon.getMaxV(); double d4 = 0.0D; double d5 = 0.05000000074505806D; double offs=0.5-d5/2; double dt=0.2D; l= world.getBlockMetadata(x, y, z); if (l == 5) { tessellator.addVertexWithUV((double)x + offs + d5, (double)(y + 1) + d4, (double)(z + 1) + d4, d0, d1); tessellator.addVertexWithUV((double)x + offs+ d5, (double)(y + 0) - d4, (double)(z + 1) + d4, d0, d3); tessellator.addVertexWithUV((double)x + offs + d5, (double)(y + 0) - d4, (double)(z + 0) - d4, d2, d3); tessellator.addVertexWithUV((double)x + offs + d5, (double)(y + 1) + d4, (double)(z + 0) - d4, d2, d1); ... } .... } what i need add in my code? read tutorial from this
-
done.
-
help the same problem. did that here suggested - did not help. at first I tried to take the update from 1.7.2 to 1.7.10. error as the author of a topic. then decided to do it all over again. 0. delete all workspace folders 1 downloaded forge-1.7.10-10.13.0.1180-src.zip 2 unpacked in new folder 3 gradle setupDevVorkspake 4. gradlew setupDecompWorkspace 5. gradlew Eclipse 6 launched Eclipse 7 imported project 8 Run created the configuration with the necessary parameters (net.minecraft.launchwrapper.Launch etc.) 9 launched - the error persists. then do this: 10. gradlew --refresh-dependencies setupDecompWorkspace 11. gradlew Eclipse launched - the error again remained.
-
not working I'm add next: @Override public boolean hasCustomNameTag() { return false; //this.dataWatcher.getWatchableObjectString(10).length() > 0; } protected void entityInit() { super.entityInit(); //this.getDataWatcher().addObject(21, Byte.valueOf((byte)0)); // -this copy from vanilla mobs. (mobs have different first parameter, what that?) this.setAlwaysRenderNameTag(false); setCustomNameTag(""); } @Override public boolean getAlwaysRenderNameTag() { return false; //this.dataWatcher.getWatchableObjectByte(11) == 1; } @Override public String getCustomNameTag() { return "";//this.dataWatcher.getWatchableObjectString(10); } bat I see tag..
-
I do not understand, I never pointed out to show the name of the mob .. pieces of code: Entity: public class EntityBustHellDog extends EntityMob { public EntityBustHellDog(World par1World) { super(par1World); // TODO Auto-generated constructor stub this.isImmuneToFire = true; } Model: public class ModelHellDog extends ModelBase { //fields ModelRenderer WolfHead; ModelRenderer Body; ModelRenderer Mane; ModelRenderer Leg1; ModelRenderer Leg2; ModelRenderer Leg3; ModelRenderer Leg4; ModelRenderer Tail; ModelRenderer Ear1; ModelRenderer Ear2; ModelRenderer Nose; public ModelHellDog() { // TODO Auto-generated constructor stub textureWidth = 64; textureHeight = 32; WolfHead = new ModelRenderer(this, 24, 17); WolfHead.addBox(-3F, -3F, -3F, 6, 6, 5); WolfHead.setRotationPoint(-1F, 13.5F, -7F); WolfHead.setTextureSize(64, 32); WolfHead.mirror = true; setRotation(WolfHead, 0F, 0F, 0F); Body = new ModelRenderer(this, 0, 17); Body.addBox(-4F, -2F, -3F, 6, 9, 6); Body.setRotationPoint(0F, 14F, 2F); Body.setTextureSize(64, 32); Body.mirror = true; setRotation(Body, 1.570796F, 0F, 0F); Mane = new ModelRenderer(this, 0, 0); Mane.addBox(-4F, -3F, -5F, 8, 7, 10); Mane.setRotationPoint(-1F, 14F, -3F); Mane.setTextureSize(64, 32); Mane.mirror = true; setRotation(Mane, 1.570796F, 0F, 0F); Leg1 = new ModelRenderer(this, 44, 0); Leg1.addBox(-1F, 0F, -1F, 2, 8, 2); Leg1.setRotationPoint(-2.5F, 16F, 7F); Leg1.setTextureSize(64, 32); Leg1.mirror = true; setRotation(Leg1, 0F, 0F, 0F); Leg2 = new ModelRenderer(this, 44, 0); Leg2.addBox(-1F, 0F, -1F, 2, 8, 2); Leg2.setRotationPoint(0.5F, 16F, 7F); Leg2.setTextureSize(64, 32); Leg2.mirror = true; setRotation(Leg2, 0F, 0F, 0F); Leg3 = new ModelRenderer(this, 44, 0); Leg3.addBox(-1F, 0F, -1F, 2, 8, 2); Leg3.setRotationPoint(-2.5F, 16F, -4F); Leg3.setTextureSize(64, 32); Leg3.mirror = true; setRotation(Leg3, 0F, 0F, 0F); Leg4 = new ModelRenderer(this, 44, 0); Leg4.addBox(-1F, 0F, -1F, 2, 8, 2); Leg4.setRotationPoint(0.5F, 16F, -4F); Leg4.setTextureSize(64, 32); Leg4.mirror = true; setRotation(Leg4, 0F, 0F, 0F); Tail = new ModelRenderer(this, 36, 0); Tail.addBox(-1F, 0F, -1F, 2, 8, 2); Tail.setRotationPoint(-1F, 12F, 8F); Tail.setTextureSize(64, 32); Tail.mirror = true; setRotation(Tail, 1.130069F, 0F, 0F); Ear1 = new ModelRenderer(this, 36, 10); Ear1.addBox(-3F, -6F, 0F, 2, 3, 1); Ear1.setRotationPoint(-1F, 13.5F, -7F); Ear1.setTextureSize(64, 32); Ear1.mirror = true; setRotation(Ear1, 0F, 0F, 0F); Ear2 = new ModelRenderer(this, 36, 10); Ear2.addBox(1F, -6F, 0F, 2, 3, 1); Ear2.setRotationPoint(-1F, 13.5F, -7F); Ear2.setTextureSize(64, 32); Ear2.mirror = true; setRotation(Ear2, 0F, 0F, 0F); Nose = new ModelRenderer(this, 46, 11); Nose.addBox(-2F, 0F, -7F, 3, 3, 6); Nose.setRotationPoint(-0.5F, 13.5F, -7F); Nose.setTextureSize(64, 32); Nose.mirror = true; setRotation(Nose, 0.1745329F, 0F, 0F); } public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { super.render(par1Entity, par2, par3, par4, par5, par6, par7); this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7); this.WolfHead.renderWithRotation(par7); this.Nose.renderWithRotation(par7); this.Ear1.renderWithRotation(par7); this.Ear2.renderWithRotation(par7); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); this.Body.render(par7); this.Leg1.render(par7); this.Leg2.render(par7); this.Leg3.render(par7); this.Leg4.render(par7); this.Tail.renderWithRotation(par7); this.Mane.render(par7); GL11.glPopMatrix(); } else { this.WolfHead.renderWithRotation(par7); this.Nose.renderWithRotation(par7); this.Ear1.renderWithRotation(par7); this.Ear2.renderWithRotation(par7); this.Body.render(par7); this.Leg1.render(par7); this.Leg2.render(par7); this.Leg3.render(par7); this.Leg4.render(par7); this.Tail.renderWithRotation(par7); this.Mane.render(par7); } } public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4) { this.Body.setRotationPoint(0.0F, 14.0F, 2.0F); this.Body.rotateAngleX = ((float)Math.PI / 2F); this.Mane.setRotationPoint(-1.0F, 14.0F, -3.0F); this.Mane.rotateAngleX = this.Body.rotateAngleX; this.Tail.setRotationPoint(-1.0F, 12.0F, 8.0F); this.Leg1.setRotationPoint(-2.5F, 16.0F, 7.0F); this.Leg2.setRotationPoint(0.5F, 16.0F, 7.0F); this.Leg3.setRotationPoint(-2.5F, 16.0F, -4.0F); this.Leg4.setRotationPoint(0.5F, 16.0F, -4.0F); this.Leg1.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3; this.Leg2.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; this.Leg3.rotateAngleX = MathHelper.cos(par2 * 0.6662F + (float)Math.PI) * 1.4F * par3; this.Leg4.rotateAngleX = MathHelper.cos(par2 * 0.6662F) * 1.4F * par3; } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } /** * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how * "far" arms and legs can swing at most. */ public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) { super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity); this.WolfHead.rotateAngleX = par5 / (180F / (float)Math.PI); this.WolfHead.rotateAngleY = par4 / (180F / (float)Math.PI); this.Nose.rotateAngleX = par5 / (180F / (float)Math.PI); this.Nose.rotateAngleY = par4 / (180F / (float)Math.PI); this.Ear1.rotateAngleX = par5 / (180F / (float)Math.PI); this.Ear1.rotateAngleY = par4 / (180F / (float)Math.PI); this.Ear2.rotateAngleX = par5 / (180F / (float)Math.PI); this.Ear2.rotateAngleY = par4 / (180F / (float)Math.PI); //this.Tail.rotateAngleX = par3; } } Render public class RenderBustHellDog extends RendererLivingEntity { private static final ResourceLocation helldogTextures = new ResourceLocation("KwastiBustMonsters:textures/entity/helldog.png"); public RenderBustHellDog() { super(new ModelHellDog(), 0.5F); // TODO Auto-generated constructor stub } protected ResourceLocation getHellDogTextures(EntityBustHellDog par1EntityBlaze) { return helldogTextures; } protected void scaleBustHellDog(EntityBustHellDog par1EntityCaveSpider, float par2) { GL11.glScalef(1.0F, 1.0F, 1.5F); } protected void preRenderCallback(EntityLivingBase par1EntityLivingBase, float par2) { this.scaleBustHellDog((EntityBustHellDog)par1EntityLivingBase, par2); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ @Override protected ResourceLocation getEntityTexture(Entity entity) { // TODO Auto-generated method stub return this.getHellDogTextures((EntityBustHellDog)entity); } }
-
how to increase the radius to find the player? I Add: protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40D); but the mob continues to look only at the approach of the player into 16 blocks.
-
Can't understand.. I create model with techne. add to my project java code.. add texture.. run for test.. and over mob see his name. Why? how to remove?
-
How drop items another mod(my mods, buildcraft, ic2 and other) ?
Kwasti replied to Kwasti's topic in Modder Support
Big thanks! -
I have my mod named "mod1", which adds things. I have my other mod named "mod2", which adds mobs how to make: if both mod set in game, the mobs of mod2 could drop items from mod1? I'm new in eclipse... I think: 1. in mod2 need check is set mod1. (How?) 2. get itemId of item from mod2. (How?) 3. drop item. How get itemId for drop if another mod Buildcraft or IC2 ?
-
How to get enchant level & get id of weapon, which was attacked mob
Kwasti replied to Kwasti's topic in Modder Support
Sorry my English Ok, Player have enchanted weapon(sword, axe, bow or other). When Player attack zombie or skeleton, executing event: EntityZombie:attackEntityFrom(DamageSource par1DamageSource, float par2) I need know: weapon of player and all enchant lvl -
Install clear forge and eclipse. Run CLient with example.mod and get error:
-
Thank's. Source found.
-
Stopped working go to minecraft class. when selecting the class from which the inheritance and pressing F3 occurred show source class and could see in detail the methods and properties of the class. Now get "source not found" Reinstalling Forge and Eclipse did not help. and when click Run Configurations.. get error: what do I do? forge-1.7.2-10.12.0.1034