Jump to content

[1.10.2] Armor Model Changing on Keybind


EscapeMC

Recommended Posts

Hello! First off, if you refuse to help me due to this request being in 1.10.2, I understand. I really shouldn't be asking about this version but I like this version and do not wish to move up as packs I am making are in this version.

 

Now, if you're still around, thank you!

 

What I am trying to do is make a set of armor that has a texture, but then on a key-bind give you a potion effect and also change the armor texture.

 

So, my question is:

 

How would I make a set of armor and an item, that upon wearing the full set, holding an item, and right-clicking the item, would change the armor model and give the potion effect, until the item is right-clicked again, in which it would turn off the potion effect and revert the armor model back to its original?

 

If you need any clarification as of what I mean, please ask as that may be a bit confusing.

Lastly, two things. One, no I am not asking you to spoon-feed me this information. Maybe a reference to keybindings and testing for all armor on an item would be great, or maybe instructions on how to do this specific task.

 

Two, thanks to all who read this far and are willing to help me!

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Anyone Please?

 

I really want to get this.

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Do you want to completely change the texture - or just the color? Just changing the color (like Leather Armor) is extremely easy (look at how `ItemArmor` does it). If you actually want to change the model/texture... I have no idea how to do that.

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Link to comment
Share on other sites

No, I wish to change the model of the armor while the player is wearing it. So, maybe from all black to all white.

No crafting changes, just changing the model.

 

 

Also one more question, I am trying to use the variable Minecraft in a method, and whenever I put it inside of my method (onItemRightClick), it gives me the error of "The method onItemRightClick(ItemStack, World, EntityPlayer, EnumHand, Minecraft) of type Bell must override or implement a supertype method"

 

How would I solve this, without removing the @Override annotation?

 

Or would I just not be able to do that, as i am not making a custom method?

EDIT:

 

Fixed that part. Never mind it.

 

I have this

 

	@Override
	public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
		
		if(playerIn.inventory.armorItemInSlot(3) != null && playerIn.inventory.armorItemInSlot(3).getItem() == ModItems.wraithHelmet &&
			playerIn.inventory.armorItemInSlot(2) != null && playerIn.inventory.armorItemInSlot(2).getItem() == ModItems.wraithChestplate &&
			playerIn.inventory.armorItemInSlot(1) != null && playerIn.inventory.armorItemInSlot(1).getItem() == ModItems.wraithLeggings &&
			playerIn.inventory.armorItemInSlot(0) != null && playerIn.inventory.armorItemInSlot(0).getItem() == ModItems.wraithBoots) {
	
//				playerIn.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("invisibility"), 1000, 1));
				
				if(isVis = false) {
					isVis = true;
				}else if(isVis = true) {
					isVis = false;
				}else{
					System.out.println("Failed to Vis");
				}
			
				itemStackIn.damageItem(1, playerIn);
		
		}
				
				changeVis(mc);
				return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStackIn);
					
	}
	
	public void changeVis(Minecraft mc) {
		
		if(isVis = true) { 
			mc.thePlayer.setInvisible(false);
			System.out.println(isVis);
			System.out.println("Should be False");
		}else if(isVis = false){
			mc.thePlayer.setInvisible(true);
			System.out.println(isVis);
			System.out.println("Should be True");
		}
		
		if(mc.thePlayer.capabilities.disableDamage = false) {
			mc.thePlayer.capabilities.disableDamage = true;
		}else if(mc.thePlayer.capabilities.disableDamage = true) {
			mc.thePlayer.capabilities.disableDamage = false;
		}

 

and when I right click this item I get the crash of

 

Spoiler

[13:14:45] [Client thread/FATAL]: Unreported exception thrown!
java.lang.NullPointerException
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.changeVis(wraithBell.java:61) ~[wraithBell.class:?]
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.onItemRightClick(wraithBell.java:53) ~[wraithBell.class:?]
	at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:162) ~[ItemStack.class:?]
	at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:495) ~[PlayerControllerMP.class:?]
	at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1544) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2184) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:1961) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1749) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1055) ~[Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:371) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
