Everything posted by Earthcomputer
-
[1.7.10][SOLVED] Coremod not loading in eclipse
-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.
-
[Solved] Can't figure out git
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
-
[Help] Prevent player from falling off mount
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
-
[1.8] Getting BlockAir BlockPos Passed
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);
-
[1.8] various questions about Entites and Why zombies dont atack this
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
-
[1.8] Getting BlockAir BlockPos Passed
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
-
[1.7.10] How to set NBT data for resulting itemstack
if (!itemstack.hasTagCompound()) itemstack.setTagCompound(new NBTTagCompound()); itemstack.getTagCompound().setInteger("", 5); Please learn basic Java before modding Minecraft.
-
[Solved] Can't figure out git
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
-
ModEventHandler not working for me
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
-
[Solved] Can't figure out git
None of them work
-
[Solved] Can't figure out git
Tried deleting remote repo, and the local .git file, redoing the steps. Result still exactly the same
-
[Solved] Can't figure out git
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
-
[Solved] Can't figure out git
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
-
[Read Comments at Page 2][1.8]--Custom Crafting Table not Removing Ingredients
If you're only having problems with shift-right-clicking, then your problem is probably in the transferStackInSlot method
-
How to make an entity invlunerable and unable to be pushed?
Is that a 'this is solved'?
-
Custom chat text formatting?
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.
-
[Read Comments at Page 2][1.8]--Custom Crafting Table not Removing Ingredients
Cerandior, yes, you're right. I meant open the *container* server side
-
[Read Comments at Page 2][1.8]--Custom Crafting Table not Removing Ingredients
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
-
Disable Layers in Forge?
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
-
[1.8] Tool that can be used only once.
Override methods such as hitEntity and onBlockDestroyed. To destroy the item, use stack.damageItem(Integer. MAX_VALUE, attacker)
-
Disable Layers in Forge?
What do you mean by 'disable'? Don't use layers if you don't want them
-
How to make an entity invlunerable and unable to be pushed?
Hm, what version of mc are you using? The method is about three quarters way down the class Entity in 1.8
-
Play Minecraft Sound Effect to Client
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
-
How to make an entity invlunerable and unable to be pushed?
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.
-
[1.8]SLOVED-Obj model not load
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.
IPS spam blocked by CleanTalk.