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.

SR2610

Members
  • Joined

  • Last visited

  1. Once ever as it is only at the death of the entity (This isn't for players so they shouldn't be dying more than once).
  2. I've actually figured out a solution since I've posted this. As I only need to generate the number once per entity, I'm using the UUID of the entity to seed the random number generator. Its probably not the perfect solution but it works well for what I'm doing.
  3. I currently have a LivingUpdateEvent where I want to generate a random number to determine an action and I want the random number to be the same between client and server. Is there an easy way to do this or will I have to use packets to send the data. Thanks in Advance.
  4. SR2610 changed their profile photo
  5. I just updated to forge 1.7.10 and I am having a couple of issues in my forge workspace. The first is the lack of both the sound assets and the icon for the game. My own sounds are fine but the vanilla ones cannot be found. My second issues is that the client takes a very long time to tick, and spams the console with this: This happens with sounds on or off, and in any world that is not superflat. It happens even with all of my code disabled. Any Ideas to why these are happening and how to fix them?
  6. Thanks, you have given me they way to go with this, and I have it solved now
  7. I have created the class, but I am not sure how to use it
  8. Can you explain how to use it?
  9. For a mod I am making, I need a way to have a new player variable such as gold or mana, I was wondering about the best way to do it, so that each player has a different value, and that the value is saved on the world, so that the player can keep the same value. I think it would be done via NBT but I need some help in doing so. Thanks in Advance
  10. Thanks, that got it working for me. The reason I am doing this is so I can have a base that I can adapt further 3d modeled weapons from in the future
  11. I am trying to create a custom sword model for a future mod, I manage to get the sword model to load in, and it is positioned correctly, but I can't get the texture to assign to it. I always get this error: 2013-07-26 21:29:32 [WARNING] [Minecraft-Client] Failed to load texture: minecraft:/assets/tutorial/textures/model/dagger.png java.io.FileNotFoundException: minecraft:/assets/tutorial/textures/model/dagger.png at net.minecraft.client.resources.FallbackResourceManager.func_110536_a(FallbackResourceManager.java:64) at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110536_a(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SimpleTexture.java:31) at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.func_110577_a(TextureManager.java:41) at modding.tutorial.ItemRenderSword.renderItem(ItemRenderSword.java:47) at net.minecraftforge.client.ForgeHooksClient.renderEquippedItem(ForgeHooksClient.java:201) at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:89) at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:490) at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:712) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1292) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:57) at net.minecraft.launchwrapper.Launch.main(Launch.java:18) If you want to see the item renderer code here it is: package modding.tutorial; import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; public class ItemRenderSword implements IItemRenderer { protected dagger SwordModel; public ItemRenderSword() { SwordModel = new dagger(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch (type) { case EQUIPPED: case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine .func_110577_a(new ResourceLocation( "/assets/tutorial/textures/model/dagger.png")); //NEED TO FIX THIS float scale = 1.4F; GL11.glScalef(scale, scale, scale); GL11.glRotatef(90, -1, 0, 0); GL11.glRotatef(85, 0, 0, 1); GL11.glRotatef(180, 0, 1, 0); GL11.glRotatef(135, 1, 0, 0); GL11.glTranslatef(-0.1F, -0.5F, 0.5F); // Left-Right // Forward-Backwards Up-Down SwordModel.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } default: break; } } } If you could help me at all, it would be useful.

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.