[13:14:45] [Client thread/INFO]: [net.minecraft.init.Bootstrap:printToSYSOUT:560]: ---- Minecraft Crash Report ----
// I just don't know what went wrong :(

Time: 7/31/17 1:14 PM
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.changeVis(wraithBell.java:61)
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.onItemRightClick(wraithBell.java:53)
	at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:162)
	at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:495)
	at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1544)
	at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2184)
	at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:1961)
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1749)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1055)
	at net.minecraft.client.Minecraft.run(Minecraft.java:371)
	at net.minecraft.client.main.Main.main(SourceFile:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.changeVis(wraithBell.java:61)
	at com.github.escapemc.deadbydaylightmod.items.wraithBell.onItemRightClick(wraithBell.java:53)
	at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:162)
	at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClick(PlayerControllerMP.java:495)
	at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1544)
	at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2184)
	at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:1961)

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player147'/324, l='MpServer', x=-303.07, y=70.00, z=217.67]]
	Chunk stats: MultiplayerChunkCache: 591, 591
	Level seed: 0
	Level generator: ID 00 - default, ver 1. Features enabled: false
	Level generator options: 
	Level spawn location: World: (-256,64,244), Chunk: (at 0,4,4 in -16,15; contains blocks -256,0,240 to -241,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 13094 game time, 13094 day time
	Level dimension: 0
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
	Forced entities: 104 total; [EntityBat['Bat'/64, l='MpServer', x=-375.08, y=19.40, z=166.48], EntityPig['Pig'/66, l='MpServer', x=-373.28, y=65.00, z=170.49], EntityZombie['Zombie'/67, l='MpServer', x=-378.50, y=40.00, z=190.50], EntityZombie['Zombie'/68, l='MpServer', x=-378.53, y=39.00, z=187.91], EntitySkeleton['Skeleton'/69, l='MpServer', x=-382.50, y=35.00, z=201.50], EntityPig['Pig'/73, l='MpServer', x=-361.36, y=69.00, z=142.26], EntityPig['Pig'/74, l='MpServer', x=-358.49, y=68.00, z=152.75], EntityPig['Pig'/75, l='MpServer', x=-353.83, y=68.00, z=154.20], EntitySkeleton['Skeleton'/83, l='MpServer', x=-351.50, y=14.00, z=159.50], EntitySkeleton['Skeleton'/84, l='MpServer', x=-351.50, y=14.00, z=161.50], EntitySkeleton['Skeleton'/92, l='MpServer', x=-321.31, y=33.00, z=142.60], EntityPig['Pig'/95, l='MpServer', x=-327.51, y=69.00, z=187.25], EntityBat['Bat'/96, l='MpServer', x=-335.63, y=30.10, z=204.27], EntityPig['Pig'/97, l='MpServer', x=-326.51, y=69.00, z=205.22], EntityPig['Pig'/98, l='MpServer', x=-334.54, y=71.00, z=236.26], EntityCow['Cow'/99, l='MpServer', x=-320.57, y=69.00, z=235.19], EntityPig['Pig'/100, l='MpServer', x=-333.30, y=64.00, z=245.48], EntityZombie['Zombie'/108, l='MpServer', x=-318.50, y=33.00, z=142.50], EntitySkeleton['Skeleton'/109, l='MpServer', x=-319.50, y=33.00, z=142.50], EntityBat['Bat'/110, l='MpServer', x=-318.32, y=17.92, z=160.41], EntityPig['Pig'/111, l='MpServer', x=-314.29, y=65.00, z=147.51], EntityPig['Pig'/112, l='MpServer', x=-310.50, y=64.00, z=146.46], EntityPig['Pig'/113, l='MpServer', x=-308.59, y=71.00, z=181.75], EntityPig['Pig'/114, l='MpServer', x=-317.89, y=69.00, z=208.55], EntityPig['Pig'/115, l='MpServer', x=-306.51, y=70.00, z=222.22], EntityZombie['Zombie'/116, l='MpServer', x=-306.16, y=45.00, z=232.64], EntityPlayerSP['Player147'/324, l='MpServer', x=-303.07, y=70.00, z=217.67], EntityZombie['Zombie'/117, l='MpServer', x=-315.28, y=57.00, z=239.51], EntityPig['Pig'/118, l='MpServer', x=-315.22, y=71.00, z=226.57], EntityCow['Cow'/119, l='MpServer', x=-306.78, y=70.00, z=237.53], EntityZombie['Zombie'/120, l='MpServer', x=-301.80, y=58.00, z=255.51], EntityPig['Pig'/121, l='MpServer', x=-311.47, y=64.00, z=256.24], EntityCreeper['Creeper'/122, l='MpServer', x=-308.50, y=37.00, z=280.50], EntityZombie['Zombie'/123, l='MpServer', x=-311.50, y=37.00, z=292.50], EntityCreeper['Creeper'/133, l='MpServer', x=-288.50, y=20.00, z=139.50], EntityZombie['Zombie'/134, l='MpServer', x=-298.41, y=15.00, z=156.22], EntityPig['Pig'/135, l='MpServer', x=-297.53, y=63.00, z=144.28], EntityZombie['Zombie'/136, l='MpServer', x=-301.50, y=19.00, z=164.50], EntityCreeper['Creeper'/137, l='MpServer', x=-300.50, y=19.00, z=168.50], EntityPig['Pig'/138, l='MpServer', x=-299.62, y=70.00, z=207.73], EntityPig['Pig'/139, l='MpServer', x=-288.78, y=71.00, z=210.76], EntityPig['Pig'/140, l='MpServer', x=-293.49, y=70.00, z=215.27], EntityCow['Cow'/141, l='MpServer', x=-293.78, y=70.00, z=209.64], EntityPig['Pig'/142, l='MpServer', x=-302.58, y=70.00, z=238.21], EntityCow['Cow'/143, l='MpServer', x=-299.17, y=69.00, z=237.54], EntityPig['Pig'/144, l='MpServer', x=-299.25, y=70.00, z=227.43], EntityPig['Pig'/145, l='MpServer', x=-290.50, y=70.00, z=282.25], EntitySheep['Sheep'/146, l='MpServer', x=-296.23, y=76.00, z=294.61], EntityCreeper['Creeper'/160, l='MpServer', x=-286.50, y=20.00, z=140.50], EntityCreeper['Creeper'/162, l='MpServer', x=-284.50, y=20.00, z=139.50], EntityCreeper['Creeper'/164, l='MpServer', x=-282.50, y=21.00, z=146.50], EntityCreeper['Creeper'/165, l='MpServer', x=-275.50, y=20.00, z=151.50], EntitySkeleton['Skeleton'/166, l='MpServer', x=-280.50, y=35.00, z=187.50], EntityChicken['Chicken'/167, l='MpServer', x=-280.64, y=71.00, z=185.81], EntityZombie['Zombie'/168, l='MpServer', x=-273.50, y=28.00, z=202.50], EntityBat['Bat'/169, l='MpServer', x=-272.25, y=47.89, z=206.25], EntityPig['Pig'/170, l='MpServer', x=-275.39, y=63.00, z=197.17], EntityCow['Cow'/171, l='MpServer', x=-275.14, y=71.00, z=214.47], EntityPig['Pig'/172, l='MpServer', x=-281.26, y=71.00, z=210.53], EntityZombie['Zombie'/173, l='MpServer', x=-276.50, y=14.00, z=242.50], EntityCreeper['Creeper'/174, l='MpServer', x=-287.50, y=20.00, z=252.50], EntityEnderman['Enderman'/175, l='MpServer', x=-286.57, y=20.00, z=253.51], EntitySheep['Sheep'/176, l='MpServer', x=-275.62, y=72.00, z=281.75], EntitySheep['Sheep'/177, l='MpServer', x=-279.73, y=78.00, z=296.48], EntityPig['Pig'/178, l='MpServer', x=-280.23, y=76.00, z=289.34], EntityPig['Pig'/179, l='MpServer', x=-278.50, y=76.00, z=290.33], EntitySkeleton['Skeleton'/190, l='MpServer', x=-268.70, y=17.00, z=140.86], EntitySpider['Spider'/191, l='MpServer', x=-269.50, y=30.00, z=143.50], EntityZombie['Zombie'/192, l='MpServer', x=-267.50, y=30.00, z=138.50], EntityBat['Bat'/193, l='MpServer', x=-259.72, y=13.06, z=146.98], EntityCreeper['Creeper'/195, l='MpServer', x=-264.50, y=17.00, z=156.50], EntitySkeleton['Skeleton'/196, l='MpServer', x=-264.50, y=17.00, z=155.50], EntityEnderman['Enderman'/197, l='MpServer', x=-263.58, y=19.00, z=144.52], EntityBat['Bat'/198, l='MpServer', x=-265.18, y=22.17, z=146.17], EntityBat['Bat'/199, l='MpServer', x=-266.57, y=32.10, z=157.31], EntityCreeper['Creeper'/200, l='MpServer', x=-269.50, y=50.00, z=149.50], EntityZombie['Zombie'/201, l='MpServer', x=-257.50, y=34.00, z=174.50], EntityPig['Pig'/202, l='MpServer', x=-258.27, y=63.00, z=162.63], EntitySkeleton['Skeleton'/203, l='MpServer', x=-258.50, y=30.00, z=187.50], EntitySkeleton['Skeleton'/204, l='MpServer', x=-263.50, y=26.00, z=177.50], EntitySkeleton['Skeleton'/205, l='MpServer', x=-258.50, y=26.00, z=207.50], EntityCreeper['Creeper'/206, l='MpServer', x=-267.18, y=29.00, z=206.50], EntityCreeper['Creeper'/207, l='MpServer', x=-262.70, y=26.00, z=205.98], EntitySkeleton['Skeleton'/208, l='MpServer', x=-258.50, y=26.00, z=209.50], EntityCreeper['Creeper'/209, l='MpServer', x=-267.50, y=25.00, z=220.50], EntityItem['item.item.egg'/210, l='MpServer', x=-270.42, y=71.00, z=219.71], EntityPig['Pig'/211, l='MpServer', x=-271.76, y=71.00, z=221.28], EntityCow['Cow'/212, l='MpServer', x=-265.50, y=72.00, z=228.21], EntityPig['Pig'/213, l='MpServer', x=-268.80, y=71.00, z=265.70], EntityPig['Pig'/214, l='MpServer', x=-257.43, y=72.00, z=284.75], EntityPig['Pig'/215, l='MpServer', x=-269.25, y=75.00, z=284.64], EntityPig['Pig'/216, l='MpServer', x=-271.27, y=76.00, z=297.51], EntityPig['Pig'/224, l='MpServer', x=-252.22, y=66.00, z=167.49], EntityChicken['Chicken'/225, l='MpServer', x=-240.37, y=68.00, z=211.03], EntityItem['item.item.egg'/226, l='MpServer', x=-247.36, y=69.00, z=217.30], EntitySquid['Squid'/227, l='MpServer', x=-240.57, y=48.20, z=253.19], EntityPig['Pig'/233, l='MpServer', x=-231.25, y=72.00, z=152.50], EntityPig['Pig'/234, l='MpServer', x=-238.43, y=74.00, z=149.76], EntityChicken['Chicken'/235, l='MpServer', x=-224.57, y=64.00, z=204.77], EntitySpider['Spider'/237, l='MpServer', x=-231.50, y=14.00, z=211.50], EntityCow['Cow'/238, l='MpServer', x=-233.82, y=68.00, z=218.70], EntityChicken['Chicken'/239, l='MpServer', x=-225.88, y=67.00, z=225.45], EntityCow['Cow'/240, l='MpServer', x=-225.33, y=64.00, z=233.45], EntitySkeleton['Skeleton'/506, l='MpServer', x=-373.50, y=15.00, z=141.50]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2660)
	at net.minecraft.client.Minecraft.run(Minecraft.java:400)
	at net.minecraft.client.main.Main.main(SourceFile:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.10.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_144, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 417683488 bytes (398 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
	FML: MCP 9.32 Powered by Forge 12.18.3.2185 4 mods loaded, 4 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeBin-1.10.2-12.18.3.2185.jar) 
	UCHIJAAAA	Forge{12.18.3.2185} [Minecraft Forge] (forgeBin-1.10.2-12.18.3.2185.jar) 
	UCHIJAAAA	dbdm{1.0} [Dead By Daylight Mod] (bin) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.53' Renderer: 'GeForce GTX 1070/PCIe/SSE2'
	Launched Version: 1.10.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 1070/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.53, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 12x AMD Ryzen 5 1600 Six-Core Processor 
[13:14:45] [Server thread/INFO]: Applying holder lookups
[13:14:45] [Server thread/INFO]: Holder lookups applied
[13:14:45] [Client thread/INFO]: [net.minecraft.init.Bootstrap:printToSYSOUT:560]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\crazy\Desktop\Games (Raw)\Minecraft Stuff\Mods\My Mods\DeadByDaylightMod\run\.\crash-reports\crash-2017-07-31_13.14.45-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

In case you want it, the entire code for the wraithBell is

 

Spoiler


package com.github.escapemc.deadbydaylightmod.items;

import com.github.escapemc.deadbydaylightmod.Reference;
import com.github.escapemc.deadbydaylightmod.init.ModItems;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;

public class wraithBell extends Item {

	private static Minecraft mc;
	private boolean isVis = false;
	
	public wraithBell() {
		
		this.setMaxStackSize(1);
		setUnlocalizedName(Reference.ModItems.WRAITHBELL.getUnlocalizedName());
		setRegistryName(Reference.ModItems.WRAITHBELL.getRegistryName());

		
	}
	
	@Override
	public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
		
		if(playerIn.inventory.armorItemInSlot(3) != null && playerIn.inventory.armorItemInSlot(3).getItem() == ModItems.wraithHelmet &&
			playerIn.inventory.armorItemInSlot(2) != null && playerIn.inventory.armorItemInSlot(2).getItem() == ModItems.wraithChestplate &&
			playerIn.inventory.armorItemInSlot(1) != null && playerIn.inventory.armorItemInSlot(1).getItem() == ModItems.wraithLeggings &&
			playerIn.inventory.armorItemInSlot(0) != null && playerIn.inventory.armorItemInSlot(0).getItem() == ModItems.wraithBoots) {
	
//				playerIn.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("invisibility"), 1000, 1));
				
				if(isVis = false) {
					isVis = true;
				}else if(isVis = true) {
					isVis = false;
				}else{
					System.out.println("Failed to Vis");
				}
			
				itemStackIn.damageItem(1, playerIn);
		
		}
				
				changeVis(mc);
				return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStackIn);
					
	}
	
	public void changeVis(Minecraft mc) {
		
		if(isVis = true) { 
			mc.thePlayer.setInvisible(false);
			System.out.println(isVis);
			System.out.println("Should be False");
		}else if(isVis = false){
			mc.thePlayer.setInvisible(true);
			System.out.println(isVis);
			System.out.println("Should be True");
		}
		
		if(mc.thePlayer.capabilities.disableDamage = false) {
			mc.thePlayer.capabilities.disableDamage = true;
		}else if(mc.thePlayer.capabilities.disableDamage = true) {
			mc.thePlayer.capabilities.disableDamage = false;
		}

		
	}
				
}

 

