Everything posted by Animefan8888
-
[SOLVED] Checking for Shift-Right Click onItemUse
You don't check if the player is sneaking.
-
[SOLVED] Is there any way to tell generically if a Mob is hostile
You can loop through the tasks field and check for certain AIs such as EntityAINearestAttackableTarget, EntityAIAttackMelee, EntityAIOwnerHurtByTarget, etc.
-
[1.10.2] Block textured, but ItemBlock is not
Post your TreeType enum.
-
[1.10.2] Block textured, but ItemBlock is not
Post a new log.
-
[Solved] [1.11] Creating Quarry
I would use the blockstates orientation from inside my TileEntity set a variable and either use entities/entity or a TESR if there is a better way to draw the lines someone else say something as that is all that "blockstates orientation" would be getting the blockstate from the world where the TE is and then extracting the variant for the direction. Of course this means you will have to have the Horizontal facing variants. An example of those would be in the FurnaceBlock class.
-
[1.10.2] Block textured, but ItemBlock is not
Is this what your item model file looks like? Without the "// or minecraft:block/oak_log" of course.
-
Crazy Craft
You need to allocate more ram to the game, but this is the wrong thread for this.
-
[1.10.2] Block textured, but ItemBlock is not
You assigned it to a model. Model is not texture. oak_bark is a model and a texture. He probably just messed up in conveying his words.
-
[SOLVED] Is there any way to tell generically if a Mob is hostile
You could look for SharedMonsterAttributes.ATTACK_DAMAGE and see if they have it and if it is greater than zero. This is assuming they used the vanillas system though.
-
[1.10.2] Block textured, but ItemBlock is not
Can I assume you have it like so "parent": "block/oak_log" // or minecraft:block/oak_log
-
[1.10.2] Block textured, but ItemBlock is not
Remove the forge marker.
-
[1.10.2] Block textured, but ItemBlock is not
In your item json model it should be "parent": "block/oak_log"
-
[1.10.2] Block textured, but ItemBlock is not
When you register the renderer for the ItemBlock don't call block.getRegistryName().toString() don't call the toString part. If it doesn't work post the log.
-
[1.10] CustomEntity transform automaticaly into pig? o.O
as written above, its not the register. well the error are my attribute tasks: this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAITempt(this, 1.0D, Items.APPLE, false)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); one of them makes my entity to an pig X) Then remove the ones you added to make sure. If so remove them one by one, if that doesn't work try removing multiple to see which ones are causing it then come back and tell us which ones are causing the problem.
-
TE throws a Null Exception during update.
You need to call your PacketHandler.init() somewhere in your main mod class.
-
TE throws a Null Exception during update.
Sadly if it was the world it would error earlier in the code....I'm thinking his PacketHandler.theNetwork is not initialized.
-
TE throws a Null Exception during update.
Is this your updateEntity method? if((this.storage.getEnergyStored() != this.lastEnergy || this.currentBurnTime != this.lastCurrentBurnTime || this.lastBurnTime != this.maxBurnTime) && this.sendUpdateWithInterval()){ If so post your sendUpdate line 106.
-
TE throws a Null Exception during update.
What is sendUpdateWithInterval line 231?
-
[1.10.2] Stop player from using the left hand slot
Cleavers don't have a right click function though... which effectively makes it so you can't use things in the left hand slot. You could use a shift right click function for that or have it spawn in a spare item and then do things at the item. I don't think you understand the problem he wants it to function on right click, but only when it is in the specified slot IE guns in right hand and shields in left hand. This could be accomplished via the ItemRightClickEvent.
-
[1.10.2] Stop player from using the left hand slot
Cleavers don't have a right click function though...
-
TE throws a Null Exception during update.
It is never set. public int currentValue; ConfigIntValues(String name, ConfigCategories category, int defaultValue, int min, int max, String desc) { this.name = name; this.category = category.name; this.defaultValue = defaultValue; this.min = min; this.max = max; this.desc = desc; }
-
TE throws a Null Exception during update.
You never set currentValue so it is 0.
-
[1.10.2]Problem with Entity Hitting with Sword
I would use the LivingAttackEvent to check if the entity attacking from the source is an instanceof EntityLiving and specifically EntityPlayer and then grab the inventory object to see if the item used was yours then apply the effect. got some problem on starting my mod, but i got the function writting with big hope that this test thing here will work: private void tryAbility(EntityLivingBase mob, EntityLivingBase target) { if ((target == null) || (target.getRidingEntity() != null) || (!mob.canEntityBeSeen(target))) { return; } long time = System.currentTimeMillis(); if ((time > this.nextAbilityUse) && (mob.getDistanceToEntity(target) > 3.0F) && (target.worldObj.canBlockSeeSky(new BlockPos(MathHelper.floor_double(target.posX), MathHelper.floor_double(target.posY), MathHelper.floor_double(target.posZ))))) { this.nextAbilityUse = (time + 15000L); mob.worldObj.addWeatherEffect(new EntityLightningBolt(mob.worldObj, target.posX, target.posY - 1.0D, target.posZ, false)); } } } What is the problem? What are you trying to accomplish? Post where the code is being called from.
-
[1.10.2] Stop player from using the left hand slot
Put in a PR, I have thought of many uses for this myself, but have never actually needed it.
-
Potion Effects Applying Oddly (Entitythrowable.) 1.11 (solved)
That's not quite correct, or at least not clear enough. Since EntityPlayer extends EntityLivingBase, any instance of EntityPlayer is an instance of EntityLivingBase. The reverse is not true, not all instances of EntityLivingBase are an instance of EntityPlayer. This is why you cannot cast an EntityLivingBase to EntityPlayer, unless you first check that the EntityLivingBase is an instance of EntityPlayer. Yes, my wording on that was not quite right I will amend that right now.
IPS spam blocked by CleanTalk.