Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Szymeon

Members
  • Joined

  • Last visited

  1. Aaaaa, ok, thanks. btw. maybe u know how to place entity in a custom structure? I placed entity to structure and save .nbt file by mcedit. Sometimes he is in spawned structure but sometimes he isnt. do u know what i mean?
  2. i thought about it, but i didnt find that option in blockbench. And i dont understand how it's possible that the entity is rotated xd?
  3. package com.Szymeon.knightsmod.entity.render; import com.Szymeon.knightsmod.Main; import com.Szymeon.knightsmod.entity.EntityOrk; import com.Szymeon.knightsmod.entity.model.ModelOrk; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; public class RenderOrk extends RenderLiving<EntityOrk> { public static final ResourceLocation TEXTURES = new ResourceLocation(Main.MOD_ID + ":textures/entity/ork.png"); public RenderOrk(RenderManager manager) { super(manager, new ModelOrk(), 0.5F); } @Override protected ResourceLocation getEntityTexture(EntityOrk entity) { return TEXTURES; } @Override protected void applyRotations(EntityOrk entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) { super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks); } }
  4. I made entity from this tutorial: https://www.youtube.com/watch?v=p6FFl3yN18M But i made model in blockbench bcs tabula has lags. In BlockBench i had to download plugin for export .java file, so i did it and its here: package com.Szymeon.knightsmod.entity.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelOrk extends ModelBase { //fields ModelRenderer e0; ModelRenderer e1; ModelRenderer e2; ModelRenderer e3; ModelRenderer e4; ModelRenderer e5; ModelRenderer e6; ModelRenderer e7; ModelRenderer e8; ModelRenderer e9; ModelRenderer e10; public ModelOrk() { this.textureWidth = 128; this.textureHeight = 128; this.e0 = new ModelRenderer(this, 0, 0); this.e0.addBox(-9F, 22F, -6F, 18, 12, 12, 1.0F); this.e1 = new ModelRenderer(this, 0, 0); this.e1.addBox(-6.5F, 17F, -5F, 13, 5, 9, 1.0F); this.e2 = new ModelRenderer(this, 0, 0); this.e2.addBox(-5F, 34F, -7.5F, 9, 11, 11, 1.0F); this.e3 = new ModelRenderer(this, 0, 0); this.e3.addBox(-12F, 16F, -3F, 3, 11, 4, 1.0F); this.e4 = new ModelRenderer(this, 0, 0); this.e4.addBox(-12F, 14F, -4F, 3, 2, 5, 1.0F); this.e5 = new ModelRenderer(this, 0, 0); this.e5.addBox(-13F, 26F, -4F, 5, 8, 6, 1.0F); this.e6 = new ModelRenderer(this, 0, 0); this.e6.addBox(8F, 26F, -4F, 5, 8, 6, 1.0F); this.e7 = new ModelRenderer(this, 0, 0); this.e7.addBox(9F, 14F, -4F, 3, 2, 5, 1.0F); this.e8 = new ModelRenderer(this, 0, 0); this.e8.addBox(9F, 16F, -3F, 3, 11, 4, 1.0F); this.e9 = new ModelRenderer(this, 0, 0); this.e9.addBox(1.5F, 0F, -3F, 6, 17, 5, 1.0F); this.e10 = new ModelRenderer(this, 0, 0); this.e10.addBox(-7.5F, 0F, -3F, 6, 17, 5, 1.0F); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { this.e0.render(f5); this.e1.render(f5); this.e2.render(f5); this.e3.render(f5); this.e4.render(f5); this.e5.render(f5); this.e6.render(f5); this.e7.render(f5); this.e8.render(f5); this.e9.render(f5); this.e10.render(f5); } public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } } But my entity looks like this: Should looks like this: Anyone know what's wrong?
  5. never mind, i dont need, anyway thanks for help
  6. damn. Do u have something what can help me? idk, maybe the most simple mod on github xd
  7. im totally newbie in modding. I tried to mod with tutorials on yt, but people said me "dont use i has model and static initializers" so i tried to do this (i was helping yourself with example mods form github). But my mod doesn't work xd. At first i tried to add item that do nothing.
  8. Just check this and say me why it doesnt work: https://github.com/imjustlearningdonthatemepls/whyisitbadd/tree/master/src/main/java/com/Szymeon/knightsmod EDIT: I tried something, but it still isnt working: https://github.com/imjustlearningdonthatemepls/whyisitbadddddda/tree/master/src/main
  9. I dont know how to stop using IHasModel, and how to register in a different way. I'm totally new and everything what I know is from youtube and forums like this one. xd
  10. Hey, i found 4 years old post where some guy showed how to increase attack speed, but code is old, and one thing isnt working. My code: Tool: public class ToolSpeed extends ItemSword implements IHasModel { public ToolSpeed(String name, ToolMaterial material) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.COMBAT); ModItems.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } @Override public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -1.8D, 0)); } return multimap; } } Cooldownable: public class Cooldownable{ public static final String COOLDOWN_NBT = "agravaine:cooldown"; /** * Call this onUpdate() in your Item WARNING: you should check for * !world.isRemote * * @param iStack * stack to update * @param maxCooldown * maximum cooldown */ public static void onUpdate(ItemStack iStack, int maxCooldown){ AgravaineNBTHelper.checkNBT(iStack); if(!AgravaineNBTHelper.verifyKey(iStack, COOLDOWN_NBT)){ AgravaineNBTHelper.setInteger(iStack, COOLDOWN_NBT, maxCooldown); } if(AgravaineNBTHelper.getInteger(iStack, COOLDOWN_NBT) > 0){ AgravaineNBTHelper.decreaseInteger(iStack, COOLDOWN_NBT, 1); } } /** * Checks for cooldown. Call it when your item needs to be used * * @param iStack * Stack to check * @param maxCooldown * Maximum cooldown * @return True if item's cooldown is zero, returns true and sets it to * maximum, otherwise false */ public static boolean canUse(ItemStack iStack, int maxCooldown){ AgravaineNBTHelper.checkNBT(iStack); if(AgravaineNBTHelper.getInteger(iStack, COOLDOWN_NBT) > 0){ return false; }else{ AgravaineNBTHelper.setInteger(iStack, COOLDOWN_NBT, maxCooldown); return true; } } /** * Call this addInformation() in your Item * * @param iStack * stack to update * @param info * cooldown text */ public static void displayCooldown(ItemStack iStack, List info){ AgravaineNBTHelper.checkNBT(iStack); if(AgravaineNBTHelper.getInteger(iStack, COOLDOWN_NBT) > 0){ info.add("Cooldown: " + AgravaineNBTHelper.getInteger(iStack, COOLDOWN_NBT)); }else{ info.add("Cooldown: ready"); } } } and util AgravaineNBTHelper, here i have an error: public class AgravaineNBTHelper{ /** * Used for null-safety * * @param stack */ public static NBTTagCompound checkNBT(ItemStack stack){ if(stack.stackTagCompound == null){ stack.stackTagCompound = new NBTTagCompound(); } return stack.stackTagCompound; } /** * Shortcut for NBTTagCompound.hasKey() */ public static boolean verifyKey(ItemStack stack, String name){ return stack.stackTagCompound.hasKey(name); } public static void setInteger(ItemStack stack, String name, int value){ stack.stackTagCompound.setInteger(name, value); } public static int getInteger(ItemStack stack, String name){ return stack.stackTagCompound.getInteger(name); } public static void decreaseInteger(ItemStack stack, String name, int value){ if(getInteger(stack, name) > 0){ setInteger(stack, name, getInteger(stack, name) - value); } } public static void decreaseIntegerIgnoreZero(ItemStack stack, String name, int value){ setInteger(stack, name, getInteger(stack, name) - value); } public static void setString(ItemStack stack, String name, String value){ stack.stackTagCompound.setString(name, value); } public static String getString(ItemStack stack, String name){ return stack.stackTagCompound.getString(name); } public static void setBoolean(ItemStack stack, String name, boolean value){ stack.stackTagCompound.setBoolean(name, value); } public static boolean getBoolean(ItemStack stack, String name){ return stack.stackTagCompound.getBoolean(name); } public static void invertBoolean(ItemStack stack, String name){ setBoolean(stack, name, !getBoolean(stack, name)); } public static void setByte(ItemStack stack, String name, byte value){ stack.stackTagCompound.setByte(name, value); } public static byte getByte(ItemStack stack, String name){ if(!verifyKey(stack, name)){ setByte(stack, name, (byte)0); } return stack.stackTagCompound.getByte(name); } } "The field ItemStack.stackTagCompound is not visible" i dont know what should be instead *Sorry for bad english if i said something wrong xd*
  11. I have an error in AgravaineNBTHelper.class . "The field ItemStack.stackTagCompound is not visible". Help

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.