Thanks to all who help

 

 

Edited by EscapeMC

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

5 hours ago, EscapeMC said:

java.lang.NullPointerException

 

5 hours ago, EscapeMC said:

private static Minecraft mc;

5 hours ago, EscapeMC said:

changeVis(mc);

Well, here is the cause of your NPE. The mc field is null as you've never assigned anything to it.

Minecraft is a client-side only class. Using it like that will crash the server. Why on earth are you even using it to get the player when you have the player passed to you as an argument?

 

5 hours ago, EscapeMC said:

private boolean isVis = false;

Items are singletons. This means that changing this field will affect all items that are an instance of wraithBell. ItemStack is what you need to work with if you want to have some data that is unique to a specific... welll ItemStack.

 

Please refrain from using logging to debug. The debugger and breakpoints exist for a reason.

 

5 hours ago, EscapeMC said:

Potion.getPotionFromResourceLocation("invisibility")

->

MobEffects.INVISIBILITY. 

 

Now all that out of the way:

I assume you want the armor to become invisible with the player as they use your bell item, correct? Item::getArmorTexture has the ItemSteack of the armor as it's parameter - you can check for, say, a specific boolean being set to true in that stack's NBT and return a texture that is completely transparent.

Link to comment
Share on other sites

Yes i do, I want the armor to disappear along with the player.

 

