Jump to content

I_Iz_Shahid

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by I_Iz_Shahid

  1. This time its a bump
  2. Not a bumb
  3. Here's a tutorial for a custom furnace: http://jabelarminecraft.blogspot.com/p/minecraft-modding-containers.html instead of making your own GUI and recipe file, just use the ones that the crafting bench uses by default
  4. I am no good with packet stuff, but after you figure out the packet stuff the code needed to kill an entity is as follows: Entity.setDead(); The entity needs to be changed to the entity you need
  5. But minecraft Does work for 1.8. What I would do is copy the tileentity, block and container files for the crafting bench, I forget what they were all called in the workspace . After you do that, change the code up a bit and make it your unique block, the bare minimum is to change the name of the files and that SHOULD be enough, next make cure that all of your files are referencing the copied counterparts, for example in the block file make sure it is spawning the copied tileentity etc. Make a custom render and model (this hasn't changed much throughout the versions) and finally register them That should be detailed enough, anyone please correct me if I have any misleading info, I haven't done this stuff in a month and am a bit rusty on the structures of tileentities And frankly, there are 1.7.10 tutorials out there, just modify the code and fix up the errors and viola!
  6. Oh poop, I edited the code from the original to remove a huge chunk that has nothing to do with the problem whatsoever, I will clean up the code after I get it to work . The issue is that if I spawn a new entityarrow then I would need to do the same code for each type of throwable entity. Is there another way to simply change the entities velocity vector? I tried setVelocity but it doesn't do anything either
  7. Watch a video on how its done, here's a video by LexManos:
  8. Hey guys, I am trying to make a mob that reflects all damage taken to its attacker, I got almost all of it working except the projectiles. The projectiles should change directions and return to the attacker but I just can't seem to get this to work properly. Here is some code from the Entities file @Override public boolean attackEntityFrom(DamageSource source, float amount) { Entity attacker = source.getSourceOfDamage(); if(source.isProjectile() && !this.worldObj.isRemote) { if(attacker instanceof EntityArrow) { Entity Aggressor = ((EntityArrow) attacker).shootingEntity; EntityArrow attackerclone = new EntityArrow(this.worldObj, this, (EntityLivingBase) Aggressor, 16.0F, 0.0F); } else } else if(!this.worldObj.isRemote && !source.isExplosion() && !source.isFireDamage() && !source.isMagicDamage() && !source.isCreativePlayer() && !source.isUnblockable() && source.getDamageType() != "fall" && source.getDamageType() != "lightningBolt" && source.getDamageType() != "inWall" && source.getDamageType() != "cactus" && source.getDamageType() != "drown" && source.getDamageType() != "outOfWorld" && source.getDamageType() != "anvil" && source.getDamageType() != "fallingBlock") { attacker.attackEntityFrom(source, amount * 3); } else if(source.isCreativePlayer()) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("<Accelerator> And they claim that I use hacks.")); this.setDead(); } else if(source.damageType == "fall") { explode(amount/2); } return false; } The arrow is ably to change directions fine but no matter how much I try I just can never make it gain velocity, it seems as if it is spawning with the minimum velocity possible. I tried to take a look at EntitySkeleton and yet here I am. I tried to change the 16.0F in the spawn code but it doesn't change anything. Thanks!
  9. Figured it out, and forgot that bit. Sorry
  10. Figured it out, apparently the onUpdate part messes up even if there is no code in it. Any ideas on why this happens?
  11. I got another random issue not related to whatever I just changed, apparently my entity is now frozen in place quivering his head oh so slightly. When I hit it, he just turns red and waves his arms like crazy. I have no idea what is going on, I commented out AI parts and the waterwalking code and the problem still prevails Code: package com.Accelerator.Entity; import net.minecraft.block.Block; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAILeapAtTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.EnumDifficulty; import net.minecraft.world.World; public class EntityAccelerator extends EntityMob { public EntityAccelerator(World worldIn) { super(worldIn); this.isImmuneToFire = true;/* this.tasks.addTask(2, new EntityAILeapAtTarget(this, 1.0F)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityMob.class, 1.0D, false)); this.tasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityZombie.class, true)); this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(4, new EntityAILookIdle(this)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(4, new EntityAISwimming(this));*/ } public boolean isAIEnabled() { return true; } public void onUpdate() {/* BlockPos pos = new BlockPos((int) this.posX, (int) this.posY - 1, (int) this.posZ); if (this.worldObj.getBlockState(pos).getBlock() == Blocks.water) { this.motionY = 0; }*/ } public void applyEntityAtributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10.0D); this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(1.0D); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(256.0D); } protected void updateAITasks() { super.updateAITasks(); } /** * Returns the sound this mob makes while it's alive. I'll be teaching how to add custom sounds a little bit later. */ protected String getLivingSound() { return "mob.cow.say"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.cow.hurt"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.cow.hurt"; } /** * Plays step sound at it's coordinates */ protected void playStepSound(int par1, int par2, int par3, int par4) { this.playSound("mob.cow.step", 0.15F, 1.0F); } /** * Returns the volume for the sounds this mob makes. */ protected float getSoundVolume() { return 0.4F; } /** * Checks if the entity's current position is a valid location to spawn this entity. */ public boolean getCanSpawnHere() { return this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL; } private void explode() { if (!this.worldObj.isRemote) { boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, flag); this.setDead(); } } }
  12. For the first concern, the mob is just supposed to be ABLE to walk. It doesn't matter if it doesn't like to wander over it, it just needs to be able to walk on top of it if it somehow goes into water. Is there a method that returns the block under the entities feet at the given moment?
  13. Hey guys, I have been trying to figure out a way to allow my custom mob to walk over water, but all of my attempts have failed. I am getting stuck on how to check what block is the entity standing on top of, I seems like the method I am looking for got removed in the recent version of minecraft. Secondly, I would like know how to make any damage the entity receives be sent back to the aggressor, Like if I hit it I would take the damage not the entity. Any Ideas?
  14. well thanks for that info I guess, but the original question remains unanswered. It doesn't matter anyways, I got my issue solved and this was only for help for future projects. I think through experimenting that a json can contain blocks up to 32 spaces up and -32 down. This is only a guess judging from previous attempts
  15. Hey guys, I was tampering around with my mod in progress and figured out that JSON files wont be read if they contain blocks that are too tall/high. I was wondering what are the limits to the dimensions a JSON can contain? Thanks!
  16. Dude, it seems that you are trying to access IStateManager from the server side, go to the error locations line 57 in ConfigHandler as dictated by the crash code and attempt to fix it. Issues like these get infinitely harder without the actual IDE debugging for you, if you know what you are doing then you should be able to do it yourself. Try to scan through all peices of code ad use the search function to see which one uses IStateManager and fix that. BTW your mod looks crazy immersive, I can't wait to see it released
  17. Hey guys, I was wondering where in the furnaces code does it consume a fuel item and set isBurning to true, I tried searching and searching but I think that I am overlooking something. Thanks!
  18. I used getCurrentEquippedItem and it works fine for my item, but go on ahead and test the difference
  19. Hey I just wanted to know what should I do if I wanted to render my techne model in my hand instead?
  20. How can I find one that is working on 1.8? Also if ti helps, I could try to recreate my model in JSON format, will that make things easier?
  21. Hey guys, I was trying to get an item to render in 3D with a custom renderer that implements IItemRenderer, but I am having issues actually getting it to render the Item. I even tried to start over following iChun's tutorial for 1.7 but I guess that it doesn't work for 1.8 anymore. The only thing I am getting is an oversized block covering my whole right hand as shown below: If needed, here is my code for my renderer and my clientproxy: Renderer: Proxy:
  22. All I need to know now is how do I split the recipekey back into its original itemstacks.
×
×
  • Create New...

Important Information

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