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. 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.
  2. 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.
  3. Anything inside a package called "client" is for the client only and is marked @SideOnly(Side.CLIENT)
  4. Client code present on dedicated server. Fix yo shit.
  5. Draco18s replied to a post in a topic in Modder Support
    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.
  6. 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.
  7. Draco18s replied to a post in a topic in Modder Support
    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.
  8. 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).
  9. 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).
  10. 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).
  11. The only thing to be aware of is that the EntityConstructed event fires before those fields are initialized.
  12. And what magical itemstack is this?
  13. You don't. Can't. You get it from the event object, like your already doing.
  14. 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.
  15. 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.
  16. 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."
  17. 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).
  18. Might help if you bound the texture before drawing it to the screen.
  19. ItemStacks are not entities. Entities can be dead, ItemStacks are nullified. Dropped items are EntityItem entities that contain an ItemStack.
  20. 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/**' }
  21. @Override public boolean hasContainerItem(ItemStack itemstack) { return false; } Dude. False? Really?
  22. 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).
  23. 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.

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.