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.

MrArcane111

Members
  • Joined

  • Last visited

Everything posted by MrArcane111

  1. In the block constructor, setTickRandomly to false. Then add an onUpdate method. Then set the tickRate to 1. Hope this helped.
  2. An example from my WIP mod: EntityRegistry.registerGlobalEntityID(EntityBullet.class, "Bullet", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityBullet.class, "Bullet", Config.entBulletId, Steamcraft.instance, 64, 20, true); If you don't know what each of the values do in the registerModEntity, please read the Forge javadocs.
  3. Here, read this: http://www.minecraftforge.net/forum/index.php/topic,18005.0.html You don't need that many translations/rotations. Basically, you need to translate to your model's center, rotate it *correctly*, then translate back to original position. If you want your item to rotate in one axis, then set the other floats in the glRotatef method to 0.
  4. *fishes for example* See in the RenderBiped how it handles bow rotation? if (var4.itemID == Item.bow.shiftedIndex) { var6 = 0.625F; GL11.glTranslatef(0.0F, 0.125F, 0.3125F); GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(var6, -var6, var6); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } I'm not that great at OpenGL, but from what I know, the method glRotatef has the values angle, float x, float y, float z. Determining on what those x, y, and z axis values are determines how it rotates. Keep trying.
  5. Take a look at OgreSean's old Teleport Swords mod: http://www.minecraftforum.net/topic/157524-v181ogreseans-mods-mods-updated-for-181/ It's old, but the vector math is still relevant, you'd just need to change a couple of things to keep it relevant in today's methods. He also has a bit in there about adding "randomness" to the teleport, but you can just get rid of that stuff.
  6. Look at the glRotatef method. See the 180.0F bit? Tinker with it and see what happens.
  7. Do you think it has to do with the fact that air is see-through? You can always make a custom Material if you need to, but I have no idea why you'd need to use Material.air for anything. Especially for an (apparent) NPC spawner.
  8. A couple of things. 1. Your method getArmorTexture should use @SideOnly(Side.CLIENT) because all texture related stuff is handled client-side. I just checked on this bit, and you do NOT need this. My mistake! 2. Is the armor custom as in made with Techne custom, or as in retextured vanilla custom? The two are handled very differently.
  9. Well, if you want the player's held item, I'd suggest using player.inventory.getCurrentItem() Additionally, it's java coding convention to separate the parts of your if statement with parenthesis: if ((blarg < -1) && (cat > 12) {} Unless you just wanted to check if you had the item in the player's inventory?
  10. The config uses the get method, but it won't process a float, but that's okay, just make it a double and then cast it as a float in the light value method.
  11. Check OpenBlocks' GitHub repo. I think Mikemoo (or whoever) likes to add the changelogs in *regular* books—not his special, custom GUI book.
  12. Really? You don't think world.spawnParticle is obvious enough?
  13. Well, you'd have some code in the updateTick or onNeighborBlockChange method that would determine if a part of the multi block structure was removed—similar to how a torch determines if the block it's placed on is removed. In any case, it's not as hard as you think, and there are oodles of resources at your fingertips for learning how to create such a structure—maybe check mDiyo's TiCon smeltery thingy (sorry!) for starters.
  14. There's an event called DrawBlockHighlightEvent (or very close) which allows access to MovingObjectPosition. All you would need to do is check if the block you mouse over is the block you want.
  15. You can create a renderer that implements IItemRenderer. It has three methods: handleRenderType, shouldUseRenderHelper, and renderItem. Additionally, you'll need to register your ItemRenderer in your ClientProxy: MinecraftForgeClient.registerItemRenderer(YourMod.yourItem, new YourItemRenderer()); Please read the following for more info: http://www.minecraftforge.net/wiki/Custom_2D_Inventory_Item_Renderer Even though the example is for inventory rendering, I believe it can be applied to first and third person viewing. Hope this helps!
  16. Hmmm...this doesn't seem to work now...is there a new way to do it? EDIT: Literally as soon as I posted this, I got it working. Now, all you need to do is go to Run, then Run Configurations. Click on Client under Java Application (there are two Client, but you only need to edit one). Then, under the arguments tab, find the Program Arguments. Now type: --username YOURUSERNAME and replace YOURUSERNAME with your username (duh). Hope this helps!
  17. Two side notes: 1. If you are STILL having decompile failures, you may need to allocate more ram to Gradle. Open the gradle file with TextEdit, and look around line 11, where it says: DEFAULT_JVM_OPTS="" Change it to however much RAM you nee. I used two GB: DEFAULT_JVM_OPTS="-Xmx2048m" 2. Also, do NOT use 'bash' before typing ./gradlew...literally copy and paste the above quoted code (line by line). Anyway, this is how I was successful. Hope this helps! P.S. This works with the latest build of forge (1.7.2 Forge: 10.12.0.1039) just in case you're wondering. If you have any questions, I'll try to help as best as I can!
  18. First off, you need to add two more methods in your ClientProxy to register your EntityRubyArrow: EntityRegistry.registerGlobalEntityID(EntityRubyArrow.class, "NameID", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityRubyArrow.class, "NameID", put unique int here, MainModClass.instance, 100, 10, false); For the registerModEntity method, the first field is the Entity class file: in your case, it's the Ruby arrow. Second, is a name forge uses to identify the entity. Ideally, you'd want to make the name sensical. The next is an integer. This is the unique entity ID. I like to keep all my entity IDs in a separate class file, but you can put in any int in there. Next is your main mod class instance. Then the next two integers are tracking ranges and update frequencies. I suggest leaving them at 100 and 10 just to keep it simple; you can adjust them later if you know what they do. Then the last parameter is a boolean which determines if it will need to send velocity updates. For an arrow, it doesn't, so leave it as false. Additionally, in your Render class, you need to change it to your EntityRubyArrow instead of EntityArrow. If you need further help, please feel free to browse around my mod repository (i.e. run a repo search) for "EntityBullet" related things where I've got entities working. https://github.com/MrArcane111/Steamcraft-2
  19. I like using ChatMessageComponent because you can do things like 'messageComponent.setColor(RED)' - approximate code, and italics and things.
  20. Can't you also use a Block Event? It handles the Block object as well as x, y, and z coords.
  21. You can use ray trace, or you can make the method on the client side and call the minecraft objectMouseOver coords. It can grab the x, y, z coords of a block. But ray trace is probably your best bet because it can be done server side.
  22. I think I've graduated Java basics. I want to learn advanced physics (and the mathematical computations involved) and OpenGL. I'm also working on a 2D RPG. I haven't taken a formal class, but I've read books and read plenty of online tutorials for Java basics. Unfortunately, they do not offer Java (or any coding class for that matter) at my school, so everything I have learned thus far is from self-teaching.
  23. Now that I have Eclipse reopened, they must've changed it to "getItem()" but you're right, it isn't needed. I will update this post once I try your suggestion. Thanks.

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.