-
Posts
17 -
Joined
-
Last visited
-
Days Won
1
Everything posted by NoFuchsGavin
-
[FML]: Attempting connection with missing mods [] at CLIENT
NoFuchsGavin replied to mikewu63's topic in Support & Bug Reports
a.) Yeah maybe it would help posting log-Files, even if it's not giving more information: b.) How do you think it's a Cauldron problem? Just because someone posted a link of a similar problem. I've installed Forge on a "Fedora 26" Server hosted by Hetzner and got the same problem. Maybe you can answer us what this message is exactly telling us. Additionaly you may got the answer. -
Can you explain further. This is not very helpful if you are not providing any example, how it is done right.
-
https://stackoverflow.com/documentation/minecraft/9956/modding-with-forge/30642/adding-custom-sounds-to-your-mod
-
[1.8] [SOLVED] Overriding left mouse click on an Item
NoFuchsGavin replied to SnowyEgret's topic in Modder Support
Maybe you guys are interested in: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/1432708-custom-arm-animation-stopping-swing So you will not stop the animation, but override the default one with a new one :-) -
[1.8] [SOLVED] Overriding left mouse click on an Item
NoFuchsGavin replied to SnowyEgret's topic in Modder Support
This does not work on this type of event because it is not implemented. I do have subscriped the following method in my item class: @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true) public void onEvent(PlayerInteractEvent.LeftClickEmpty event) { //This is always called when the player attacks if (getItemIsHoldinHand().equals(ItemHoldInHand.NONE)) { //Do nothing if it is not hold return; } //Check if the attack can be handled if (this instanceof AttackItem) { //interface with the onAttack method ((AttackItem) this).attackClicked(event.getEntityPlayer(), event.getWorld(), event.getEntityLiving(),event.getEntity()); try{ event.setCanceled(true); }catch(IllegalArgumentException illegalArgument){ LOGGER.log(Level.INFO, "Could not cancel event will try to set other parameters"); event.setResult(Event.Result.DENY); event.setPhase(EventPriority.LOWEST); } } Overriding following method in your CustomItem @Override public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) { return true; //Handled to do not a swing } Will just stop doing a swing, when clicking a Block (mining it) but will do a swing when in LeftClick.Empty.... I will try more -
[1.8]Disable pickaxe swing animation? is posible
NoFuchsGavin replied to perromercenary00's topic in Modder Support
@Override public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) { return true; //Handled to do not a swing } But on the Event: PlayerInteractEvent.LeftClickEmpty event still remains an animation where the hand is going down and up. -
I do have the follwing error when starting my Mod Client: So I checked my: sounds.json and it looks like { "p99_shot": { "category" : "player", "sounds": [{ "name": "p99/shot", "stream": false } ] }, "p99_reload": { "category" : "player", "sounds": [{ "name": "p99/reload", "stream": false } ] }, "bullet_flyby": { "category" : "player", "sounds": [ { "name": "bullet/flyby01", "stream": false }, { "name": "bullet/flyby02", "stream": false }, { "name": "bullet/flyby03", "stream": false }, { "name": "bullet/flyby04", "stream": false }, { "name": "bullet/flyby05", "stream": false }, { "name": "bullet/flyby06", "stream": false }, { "name": "bullet/flyby07", "stream": false }, { "name": "bullet/flyby08", "stream": false }, { "name": "bullet/flyby09", "stream": false } ] } } My files are all there, in the directory: C:\Modding\mod1\src\main\resources\assets\survivethis\sounds\p99\ C:\Modding\mod1\src\main\resources\assets\survivethis\sounds\bullet\ containing all the files of type "*.ogg" What did I miss?
-
What is about remapping keys for attack. Attack on "H" so this will not be on the LeftClick anymore.
-
@Abastro I think this will not work as I expect. I thought it's possible to override the attack that I can use an item like I wanna to. Pistol -> shoot. So I need to override the default logic for the attack: Do not hit the block infront of the player Do no animation for hitting ....
-
@Abastro So instead of using isPressed on the attack keybinding, isKeyDown() will work?
-
Forge 1.11.2 installation error
NoFuchsGavin replied to Scorpion_33's topic in Support & Bug Reports
He means the installer (attached screenshot) What exactly are you trying to do? 1. Install MDK to create your own MOD 2. Install Forge to play with MODs? -
All of you faced this problem. And now me, too. I wrote some code to catch Keyboard events. like: @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public void onEvent(InputEvent.KeyInputEvent event) { if (itemIsHoldinHand.equals(ItemHoldInHand.NONE)) { //Do nothing if it is not hold return; } String keyBindingDescKey = "key.attack"; // make local copy of key binding array KeyBinding[] keyBindings = Minecraft.getMinecraft().gameSettings.keyBindings; for (KeyBinding binding : keyBindings) { if (keyBindingDescKey.equals(binding.getDescriptionKey()) && /*IMPORTANT to do this on second check because its counter based and will reset other key actions when it hits*/ binding.isPressed()) { return; } } } This code works well as the attack key is bound to a keyboard key like: R, A, ... But at default the attack key is bound to KeyCode: -100 (Left mouse button) But thats not the main problem, I knew that there is another event for catching mousecation like: @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public void onEvent(InputEvent.MouseInputEvent event) { if (itemIsHoldinHand.equals(ItemHoldInHand.NONE)) { //Do nothing if it is not hold return; } ... String keyBindingDescKey = "key.attack"; // make local copy of key binding array KeyBinding[] keyBindings = Minecraft.getMinecraft().gameSettings.keyBindings; for (KeyBinding binding : keyBindings) { if (keyBindingDescKey.equals(binding.getDescriptionKey()) && /*This same pattern never hits....*/ binding.isPressed()) { return; } } } But doing the same thing as before results in nothing. Even trying to do: @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public void onEvent(InputEvent.MouseInputEvent event) { if (itemIsHoldinHand.equals(ItemHoldInHand.NONE)) { //Do nothing if it is not hold return; } boolean isPressed = Minecraft.getMinecraft().gameSettings.keyBindAttack.isPressed(); if(isPressed){ System.out.println("Hell yeah"); } } Is getting me no result. So I am asking you guys . Is there any pattern, how to or possibility to access the left mouse click (user friendly) PS: I did add it to the EVENT_BUS MinecraftForge.EVENT_BUS.register(ModItems.ItemGun);
-
Access custom messages from .lang File
NoFuchsGavin replied to NoFuchsGavin's topic in Modder Support
It not documented anywhere I just imported the wrong. -
I do have the problem I want to access the messages from the en_us.lang File I am using 1.11.2 - 13.20.0.2296 I am trying something like: if(!Init.isInitialized()) { Language currentLanguage = Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage(); ResourceLocation loc = new ResourceLocation(MODID, String.format("%s.%s", currentLanguage.getLanguageCode(), "lang")); InputStream resourceInputStream = Minecraft.getMinecraft().getResourceManager().getResource(loc).getInputStream(); Init.init(); //Init.fileInit(resourceInputStream); This is not possible because it has private access } //This is what I want to do to replace the tooltip with a description I defined for the item description = I18n.translate(this.getUnlocalizedName() + SurviveThis.DESC_SUFFIX); I am stuck. Google does not help me ....
-
You are completely right I have read this in the "pack.mcmeta" file Thank you
-
Hi together, I am new to modding and I started yesterday with modding. So I downloaded the current forge version: 1.11.2 - 13.20.0.2296 (which is not recommended I know, but as I am a dev aswell I wanted to start with this. So I created everything to run it with Intellij like it is documented in the official documentation. I started to create my very first item then, but instead of implementing the item directly I implemented a "parent" classw which keeps all the basic information. My child class inherits everything and is just changing the "identifier" which is used ti create registry name and unlocalized name for the item. So the interface with the methode "getIdentifier()" is used in the parental class to call setUnlocalizedName(getIdentifier()) setRegistryName(getIdentifier()) and will result in: item.child child So I created the resources under resources -> assets -> modid -> lang resources -> assets -> modid -> models resources -> assets -> modid -> textures And everything works finde the textures are shown, now "purple black cube", except the loading of the name. As I think the unlocalized name is used to refer to the .lang-file, because it shows me in the game: item.child.name it is not resolving the name: I do have defined under the assets -> modid -> lang Path a en_US.lang - File which contains the line: item.child.name=Child Name! The file is encoded UTF-8 (without BOM/Standard) and has no trailling or other whitespace strings. Am I missing something or is this a Bug. If you want I can provide the source as .zip/.tar however