matt1999rd
Members-
Posts
133 -
Joined
-
Last visited
Everything posted by matt1999rd
-
switchrail-1.0.jar here is the new file with modification. I have moved my main class that were in the main directory switchrail into a sub directory and it had caused failure
-
when intellij rename file does it work the same way ?
-
I have found in the directory bin default the wrong case but after changing SwitchRail to switchrail it is not working and sending the same error
-
maybe it needn't lowercase in the project name ?
-
when I look into my document it says that it is in fr/mattmouss/switchrail. how can I have lowercase in all place ? I don't know where I can find the wrong writing
-
le voila switchrail-1.0.jar
-
I have tried to load my mod on minecraft but it crash and show this crashreport : ---- Minecraft Crash Report ---- // This doesn't make any sense! Time: 21/12/19 18:28 Description: Initializing game java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:78) ~[?:28.0] {} at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:208) ~[?:?] {} at net.minecraftforge.fml.ModLoader.lambda$buildMods$23(ModLoader.java:190) ~[?:?] {} at net.minecraftforge.fml.ModLoader$$Lambda$1946/458582664.apply(Unknown Source) ~[?:?] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_51] {} at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1683) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[?:1.8.0_51] {} at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_51] {} at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_51] {} at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:190) ~[?:?] {} at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$15(ModLoader.java:149) ~[?:?] {} at net.minecraftforge.fml.ModLoader$$Lambda$1943/1802627471.apply(Unknown Source) ~[?:?] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_51] {} at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_51] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[?:1.8.0_51] {} at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_51] {} at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_51] {} at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_51] {} at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:151) ~[?:?] {} at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:68) ~[?:?] {pl:runtimedistcleaner:A} at net.minecraftforge.fml.client.ClientModLoader$$Lambda$1925/1821215584.run(Unknown Source) ~[?:?] {} at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:84) ~[?:?] {pl:runtimedistcleaner:A} at net.minecraftforge.fml.client.ClientModLoader$$Lambda$1926/1336343423.run(Unknown Source) ~[?:?] {} at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:68) ~[?:?] {pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:453) [?:?] {pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:365) [?:?] {pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(SourceFile:155) [?:?] {} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {} at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) [forge-1.14.4-28.0.11.jar:28.0] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$343/1807911555.call(Unknown Source) [forge-1.14.4-28.0.11.jar:28.0] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-3.0.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-3.0.2.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:68) [modlauncher-3.0.2.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:80) [modlauncher-3.0.2.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-3.0.2.jar:?] {} Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_51] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_51] {} at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:73) ~[?:28.0] {} ... 41 more Caused by: net.minecraftforge.fml.ModLoadingException: Mod Loading Exception : fml.modloading.failedtoloadmodclass [net.minecraftforge.fml.loading.moddiscovery.ModInfo@769a1df5, CONSTRUCT, java.lang.ClassNotFoundException: fr.mattmouss.switchrail.other.SwitchRailMod] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:77) ~[?:28.0] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_51] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_51] {} at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:73) ~[?:28.0] {} ... 41 more Caused by: java.lang.ClassNotFoundException: fr.mattmouss.switchrail.other.SwitchRailMod at java.lang.ClassLoader.findClass(ClassLoader.java:530) ~[?:1.8.0_51] {} at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_51] {} at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:102) ~[modlauncher-3.0.2.jar:?] {} at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_51] {} at java.lang.Class.forName0(Native Method) ~[?:1.8.0_51] {} at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_51] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:71) ~[?:28.0] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_51] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_51] {} at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:73) ~[?:28.0] {} ... 41 more
-
yes I have found it but it did not work because I think it missed the main function. So how can I run gradlew build properly ?
-
I have finished a mod and I try to create a jar file that contains the actual mod using gradlew build. When I do it, it says that build has been done successfully but I don't see any repertory called build/libs so where it is ? or why is it not working ?
-
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
I know how I can do what I wanted but I just don't know what are the argument of the method AbstractGui#blit ... -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
can I use the interface IGuiListener for using the function mouseClicked and if so what do its argument actually stand for ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
okay I cannot do what I want... if container allow creating multiple connection at a time is there a way to use it but with button instead of item ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
and is it like multiple windows on computer or only one screen is activated at the same time ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
I want to have a screen which opens screens in its method is it possible ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
well that is right I have check the wrong class file... but it is not the point I have got a question now : can I open multiple screen with button inside and that we can clicked on the button inside the blockbecause that the solution I choose for my problem -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
as I look at the CheckBoxButton it never mention the ResourceLocation corresponding to the checkbox.png file so how this can render it ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
I want to make a GUI that look like this : Within the black part I put a grid of where switch are and I can change the direction directly from this gui -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
I don't understand what you mean... If I use render from super I get the normal aspect and without I did not show up And I am not sure that I can do what I want because I want to make a GUI that shows button corresponding to blocks in world. -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
If I render the block using super I get the button normal texture and I have changed Widget because It wasn't working How to render something ? -
[1-14-newer] how to make a button with a specified texture ?
matt1999rd replied to matt1999rd's topic in Modder Support
It is for the gui : public class ControllerScreen extends Screen { private ResourceLocation GUI = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/controller_gui.png"); private static final int WIDTH = 206; private static final int HEIGHT = 152; public int scaleX = 16; public int scaleY = 11; boolean addone =false; boolean delone =true; public Button ZoomInButton ; public Button ZoomOutButton ; public SwitchButton FirstSwitchButton ; private static final int white = 0xffffff; private TileEntity te; public ControllerScreen(TileEntity tileEntity) { super(new StringTextComponent("Switch Controller")); te = tileEntity; } public void init() { int relX = (this.width-WIDTH) / 2; int relY = (this.height-HEIGHT) / 2; addButton(new Button(relX+12, relY+122, 146, 20, "Done", button-> onClose())); ZoomInButton = new Button(relX+160, relY+26, 39, 20, "Zoom+", button-> ZoomIn()); ZoomOutButton = new Button(relX+160, relY+47, 39, 20, "Zoom-", button-> ZoomOut()); addButton(ZoomInButton); addButton(ZoomOutButton); FirstSwitchButton = new SwitchButton(relX+13, relY+22, scaleX, scaleY, "", SwitchType.TRIPLE, new BlockPos(0,0,0)); addButton(FirstSwitchButton); } @Override public boolean isPauseScreen() { return true; } public void changeSwitch(){ } public void ZoomOut(){ System.out.println("Zoom - active"); scaleX = (addone) ? scaleX + 1 : scaleX + 2 ; addone = !addone; delone = !delone; scaleY += 1; } public void ZoomIn(){ System.out.println("Zoom + active"); scaleX = (delone) ? scaleX - 1 : scaleX - 2 ; delone = !delone; addone = !addone; scaleY -= 1; } @Override public void render(int mouseX, int mouseY, float partialTicks) { GlStateManager.color4f(1.0F,1.0F,1.0F,1.0F); this.minecraft.getTextureManager().bindTexture(GUI); int relX = (this.width-WIDTH) / 2; int relY = (this.height-HEIGHT) / 2; this.blit(relX,relY,0,0,WIDTH,HEIGHT); this.drawString(Minecraft.getInstance().fontRenderer,"RailSystem",relX+10,relY+10,white); this.drawString(Minecraft.getInstance().fontRenderer,scaleX+" X "+scaleY,relX+160,relY+68,white); ZoomOutButton.active = (scaleX != 16); ZoomInButton.active = (scaleX != 4); FirstSwitchButton.visible = true; FirstSwitchButton.setWidth(scaleX); FirstSwitchButton.setHeight(scaleY); //displaySwitch(relX,relY); GlStateManager.enableBlend(); super.render(mouseX, mouseY, partialTicks); } private void displaySwitch(int RelativeX,int RelativeY){ List<SwitchData> switches = ((ControllerTile)te).getSwitch(); if (!switches.isEmpty()) { int i = 20; for (SwitchData data : switches) { this.drawString(Minecraft.getInstance().fontRenderer, data.type.getName()+" : "+data.pos.toString(), RelativeX + 10, RelativeY + i, white); i += 10; } } } } and here is the code of my button : package fr.mattmouss.switchrail.gui; import fr.mattmouss.switchrail.SwitchRailMod; import fr.mattmouss.switchrail.switchdata.SwitchType; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.AbstractGui; import net.minecraft.client.gui.widget.Widget; import net.minecraft.client.gui.widget.button.AbstractButton; import net.minecraft.client.gui.widget.button.Button; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; public class SwitchButton extends Widget { SwitchType type; BlockPos pos; private ResourceLocation SW_BUTTON_9x9 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_9x9.png"); private ResourceLocation SW_BUTTON_10x10 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_10x10.png"); private ResourceLocation SW_BUTTON_11x11 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_11x11.png"); private ResourceLocation SW_BUTTON_13x12 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_13x12.png"); private ResourceLocation SW_BUTTON_14x14 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_14x14.png"); private ResourceLocation SW_BUTTON_18x16 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_18x16.png"); private ResourceLocation SW_BUTTON_20x19 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_20x19.png"); private ResourceLocation SW_BUTTON_28x24 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_28x24.png"); private ResourceLocation SW_BUTTON_36x33 = new ResourceLocation(SwitchRailMod.MODID,"textures/gui/sw_button_36x33.png"); public SwitchButton(int widthIn, int heightIn, int width, int height, String text,SwitchType type,BlockPos pos) { super(widthIn,heightIn,width,height,text); this.type = type; this.pos = pos; } @Override public void render(int mouseX, int mouseY, float partialTicks) { ResourceLocation SW_BUTTON_TEXTURE_USED ; switch (this.width){ case 16: SW_BUTTON_TEXTURE_USED = SW_BUTTON_9x9; break; case 14: SW_BUTTON_TEXTURE_USED = SW_BUTTON_10x10; break; case 13: SW_BUTTON_TEXTURE_USED = SW_BUTTON_11x11; break; case 11: SW_BUTTON_TEXTURE_USED = SW_BUTTON_13x12; break; case 10: SW_BUTTON_TEXTURE_USED = SW_BUTTON_14x14; break; case 8: SW_BUTTON_TEXTURE_USED = SW_BUTTON_18x16; break; case 7: SW_BUTTON_TEXTURE_USED = SW_BUTTON_20x19; break; case 5: SW_BUTTON_TEXTURE_USED = SW_BUTTON_28x24; break; case 4: SW_BUTTON_TEXTURE_USED = SW_BUTTON_36x33; break; default: throw new IllegalArgumentException("no such scaleX authorised !! "); } Minecraft.getInstance().getTextureManager().bindTexture(SW_BUTTON_TEXTURE_USED); //super.render(mouseX, mouseY, partialTicks); } } -
I am doing a mod with a special button and I don't know how to display it on the gui I have already done. I use the line Minecraft.getInstance().getTextureManager().bindTexture(SW_BUTTON_TEXTURE_USED); but I did not show it on screen How can I make it visible ? for information the ResourceLocation is found and the boolean is at True
-
[1.14-newer] how to keep value when closing minecraft
matt1999rd replied to matt1999rd's topic in Modder Support
it works well with Capability thanks