Everything posted by Draco18s
-
[1.8.9] Custom Walls issues
I was going to take a guess at isSideSolid, earlier, but I would have thought that BlockWall did that already.
-
[1.8]Tile Entity not saving Items
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?
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
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
-
1.8 Crash Help
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.
-
LivingAttackEvent problems [solved]
You checked if source was an instance of EntityDamageSource, but you didn't cast it. ((EntityDamageSource)source).getEntity()
-
How Does Forge Reflection Work?
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.)
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
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.)
-
[SOLVED] [1.8.9] Rotating an entity with the player.
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).
-
1.9 Changes to Forge?
It used to, but it now returns a ResourceLocation under the new registry system. Ah, interesting.
-
How portable will 1.9 code be when porting to 1.9.2?
...there's a 1.9.2 version of Forge? Srsly, the changes necessary for 1.9.0 aren't done yet.
-
[1.8.9] Custom Walls issues
What do you mean it "didn't work"?
-
[1.7.10] Custom Gui for custom crafting table.
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))
-
1.9 Changes to Forge?
myItem.setRegistryName("myItemIsCool"); GameRegistry.register(myItem); Also, getRegistryName() already returns a string, you don't need to .ToString() it.
-
[SOLVED][1.9] Mod doesn't work in SMP
You should really move the rendering stuff to a client proxy.
-
[1.7.10] Issue with identifying random item.
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.
-
MC 1.7.10 Custom walls connecting
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.
-
[1.8.9][SOLVED] Tile Entity's Tank not updating (wrongly) client-side
Your update function still bypasses the change that doesn't get tracked on the client, on the client.
-
Custom Crop with 15 Ages
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.
-
[1.7.10]Connecting Blocks
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)
-
[SOLVED] [1.8.9] Rotating an entity with the player.
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); }
-
[1.7.10] Custom Gui for custom crafting table.
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.
-
1.9 Changes to Forge?
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.
-
[1.7.10] Issue with identifying random item.
Also, oh god, that if-stack checking whether the item given was equal to an array of stuff. Jesus christ. Cleaned it up
-
I can`t find any sources on making name tags above blocks? [1.7.10]
The NBT in my context was the NBT tag attached to an item stack, not the TileEntity's saveToNBT
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
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.
IPS spam blocked by CleanTalk.