Everything posted by Draco18s
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Its funny what reading does. [14:07:11] [server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
return handleClientMessage(Minecraft.getMinecraft().thePlayer, message, ctx); Oh jesus christ. The server still has to LOAD the code for this class and make sure it's valid. It can't do that if you include a reference to a client sided object.
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Anything inside a package called "client" is for the client only and is marked @SideOnly(Side.CLIENT)
-
[1.7.10] Testing mod in Eclipse on Server - Crash from my network registry
Client code present on dedicated server. Fix yo shit.
-
[1.7.10] [Solved] Custom Events?
Event ev = new MyCustomEvent(); theEventBus.post(ev); Where theEventBus is a reference to an event bus (as there are several), eg. MinecraftForge.EVENT_BUS.post(ev), and you can even write your own if you feel the need, it's basically just a priority-sorted list of the listener functions which are called in order when post() is executed.
-
[1.7.10] [Solved] How do I get nbt data from a TileEntity?
The emphasis here is that you implement writeNBT and readNBT, you don't call them (the only common exception being getDescriptionPacket and onDataPacket, as that's a form of save/load except that it's the sync between server and client rather than to disk*). *IMO the override implementation used is something that should have been in the base TileEntity class, but which isn't because very few of the Vanilla TEs use it as they have special packets that sync their data, rather than the generic packet used for mod TEs.
-
[1.7.10] [Solved] Custom Events?
You extend Event and post it to the bus. Which bus is up to you, but at least pick one that makes sense. Don't put an update event on the ore gen bus, for example.
-
[1.7.10] local entity coordinates to global coordinates
sin(10) = 0.174 sin(-10) = -0.174 You can't just arbitrarily modify the rotation value. If you absolutely must use a positive value, add 360 (in degrees, or 2*PI in radians).
-
[1.7.10] [Solved] How do I get nbt data from a TileEntity?
Unless you are doing Dirty Things and know what you're trying to do. E.g. configure an entity that is placed as part of structure generation, and the values you want to set aren't public (for example, making a spawner spawn a custom mob on a much longer than default timer or place a specific painting). NBT can give you access to values that aren't, and shouldn't be, public but sometimes you have to go "I need this to be like this for a good reason." (Note: if either of those two examples can be done without modifying the NBT, using reflection, or ASM, I'd be happy to update the code).
-
[1.7.10] local entity coordinates to global coordinates
http://lmgtfy.com/?q=local+to+global+coordinate+transformation Long story short: it involves a lot of math, and its a lot of math that has existing packages to help you with. But doing it by hand is quite possible and really not that hard, as long as you understand how to multiply matricies (the MSDN link is probably the most useful).
-
[1.8] [Solved] Adding custom Mob to the entities a Zombie will attack
The only thing to be aware of is that the EntityConstructed event fires before those fields are initialized.
-
[1.7.10] set an ItemStack to dead
And what magical itemstack is this?
-
[1.7.10] set an ItemStack to dead
Really?
-
[1.7.10] set an ItemStack to dead
Jesus.
-
[1.7.10] set an ItemStack to dead
You don't. Can't. You get it from the event object, like your already doing.
-
[1.7.10] set an ItemStack to dead
Then you need to set the event to canceled and set the EntityItem to dead. OR Remove the item from the player's inventory. Nulling the local variable doesn't do anything, you need to null the inventory's reference to it.
-
[1.7.10] Gradle packaging dependencies into mod jar.
Honestly, no idea. I managed to get that, due to having multiple jar files I wish to publish (so I have a task for each one). Not sure why you're getting what you're getting with the regular build, and I don't know enough about the build scripts to know how to tweak the default task.
-
[1.8]Rendering Custom Potion Icon
Well, the "width" and "height" there aren't "size on screen" they're "width and height of the texture region." And right now your code says "use as many texture pixels as the game window is large."
-
[1.7.10] Gradle packaging dependencies into mod jar.
Apologies, for some reason I missed the scroll bar before. I remember even checking twice to see if there was more (as I was seeing only the one section). Hmm. Ok then. Try adding this: task exclusionBuild(type: Jar) { baseName = archivesBaseName+"_noAPIs" from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'mcmod.info','enviromine/**','cofh/**' } } exclusionBuild.dependsOn('reobf') Then, instead of "gradlew build" do "gradlew build exclusionBuild" (You can name the task whatever you'd like, of course).
-
[1.8]Rendering Custom Potion Icon
Might help if you bound the texture before drawing it to the screen.
-
[1.7.10] set an ItemStack to dead
ItemStacks are not entities. Entities can be dead, ItemStacks are nullified. Dropped items are EntityItem entities that contain an ItemStack.
-
[1.7.10] Gradle packaging dependencies into mod jar.
That can't be your entire build file. The default one Forge ships looks like this: buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.0" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "modid" minecraft { version = "1.7.10-10.13.2.1352-1.7.10" runDir = "eclipse" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } The important bit here, is from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } You can exclude more things there, if you need to. Say from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info','enviromine/**','cofh/**' }
-
[1.8] Creating an Unique Tool with Durability [SOLVED]
@Override public boolean hasContainerItem(ItemStack itemstack) { return false; } Dude. False? Really?
-
[1.8] Creating an Unique Tool with Durability [SOLVED]
1) Extend ItemTool 2) Have it override hasContainerItem and getContainerItem . These will cause it to be left in the crafting grid and take damage (getContainerItem should return the same stack given, but with 1 point more damage).
-
[1.7.10] How to stop potion effect particles from being rendered?
I'd first try setting the applifier negative. For invisibility and night vision, there is no mechanical effect, but if that stops the particles, that would be the best solution. Failing that, the data watcher, as if you're invisible you should be.....invisible.
IPS spam blocked by CleanTalk.