Jump to content

TehFlyingLlama

Members
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

TehFlyingLlama's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Also, while this topic is up and going i may as well ask why this code doesnt work. It is within a functional, errorless livingUpdateEvent but it is never working properly. if(event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entity; EventTMGInfectedPlayer props = EventTMGInfectedPlayer.get((EntityPlayer) event.entity); if(props.getCurrentMana() < 1) { if(!event.entity.worldObj.isRemote) { ((EntityPlayer) event.entity).addPotionEffect(new PotionEffect(Potion.wither.id, 480, 1)); } }
  2. Im sorry i dont know a hell of a lot about this stuff, so can you just give me a code example of what you mean?
  3. Sooo i was working on my virus mod and finally got my humanity level to work. Sort of. this happened... Pretty strange, right? Anyway, what i am wondering is how the hell im going to fix it, because I have tried so many things its unreal. Here is my overlay code: package com.tmg.tmggunsmod; import java.util.Random; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class EventTMGInfectionDisplay{ public static class GUIRenderEventClass10 { @SubscribeEvent(priority = EventPriority.HIGHEST) public void eventHandler(RenderGameOverlayEvent event){ int posX = (event.resolution.getScaledWidth()) /2; int posY = (event.resolution.getScaledHeight()) /2; EntityPlayer entity = Minecraft.getMinecraft().thePlayer; int i = (int)entity.posX; int j = (int)entity.posY; int k = (int)entity.posZ; MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); World world = server.worldServers[0]; EventTMGInfectedPlayer props = EventTMGInfectedPlayer.get((EntityPlayer) entity); if(props.getCurrentMana() < 50){ Minecraft.getMinecraft().fontRenderer.drawString(props.getCurrentMana() * 2 + "% Humanity", posX+(-188), posY+(-109), 0xffffff); if(props.getCurrentMana() < 10) { Minecraft.getMinecraft().fontRenderer.drawString("Low Humanity. Prepare for Infection.", posX+(-188), posY+(-98), 0xff0033); } } } } //idk, one of my fixing attempts public void load(){ MinecraftForge.EVENT_BUS.register(new GUIRenderEventClass10()); } } and here is the registry line: MinecraftForge.EVENT_BUS.register(new GUIRenderEventClass10()); Anyway, if anyboy could edit my code and show me how to fix this, i would be MORE than happy! PS: the extended entity properties are working fine, its the rendering glitch that "bugs" me
  4. So, I have been working on a very large virus mod, and one of the main features is becoming infected. I need the code for all the classes to achieve such an effect. What i need is the player to be attacked, and add to a number / bar in the top left corner. Once it reaches 100% i want the player to simply die. If the post seems somewhat difficult to understand just ask what i need in more detail! Thanks in advance, Llama.
  5. custom mobs are being used and a heavy speed buff is added, so pathfinding isnt an issue. Plus the hitbox is very big so it is bound to collide one way or another
  6. Okay, I have not much experience in modding, and only vague experience in modding. I can code, add blocks items, mobs, gui etc. but I am faced with an ENTITY problem. You know how the wither destroys blocks when it collides with blocks? i need to replicate that on a walking mob. The provided source code is very messy (p_82381_a etc.) so it is very difficult to read that. What i need from you is a working way of achieving my goal. Thanks in advance
  7. Got it fixed... Finally... Thanks for the help!
  8. I have been having a slight issue with my techne model. All my other ones work, but not this one. It causes a random crash and the report leads me to the model class. I'll give you guys the model class so you can hopefully tell me what's wrong with it Class: package com.tmg.tmggunsmod; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelTMGZombie6Demolisher extends ModelBase { //fields ModelRenderer head; ModelRenderer body; ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; ModelRenderer Shape11; ModelRenderer Shape12; ModelRenderer Shape15; ModelRenderer Shape13; ModelRenderer Shape14; ModelRenderer Shape10; ModelRenderer Shape6; public ModelTMGZombie6Demolisher() { textureWidth = 128; textureHeight = 64; head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -8F, -4F, 8, 8, ; head.setRotationPoint(0F, -21F, -4F); head.setTextureSize(128, 64); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 16, 38); body.addBox(-8F, 0F, -2F, 16, 18, ; body.setRotationPoint(0F, -24F, -2F); body.setTextureSize(128, 64); body.mirror = true; setRotation(body, 0F, 0F, 0F); Shape1 = new ModelRenderer(this, 32, 0); Shape1.addBox(0F, 0F, 0F, 1, 2, 2); Shape1.setRotationPoint(-6F, -15F, -1F); Shape1.setTextureSize(128, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 32, 0); Shape2.addBox(0F, 0F, 0F, 1, 2, 2); Shape2.setRotationPoint(5F, -15F, -1F); Shape2.setTextureSize(128, 64); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 50, 0); Shape3.addBox(0F, 0F, 0F, 12, 6, 6); Shape3.setRotationPoint(-6F, -6F, -3F); Shape3.setTextureSize(128, 64); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 80, 16); Shape4.addBox(-3F, 0F, -3F, 6, 24, 6); Shape4.setRotationPoint(-3F, 0F, 0F); Shape4.setTextureSize(128, 64); Shape4.mirror = true; setRotation(Shape4, 0F, 0.1396263F, 0.0349066F); Shape5.mirror = true; Shape5 = new ModelRenderer(this, 80, 16); Shape5.addBox(-3F, 0F, -3F, 6, 24, 6); Shape5.setRotationPoint(3F, 0F, 0F); Shape5.setTextureSize(128, 64); Shape5.mirror = true; setRotation(Shape5, 0F, -0.1396263F, -0.0349066F); Shape5.mirror = false; Shape7 = new ModelRenderer(this, 16, 22); Shape7.addBox(-2F, -3F, -3F, 6, 36, 6); Shape7.setRotationPoint(8F, -23F, 0F); Shape7.setTextureSize(128, 64); Shape7.mirror = true; setRotation(Shape7, -0.1396263F, -0.1396263F, -0.0698132F); Shape8 = new ModelRenderer(this, 96, 0); Shape8.addBox(-6F, -5F, -3F, 8, 8, ; Shape8.setRotationPoint(-5F, -25F, 2F); Shape8.setTextureSize(128, 64); Shape8.mirror = true; setRotation(Shape8, -0.1919862F, 0.1047198F, -0.2792527F); Shape9 = new ModelRenderer(this, 96, 0); Shape9.addBox(0F, -6F, -3F, 8, 8, ; Shape9.setRotationPoint(5F, -23F, 0F); Shape9.setTextureSize(128, 64); Shape9.mirror = true; setRotation(Shape9, -0.1919862F, -0.1047198F, 0.2792527F); Shape11 = new ModelRenderer(this, 96, 0); Shape11.addBox(-7F, -1F, 0F, 8, 8, ; Shape11.setRotationPoint(2F, -27F, 2F); Shape11.setTextureSize(128, 64); Shape11.mirror = true; setRotation(Shape11, -0.0698132F, -0.1919862F, -0.0349066F); Shape12 = new ModelRenderer(this, 96, 0); Shape12.addBox(0F, 0F, 0F, 8, 8, ; Shape12.setRotationPoint(-13F, -22F, -1F); Shape12.setTextureSize(128, 64); Shape12.mirror = true; setRotation(Shape12, 0.2268928F, -0.296706F, 0.0698132F); Shape15 = new ModelRenderer(this, 96, 0); Shape15.addBox(0F, -8F, 0F, 8, 8, ; Shape15.setRotationPoint(-2F, -3F, 0F); Shape15.setTextureSize(128, 64); Shape15.mirror = true; setRotation(Shape15, 0.0698132F, -0.0872665F, -0.0523599F); Shape13 = new ModelRenderer(this, 96, 0); Shape13.addBox(0F, 0F, 0F, 8, 8, ; Shape13.setRotationPoint(7F, -21F, 0F); Shape13.setTextureSize(128, 64); Shape13.mirror = true; setRotation(Shape13, 0.1047198F, 0.1396263F, 0.1047198F); Shape14 = new ModelRenderer(this, 96, 0); Shape14.addBox(0F, 0F, 0F, 8, 8, ; Shape14.setRotationPoint(-6F, -17F, 0F); Shape14.setTextureSize(128, 64); Shape14.mirror = true; setRotation(Shape14, -0.0698132F, -0.0872665F, -0.1745329F); Shape10 = new ModelRenderer(this, 96, 0); Shape10.addBox(0F, 0F, 0F, 8, 8, ; Shape10.setRotationPoint(0F, -22F, 2F); Shape10.setTextureSize(128, 64); Shape10.mirror = true; setRotation(Shape10, 0.1745329F, -0.3141593F, 0F); Shape6 = new ModelRenderer(this, 16, 22); Shape6.addBox(-4F, -3F, -3F, 6, 36, 6); Shape6.setRotationPoint(-8F, -23F, 0F); Shape6.setTextureSize(128, 64); Shape6.mirror = true; setRotation(Shape6, -0.1396263F, 0.1396263F, 0.0698132F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); head.render(f5); body.render(f5); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); Shape11.render(f5); Shape12.render(f5); Shape15.render(f5); Shape13.render(f5); Shape14.render(f5); Shape10.render(f5); Shape6.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } } Any ideas? I apologise if this is messy.
  9. Ok, so - like many other people - have got stuck in a few coding holes. I do not, therfore, fully understand these concepts and require a precise tutorial to allow me to do so. Here are my questions: 1. I require the player to be able to reach further and attack from a greater distance while holding an item Assumed solution - I may have to use events to detect when the item is held and modify the data that sets my reach 2. Custom mobs being able to attack EVERYTHING. I have attempted to change my entity's AI but it still only targets and attacks the player, regardless of any conditions. Assumed Solution - 3. I can't seem to find any tutorials that are in 1.7 that describe the processes needed to make custom armor models Assumed Solution - 4. Custom Dimension Assumed Solution - (need tutorial) Please, people. Do not go to yourself "What the hell how don't you know this!?!?!?!". I am 12 and just started modding a month ago so leave me be. Thanks in advance, TehFlyingLlama
×
×
  • Create New...

Important Information

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