So is what I have (sort of) correct? Or what exactly need I do to get this? adding mc = new Minecraft(); gives an error, and I am really not sure on what to do.

 

Really, what is the needed plan for me to be able to get the player and the armor invisible.

Edited by EscapeMC

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

56 minutes ago, EscapeMC said:

So is what I have (sort of) correct? Or what exactly need I do to get this? adding mc = new Minecraft(); gives an error, and I am really not sure on what to do.

I'll repeat myself:

On 8/1/2017 at 1:25 AM, V0idWa1k3r said:

Why on earth are you even using it to get the player when you have the player passed to you as an argument?

 

56 minutes ago, EscapeMC said:

Really, what is the needed plan for me to be able to get the player and the armor invisible.

 1.  Override Item::getArmorTexture in your armor class and make it do the following:

  • Check for a boolean value stored in the NBT of the ItemStack passed to the method as an argument.
  • If it is true: return a texture that is completely transparent
  • If it is false: return your normal armor texture.

 2.  In your wraithBell's onItemRightClick class modify that boolean value of armor's NBT if your conditions are correct.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Selamat datang di Gacor88 salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor Gacor88 ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini Gacor88.
    • Selamat datang di Casino88 salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor Casino88 ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini Casino88.
    • https://cdjh.short.gy/slotsc Selamat datang di Senangcasino88 salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor Senangcasino88 ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini Senangcasino88.
    • Selamat datang di Rajadomino salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor Rajadomino ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini Rajadomino.
    • Selamat datang di IDRkasino salah satu situs slot gacor gampang menang hari ini di Indonesia yang sangat menjajikan. Slot gacor adalah adalah suatu istilah yang digunakan untuk menjelaskan sebuah permainan slot gampang menang di situs slot online. Situs slot gacor IDRkasino ini bisa menjadi populer walaupun terbilang baru karena RTP slot online yang disajikan begitu tinggi. Seiring dengan perkembangan zaman situs slot gacor terbaru ini juga sudah update dari segi teknologi yang menggunakan HTML5, inilah yang membuat grafis permainan terlihat begitu modern, audio lebih jernih, dan user interface yang smooth. Tidak dipungkiri grafis yang kami memiliki sudah menarik banyak sekali pendatang baru yang ingin merasakan terbawa dalam suasana tema permainan mesin slot. Kehadiran slot gacor menjadi angin segar bagi para pecinta judi online, memberikan alternatif permainan yang seru dan menguntungkan. Tak heran jika popularitas slot gacor terus meningkat, menarik minat para pemain baru untuk mencoba peruntungan mereka di situs slot gacor hari ini IDRkasino.
  • Topics

×
×
  • Create New...

Important Information

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