Jump to content

Earthcomputer

Forge Modder
  • Posts

    114
  • Joined

  • Last visited

Everything posted by Earthcomputer

  1. -Dfml.coreMods.load=code.elix_x.coremods.antiidconflict.AntiIdConflictCore Note the equals sign. Why do you need to make a coremod? FML handles ID conflicts internally.
  2. Thanks jebelar! Busy life, still haven't had chance, but will give it a try Edit: got the chance to try out source tree, got it to work in five minutes. Thanks for your help everyone
  3. There are only a few cases I know of that causes a player to be dismounted: The player presses shift The player is in a minecart and goes over a powered activator rail The player is mounting and untamed horse and the horse throws the player off The entity the player is riding is killed Another mod causes it for some reason Which of these reasons do you want to prevent? Edit: as diesieben07 pointed out below, you can also get dismounted in water
  4. Going back to my previous answer about the instanceof check, instead of returning false, you could return IBlockState state = w.getBlockState(pos); return state.getBlock().isAir(w, state);
  5. To address one of your questions, you want zombies to avoid your mob. This is easily done using events: @SubscribeEvent public void entityConstructing(EntityConstructing evt) { if (evt.entity instanceof EntityZombie) { EntityZombie zombie = (EntityZombie) evt.entity; zombie.tasks.add(new EntityAIAvoidEntity(zombie, new Predicate<Entity>() { @Override public boolean apply(Entity entity) { return entity instanceof mobMercenario && ((mobMercenario) entity).isTargetingZombies(); } }, 6, 1, 1.2); } } Hope it helps I don't know much about modelling, so I can't help you much with that I'm afraid
  6. I don't know why the wrong block is being passed to your method, but you could possibly solve your problem by using an instanceof check: if (!(w.getBlockState(pos).getBlock() instanceof BlockYourAir)) return false; // Not too sure what to return here, but at least it will stop the crash
  7. if (!itemstack.hasTagCompound()) itemstack.setTagCompound(new NBTTagCompound()); itemstack.getTagCompound().setInteger("", 5); Please learn basic Java before modding Minecraft.
  8. Thanks for all your suggestions. I will definitely give source tree a try. The main reason I wanted to use the command line is so I could write a batch file to build and push my project in one command, but source tree certainly sounds easier
  9. For listening to events from event buses, use @SubscribeEvent. If you look at the Javadocs for @EventHandler, you would see that it is mainly used to manage the lifecycle of your mod
  10. Tried deleting remote repo, and the local .git file, redoing the steps. Result still exactly the same
  11. I figured out what I did wrong about gradle/, I pushed it to github before adding it to gitignore *facepalm*. But I'm still having the problem that I can't add the subdirectories of src. I've tried everything: git add ., git add *, git add --all, git add src, git add src --all but whenever I run git commit, I get the following message: On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: src (modified content) no changes added to commit (use "git add" and/or "git commit -a") Edit: I copied diesieben07's .gitignore, still doesn't work. To see what I mean about the src folder, https://github.com/Earthcomputer/Ultra-Adventure is my git repo
  12. I'm making a forge mod, and am getting quite frustrated trying to figure out how to get my mod uploaded to github. After much frustration trying to use egit, I decided to use plain old command line git, which I've had the most success with. I managed to push the project to github, but I can't figure out how not to upload the folder gradle/wrapper/ and the file CREDITS-fml.txt. Also, when I push the project, the src directory is empty on the remote side. Here is my .gitignore file: # eclipse bin *.launch .settings .metadata .classpath .project # idea out *.ipr *.iws *.iml .idea # gradle build .gradle # other eclipse run CREDITS-fml.txt gradle forge-1.8-11.14.4.1565-changelog.txt gradlew gradlew.bat LICENSE-fml.txt MinecraftForge-Credits.txt MinecraftForge-License.txt Paulscode IBXM Library License.txt Paulscode SoundSystem CodecIBXM License.txt README.txt Thanks in advance for help
  13. If you're only having problems with shift-right-clicking, then your problem is probably in the transferStackInSlot method
  14. You can also change the font server-side by sending a resource pack to the client when they log in, but clients can decline and it can take a while to download.
  15. You made a mistake in the onBlockActivated method of your block class: openGui should only be called on the server. Strange, but true I don't think it's possible for onBlockActivated to be called if the player is sneaking
  16. Sorry, I was unclear with my wording. If you don't want to use layers, put everything in layer0. Most vanilla items do this - it shouldn't be too difficult to find an example
  17. Override methods such as hitEntity and onBlockDestroyed. To destroy the item, use stack.damageItem(Integer. MAX_VALUE, attacker)
  18. What do you mean by 'disable'? Don't use layers if you don't want them
  19. Hm, what version of mc are you using? The method is about three quarters way down the class Entity in 1.8
  20. No I think the OP wants this to be client-side only. world.playSoundEffect is the way to go, and yes, if called on the client, it is client-side only
  21. For making an entity invulnerable: If it is a custom entity override the method isEntityInvulnerable(DamageSource). Otherwise, use the LivingHurtEvent and cancel it if necessary.
  22. You need proxies for this kind of thing. Any *reference* to a class/field/method with the @SideOnly annotation that is detected on the wrong side will crash the game, even if the code isn't ever executed. Try and run your mod on a "dedicated* server, and you'll see it chashes.
×
×
  • Create New...

Important Information

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