Skip 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. I was going to take a guess at isSideSolid, earlier, but I would have thought that BlockWall did that already.
  2. I don't see anything wrong with your read/write NBT methods, but holy hell your class names are a mess. ModBlockTileEntity.java isn't the tile entity class as I first expected, then neither was ContainerModTileEntity.java The "best" naming convention will be one that everyone working on Minecraft is familiar with: BlockWhatever , TileEntityThingamajig , ContainerWhatThing , etc. Also, Class.java ? Seriously?
  3. You have @SideOnly on these methods, why? https://github.com/NovaViper/TetraCraft/blob/f8c2adc9221004eed999621d2c95a2c922fc1605/src-1.8/main/java/novaviper/tetracraft/client/proxy/ClientProxy.java#L105-L133
  4. Show your Reference class. I cannot tell if you have typoed the package name for your client proxy because you hid that value away inside another class.
  5. You checked if source was an instance of EntityDamageSource, but you didn't cast it. ((EntityDamageSource)source).getEntity()
  6. Isn't the JVM amazing? (There's also a reason that I call coremodding / ASM an abyss that looks back. Javacode can modify javacode at runtime. Hell, you can create new class types at runtime, entirely through the bytecode manipulation features if you really want to.)
  7. import lines, by the way, aren't actually compiled. You can import all the packages you want, it doesn't matter. What imports do is tell the compiler where to find a given class that is being used (and those references are compiled). Imports are essentially syntactic sugar. You only have to type import System; Object somevar; , but what actually gets compiled is System.Object somevar; . So import some.package.not.being.used; gets stripped. So what happens when a class is loaded by the JVM is that the JVM needs to verify that every other class reference made by the loaded one can be retrieved and loaded as well, as it needs to insure that every call being made by the class being loaded is a valid action. This is why if you do any coremodding and alter a class, but make it try to reference a class or object that doesn't exist (e.g. a typo) the game will crash: it attempted to validate the modified class and was unable to locate the reference (I did this on accident once). (As an aside, the throws declaration isn't compiled at all and the JVM doesn't care until the error is actually thrown and nothing in the call stack handles it.)
  8. You should be taking the player's rotation, getting the sin and cos, and adding that to the player's position. I don't know why the circle would be small, unless the offset isn't being multiplied by a large enough value (the double distance = this.SpecialBulletLogicOffsetFromFiringEntity; line dictates how far away from the player the chicken will be).
  9. It used to, but it now returns a ResourceLocation under the new registry system. Ah, interesting.
  10. ...there's a 1.9.2 version of Forge? Srsly, the changes necessary for 1.9.0 aren't done yet.
  11. What do you mean it "didn't work"?
  12. You removed the public static field tile_entity_gui . You still need that, or can replace it with a 0 (but doing so violates the advice given upthead, but to follow it you'd need to check id == tile_entity_gui instead of id == 0 ). ((Also, tile_entity_gui is a terrible name))
  13. myItem.setRegistryName("myItemIsCool"); GameRegistry.register(myItem); Also, getRegistryName() already returns a string, you don't need to .ToString() it.
  14. You should really move the rendering stuff to a client proxy.
  15. Splitting it out like that had a huge potential for introducing more errors. If you'd managed to screw something up and got the items out of order the second time around, you'd never have noticed. If you plan for this to be extendable, it'd be worth creating a "helper" class that lets you create the results and their message strings like a recipe. [cope]public class RandomWhatever { public ItemStack theStack; public string message; //create these once, store somewhere, reference later public RandomWhatever(ItemStack stack, string msg) { theStack = stack; message = msg; } } Then you can store them in an array, randomly select one, clone the item stack and alert the player with the string, no weird lookups, equivalence checks, if-else blocks, or switch stack.
  16. And we don't have time to have you ignore what we tell you three times. You know, like this bit: That was pointed out to you at least twice, this is not a surprise revelation.
  17. Your update function still bypasses the change that doesn't get tracked on the client, on the client.
  18. You might be able to squeeze a new property into the last metadata bit (that BlockCrops doesn't use) so that the AGE property in BlockCrops is used and evaluated as the game expects, but you can do a secondary detection for "AGE=7" and set your extra bool flag and set AGE back to 0. That would make the game thing Everything is Fine, but let you have the full 16 states for age.
  19. This should be done in the rendering side of things. You manually check what blocks are next to the one being drawn in order to decide how to draw it. Look at how the fence rendering code works. (Also: update to 1.9)
  20. Items in a player's hand don't do anything special to stay in their hand as the player rotates. That's all handled by the GL calls. Namely, GL rotates the context, then draws the player and their equipment. All of the trig is hidden away from you. *Digs out some code from a project he's currently working on.* You'll have to convert some stuff, but the math is here. //SpecialBulletLogic is an XML based parameterized system that drive various aspects, should be apparent what things do public void MeleeShot_UpdatePosition() { double distance = this.SpecialBulletLogicOffsetFromFiringEntity; //how far from parent's center; double angle = 0; if(this.SpecialBulletLogic.RotatesAroundFiringEntity) { //you want this angle = MathHelper.SafeAngleAddRadians(angle, this.SpecialBulletLogic.ParentBullet.CurrentAngleRadians); //add parent's angle } Vector2 effectiveOffset = Vector2.zero; if(distance != 0) { //calculate rotated offsets effectiveOffset.x = (float)(distance * Math.Cos(angle)); effectiveOffset.y = (float)(distance * Math.Sin(angle)); } Vector2 newLocation = this.SpecialBulletLogic.ParentBullet.WorldLocation; newLocation.x += effectiveOffset.x; newLocation.y += effectiveOffset.y; this.SetWorldLocation(newLocation); }
  21. You've gone all bonkers with the file. The first problem is that BlockPos does not exist in 1.7.10, but you're trying to use it. This is what the class should look like.
  22. Stop using unlocalized name and start using setRegistryName. Don't ever use getUnlocalizedName().substring(5) for anything, ever. Stop doing it. That's bad. Really really bad, perpetuated by a shitty tutorial that follows tons of bad practices and should be taken down.
  23. Also, oh god, that if-stack checking whether the item given was equal to an array of stuff. Jesus christ. Cleaned it up
  24. The NBT in my context was the NBT tag attached to an item stack, not the TileEntity's saveToNBT
  25. So you moved all of your item registration into your ClientProxy. Good job. Now what does the server know about your items? Jack shit is what.

Important Information

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

Account

Navigation

Search

Search

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.